home *** CD-ROM | disk | FTP | other *** search
/ XML Bible (2nd Edition) / XML_Bible_Second_Edition_Hungry_Minds_2001.iso / mac / specs / XML-MathML-20010221 / xml / content-markup.xml < prev    next >
Text File  |  2001-01-30  |  275KB  |  7,649 lines

  1. <div1 id="contm" role="chapter4"><head>Content Markup</head>
  2. <!-- $Id: content-markup.xml,v 1.91 2001/01/30 11:45:47 jsdevitt Exp $ -->
  3.  
  4. <!--
  5. Principal Authors
  6. Stephen Buswell: overall design; organization and original text
  7. of documentation.
  8. Stan Devitt: design revision.
  9. -->
  10. <div2 id = "contm_intro">
  11. <head>Introduction</head>
  12. <div3>
  13. <head>The Intent of Content Markup</head>
  14. <p>As has been noted in the introductory section of this Recommendation, mathematics can be distinguished by its use of a (relatively) formal language, mathematical notation. However, mathematics and its presentation should not be viewed as one and the same thing. Mathematical sums or products exist and are meaningful to many applications completely without regard to how they are rendered aurally or visually. The intent of the content markup in the Mathematical Markup Language is to provide an explicit encoding of the 
  15. <emph>underlying mathematical structure</emph> of an expression, rather than any particular rendering for the expression.</p>
  16. <p>There are many reasons for providing a specific encoding for content. Even a disciplined and systematic use of presentation tags cannot properly capture this semantic information. This is because without additional information it is impossible to decide whether a particular presentation was chosen deliberately to encode the mathematical structure or simply to achieve a particular visual or aural effect. Furthermore, an author using the same encoding to deal with both the presentation and mathematical structure might find a particular presentation encoding unavailable simply because convention had reserved it for a different semantic meaning.</p>
  17. <p>The difficulties stem from the fact that there are many to one mappings from presentation to semantics and vice versa. For example the mathematical construct 
  18. <quote>
  19. <mi>H</mi> multiplied by 
  20. <mi>e</mi></quote> is often encoded using an explicit operator as in
  21. <mi>H</mi> × 
  22. <mi>e</mi>. In different presentational contexts, the multiplication operator might be invisible
  23. <quote>
  24. <mi>H</mi> 
  25. <mi>e</mi></quote>, or rendered as the spoken word
  26. <quote>times</quote>. Generally, many different presentations are possible depending on the context and style preferences of the author or reader. Thus, given 
  27. <quote>
  28. <mi>H</mi> 
  29. <mi>e</mi></quote> out of context it may be impossible to decide if this is the name of a chemical or a mathematical product of two variables 
  30. <mi>H</mi> and 
  31. <mi>e</mi>.</p>
  32. <p>Mathematical presentation also changes with culture and time: some expressions in combinatorial mathematics today have one meaning to a Russian mathematician, and quite another to a French mathematician; see 
  33. <specref ref = "mixing_notsheet"/> for an example. Notations may lose currency, for example the use of musical sharp and flat symbols to denote maxima and minima 
  34. <bibref ref = "Chaundy1954"/>. A notation in use in 1644 for the multiplication mentioned above was
  35. <graphic role = "inline" source = "image/f4001.gif" alt = "\blacksquare"/>
  36. <mi>H</mi>
  37. <mi>e</mi> 
  38. <bibref ref = "Cajori1928"/>.</p>
  39. <p>When we encode the underlying mathematical structure explicitly, without regard to how it is presented aurally or visually, we are able to interchange information more precisely with those systems that are able to manipulate the mathematics. In the trivial example above, such a system could substitute values for the variables 
  40. <mi>H</mi> and 
  41. <mi>e</mi> and evaluate the result. Further interesting application areas include interactive textbooks and other teaching aids.</p></div3>
  42. <div3>
  43. <head>The Scope of Content Markup</head>
  44. <p>The semantics of general mathematical notation is not a matter of consensus. It would be an enormous job to systematically codify most of mathematics – a task that can never be complete. Instead, MathML makes explicit a relatively small number of commonplace mathematical constructs, chosen carefully to be sufficient in a large number of applications. In addition, it provides a mechanism for associating semantics with new notational constructs. In this way, mathematical concepts that are not in the base collection of elements can still be encoded (<specref ref = "contm_synsem"/>).</p>
  45. <p>The base set of content elements is chosen to be adequate for simple coding of most of the formulas used from kindergarten to the end of high school in the United States, and probably beyond through the first two years of college, that is up to A-Level or Baccalaureate level in Europe. Subject areas covered to some extent in MathML are:
  46. <ulist>
  47. <item>
  48. <p>arithmetic, algebra, logic and relations</p></item>
  49. <item>
  50. <p>calculus and vector calculus</p></item>
  51. <item>
  52. <p>set theory</p></item>
  53. <item>
  54. <p>sequences and series</p></item>
  55. <item>
  56. <p>elementary classical functions</p></item>
  57. <item>
  58. <p>statistics</p></item>
  59. <item>
  60. <p>linear algebra</p></item></ulist>It is not claimed, or even suggested, that the proposed set of elements is complete for these areas, but the provision for author extensibility greatly alleviates any problem omissions from this finite list might cause.</p></div3>
  61. <div3>
  62. <head>Basic Concepts of Content Markup</head>
  63. <p>The design of the MathML content elements are driven by the following principles:
  64. <ulist>
  65. <item>
  66. <p>The expression tree structure of a mathematical expression should be directly encoded by the MathML content elements.</p></item>
  67. <item>
  68. <p>The encoding of an expression tree should be explicit, and not dependent on the special parsing of 
  69. <kw>PCDATA</kw> or on additional processing such as operator precedence parsing.</p></item>
  70. <item>
  71. <p>The basic set of mathematical content constructs that are provided should have default mathematical semantics.</p></item>
  72. <item>
  73. <p>There should be a mechanism for associating specific mathematical semantics with the constructs.</p></item></ulist></p>
  74. <p>The primary goal of the content encoding is to establish explicit connections between mathematical structures and their mathematical meanings. The content elements correspond directly to parts of the underlying mathematical expression tree. Each structure has an associated default semantics and there is a mechanism for associating new mathematical definitions with new constructs.</p>
  75. <p>Significant advantages to the introduction of content-specific tags include:
  76. <ulist>
  77. <item>
  78. <p>Usage of presentation elements is less constrained. When mathematical semantics are inferred from presentation markup, processing agents must either be quite sophisticated, or they run the risk of inferring incomplete or incorrect semantics when irregular constructions are used to achieve a particular aural or visual effect.</p></item>
  79. <item>
  80. <p>It is immediately clear which kind of information is being encoded simply by the kind of elements that are used.</p></item>
  81. <item>
  82. <p>Combinations of semantic and presentation elements can be used to convey both the appearance and its mathematical meaning much more effectively than simply trying to infer one from the other.</p></item></ulist></p>
  83. <p>Expressions described in terms of content elements must still be rendered. For common expressions, default visual presentations are usually clear. 
  84. <quote>Take care of the sense and the sounds will take care of themselves</quote> wrote Lewis Carroll 
  85. <bibref ref = "Carroll1871"/>. Default presentations are included in the detailed description of each element occurring in 
  86. <specref ref = "contm_elem"/>.</p>
  87. <p>To accomplish these goals, the MathML content encoding is based on the concept of an expression tree. A content expression tree is constructed from a collection of more primitive objects, referred to herein as
  88. <emph>containers</emph> and 
  89. <emph>operators</emph>. MathML possesses a rich set of predefined container and operator objects, as well as constructs for combining containers and operators in mathematically meaningful ways. The syntax and usage of these content elements and constructions is described in the next section.</p></div3></div2>
  90. <div2 id = "contm_usage">
  91. <head>Content Element Usage Guide</head>
  92. <p>Since the intent of MathML content markup is to encode mathematical expressions in such a way that the mathematical structure of the expression is clear, the syntax and usage of content markup must be consistent enough to facilitate automated semantic interpretation. There must be no doubt when, for example, an actual sum, product or function application is intended and if specific numbers are present, there must be enough information present to reconstruct the correct number for purposes of computation. Of course, it is still up to a MathML-compliant processor to decide what is to be done with such a content-based expression, and computation is only one of many options. A renderer or a structured editor might simply use the data and its own built-in knowledge of mathematical structure to render the object. Alternatively, it might manipulate the object to build a new mathematical object. A more computationally oriented system might attempt to carry out the indicated operation or function evaluation.</p>
  93. <p>The purpose of this section is to describe the intended, consistent usage. The requirements involve more than just satisfying the syntactic structure specified by an XML DTD. Failure to conform to the usage as described below will result in a MathML error, even though the expression may be syntactically valid according to the DTD.</p>
  94. <p>In addition to the usage information contained in this section, 
  95. <specref ref = "contm_elem"/> gives a complete listing of each content element, providing reference information about their attributes, syntax, examples and suggested default semantics and renderings. The rules for using presentation markup within content markup are explained in 
  96. <specref ref = "mixing_pmincm"/>. An informal EBNF grammar describing the syntax for the content markup is given in 
  97. <specref ref = "cmvg"/>.</p>
  98. <div3 id = "contm_cats">
  99. <head>Overview of Syntax and Usage</head>
  100. <p>MathML content encoding is based on the concept of an expression tree. 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.</p>
  101. <p>The MathML content elements can be grouped into the following categories based on their usage:
  102. <ulist>
  103. <item>
  104. <p>containers</p></item>
  105. <item>
  106. <p>operators and functions</p></item>
  107. <item>
  108. <p>qualifiers</p></item>
  109. <item>
  110. <p>relations</p></item>
  111. <item>
  112. <p>conditions</p></item>
  113. <item>
  114. <p>semantic mappings</p></item>
  115. <item>
  116. <p>constants and symbols</p></item></ulist>These are the building blocks out of which MathML content expressions are constructed. Each category is discussed in a separate section below. In the remainder of this section, we will briefly introduce some of the most common elements of each type, and consider the general constructions for combining them in mathematically meaningful ways.</p>
  117. <div4>
  118. <head>Constructing Mathematical Objects</head>
  119. <p>Content expression trees are built up from basic mathematical objects. At the lowest level, 
  120. <emph>leaf nodes</emph> are encapsulated in non-empty elements that define their type. Numbers and symbols are marked by the 
  121. <emph>token</emph> elements 
  122. <kw role = "element">cn</kw> and 
  123. <kw role = "element">ci</kw>. More elaborate constructs such as sets, vectors and matrices are also marked using elements to denote their types, but rather than containing data directly, these 
  124. <emph>container</emph> elements are constructed out of other elements. Elements are used in order to clearly identify the underlying objects. In this way, standard XML parsing can be used and attributes can be used to specify global properties of the objects.</p>
  125. <p>The containers such as
  126. <code><![CDATA[<cn>12345</cn>]]></code> ,
  127. <code><![CDATA[<ci>x</ci>]]></code> and  
  128. <code><![CDATA[<csymbol definitionURL="mySymbol.htm" encoding="text">S</csymbol>]]></code>represent mathematical numbers , identifiers and externally defined symbols. Below, we will look at 
  129. <kw role = "element">operator</kw> elements such as 
  130. <kw role = "element">plus</kw> or 
  131. <kw role = "element">sin</kw>, which provide access to the basic mathematical operations and functions applicable to those objects. Additional containers such as 
  132. <kw role = "element">set</kw> for sets, and 
  133. <kw role = "element">matrix</kw> for matrices are provided for representing a variety of common compound objects.</p>
  134. <p>For example, the number 12345 is encoded as
  135. <eg role = "mathml"><![CDATA[
  136. <cn>12345</cn>
  137. ]]></eg> The attributes and 
  138. <kw>PCDATA</kw> content together provide the data necessary for an application to parse the number. For example, a default base of 10 is assumed, but to communicate that the underlying data was actually written in base 8, simply set the
  139. <kw role = "attrib">base</kw>  attribute to 8 as in
  140. <eg role = "mathml"><![CDATA[
  141. <cn base="8">12345</cn>
  142. ]]></eg>while the complex number 3 + 4i can be encoded as
  143. <eg role = "mathml"><![CDATA[
  144. <cn type="complex-cartesian">3<sep/>4</cn>
  145. ]]></eg>Such information makes it possible for another application to easily parse this into the correct number.</p>
  146. <p>As another example, the scalar symbol
  147. <mi>v</mi> is encoded as
  148. <eg role = "mathml"><![CDATA[
  149. <ci>v</ci>
  150. ]]></eg>By default, 
  151. <kw role = "element">ci</kw> elements represent elements from a commutative field (see 
  152. <specref ref = "cedef"/>). If a vector is intended then this fact can be encoded as
  153. <eg role = "mathml"><![CDATA[
  154. <ci type="vector">v</ci>
  155. ]]></eg>This invokes default semantics associated with the 
  156. <kw role = "element">vector</kw> element, namely an arbitrary element of a finite-dimensional vector space.</p>
  157. <p>By using the 
  158. <kw role = "element">ci</kw> and 
  159. <kw role = "element">csymbol</kw> elements we have made clear that we are referring to a mathematical identifier or symbol but this does not say anything about how it should be rendered. By default a symbol is rendered as if the 
  160. <kw role = "element">ci</kw> or 
  161. <kw role = "element">csymbol</kw> element were actually the presentation element 
  162. <kw role = "element">mi</kw> (see 
  163. <specref ref = "presm_mi"/>).  The actual rendering of a mathematical symbol can be made as elaborate as necessary simply by using the more elaborate presentational constructs (as described in 
  164. <specref ref = "presm"/>) in the body of the 
  165. <kw role = "element">ci</kw> or 
  166. <kw role = "element">csymbol</kw> element.</p>
  167. <p>The default rendering of a simple 
  168. <kw role = "element">cn</kw>-tagged object is the same as for the presentation element 
  169. <kw role = "element">mn</kw> with some provision for overriding the presentation of the 
  170. <kw>PCDATA</kw> by providing explicit 
  171. <kw role = "element">mn</kw> tags. This is described in detail in 
  172. <specref ref = "contm_elem"/>.</p>
  173. <p>The issues for compound objects such as sets, vectors and matrices are all similar to those outlined above for numbers and symbols. Each such object has global properties as a mathematical object that impact how it is to be parsed. This may affect everything from the interpretation of operations that are applied to it to how to render the symbols representing it. These mathematical properties are captured by setting attribute values.</p></div4>
  174. <div4>
  175. <head>Constructing General Expressions</head>
  176. <p>The notion of constructing a general expression tree is essentially that of applying an operator to sub-objects. For example, the sum 
  177. <mi>a</mi> +
  178. <mi>b</mi> can be thought of as an application of the addition operator to two arguments 
  179. <mi>a</mi> and 
  180. <mi>b</mi>. In MathML, elements are used for operators for much the same reason that elements are used to contain objects. They are recognized at the level of XML parsing, and their attributes can be used to record or modify the intended semantics. For example, with the MathML 
  181. <kw role = "element">plus</kw> element, setting the
  182. <kw role = "attrib">definitionURL</kw> and 
  183. <kw role = "attrib">encoding</kw> attributes as in
  184. <eg role = "mathml-fragment"><![CDATA[
  185. <plus definitionURL="www.example.com/VectorCalculus.htm"
  186.       encoding="text"/>
  187. ]]></eg>can communicate that the intended operation is vector-based.</p>
  188. <p>There is also another reason for using elements to denote operators. There is a crucial semantic distinction between the function itself and the expression resulting from applying that function to zero or more arguments which must be captured. This is addressed by making the functions self-contained objects with their own properties and providing an explicit
  189. <kw role = "element">apply</kw> construct corresponding to function application. We will consider the 
  190. <kw role = "element">apply</kw> construct in the next section.</p>
  191. <p>MathML contains many pre-defined operator elements, covering a range of mathematical subjects. However, an important class of expressions involve unknown or user-defined functions and symbols. For these situations, MathML provides a general 
  192. <kw role = "element">csymbol</kw> element, which is discussed below.</p></div4>
  193. <div4>
  194. <head>The 
  195. <kw role = "element">apply</kw> construct</head>
  196. <p>The most fundamental way of building up a mathematical expression in MathML content markup is the 
  197. <kw role = "element">apply</kw> construct. An
  198. <kw role = "element">apply</kw> element typically applies an operator to its arguments. It corresponds to a complete mathematical expression. Roughly speaking, this means a piece of mathematics that could be surrounded by parentheses or 
  199. <quote>logical brackets</quote> without changing its meaning.</p>
  200. <p>For example, (<mi>x</mi> + 
  201. <mi>y</mi>) might be encoded as
  202. <eg role = "mathml"><![CDATA[
  203. <apply>
  204.   <plus/>
  205.   <ci> x </ci>
  206.   <ci> y </ci>
  207. </apply>
  208. ]]></eg>The opening and closing tags of 
  209. <kw role = "element">apply</kw> specify exactly the scope of any operator or function. The most typical way of using 
  210. <kw role = "element">apply</kw> is simple and recursive. Symbolically, the content model can be described as:
  211. <eg role = "mathml-extension"><apply> 
  212. <emph>op</emph> 
  213. <emph>a</emph> 
  214. <emph>b</emph> </apply></eg>where the 
  215. <emph>operands</emph> a and b are containers or other content-based elements themselves, and 
  216. <emph>op</emph> is an operator or function. Note that since 
  217. <kw role = "element">apply</kw> is a container, this allows 
  218. <kw role = "element">apply</kw> constructs to be nested to arbitrary depth.</p>
  219. <p>An 
  220. <kw role = "element">apply</kw> may in principle have any number of operands:
  221. <eg role = "mathml-extension"><![CDATA[
  222. <apply> op a b [c...] <apply>
  223. ]]></eg>For example, (<mi>x</mi> + 
  224. <mi>y</mi> + 
  225. <mi>z</mi>) can be encoded as
  226. <eg role = "mathml"><![CDATA[
  227. <apply>
  228.   <plus/>
  229.   <ci> x </ci>
  230.   <ci> y </ci>
  231.   <ci> z </ci>
  232. </apply>
  233. ]]></eg></p>
  234. <p>Mathematical expressions involving a mixture of operations result in nested occurrences of 
  235. <kw role = "element">apply</kw>. For example,
  236. <mi>a</mi>
  237. <mi>x</mi> + 
  238. <mi>b</mi> would be encoded as
  239. <eg role = "mathml"><![CDATA[
  240. <apply>
  241.   <plus/>
  242.   <apply>
  243.     <times/>
  244.     <ci> a </ci>
  245.     <ci> x </ci>
  246.   </apply>
  247.   <ci> b </ci>
  248. </apply>
  249. ]]></eg></p>
  250. <p>There is no need to introduce parentheses or to resort to operator precedence in order to parse the expression correctly. The 
  251. <kw role = "element">apply</kw> tags provide the proper grouping for the re-use of the expressions within other constructs. Any expression enclosed by an
  252. <kw role = "element">apply</kw> element is viewed as a single coherent object.</p>
  253. <p>An expression such as (<mi>F</mi> + 
  254. <mi>G</mi>)(<mi>x</mi>) might be a product, as in
  255. <eg role = "mathml"><![CDATA[
  256. <apply>
  257.   <times/>
  258.   <apply>
  259.     <plus/>
  260.     <ci> F </ci>
  261.     <ci> G </ci>
  262.   </apply>
  263.   <ci> x </ci>
  264. </apply>
  265. ]]></eg>or it might indicate the application of the function
  266. <mi>F</mi> + 
  267. <mi>G</mi> to the argument 
  268. <mi>x</mi>. This is indicated by constructing the sum
  269. <eg role = "mathml"><![CDATA[
  270. <apply>
  271.   <plus/>
  272.   <ci> F </ci>
  273.   <ci> G </ci>
  274. </apply>
  275. ]]></eg>and applying it to the argument 
  276. <mi>x</mi> as in
  277. <eg role = "mathml"><![CDATA[
  278. <apply>
  279.   <apply>
  280.     <plus/>
  281.     <ci> F </ci>
  282.     <ci> G </ci>
  283.     </apply>
  284.   <ci> x </ci>
  285. </apply>
  286. ]]></eg>Both the function and the arguments may be simple identifiers or more complicated expressions.</p>
  287. <p>In MathML 1.0 , another construction closely related to the use of the
  288. <kw role = "element">apply</kw> element with operators and arguments was the
  289. <kw role = "element">reln</kw> element. The 
  290. <kw role = "element">reln</kw> element was used to denote that a mathematical relation holds between its arguments, as opposed to applying an operator. Thus, the MathML markup for the expression 
  291. <mi>x</mi> < 
  292. <mi>y</mi> was given in MathML 1.0 by:
  293. <eg role = "mathml"><![CDATA[
  294. <reln>
  295.   <lt/>
  296.   <ci> x </ci>
  297.   <ci> y </ci>
  298. </reln>
  299. ]]></eg>In MathML 2.0, the 
  300. <kw role = "element">apply</kw> construct is used with all operators, including logical operators. The expression above becomes
  301. <eg role = "mathml"><![CDATA[
  302. <apply>
  303.   <lt/>
  304.   <ci> x </ci>
  305.   <ci> y </ci>
  306. </apply>
  307. ]]></eg>in MathML 2.0. The use of 
  308. <kw role = "element">reln</kw> with relational operators is supported
  309. for reasons of backwards compatibility, but  <intref ref =
  310. "interf_deprec">deprecated</intref>. Authors creating new content are
  311. encouraged to use  
  312. <kw role = "element">apply</kw> in all cases.</p></div4><!--
  313. removed 'and the <kw role="element">csymbol</kw> and
  314. <kw role="element">fn</kw> constructs' from this very long
  315. title, because references to this section looked terrible.
  316. -->
  317. <div4 id = "contm_deffun">
  318. <head>Explicitly defined functions and operators</head>
  319. <p>The most common operations and functions such as 
  320. <kw role = "element">plus</kw> and 
  321. <kw role = "element">sin</kw> have been predefined explicitly as empty elements (see 
  322. <specref ref = "contm_elem"/>). They have 
  323. <kw role = "attrib">type</kw> and 
  324. <kw role = "attrib">definitionURL</kw> attributes, and by changing these attributes, the author can record that a different sort of algebraic operation is intended. This allows essentially the same notation to be re-used for a discussion taking place in a different algebraic domain.</p>
  325. <p>Due to the nature of mathematics the notation 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.</p>
  326. <p>It is always possible to create arbitrary expressions, and then to use them as symbols in the language. Their properties can then be inferred directly from that usage as was done in the previous section. However, such an approach would preclude being able to encode the fact that the construct was a known symbol, or to record its mathematical properties except by actually using it. The 
  327. <kw role = "element">csymbol</kw> element is used as a container to construct a new symbol in much the same way that 
  328. <kw role = "element">ci</kw> is used to construct an identifier. (Note that
  329. <quote>symbol</quote> is used here in the abstract sense and has no connection with any presentation of the construct on screen or paper). The difference in usage is that 
  330. <kw role = "element">csymbol</kw> should refer to some mathematically defined concept with an external definition referenced via the 
  331. <kw role = "attrib">definitionURL</kw> attribute, whereas 
  332. <kw role = "element">ci </kw> is used for identifiers that are essentially
  333. <quote>local</quote> to the MathML expression and do not use any external definition mechanism. The target of the 
  334. <kw role = "attrib">definitionURL</kw> attribute on the 
  335. <kw role = "element">csymbol</kw> element may encode the definition in any format; the particular encoding in use is given by the
  336. <kw role = "attrib">encoding</kw> attribute.</p>
  337. <p>To use 
  338. <kw role = "element">csymbol</kw> to describe a completely new function, we write for example
  339. <eg role = "mathml"><![CDATA[
  340. <csymbol definitionURL="www.example.com/VectorCalculus.htm"
  341.          encoding="text">
  342.   Christoffel
  343. </csymbol>
  344. ]]></eg>The 
  345. <kw role = "attrib">definitionURL</kw> attribute specifies a URI that provides a written definition for the 
  346. <kw>Christoffel</kw> symbol. Suggested default definitions for the content elements of MathML appear in 
  347. <specref ref = "cedef"/> in a format based on OpenMath, although there is no requirement that a particular format be used. The role of the
  348. <kw role = "attrib">definitionURL</kw> attribute is very similar to the role of definitions included at the beginning of many mathematical papers, and which often just refer to a definition used by a particular book.</p>
  349. <p>MathML 1.0 supported the use of the 
  350. <kw>fn</kw> to encode the fact that a construct is explicitly being used as a function or operator. To record the fact that 
  351. <mi>F</mi>+ 
  352. <mi>G</mi> is being used semantically as if it were a function, it was encoded as:
  353. <eg role = "mathml"><![CDATA[
  354. <fn>
  355.   <apply>
  356.     <plus/>
  357.     <ci>F</ci>
  358.     <ci>G</ci>
  359.   </apply>
  360. </fn>
  361. ]]></eg>This usage, although allowed in MathML 2.0 for reasons of backwards compatibility,
  362. is now <intref ref="interf_deprec">deprecated</intref>.
  363. The fact that a construct is being used as an operator is clear from the position of the construct as the
  364. first child of the 
  365. <kw>apply</kw>. If it is required to add additional information to the construct, it should be wrapped in a 
  366. <kw>semantics</kw> element, for example:
  367. <eg role = "mathml"><![CDATA[
  368. <semantics definitionURL="www.example.com/vectorfuncs/plus.htm"
  369.            encoding="Mathematica">
  370.   <apply>
  371.     <plus/>
  372.     <ci>F</ci>
  373.     <ci>G</ci>
  374.   </apply>
  375. </semantics>
  376. ]]></eg></p>
  377. <p>MathML 1.0 supported the use of 
  378. <kw role = "attrib">definitionURL</kw> with
  379. <kw>fn</kw> to refer to external definitions for user-defined
  380. functions. This usage, although allowed for reasons of backwards
  381. compatibility, is <intref ref="interf_deprec">deprecated</intref> in
  382. MathML 2.0 in favor of using  
  383. <kw>csymbol</kw> to define the function, and then 
  384. <kw>apply</kw> to link the function to its arguments. For example:
  385. <eg role = "mathml"><![CDATA[
  386.   <apply>
  387.     <csymbol definitionURL="http://www.example.org/function_spaces.html#my_def"
  388.              encoding="text">
  389.       BigK
  390.     </csymbol>
  391.     <ci>x</ci>
  392.     <ci>y</ci>
  393.   </apply>
  394. ]]></eg></p></div4>
  395. <div4 id = "contm_inverseconstruct">
  396. <head>The inverse construct</head>
  397. <p>Given functions, it is natural to have functional inverses. This is handled by the 
  398. <kw role = "element">inverse</kw> element.</p>
  399. <p>Functional inverses can be problematic from a mathematical point of view in that they implicitly involve the definition of an inverse for an arbitrary function 
  400. <mi>F</mi>. Even at the K-through-12 level the concept of an inverse 
  401. <mi>F</mi> 
  402. <sup>-1</sup> of many common functions 
  403. <mi>F</mi> is not used in a uniform way. For example, the definitions used for the inverse trigonometric functions may differ slightly depending on the choice of domain and/or branch cuts.</p>
  404. <p>MathML adopts the view: if 
  405. <mi>F</mi> is a function from a domain
  406. <mi>D</mi> to 
  407. <mi>D</mi>', then the inverse
  408. <mi>G</mi> of 
  409. <mi>F</mi> is a function over
  410. <mi>D</mi>' such that
  411. <mi>G</mi>(<mi>F</mi>(<mi>x</mi>)) = 
  412. <mi>x</mi>  for
  413. <mi>x</mi> in 
  414. <mi>D</mi>. This definition does not assert that such an inverse exists for all or indeed any 
  415. <mi>x</mi> in 
  416. <mi>D</mi>, or that it is single-valued anywhere. Also, depending on the functions involved, additional properties such as
  417. <mi>F</mi>(<mi>G</mi>(<mi>y</mi>)) = 
  418. <mi>y</mi> for 
  419. <mi>y</mi> in
  420. <mi>D</mi>' may hold.</p>
  421. <p>The 
  422. <kw role = "element">inverse</kw> element is applied to a function whenever an inverse is required. For example, application of the inverse sine function to 
  423. <mi>x</mi>, i.e. sin<sup>-1</sup> (<mi>x</mi>), is encoded as:
  424. <eg role = "mathml"><![CDATA[
  425. <apply>
  426.   <apply> <inverse/> <sin/> </apply>
  427.   <ci> x </ci>
  428. </apply>
  429. ]]></eg>While 
  430. <kw role = "element">arcsin</kw> is one of the predefined MathML functions, an explicit reference to sin<sup>-1</sup>(<mi>x</mi>) might occur in a document discussing possible definitions of
  431. <kw role = "element">arcsin</kw>.</p></div4>
  432. <div4>
  433. <head>The declare construct</head>
  434. <p>Consider a document discussing the vectors
  435. <mi>A</mi> = (<mi>a</mi>, <mi>b</mi>, 
  436. <mi>c</mi>) and
  437. <mi>B</mi> = (<mi>d</mi>, <mi>e</mi>, 
  438. <mi>f</mi>), and later including the expression
  439. <mi>V</mi> = 
  440. <mi>A</mi> + 
  441. <mi>B</mi>. It is important to be able to communicate the fact that wherever
  442. <mi>A</mi> and 
  443. <mi>B</mi> are used they represent a particular vector. The properties of that vector may determine aspects of operators such as 
  444. <kw role = "element">plus</kw>.</p>
  445. <p>The simple fact that
  446. <mi>A</mi> is a vector can be communicated by using the markup
  447. <eg role = "mathml"><![CDATA[
  448. <ci type="vector">A</ci>
  449. ]]></eg>
  450. but this still does not communicate, for example, which vector is involved
  451. or its dimensions.</p>
  452.  
  453. <p>The <kw role="element">declare</kw> construct is used to associate
  454. specific properties or meanings with an object. The actual declaration
  455. itself is not rendered visually (or in any other form). However, it
  456. indirectly impacts the semantics of all affected uses of the declared
  457. object.</p>
  458.  
  459. <p>Declarations must occur at the beginning of a <kw role="element">math</kw>
  460. element. The scope of a declaration is the entire
  461. <kw role="element">math</kw> element in which the declaration is made.
  462. The <kw role="attrib">scope</kw> attribute of a <kw role="element">declare</kw>
  463. may be included but has no effect since the two possible values of
  464. <kw role="attval">local</kw> or <kw role="attval">global</kw>
  465. now have the same meaning. The <kw role="attval">global</kw> attribute value
  466. is still allowed for backwards compatibility with MathML 1.0.,
  467. but is <intref ref="interf_deprec">deprecated</intref> in MathML 2.0.</p>
  468.  
  469. <p>The uses of the <kw role="element">declare</kw> element range from
  470. resetting default attribute values to associating an expression with a
  471. particular instance of a more elaborate structure. Subsequent uses of the
  472. original expression (within the scope of the <kw
  473. role="element">declare</kw>) play the same semantic role as would the
  474. paired object.</p>
  475.  
  476. <p>For example, the declaration
  477. <eg role = "mathml"><![CDATA[
  478. <declare>
  479.   <ci> A </ci>
  480.   <vector>
  481.     <ci> a </ci>
  482.     <ci> b </ci>
  483.     <ci> c </ci>
  484.   </vector>
  485. </declare>
  486. ]]></eg>
  487. specifies that <mi>A</mi> stands for the particular vector (<mi>a</mi>,
  488. <mi>b</mi>, <mi>c</mi>) so that subsequent uses of <mi>A</mi> as in
  489. <mi>V</mi> = <mi>A</mi> + <mi>B</mi> can take this into account. When <kw
  490. role="element">declare</kw> is used in this way, the actual encoding
  491.  
  492. <eg role="mathml"><![CDATA[
  493. <apply>
  494.   <eq/>
  495.   <ci> V </ci>
  496.   <apply>
  497.     <plus/>
  498.     <ci> A </ci>
  499.     <ci> B </ci>
  500.   </apply>
  501. </apply>
  502. ]]></eg>remains unchanged but the expression can be interpreted properly as vector addition.</p>
  503. <p>There is no requirement to declare an expression to stand for a specific object. For example, the declaration
  504. <eg role = "mathml"><![CDATA[
  505. <declare type="vector">
  506.   <ci> A </ci>
  507. </declare>
  508. ]]></eg>specifies that 
  509. <mi>A</mi> is a vector without indicating the number of components or the values of specific components. The possible values for the 
  510. <kw role = "attrib">type</kw> attribute include all the predefined container element names such as 
  511. <kw role = "element">vector</kw>, 
  512. <kw role = "element">matrix</kw> or 
  513. <kw role = "element">set</kw> (see 
  514. <specref ref = "contm_typeattrib"/>).</p></div4>
  515. <div4>
  516. <head>The lambda construct</head>
  517. <p>The lambda calculus allows a user to construct a function from a variable and an expression. For example, the lambda construct underlies the common mathematical idiom illustrated here:
  518. <eg role = "text">Let 
  519. <mi>f</mi> be the function taking 
  520. <mi>x</mi> to 
  521. <mi>x</mi><sup>2</sup> + 2</eg></p>
  522. <p>There are various notations for this concept in mathematical literature, such as
  523. <graphic role="inline" source="image/f4002.gif" alt="\lambda"/>(<mi>x</mi>, 
  524. <mi>F</mi>(<mi>x</mi>)) = <mi>F</mi> or
  525. <graphic role="inline" source="image/f4002.gif" alt="\lambda"/>(<mi>x</mi>,
  526. [<mi>F</mi>]) =<mi>F</mi>, where <mi>x</mi> is a free variable in <mi>F</mi>.</p>
  527.  
  528. <p>This concept is implemented in MathML with the <kw
  529. role="element">lambda</kw> element. A lambda construct with <mi>n</mi>
  530. internal variables is encoded by a <kw role="element">lambda</kw> element
  531. with <mi>n</mi>+1 children. All but the last child must be <kw
  532. role="element">bvar</kw> elements containing the identifiers of the
  533. internal variables. The last child is an expression defining the
  534. function. This is typically an <kw role="element">apply</kw>, but can also
  535. be any container element.</p>
  536.  
  537. <p>The following constructs
  538. <graphic role = "inline" source = "image/f4002.gif" alt = "\lambda"/>
  539. (<mi>x</mi>, sin(<mi>x</mi>+1)):
  540. <eg role = "mathml"><![CDATA[
  541. <lambda>
  542.   <bvar><ci> x </ci></bvar>
  543.   <apply>
  544.     <sin/>
  545.     <apply>
  546.       <plus/>
  547.       <ci> x </ci>
  548.       <cn> 1 </cn>
  549.     </apply>
  550.   </apply>
  551. </lambda>
  552. ]]></eg></p>
  553. <p>To use 
  554. <kw role = "element">declare</kw> and 
  555. <kw role = "element">lambda</kw> to construct the function 
  556. <mi>f</mi> for which
  557. <mi>f</mi>( 
  558. <mi>x</mi>) = 
  559. <mi>x</mi><sup>2</sup> + 
  560. <mi>x</mi> + 3 use:
  561. <eg role = "mathml"><![CDATA[
  562. <declare type="fn">
  563.   <ci> f </ci>
  564.   <lambda>
  565.     <bvar><ci> x </ci></bvar>
  566.     <apply>
  567.       <plus/>
  568.       <apply>
  569.         <power/>
  570.         <ci> x </ci>
  571.         <cn> 2 </cn>
  572.       </apply>
  573.       <ci> x </ci>
  574.       <cn> 3 </cn>
  575.     </apply>
  576.   </lambda>
  577. </declare>
  578. ]]></eg>The following markup declares and constructs the function 
  579. <mi>J</mi> such that 
  580. <mi>J</mi>(<mi>x</mi>, 
  581. <mi>y</mi>) is the integral from 
  582. <mi>x</mi> to
  583. <mi>y</mi> of 
  584. <mi>t</mi><sup>4</sup> with respect to <mi>t</mi>.
  585. <eg role = "mathml"><![CDATA[
  586. <declare type="fn">
  587.   <ci> J </ci>
  588.   <lambda>
  589.     <bvar><ci> x </ci></bvar>
  590.     <bvar><ci> y </ci></bvar>
  591.     <apply> <int/>
  592.       <bvar>
  593.         <ci> t </ci>
  594.       </bvar>
  595.       <lowlimit>
  596.         <ci> x </ci>
  597.       </lowlimit>
  598.       <uplimit>
  599.         <ci> y </ci>
  600.       </uplimit>
  601.       <apply>   <power/>
  602.         <ci>t</ci>
  603.         <cn>4</cn>
  604.       </apply>
  605.     </apply>
  606.   </lambda>
  607. </declare>
  608. ]]></eg>The function 
  609. <mi>J</mi> can then in turn be applied to an argument pair.</p></div4>
  610. <div4>
  611. <head>The use of qualifier elements and the condition construct</head>
  612. <p>The last example of the preceding section illustrates the use of
  613. <emph>qualifier</emph> elements 
  614. <kw role = "element">lowlimit</kw>, 
  615. <kw role = "element">uplimit</kw>, and 
  616. <kw role = "element">bvar</kw> used in conjunction with the 
  617. <kw role = "element">int</kw> element. A number of common mathematical constructions involve additional data that is 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.</p>
  618. <p>Content markup uses qualifier elements in conjunction with a number of operators, including integrals, sums, series, and certain differential operators. Qualifier elements appear in the same
  619. <kw role = "element">apply</kw> element with one of these operators. In general, they must appear in a certain order, and their precise meaning depends on the operators being used. For details, see 
  620. <specref ref = "contm_opwithqual"/>.</p>
  621. <p>The qualifier element 
  622. <kw role = "element">bvar</kw> is also used in another important MathML construction. The 
  623. <kw role = "element">condition</kw> element is used to place conditions on bound variables in other expressions. This allows MathML to define sets by rule, rather than enumeration, for example. The following markup, for instance, encodes the set {
  624. <mi>x</mi> | 
  625. <mi>x</mi> < 1}:
  626. <eg role = "mathml"><![CDATA[
  627. <set>
  628.   <bvar><ci> x </ci></bvar>
  629.   <condition>
  630.     <apply>
  631.       <lt/>
  632.       <ci> x </ci>
  633.       <cn> 1 </cn>
  634.     </apply>
  635.   </condition>
  636. </set>
  637. ]]></eg></p></div4>
  638. <div4>
  639. <head>Rendering of Content elements</head>
  640. <p>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. Each content element has a default rendering, given in
  641. <specref ref = "contm_elem"/>, and several mechanisms (including 
  642. <specref ref = "contm_genatt"/>) are provided for associating a particular rendering with an object.</p></div4></div3>
  643. <div3 id = "contm_container">
  644. <head>Containers</head>
  645. <p>Containers provide a means for the construction of mathematical objects of a given type.
  646. <table border = "1">
  647. <tbody>
  648. <tr>
  649. <td>Tokens</td>
  650. <td>
  651. <kw role = "element">ci</kw>,
  652. <kw role = "element">cn</kw>,
  653. <kw role = "element">csymbol</kw></td></tr>
  654. <tr>
  655. <td>Constructors</td>
  656. <td>
  657. <kw role = "element">interval</kw>,
  658. <kw role = "element">list</kw>,
  659. <kw role = "element">matrix</kw>,
  660. <kw role = "element">matrixrow</kw>,
  661. <kw role = "element">set</kw>,
  662. <kw role = "element">vector</kw>,
  663. <kw role = "element">apply</kw>,
  664. <kw role = "element">reln</kw>,
  665. <kw role = "element">fn</kw>,
  666. <kw role = "element">lambda</kw>,
  667. <kw role = "element">piecewise, piece, otherwise</kw>
  668. </td>
  669. </tr>
  670. <tr>
  671. <td>Specials</td>
  672. <td>
  673. <kw role = "element">declare</kw></td></tr></tbody></table></p>
  674. <div4>
  675. <head>Tokens</head>
  676. <p>Token elements are typically the leaves of the MathML expression tree. Token elements are used to indicate mathematical identifiers,  numbers and symbols.</p>
  677. <p>It is also possible for the canonically empty operator elements such as
  678. <kw role = "element">exp</kw>, 
  679. <kw role = "element">sin</kw> and 
  680. <kw role = "element">cos</kw> to be leaves in an expression tree. The usage of operator elements is described in 
  681. <specref ref = "contm_funopqual"/>.
  682. <glist>
  683. <gitem>
  684. <label>cn</label>
  685. <def>
  686. <p>The 
  687. <kw role = "element">cn</kw> element is the MathML token element used to represent numbers. The supported types of numbers include:
  688. <kw role = "attval">real</kw>,
  689. <kw role = "attval">integer</kw>,
  690. <kw role = "attval">rational</kw>,
  691. <kw role = "attval">complex-cartesian</kw>, and
  692. <kw role = "attval">complex-polar</kw>, with
  693. <kw role = "attval">real</kw> being the default type. An attribute 
  694. <kw role = "attrib">base</kw> (with default value 
  695. <kw role = "attval">10</kw>) is used to help specify how the content is to be parsed. The content itself is essentially 
  696. <kw>PCDATA</kw>, separated by 
  697. <kw role = "emptytag">sep</kw> when two parts are needed in order to fully describe a number. For example, the real number 3 is constructed by
  698. <code><![CDATA[<cn type="real"> 3 </cn>]]></code>, while the rational number 3/4 is constructed as
  699. <code><![CDATA[<cn type="rational"> 3<sep/>4 </cn>]]></code>. The detailed structure and specifications are provided in
  700. <specref ref = "contm_cn"/>.</p></def></gitem>
  701. <gitem>
  702. <label>ci</label>
  703. <def>
  704. <p>The 
  705. <kw role = "element">ci</kw> element, or 
  706. <quote>content identifier</quote> is used to construct a variable, or an identifier. A 
  707. <kw role = "attrib">type</kw> attribute indicates the type of object the symbol represents. Typically, 
  708. <kw role = "element">ci</kw> represents a real scalar,  but no default is specified. The content is either 
  709. <kw>PCDATA</kw> or a general presentation construct (see 
  710. <specref ref = "presm_summary"/>). For example,
  711. <eg role = "mathml"><![CDATA[
  712. <ci>
  713. <msub>
  714.   <mi>c</mi>
  715.   <mn>1</mn>
  716. </msub>
  717. </ci>
  718. ]]></eg>encodes an atomic symbol that displays visually as 
  719. <mi>c</mi><sub>1</sub>
  720. which, for purposes of content, is treated as a single symbol representing a real number. The detailed structure and specifications are provided in 
  721. <specref ref = "contm_ci"/>.</p></def></gitem>
  722. <gitem>
  723. <label>csymbol</label>
  724. <def>
  725. <p>The 
  726. <kw role = "element">csymbol</kw> element, or 
  727. <quote>content symbol</quote> is used to construct a symbol whose semantics are not part of the core content elements provided by MathML, but defined externally.
  728. <kw role = "element">csymbol</kw> does not make any attempt to describe how to map the arguments occurring in any application of the function into a new MathML expression. Instead, it depends on its 
  729. <kw role = "attrib">definitionURL</kw> attribute to point to a particular meaning, and the 
  730. <kw role = "attrib">encoding</kw> attribute to give the syntax of this definition. The content of a 
  731. <kw role = "element">csymbol</kw> is either 
  732. <kw>PCDATA</kw> or a general presentation construct (see 
  733. <specref ref = "presm_summary"/>). For example,
  734. <eg role = "mathml"><![CDATA[
  735. <csymbol definitionURL="www.example.com/ContDiffFuncs.htm"
  736.          encoding="text">
  737. <msup>
  738.   <mi>C</mi>
  739.   <mn>2</mn>
  740. </msup>
  741. </csymbol>
  742. ]]></eg>encodes an atomic symbol that displays visually as 
  743. <mi>C</mi><sup>2</sup> and that, for purposes of content, is treated as a single symbol representing the space of twice-differentiable continuous functions.  The detailed structure and specifications are provided in 
  744. <specref ref = "contm_csymbol"/>.</p></def></gitem></glist></p></div4>
  745. <div4 id = "contm_constructor">
  746. <head>Constructors</head>
  747. <p>MathML provides a number of elements for combining elements into familiar compound objects. The compound objects include things like lists and sets. Each constructor produces a new type of object.
  748. <glist>
  749. <gitem>
  750. <label>interval</label>
  751. <def>
  752. <p>The 
  753. <kw role = "element">interval</kw> element is described in detail in
  754. <specref ref = "contm_interval"/>. It denotes an interval on the real line with the values represented by its children as end points. The
  755. <kw role = "attrib">closure</kw> attribute is used to qualify the type of interval being represented. For example,
  756. <eg role = "mathml"><![CDATA[
  757. <interval closure="open-closed">
  758.   <ci> a </ci>
  759.   <ci> b </ci>
  760. </interval>
  761. ]]></eg>represents the open-closed interval often written (<mi>a</mi>,
  762. <mi>b</mi>].</p></def></gitem>
  763. <gitem>
  764. <label>set and list</label>
  765. <def>
  766. <p>The 
  767. <kw role = "element">set</kw> and 
  768. <kw role = "element">list</kw> elements are described in detail in 
  769. <specref ref = "contm_set"/> and
  770. <specref ref = "contm_list"/>. Typically, the child elements of a possibly empty 
  771. <kw role = "element">list</kw> element are the actual components of an ordered 
  772. <emph>list</emph>. For example, an ordered list of the three symbols
  773. <mi>a</mi>, 
  774. <mi>b</mi>, and 
  775. <mi>c</mi> is encoded as
  776. <eg role = "mathml"><![CDATA[
  777. <list> <ci> a </ci> <ci> b </ci> <ci> c </ci> </list>
  778. ]]></eg>Alternatively, 
  779. <kw role = "element">bvar</kw> and 
  780. <kw role = "element">condition</kw> elements can be used to define lists where membership depends on satisfying certain conditions.</p>
  781. <p>An 
  782. <kw role = "attrib">order</kw> 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.</p>
  783. <p>Sets are structured much the same as lists except that there is no implied ordering and the 
  784. <kw role = "attrib">type</kw> of set may be 
  785. <kw role = "attval">normal</kw> or 
  786. <kw role = "attval">multiset</kw> with
  787. <kw role = "attval">multiset</kw> indicating that repetitions are allowed.</p>
  788. <p>For both sets and lists, the child elements must be valid MathML content elements. The type of the child elements is not restricted. For example, one might construct a list of equations, or of inequalities.</p></def></gitem>
  789. <gitem>
  790. <label>matrix and matrixrow</label>
  791. <def>
  792. <p>The 
  793. <kw role = "element">matrix</kw> element is used to represent mathematical matrices. It is described in detail in 
  794. <specref ref = "contm_matrix"/>. It has zero or more child elements, all of which are 
  795. <kw role = "element">matrixrow</kw> elements. These in turn expect zero or more child elements that evaluate to algebraic expressions or numbers. These sub-elements are often real numbers, or symbols as in
  796. <eg role = "mathml"><![CDATA[
  797. <matrix>
  798.   <matrixrow> <cn> 1 </cn> <cn> 2 </cn> </matrixrow>
  799.   <matrixrow> <cn> 3 </cn> <cn> 4 </cn> </matrixrow>
  800. </matrix>
  801. ]]></eg>The 
  802. <kw role = "element">matrixrow</kw> elements must always be contained inside of a matrix, and all rows in a given matrix must have the same number of elements.</p>
  803. <p>Note that the behavior of the 
  804. <kw role = "element">matrix</kw> and 
  805. <kw role = "element">matrixrow</kw> elements is substantially different from the
  806. <kw role = "element">mtable</kw> and 
  807. <kw role = "element">mtr</kw> presentation elements.</p></def></gitem>
  808. <gitem>
  809. <label>vector</label>
  810. <def>
  811. <p>The 
  812. <kw role = "element">vector</kw> element is described in detail in
  813. <specref ref = "contm_vector"/>. It constructs vectors from an
  814. <mi>n</mi>-dimensional vector space so that its 
  815. <mi>n</mi> child elements typically represent real or complex valued scalars as in the three-element vector
  816. <eg role = "mathml"><![CDATA[
  817. <vector>
  818.   <apply>
  819.     <plus/>
  820.     <ci> x </ci>
  821.     <ci> y </ci>
  822.   </apply>
  823.   <cn> 3 </cn>
  824.   <cn> 7 </cn>
  825. </vector>
  826. ]]></eg></p></def></gitem>
  827. <gitem>
  828. <label>apply</label>
  829. <def>
  830. <p>The 
  831. <kw role = "element">apply</kw> element is described in detail in
  832. <specref ref = "contm_apply"/>. Its purpose is to apply a function or operator to its arguments to produce an expression representing an element of the codomain of the function. It is involved in everything from forming sums such as 
  833. <mi>a</mi> + 
  834. <mi>b</mi> as in
  835. <eg role = "mathml"><![CDATA[
  836. <apply>
  837.   <plus/>
  838.   <ci> a </ci>
  839.   <ci> b </ci>
  840. </apply>
  841. ]]></eg>through to using the sine function to construct sin(<mi>a</mi>) as in
  842. <eg role = "mathml"><![CDATA[
  843. <apply>
  844.   <sin/>
  845.   <ci> a </ci>
  846. </apply>
  847. ]]></eg>or constructing integrals. Its usage in any particular setting is determined largely by the properties of the function (the first child element) and as such its detailed usage is covered together with the functions and operators in 
  848. <specref ref = "contm_funopqual"/>.</p></def></gitem>
  849. <gitem>
  850. <label>reln</label>
  851. <def>
  852. <p>The 
  853. <kw role = "element">reln</kw> element is described in detail in
  854. <specref ref = "contm_reln"/>. It was used in MathML 1.0 to construct an expression such as 
  855. <mi>a</mi> = 
  856. <mi>b</mi>, as in
  857. <eg role = "mathml"><![CDATA[
  858. <reln><eq/>
  859.   <ci> a </ci>
  860.   <ci> b </ci>
  861. </reln>
  862. ]]></eg>indicating an intended comparison between two mathematical values.</p>
  863. <p>MathML 2.0 takes the view that this should be regarded as the application of a boolean function, and as such could be constructed using 
  864. <kw role = "element">apply</kw>. The use of 
  865. <kw>reln</kw> with logical operators is supported
  866.  for reasons of backwards compatibility, but <intref
  867. ref="interf_deprec">deprecated</intref> in favor of  
  868. <kw>apply</kw>.</p></def></gitem>
  869.  
  870. <gitem>
  871. <label>fn</label>
  872. <def>
  873. <p>The 
  874. <kw role = "element">fn</kw> element was used in MathML 1.0 to make
  875. explicit the fact that an expression is being used as a function or
  876. operator. This is allowed in MathML 2.0 for backwards compatibility,
  877. but is <intref ref="interf_deprec">deprecated</intref>, as the use of
  878. an expression as a function or operator is clear from its position as
  879. the first child of an 
  880. <kw role = "element">apply</kw>.  
  881. <kw role = "element">fn</kw> is discussed in detail in 
  882. <specref ref = "contm_fn"/>.</p></def></gitem>
  883.  
  884. <gitem>
  885. <label>lambda</label>
  886. <def>
  887. <p>The 
  888. <kw role = "element">lambda</kw> element is used to construct a user-defined function from an expression and one or more free variables. The lambda construct with 
  889. <mi>n</mi> internal variables takes
  890. <mi>n</mi>+1 children. The first (second, up to 
  891. <mi>n</mi>) is a 
  892. <kw role = "element">bvar</kw> containing the identifiers of the internal variables. The last is an expression defining the function. This is typically an 
  893. <kw role = "element">apply</kw>, but can also be any container element. The following constructs
  894. <graphic role = "inline" source = "image/f4002.gif" alt = "\lambda"/>
  895. (<mi>x</mi>, sin 
  896. <mi>x</mi>)
  897. <eg role = "mathml"><![CDATA[
  898. <lambda>
  899.   <bvar><ci> x </ci></bvar>
  900.   <apply>
  901.     <sin/>
  902.     <ci> x </ci>
  903.   </apply>
  904. </lambda>
  905. ]]></eg>The following constructs the constant function
  906. <graphic role = "inline" source = "image/f4002.gif" alt = "\lambda"/>
  907. (<mi>x</mi>, 3)
  908. <eg role = "mathml"><![CDATA[
  909. <lambda>
  910.   <bvar><ci> x </ci></bvar>
  911.   <cn> 3 </cn>
  912. </lambda>
  913. ]]></eg></p></def></gitem>
  914.  
  915. <gitem>
  916. <label>piecewise, piece, otherwise</label>
  917. <def>
  918. <p>The 
  919. <kw role = "element">piecewise</kw>, 
  920. <kw role = "element">piece</kw>, 
  921. <kw role = "element">otherwise</kw>  
  922. elements are used to support <quote>piecewise</quote> declarations of the form <quote>
  923.   <mi>H</mi>(<mi>x</mi>) = 0 if <mi>x</mi> less than 0,  
  924.   <mi>H</mi>(<mi>x</mi>) =  1 otherwise</quote>.</p> 
  925.  
  926. <p>
  927. <eg role = "mathml"><![CDATA[
  928. <piecewise>
  929.   <piece>
  930.       <cn> 0 </cn>
  931.       <apply><lt/><ci> x </ci> <cn> 0 </cn></apply>
  932.   </piece>
  933.     <otherwise>
  934.       <ci> x </ci>
  935.     </otherwise>
  936. </piecewise>
  937. ]]></eg>
  938. The <kw role = "element">piecewise</kw> elements are discussed in detail in 
  939. <specref ref = "contm_piecewise"/>.
  940.  
  941.  
  942. </p></def></gitem>
  943.  
  944.  
  945. </glist></p></div4>
  946. <div4>
  947. <head>Special Constructs</head>
  948. <p>The 
  949. <kw role = "element">declare</kw> construct is described in detail in
  950. <specref ref = "contm_declare"/>. It is special in that its entire purpose is to modify 
  951. the semantics of other objects. It is not rendered visually or aurally.</p>
  952. <p>The need for declarations arises any time a symbol (including more general presentations) 
  953. is being used to represent an instance of an object of a particular type. For example, 
  954. you may wish to declare that the symbolic identifier <mi>V</mi> represents a vector. 
  955. The single argument form can be used to set properties of objects by setting 
  956. the default values of implied attribute values to specific values.</p>
  957. <p>The declaration
  958. <eg role = "mathml"><![CDATA[
  959. <declare type="vector"><ci>V</ci></declare>
  960. ]]></eg>resets the default type attribute of 
  961. <code><![CDATA[<ci>V</ci>]]></code> to
  962. <kw role = "attval">vector</kw> for all affected occurrences of
  963. <code><![CDATA[<ci>V</ci>]]></code>. This avoids having to write
  964. <code><![CDATA[<ci type="vector">V</ci>]]></code> every time you use the symbol.</p>
  965. <p>More generally, 
  966. <kw role = "element">declare</kw> can be used to associate expressions with specific content. For example, the declaration
  967. <eg role = "mathml"><![CDATA[
  968. <declare>
  969.   <ci>F</ci>
  970.   <lambda>
  971.     <bvar><ci> U </ci></bvar>
  972.     <apply>
  973.       <int/>
  974.       <bvar><ci> x </ci></bvar>
  975.       <lowlimit><cn> 0 </cn></lowlimit>
  976.       <uplimit><ci> a </ci></uplimit>
  977.       <ci> U </ci>
  978.     </apply>
  979.   </lambda>
  980. </declare>
  981. ]]></eg>associates the symbol 
  982. <mi>F</mi> with a new function defined by the 
  983. <kw role = "element">lambda</kw> construct. Within the scope where the declaration is in effect, the expression
  984. <eg role = "mathml"><![CDATA[
  985. <apply>
  986.   <ci>F</ci>
  987.   <ci> U </ci>
  988. </apply>
  989. ]]></eg>stands for the integral of 
  990. <mi>U</mi> from 0 to 
  991. <mi>a</mi>.</p>
  992. <p>The 
  993. <kw role = "element">declare</kw> element can also be used to change the definition of a function or operator. For example, if the URL
  994. <code>http://.../MathML:noncommutplus</code> described a non-commutative plus operation encoded in Maple syntax, then the declaration
  995. <eg role = "mathml"><![CDATA[
  996. <declare definitionURL="http://.../MathML:noncommutplus"
  997.          encoding="Maple">
  998.   <plus/>
  999. </declare>
  1000. ]]></eg>would indicate that all affected uses of 
  1001. <kw role = "element">plus</kw> are to be interpreted as having that definition of 
  1002. <kw role = "element">plus</kw>.</p></div4></div3>
  1003. <div3 id = "contm_funopqual">
  1004. <head>Functions, Operators and Qualifiers</head>
  1005. <p>The operators and functions defined by MathML can be divided into categories as shown in the table below. <!-- TODO: the second column should be a p column in LaTeX -->
  1006. <table id = "contm_table-funopqual" border = "1">
  1007. <tbody>
  1008. <tr>
  1009. <td>unary arithmetic</td>
  1010. <td>
  1011. <kw role = "element">factorial</kw>,
  1012. <kw role = "element">minus</kw>,
  1013. <kw role = "element">abs</kw>,
  1014. <kw role = "element">conjugate</kw>,
  1015. <kw role = "element">arg</kw>,
  1016. <kw role = "element">real</kw>,
  1017. <kw role = "element">imaginary</kw>,
  1018. <kw role = "element">floor</kw>,
  1019. <kw role = "element">ceiling</kw>
  1020. </td></tr>
  1021. <tr>
  1022. <td>unary logical</td>
  1023. <td>
  1024. <kw role = "element">not</kw></td></tr>
  1025. <tr>
  1026. <td>unary functional</td>
  1027. <td>
  1028. <kw role = "element">inverse</kw>,
  1029. <kw role = "element">ident</kw>,
  1030. <kw role = "element">domain</kw>,
  1031. <kw role = "element">codomain</kw>,
  1032. <kw role = "element">image</kw>
  1033. </td></tr>
  1034. <tr>
  1035. <td>unary elementary classical functions</td>
  1036. <td>
  1037. <kw role = "element">sin</kw>,
  1038. <kw role = "element">cos</kw>,
  1039. <kw role = "element">tan</kw>,
  1040. <kw role = "element">sec</kw>,
  1041. <kw role = "element">csc</kw>,
  1042. <kw role = "element">cot</kw>,
  1043. <kw role = "element">sinh</kw>,
  1044. <kw role = "element">cosh</kw>,
  1045. <kw role = "element">tanh</kw>,
  1046. <kw role = "element">sech</kw>,
  1047. <kw role = "element">csch</kw>,
  1048. <kw role = "element">coth</kw>,
  1049. <kw role = "element">arcsin</kw>,
  1050. <kw role = "element">arccos</kw>,
  1051. <kw role = "element">arctan</kw>,
  1052. <kw role = "element">arccosh</kw>,
  1053. <kw role = "element">arccot</kw>,
  1054. <kw role = "element">arccoth</kw>,
  1055. <kw role = "element">arccsc</kw>,
  1056. <kw role = "element">arccsch</kw>,
  1057. <kw role = "element">arcsec</kw>,
  1058. <kw role = "element">arcsech</kw>,
  1059. <kw role = "element">arcsinh</kw>,
  1060. <kw role = "element">arctanh</kw>,
  1061. <kw role = "element">exp</kw>,
  1062. <kw role = "element">ln</kw>,
  1063. <kw role = "element">log</kw></td></tr>
  1064. <tr>
  1065. <td>unary linear algebra</td>
  1066. <td>
  1067. <kw role = "element">determinant</kw>,
  1068. <kw role = "element">transpose</kw></td></tr>
  1069. <tr>
  1070. <td>unary calculus and vector calculus</td>
  1071. <td>
  1072. <kw role = "element">divergence</kw>,
  1073. <kw role = "element">grad</kw>,
  1074. <kw role = "element">curl</kw>,
  1075. <kw role = "element">laplacian</kw></td></tr>
  1076. <tr>
  1077. <td>unary set-theoretic</td>
  1078. <td>
  1079. <kw role = "element">card</kw></td></tr>
  1080. <tr>
  1081. <td>binary arithmetic</td>
  1082. <td>
  1083. <kw role = "element">quotient</kw>,
  1084. <kw role = "element">divide</kw>,
  1085. <kw role = "element">minus</kw>,
  1086. <kw role = "element">power</kw>,
  1087. <kw role = "element">rem</kw></td></tr>
  1088. <tr>
  1089. <td>binary logical</td>
  1090. <td>
  1091. <kw role = "element">implies</kw>,
  1092. <kw role = "element">equivalent</kw>,
  1093. <kw role = "element">approx</kw></td></tr>
  1094. <tr>
  1095. <td>binary set operators</td>
  1096. <td>
  1097. <kw role = "element">setdiff</kw></td></tr>
  1098. <tr>
  1099. <td>binary linear algebra</td>
  1100. <td>
  1101. <kw role = "element">vectorproduct</kw>,
  1102. <kw role = "element">scalarproduct</kw>,
  1103. <kw role = "element">outerproduct</kw></td></tr>
  1104. <tr>
  1105. <td>n-ary arithmetic</td>
  1106. <td>
  1107. <kw role = "element">plus</kw>,
  1108. <kw role = "element">times</kw>,
  1109. <kw role = "element">max</kw>,
  1110. <kw role = "element">min</kw>,
  1111. <kw role = "element">gcd</kw>,
  1112. <kw role = "element">lcm</kw>
  1113. </td></tr>
  1114. <tr>
  1115. <td>n-ary statistical</td>
  1116. <td>
  1117. <kw role = "element">mean</kw>,
  1118. <kw role = "element">sdev</kw>,
  1119. <kw role = "element">variance</kw>,
  1120. <kw role = "element">median</kw>,
  1121. <kw role = "element">mode</kw></td></tr>
  1122. <tr>
  1123. <td>n-ary logical</td>
  1124. <td>
  1125. <kw role = "element">and</kw>,
  1126. <kw role = "element">or</kw>,
  1127. <kw role = "element">xor</kw></td></tr>
  1128. <tr>
  1129. <td>n-ary linear algebra</td>
  1130. <td>
  1131. <kw role = "element">selector</kw></td></tr>
  1132. <tr>
  1133. <td>n-ary set operator</td>
  1134. <td>
  1135. <kw role = "element">union</kw>,
  1136. <kw role = "element">intersect</kw>,
  1137. <kw role = "element">cartesianproduct</kw>
  1138. </td></tr>
  1139. <tr>
  1140. <td>n-ary functional</td>
  1141. <td>
  1142. <kw role = "element">fn</kw>,
  1143. <kw role = "element">compose</kw></td></tr>
  1144. <tr>
  1145. <td>integral, sum, product operators</td>
  1146. <td>
  1147. <kw role = "element">int</kw>,
  1148. <kw role = "element">sum</kw>,
  1149. <kw role = "element">product</kw></td></tr>
  1150. <tr>
  1151. <td>differential operator</td>
  1152. <td>
  1153. <kw role = "element">diff</kw>,
  1154. <kw role = "element">partialdiff</kw></td></tr>
  1155. <tr>
  1156. <td>quantifier</td>
  1157. <td>
  1158. <kw role = "element">forall</kw>,
  1159. <kw role = "element">exists</kw></td></tr></tbody></table></p>
  1160. <p>From the point of view of usage, MathML regards functions (for example
  1161. <kw role = "element">sin</kw> and 
  1162. <kw role = "element">cos</kw>) and operators (for example 
  1163. <kw role = "element">plus</kw> and 
  1164. <kw role = "element">times</kw>) in the same way. MathML predefined functions and operators are all canonically empty elements.</p>
  1165. <p>Note that the 
  1166. <kw role = "element">csymbol</kw> element can be used to construct a user-defined symbol that can be used as a function or operator.</p>
  1167. <div4>
  1168. <head>Predefined functions and operators</head>
  1169. <p>MathML functions can be used in two ways. They can be used as the operator within an 
  1170. <kw role = "element">apply</kw> element, in which case they refer to a function evaluated at a specific value. For example,
  1171. <eg role = "mathml"><![CDATA[
  1172. <apply>
  1173.   <sin/>
  1174.   <cn>5</cn>
  1175. </apply>
  1176. ]]></eg>denotes a real number, namely sin(5).</p>
  1177. <p>MathML functions can also be used as arguments to other operators, for example
  1178. <eg role = "mathml"><![CDATA[
  1179. <apply>
  1180.   <plus/><sin/><cos/>
  1181. </apply>
  1182. ]]></eg>denotes a function, namely the result of adding the sine and cosine functions in some function space. (The default semantic definition of 
  1183. <kw role = "element">plus</kw> is such that it infers what kind of operation is intended from the type of its arguments.)</p>
  1184. <p>The number of child elements in the 
  1185. <kw role = "element">apply</kw> is defined by the element in the first (i.e. operator) position.</p>
  1186. <p>
  1187. <emph>Unary</emph> operators are followed by exactly one other child element within the 
  1188. <kw role = "element">apply</kw>.</p>
  1189. <p>
  1190. <emph>Binary</emph> operators are followed by exactly two child elements.</p>
  1191. <p>
  1192. <emph>N-ary</emph> operators are followed by two or more child elements.</p>
  1193. <p>The one exception to these rules is that 
  1194. <kw role = "element">declare</kw> elements may be inserted in any position except the first. 
  1195. <kw role = "element">declare</kw> elements are not counted when satisfying the child element count for an 
  1196. <kw role = "element">apply</kw> containing a unary or binary operator element.</p>
  1197. <p>Integral, sum, product and differential operators are discussed below in
  1198. <specref ref = "contm_opwithqual"/>.</p></div4>
  1199. <div4 id = "contm_opwithqual">
  1200. <head>Operators taking Qualifiers</head>
  1201. <p>The table below contains the qualifiers and the operators defined as taking qualifiers in MathML.
  1202. <table border = "1">
  1203. <tbody>
  1204. <tr>
  1205. <td>qualifiers</td>
  1206. <td>
  1207. <kw role = "element">lowlimit</kw>,
  1208. <kw role = "element">uplimit</kw>,
  1209. <kw role = "element">bvar</kw>,
  1210. <kw role = "element">degree</kw>,
  1211. <kw role = "element">logbase</kw>,
  1212. <kw role = "element">interval</kw>,
  1213. <kw role = "element">condition</kw>,
  1214. <kw role = "element">domainofapplication</kw>,
  1215. <kw role = "element">momentabout</kw>
  1216. </td></tr>
  1217. <tr>
  1218. <td>operators</td>
  1219. <td>
  1220. <kw role = "element">int</kw>,
  1221. <kw role = "element">sum</kw>,
  1222. <kw role = "element">product</kw>,
  1223. <kw role = "element">root</kw>,
  1224. <kw role = "element">diff</kw>,
  1225. <kw role = "element">partialdiff</kw>,
  1226. <kw role = "element">limit</kw>,
  1227. <kw role = "element">log</kw>,
  1228. <kw role = "element">moment</kw>,
  1229. <kw role = "element">min</kw>,
  1230. <kw role = "element">max</kw>,
  1231. <kw role = "element">forall</kw>,
  1232. <kw role = "element">exists</kw></td></tr></tbody></table></p>
  1233. <p>Operators taking qualifiers are canonically empty functions that differ from ordinary empty functions only in that they support the use of special
  1234. <emph>qualifier</emph> elements to specify their meaning more fully. They are used in exactly the same way as ordinary operators, except that when they are used as operators, certain qualifier elements are also permitted to be in the enclosing 
  1235. <kw role = "element">apply</kw>. Qualifiers always follow the operator and precede the argument if it is present. If more than one qualifier is present, they appear in the order
  1236. <kw role = "element">bvar</kw>,
  1237. <kw role = "element">lowlimit</kw>,
  1238. <kw role = "element">uplimit</kw>,
  1239. <kw role = "element">interval</kw>,
  1240. <kw role = "element">condition</kw>,
  1241. <kw role = "element">domainofapplication</kw>,
  1242. <kw role = "element">degree</kw>,
  1243. <kw role = "element">momentabout</kw>,
  1244. <kw role = "element">logbase</kw>. A typical example is:
  1245. <eg role = "mathml"><![CDATA[
  1246. <apply>
  1247.   <int/>
  1248.   <bvar><ci>x</ci></bvar>
  1249.   <interval><cn>0</cn><cn>1</cn></interval>
  1250.   <apply>
  1251.       <power/>
  1252.     <ci>x</ci>
  1253.     <cn>2</cn>
  1254.   </apply>
  1255. </apply>
  1256. ]]></eg></p>
  1257. <p>It is also valid to use qualifier schema with a function not applied to an argument. For example, a function acting on integrable functions on the interval [0,1] might be denoted:
  1258. <eg role = "mathml"><![CDATA[
  1259. <fn>
  1260.   <apply>
  1261.     <int/>
  1262.     <bvar><ci>x</ci></bvar>
  1263.     <lowlimit><cn>0</cn></lowlimit>
  1264.     <uplimit><cn>1</cn></uplimit>
  1265.   </apply>
  1266. </fn>
  1267. ]]></eg></p>
  1268. <p>In addition to the defined usage in MathML, qualifier schema may be used with any user-defined symbol 
  1269. (e.g. using <kw role = "element">csymbol</kw>) or construct. The meaning of such a usage is not defined by MathML;
  1270. it would normally be user-defined using the <kw role = "attrib">definitionURL</kw> attribute.</p>
  1271. <p>The meaning and usage of qualifier schema varies from function to function. The following list summarizes the usage of qualifier schema with the MathML functions taking qualifiers.
  1272. <glist>
  1273. <gitem>
  1274. <label>int</label>
  1275. <def>
  1276. <p>The
  1277. <kw role = "element">int</kw> function accepts the
  1278. <kw role = "element">lowlimit</kw>,
  1279. <kw role = "element">uplimit</kw>,
  1280. <kw role = "element">bvar</kw>,
  1281. <kw role = "element">interval</kw>,
  1282. <kw role = "element">condition</kw> and 
  1283. <kw role = "element">domainofapplication</kw> schemata. If both
  1284. <kw role = "element">lowlimit</kw> and
  1285. <kw role = "element">uplimit</kw> schemata are present, they denote the limits of a definite integral. The domain of integration may alternatively be specified using
  1286. <kw role = "element">interval</kw>, 
  1287. <kw role = "element">condition</kw> or 
  1288. <kw role = "element">domainofapplication</kw>. The 
  1289. <kw role = "element">bvar</kw> schema signifies the variable of integration. When used with 
  1290. <kw role = "element">int</kw>, each qualifier schema is expected to contain a single child schema; otherwise an error is generated.</p></def></gitem>
  1291. <gitem>
  1292. <label>diff</label>
  1293. <def>
  1294. <p>The 
  1295. <kw role = "element">diff</kw> function accepts the
  1296. <kw role = "element">bvar</kw> schema. The
  1297. <kw role = "element">bvar</kw> schema specifies with respect to which variable the derivative is being taken. The 
  1298. <kw role = "element">bvar</kw> may itself contain a 
  1299. <kw role = "element">degree</kw> schema that is used to specify the order of the derivative, i.e. a first derivative, a second derivative, etc. For example, the second derivative of 
  1300. <mi>f</mi> with respect to 
  1301. <mi>x</mi> is:
  1302. <eg role = "mathml"><![CDATA[
  1303. <apply>
  1304.   <diff/>
  1305.   <bvar>
  1306.     <ci> x </ci>
  1307.     <degree>
  1308.       <cn> 2 </cn>
  1309.     </degree>
  1310.   </bvar>
  1311.   <apply><fn><ci>f</ci></fn>
  1312.     <ci> x </ci>
  1313.   </apply>
  1314. </apply>
  1315. ]]></eg></p></def></gitem>
  1316. <gitem>
  1317. <label>partialdiff</label>
  1318. <def>
  1319. <p>The 
  1320. <kw role = "element">partialdiff</kw> operator accepts zero or more
  1321. <kw role = "element">bvar</kw> schemata, and an optional <kw role = "element">degree</kw> qualifier schema. The 
  1322. <kw role = "element">bvar</kw> schema specify, in order, the variables with respect to which the derivative is being taken. Each 
  1323. <kw role = "element">bvar</kw> element may contain a 
  1324. <kw role = "element">degree</kw> schema which is used to specify the order of the derivative being taken with respect to that 
  1325. variable. The optional <kw role = "element">degree</kw> schema qualifier associated with the 
  1326. <kw role = "element">partialdiff</kw> element itself (that is, appearing as a child of the enclosing
  1327. <kw role = "element">apply</kw> element rather than of one of the <kw role = "element">bvar</kw> qualifiers) is used to represent
  1328. the total degree of the differentiation. Each 
  1329. <kw role = "element">degree</kw> schema used with <kw role = "element">partialdiff</kw> is expected 
  1330. to contain a single child schema. For example,
  1331. <eg role = "mathml"><![CDATA[
  1332. <apply>
  1333.   <partialdiff/>
  1334.   <bvar>
  1335.     <degree><cn>2</cn></degree>
  1336.     <ci>x</ci>
  1337.   </bvar>
  1338.   <bvar><ci>y</ci></bvar>
  1339.   <bvar><ci>x</ci></bvar>
  1340.   <degree><cn>4</cn></degree>
  1341.   <ci type="fn">f</ci>
  1342. </apply>
  1343. ]]></eg>denotes the mixed partial derivative ( d<sup>4</sup> /
  1344. d<sup>2</sup><mi>x</mi> d<mi>y</mi> d<mi>x</mi> ) <mi>f</mi>.</p></def></gitem>
  1345. <gitem>
  1346. <label>sum, product</label>
  1347. <def>
  1348. <p>The 
  1349. <kw role = "element">sum</kw> and 
  1350. <kw role = "element">product</kw> functions accept the 
  1351. <kw role = "element">bvar</kw>, 
  1352. <kw role = "element">lowlimit</kw>, 
  1353. <kw role = "element">uplimit</kw>, 
  1354. <kw role = "element">interval</kw>, 
  1355. <kw role = "element">condition</kw> and 
  1356. <kw role = "element">domainofapplication</kw> schemata. If both 
  1357. <kw role = "element">lowlimit</kw> and 
  1358. <kw role = "element">uplimit</kw> schemata are present, they denote the limits of the sum or product. The limits may alternatively be specified using the 
  1359. <kw role = "element">interval</kw>, 
  1360. <kw role = "element">condition</kw> or 
  1361. <kw role = "element">domainofapplication</kw> schema. The 
  1362. <kw role = "element">bvar</kw> schema signifies the internal variable in the sum or product. A typical example might be:
  1363. <eg role = "mathml"><![CDATA[
  1364. <apply>
  1365.   <sum/>
  1366.   <bvar><ci>i</ci></bvar>
  1367.   <lowlimit><cn>0</cn></lowlimit>
  1368.   <uplimit><cn>100</cn></uplimit>
  1369.   <apply>
  1370.     <power/>
  1371.     <ci>x</ci>
  1372.     <ci>i</ci>
  1373.   </apply>
  1374. </apply>
  1375. ]]></eg>When used with 
  1376. <kw role = "element">sum</kw> or 
  1377. <kw role = "element">product</kw>, each qualifier schema is expected to contain a single child schema; otherwise an error is generated.</p></def></gitem>
  1378. <gitem>
  1379. <label>limit</label>
  1380. <def>
  1381. <p>The 
  1382. <kw role = "element">limit</kw> function accepts zero or more 
  1383. <kw role = "element">bvar</kw> schemata, and optional 
  1384. <kw role = "element">condition</kw> and 
  1385. <kw role = "element">lowlimit</kw> schemata. A 
  1386. <kw role = "element">condition</kw> may be used to place constraints on the 
  1387. <kw role = "element">bvar</kw>. The 
  1388. <kw role = "element">bvar</kw> schema denotes the variable with respect to which the limit is being taken. The 
  1389. <kw role = "element">lowlimit</kw> schema denotes the limit point. When used with 
  1390. <kw role = "element">limit</kw>, the
  1391. <kw role = "element">bvar</kw> and 
  1392. <kw role = "element">lowlimit</kw> schemata are expected to contain a single child schema; otherwise an error is generated.</p></def></gitem>
  1393. <gitem>
  1394. <label>log</label>
  1395. <def>
  1396. <p>The 
  1397. <kw role = "element">log</kw> function accepts only the 
  1398. <kw role = "element">logbase</kw> schema. If present, the 
  1399. <kw role = "element">logbase</kw> schema denotes the base with respect to which the logarithm is being taken. Otherwise, the log is assumed to be base 10. When used with 
  1400. <kw role = "element">log</kw>, the 
  1401. <kw role = "element">logbase</kw> schema is expected to contain a single child schema; otherwise an error is generated.</p></def></gitem>
  1402. <gitem>
  1403. <label>moment</label>
  1404. <def>
  1405. <p>The 
  1406. <kw role = "element">moment</kw> function accepts  the 
  1407. <kw role = "element">degree</kw> and <kw role = "element">momentabout</kw>  schema. If present, the 
  1408. <kw role = "element">degree</kw> schema denotes the order of the moment. Otherwise, the moment is assumed to be the first order moment. When used with 
  1409. <kw role = "element">moment</kw>, the 
  1410. <kw role = "element">degree</kw> schema is expected to contain a single child schema; otherwise an error is generated. If present, the 
  1411. <kw role = "element">momentabout</kw> schema denotes the point about which the moment is taken. Otherwise, the moment is assumed to be the  moment about zero.</p></def></gitem>
  1412. <gitem>
  1413. <label>min, max</label>
  1414. <def>
  1415. <p>The 
  1416. <kw role = "element">min</kw> and 
  1417. <kw role = "element">max</kw> functions accept a 
  1418. <kw role = "element">bvar</kw> schema in cases where the maximum or minimum  is being taken over a set of values specified by a 
  1419. <kw role = "element">condition</kw> schema together with an expression  to be evaluated on that set. 
  1420. <kw role = "element"></kw>In MathML1.0,  the 
  1421. <kw role = "element">bvar</kw> element was optional when using a 
  1422. <kw role = "element">condition</kw>; if a 
  1423. <kw role = "element">condition</kw> element containing a single  variable was given by itself following a 
  1424. <kw role = "element">min</kw> or 
  1425. <kw role = "element">max</kw> operator, the variable was implicitly
  1426. assumed to be bound, and the expression to be maximized or minimized
  1427. (if absent) was assumed to be the single bound variable.  This usage
  1428. is <intref ref="interf_deprec">deprecated</intref> in MathML 2.0   in
  1429. favor of explicitly stating the bound variable(s) and the expression
  1430. to be maximized or minimized in all cases.</p> 
  1431. <p>The 
  1432. <kw role = "element">min</kw> and 
  1433. <kw role = "element">max</kw> elements may also be applied to a list of values in which case no qualifier schemata are used. For examples of all three usages, see 
  1434. <specref ref = "contm_maxmin"/>.</p></def></gitem>
  1435. <gitem>
  1436. <label>forall, exists</label>
  1437. <def>
  1438. <p>The universal and existential quantifier operators 
  1439. <kw role = "element">forall</kw> and 
  1440. <kw role = "element">exists</kw> are used in conjunction with one or more 
  1441. <kw role = "element">bvar</kw> schemata to represent simple logical assertions. There are two ways of using the logical quantifier operators. The first usage is for representing a simple, quantified assertion. For example, the statement 
  1442. <quote>there exists
  1443. <mi>x</mi>< 9</quote> would be represented as:
  1444. <eg role = "mathml"><![CDATA[
  1445. <apply>
  1446.   <exists/>
  1447.   <bvar><ci> x </ci></bvar>
  1448.   <apply><lt/>
  1449.     <ci> x </ci><cn> 9 </cn>
  1450.   </apply>
  1451. </apply>
  1452. ]]></eg>The second usage is for representing implications. Hypotheses are given by a 
  1453. <kw role = "element">condition</kw> element following the bound variables. For example the statement 
  1454. <quote>for all 
  1455. <mi>x</mi> < 9, 
  1456. <mi>x</mi> < 10</quote> would be represented as:
  1457. <eg role = "mathml"><![CDATA[
  1458. <apply>
  1459.   <forall/>
  1460.   <bvar><ci> x </ci></bvar>
  1461.   <condition>
  1462.     <apply><lt/>
  1463.       <ci> x </ci><cn> 9 </cn>
  1464.     </apply>
  1465.   </condition>
  1466.   <apply><lt/>
  1467.     <ci> x </ci><cn> 10 </cn>
  1468.   </apply>
  1469. </apply>
  1470. ]]></eg>Note that in both usages one or more 
  1471. <kw role = "element">bvar</kw> qualifiers are mandatory.</p></def></gitem></glist></p></div4></div3>
  1472. <div3 id = "contm_relation">
  1473. <head>Relations</head>
  1474. <table>
  1475. <tbody>
  1476. <tr>
  1477. <td>binary relation</td>
  1478. <td>
  1479. <kw role = "element">neq</kw>,
  1480. <kw role = "element">equivalent</kw>,
  1481. <kw role = "element">approx</kw>,
  1482. <kw role = "element">factorof</kw>
  1483. </td></tr>
  1484. <tr>
  1485. <td>binary logical relation</td>
  1486. <td>
  1487. <kw role = "element">implies</kw></td></tr>
  1488. <tr>
  1489. <td>binary set relation</td>
  1490. <td>
  1491. <kw role = "element">in</kw>,
  1492. <kw role = "element">notin</kw>,
  1493. <kw role = "element">notsubset</kw>,
  1494. <kw role = "element">notprsubset</kw></td></tr>
  1495. <tr>
  1496. <td>binary series relation</td>
  1497. <td>
  1498. <kw role = "element">tendsto</kw></td></tr>
  1499. <tr>
  1500. <td>n-ary relation</td>
  1501. <td>
  1502. <kw role = "element">eq</kw>,
  1503. <kw role = "element">leq</kw>,
  1504. <kw role = "element">lt</kw>,
  1505. <kw role = "element">geq</kw>,
  1506. <kw role = "element">gt</kw></td></tr>
  1507. <tr>
  1508. <td>n-ary set relation</td>
  1509. <td>
  1510. <kw role = "element">subset</kw>,
  1511. <kw role = "element">prsubset</kw></td></tr></tbody></table>
  1512. <p>The MathML content tags include a number of canonically empty elements which denote arithmetic and logical relations. Relations are characterized by the fact that, if an external application were to evaluate them (MathML does not specify how to evaluate expressions), they would typically return a truth value. By contrast, operators generally return a value of the same type as the operands. For example, the result of evaluating 
  1513. <mi>a</mi> <
  1514. <mi>b</mi> is either true or false (by contrast, 1 + 2 is again a number).</p>
  1515. <p>Relations are bracketed with their arguments using the 
  1516. <kw role = "element">apply</kw> element in the same way as other functions. In MathML 1.0, relational operators were bracketed using 
  1517. <kw role = "element">reln</kw>. This usage, although still supported,
  1518. is now <intref ref="interf_deprec">deprecated</intref> in favor of  
  1519. <kw>apply</kw>. The element for the relational operator is the first child element of the
  1520. <kw role = "element">apply</kw>. Thus, the example from the preceding paragraph is properly marked up as:
  1521. <eg role = "mathml"><![CDATA[
  1522. <apply>
  1523.   <lt/>
  1524.   <ci>a</ci>
  1525.   <ci>b</ci>
  1526. </apply>
  1527. ]]></eg>It is an error to enclose a relation in an element other than
  1528. <kw role = "element">apply</kw> or 
  1529. <kw role = "element">reln</kw>.</p>
  1530. <p>The number of child elements in the 
  1531. <kw role = "element">apply</kw> is defined by the element in the first (i.e. relation) position.</p>
  1532. <p>
  1533. <emph>Unary</emph> relations are followed by exactly one other child element within the 
  1534. <kw role = "element">apply</kw>.</p>
  1535. <p>
  1536. <emph>Binary</emph> relations are followed by exactly two child elements.</p>
  1537. <p>
  1538. <emph>N-ary</emph> relations are followed by zero or more child elements.</p>
  1539. <p>The one exception to these rules is that 
  1540. <kw role = "element">declare</kw> elements may be inserted in any position except the first. 
  1541. <kw role = "element">declare</kw> elements are not counted when satisfying the child element count for an 
  1542. <kw role = "element">apply</kw> containing a unary or binary relation element.</p></div3>
  1543. <div3 id = "contm_conditions">
  1544. <head>Conditions</head>
  1545. <table border = "1">
  1546. <tbody>
  1547. <tr>
  1548. <td>condition</td>
  1549. <td>
  1550. <kw role = "element">condition</kw></td></tr></tbody></table>
  1551. <p>The 
  1552. <kw role = "element">condition</kw> element is used to define the
  1553. <quote>such that</quote> construct in mathematical expressions. Condition elements are used in a number of contexts in MathML. They are used to construct objects like sets and lists by rule instead of by enumeration. They can be used with the 
  1554. <kw role = "element">forall</kw> and
  1555. <kw role = "element">exists</kw> operators to form logical expressions. And finally, they can be used in various ways in conjunction with certain operators. For example, they can be used with an 
  1556. <kw role = "element">int</kw> element to specify domains of integration, or to specify argument lists for operators like 
  1557. <kw role = "element">min</kw> and
  1558. <kw role = "element">max</kw>.</p>
  1559. <p>The 
  1560. <kw role = "element">condition</kw> element is always used together with one or more 
  1561. <kw role = "element">bvar</kw> elements.</p>
  1562. <p>The exact interpretation depends on the context, but generally speaking, the 
  1563. <kw role = "element">condition</kw> element is used to restrict the permissible values of a bound variable appearing in another expression to those that satisfy the relations contained in the 
  1564. <kw role = "element">condition</kw>. Similarly, when the 
  1565. <kw role = "element">condition</kw> element contains a 
  1566. <kw role = "element">set</kw>, the values of the bound variables are restricted to that set.</p>
  1567. <p>A condition element contains a single child that is either an  
  1568. <kw role = "element">apply</kw>, or a 
  1569. <kw role = "element">reln</kw> element (<intref
  1570. ref="interf_deprec">deprecated</intref>). Compound conditions are
  1571. indicated by applying relations such as  
  1572. <kw role = "element">and</kw> inside the child of the condition.</p>
  1573. <div4>
  1574. <head>Examples</head>
  1575. <p>The following encodes 
  1576. <quote>there exists
  1577. <mi>x</mi> such that 
  1578. <mi>x</mi><sup>5</sup> < 3</quote>.
  1579. <eg role = "mathml"><![CDATA[
  1580. <apply>
  1581.   <exists/>
  1582.   <bvar><ci> x </ci></bvar>
  1583.   <condition>
  1584.     <apply><lt/>
  1585.       <apply>
  1586.         <power/>
  1587.         <ci>x</ci>
  1588.         <cn>5</cn>
  1589.       </apply>
  1590.       <cn>3</cn>
  1591.     </apply>
  1592.   </condition>
  1593. </apply>
  1594. ]]></eg></p>
  1595. <p>The next example encodes 
  1596. <quote>for all 
  1597. <mi>x</mi> in 
  1598. <mi>N</mi> there exist prime numbers
  1599. <mi>p, q</mi> such that
  1600. <mi>p</mi>+<mi>q</mi> =
  1601. <mi>2x</mi></quote>. 
  1602. <eg role = "mathml"><![CDATA[
  1603. <apply>
  1604.   <forall/>
  1605.   <bvar><ci>x</ci></bvar>
  1606.   <condition>
  1607.     <apply><in/>
  1608.           <ci>x</ci>
  1609.           <csymbol encoding="OpenMath" 
  1610.             definitionURL="http://www.openmath.org/cd/setname1.ocd">
  1611.             N
  1612.           </csymbol>
  1613.         </apply>
  1614.   </condition>
  1615.  
  1616.   <apply><exists/>
  1617.      <bvar><ci>p</ci></bvar>
  1618.      <bvar><ci>q</ci></bvar>
  1619.      <condition>
  1620.        <apply><and/>
  1621.           <apply><in/><ci>p</ci>
  1622.             <csymbol encoding="OpenMath" 
  1623.               definitionURL="http://www.openmath.org/cd/setname1.ocd">
  1624.              P
  1625.             </csymbol>
  1626.           </apply>
  1627.           <apply><in/><ci>q</ci>
  1628.             <csymbol encoding="OpenMath" 
  1629.               definitionURL="http://www.openmath.org/cd/setname1.ocd">
  1630.               P
  1631.             </csymbol>
  1632.           </apply>
  1633.           <apply><eq/>
  1634.               <apply><plus/><ci>p</ci><ci>q</ci></apply>
  1635.               <apply><times/><cn>2</cn><ci>x</ci></apply>
  1636.           </apply>
  1637.         </apply>
  1638.       </condition>
  1639.   </apply>
  1640. </apply>
  1641. ]]></eg> </p>
  1642. <p>A third example shows the use of quantifiers with 
  1643. <kw role = "element">condition</kw>. The following markup encodes 
  1644. <quote>there exists
  1645. <mi>x</mi> < 3 such that 
  1646. <mi>x</mi><sup>2</sup> = 4</quote>.
  1647. <eg role = "mathml"><![CDATA[
  1648. <apply>
  1649.   <exists/>
  1650.   <bvar><ci> x </ci></bvar>
  1651.   <condition>
  1652.     <apply><lt/><ci>x</ci><cn>3</cn></apply>
  1653.   </condition>
  1654.   <apply>
  1655.     <eq/>
  1656.     <apply>
  1657.       <power/><ci>x</ci><cn>2</cn>
  1658.     </apply>
  1659.     <cn>4</cn>
  1660.   </apply>
  1661. </apply>
  1662. ]]></eg></p></div4></div3>
  1663. <div3 id = "contm_synsem">
  1664. <head>Syntax and Semantics</head>
  1665. <table border = "1">
  1666. <tbody>
  1667. <tr>
  1668. <td>mappings</td>
  1669. <td>
  1670. <kw role = "element">semantics</kw>,
  1671. <kw role = "element">annotation</kw>,
  1672. <kw role = "element">annotation-xml</kw></td></tr></tbody></table>
  1673. <p>The use of content markup rather than presentation markup for mathematics is sometimes referred to as 
  1674. <emph>semantic tagging</emph>
  1675. <bibref ref = "Buswell1996"/>. The parse-tree of a valid element structure using MathML content elements corresponds directly to the expression tree of the underlying mathematical expression. We therefore regard the content tagging itself as encoding the 
  1676. <emph>syntax</emph> of the mathematical expression. This is, in general, sufficient to obtain some rendering and even some symbolic manipulation (e.g. polynomial factorization).</p>
  1677. <p>However, even in such apparently simple expressions as 
  1678. <mi>X</mi> +
  1679. <mi>Y</mi>, some additional information may be required for applications such as computer algebra. Are 
  1680. <mi>X</mi> and 
  1681. <mi>Y</mi> integers, or functions, etc.? 
  1682. <quote>Plus</quote> represents addition over which field? This additional information is referred to as 
  1683. <emph>semantic mapping</emph>. In MathML, this mapping is provided by the 
  1684. <kw role = "element">semantics</kw>, 
  1685. <kw role = "element">annotation</kw> and 
  1686. <kw role = "element">annotation-xml</kw> elements.</p>
  1687. <p>The 
  1688. <kw role = "element">semantics</kw> element is the container element for the MathML expression together with its semantic mappings. 
  1689. <kw role = "element">semantics</kw> expects a variable number of child elements. The first is the element (which may itself be a complex element structure) for which this additional semantic information is being defined. The second and subsequent children, if any, are instances of the elements 
  1690. <kw role = "element">annotation</kw> and/or 
  1691. <kw role = "element">annotation-xml</kw>.</p>
  1692. <p>The 
  1693. <kw role = "element">semantics</kw> element also accepts the
  1694. <kw role = "attrib">definitionURL</kw> and 
  1695. <kw role = "attrib">encoding</kw> attributes for use by external processing applications. One use might be a URI for a semantic content dictionary, for example. Since the semantic mapping information might in some cases be provided entirely by the 
  1696. <kw role = "attrib">definitionURL</kw> attribute, the 
  1697. <kw role = "element">annotation</kw> or 
  1698. <kw role = "element">annotation-xml</kw> elements are optional.</p>
  1699. <p>The 
  1700. <kw role = "element">annotation</kw> element is a container for arbitrary data. This data may be in the form of text, computer algebra encodings, C programs, or whatever a processing application expects. 
  1701. <kw role = "element">annotation</kw> has an attribute 
  1702. <kw role = "attval">encoding</kw> defining the form in use. Note that the content model of 
  1703. <kw role = "element">annotation</kw> is 
  1704. <kw>PCDATA</kw>, so care must be taken that the particular encoding does not conflict with XML parsing rules.</p>
  1705. <p>The 
  1706. <kw role = "element">annotation-xml</kw> element is a container for semantic information in well-formed XML. For example, an XML form of the OpenMath semantics could be given. Another possible use here is to embed, for example, the presentation tag form of a construct given in content tag form in the first child element of 
  1707. <kw role = "element">semantics</kw> (or vice versa). 
  1708. <kw role = "element">annotation-xml</kw> has an attribute 
  1709. <kw role = "attval">encoding</kw> defining the form in use.</p>
  1710. <p>For example:
  1711. <eg role = "mathml"><![CDATA[
  1712. <semantics>
  1713.   <apply>
  1714.   <divide/>
  1715.     <cn>123</cn>
  1716.     <cn>456</cn>
  1717.   </apply>
  1718.   <annotation encoding="Mathematica">
  1719.     N[123/456, 39]
  1720.   </annotation>
  1721.   <annotation encoding="TeX">
  1722.     $0.269736842105263157894736842105263157894\ldots$
  1723.   </annotation>
  1724.   <annotation encoding="Maple">
  1725.     evalf(123/456, 39);
  1726.   </annotation>
  1727.   <annotation-xml encoding="MathML-Presentation">
  1728.     <mrow>
  1729.       <mn> 0.269736842105263157894 </mn>
  1730.       <mover accent='true'>
  1731.         <mn> 736842105263157894 </mn>
  1732.         <mo> ‾ </mo>
  1733.       </mover>
  1734.     </mrow>
  1735.   </annotation-xml>
  1736.   <annotation-xml encoding="OpenMath">
  1737.     <OMA xmlns="http://www.openmath.org/OpenMath">
  1738.       <OMS cd="arith1" name="divide"/>
  1739.       <OMI>123</OMI>
  1740.       <OMI>456</OMI>
  1741.     </OMA>
  1742.   </annotation-xml>
  1743. </semantics>
  1744. ]]></eg>where 
  1745. <kw role = "element">OMA</kw> is the element defining the additional semantic information.</p>
  1746. <p>Of course, providing an explicit semantic mapping at all is optional, and in general would only be provided where there is some requirement to process or manipulate the underlying mathematics.</p></div3>
  1747. <div3>
  1748. <head>Semantic Mappings</head>
  1749. <p>Although semantic mappings can easily be provided by various proprietary, or highly specialized encodings, there are no widely available, non-proprietary standard schemes for semantic mapping. In part to address this need, the goal of the OpenMath effort is to provide a platform-independent, vendor-neutral standard for the exchange of mathematical objects between applications. Such mathematical objects include semantic mapping information. The OpenMath group has defined an XML syntax for the encoding of this information 
  1750. <bibref ref = "OpenMath2000"/>. This element set could provide the basis of one 
  1751. <kw role = "element">annotation-xml</kw> element set.</p>
  1752. <p>An attractive side of this mechanism is that the OpenMath syntax is specified in XML, so that a MathML expression together with its semantic annotations can be validated using XML parsers.</p></div3>
  1753. <div3>
  1754. <head>Constants and Symbols</head>
  1755. <p>MathML provides a collection of predefined constants and symbols which represent frequently-encountered concepts in K-12 mathematics. These include symbols for well-known sets, such as
  1756. <kw role = "element">integers</kw> and 
  1757. <kw role = "element">rationals</kw>, and also some widely known constant symbols such as 
  1758. <kw role = "element">false</kw>, 
  1759. <kw role = "element">true</kw>, 
  1760. <kw role = "element">exponentiale</kw>.</p></div3>
  1761. <div3>
  1762. <head>MathML element types</head>
  1763. <p>MathML functions, operators and relations can all be thought of as mathematical functions if viewed in a sufficiently abstract way. For example, the standard addition operator can be regarded as a function mapping pairs of real numbers to real numbers. Similarly, a relation can be thought of as a function from some space of ordered pairs into the set of values {true, false}. To be mathematically meaningful, the domain and codomain of a function must be precisely specified. In practical terms, this means that functions only make sense when applied to certain kinds of operands. For example, thinking of the standard addition operator, it makes no sense to speak of 
  1764. <quote>adding</quote> a set to a function. Since MathML content markup seeks to encode mathematical expressions in a way that can be unambiguously evaluated, it is no surprise that the types of operands is an issue.</p>
  1765. <p>MathML specifies the types of arguments in two ways. The first way is by providing precise instructions for processing applications about the kinds of arguments expected by the MathML content elements denoting functions, operators and relations. These operand types are defined in a dictionary of default semantic bindings for content elements, which is given in
  1766. <specref ref = "cedef"/>.  For example, the MathML content dictionary specifies that for real scalar arguments the plus operator is the standard commutative addition operator over a field. The elements 
  1767. <kw role = "element">cn</kw> has a 
  1768. <kw role = "attrib">type</kw> attribute with a default value of 
  1769. <kw role = "attval">real</kw>. Thus some processors will be able to use this information to verify the validity of the indicated operations.</p>
  1770.  
  1771.  
  1772. <p>Although MathML specifies the types of arguments for functions, operators and relations, and provides a mechanism for typing arguments, a MathML-compliant processor is not required to do any type checking. In other words, a MathML processor will not generate errors if argument types are incorrect. If the processor is a computer algebra system, it may be unable to evaluate an expression, but no MathML error is generated.</p></div3></div2>
  1773. <div2 id = "contm_attrib">
  1774. <head>Content Element Attributes</head>
  1775. <div3>
  1776. <head>Content Element Attribute Values</head>
  1777. <p>Content element attributes are all of the type 
  1778. <kw>CDATA,</kw> that is, any character string will be accepted as valid. In addition, each attribute has a list of predefined values, which a content processor is expected to recognize and process. The reason that the attribute values are not formally restricted to the list of predefined values is to allow for extension. A processor encountering a value (not in the predefined list) which it does not recognize may validly process it as the default value for that attribute.</p></div3>
  1779. <div3>
  1780. <head>Attributes Modifying Content Markup Semantics</head>
  1781. <p>Each attribute is followed by the elements to which it can be applied.</p>
  1782. <div4>
  1783. <head>
  1784. <kw role = "attrib">base</kw></head>
  1785. <glist>
  1786. <gitem>
  1787. <label>cn</label>
  1788. <def>
  1789. <p>indicates numerical base of the number. Predefined values: any numeric string.</p>
  1790. <p>The default value is 
  1791. <kw role = "attval">10</kw></p></def></gitem></glist></div4>
  1792. <div4>
  1793. <head>
  1794. <kw role = "attrib">closure</kw></head>
  1795. <glist>
  1796. <gitem>
  1797. <label>interval</label>
  1798. <def>
  1799. <p>indicates closure of the interval. Predefined values:
  1800. <kw role = "attval">open</kw>,
  1801. <kw role = "attval">closed</kw>,
  1802. <kw role = "attval">open-closed</kw>,
  1803. <kw role = "attval">closed-open</kw>.</p>
  1804. <p>The default value is 
  1805. <kw role = "attval">closed</kw></p></def></gitem></glist></div4>
  1806. <div4>
  1807. <head>
  1808. <kw role = "attrib">definitionURL</kw></head>
  1809. <glist>
  1810. <gitem>
  1811. <label>csymbol, declare, semantics, any operator element</label>
  1812. <def>
  1813. <p>points to an external definition of the semantics of the symbol or construct being declared. The value is a URL or URI that should point to some kind of definition. This definition overrides the MathML default semantics.</p>
  1814. <p>At present, MathML does not specify the format in which external semantic definitions should be given. In particular, 
  1815. <emph>there is no requirement that the target of the URI be loadable and parsable.</emph>  
  1816. An external definition could, for example, define the semantics in human-readable form.</p>
  1817. <p>Ideally, in most situations the definition pointed to by the
  1818. <kw role = "attrib">definitionURL</kw> attribute would be some standard, machine-readable format. However, there are reasons why MathML does not require such a format.</p>
  1819. <ulist>
  1820. <item>
  1821. <p>No such format currently exists. There are several projects underway 
  1822. to develop and implement standard semantic encoding formats, 
  1823. most notably the OpenMath effort. 
  1824. By nature, the development of a comprehensive system of semantic encoding 
  1825. is a very large enterprise, and while much work has been done, much 
  1826. additional work remains. Even though the 
  1827. <kw role = "attrib">definitionURL</kw> is designed and intended for use 
  1828. with a formal semantic encoding language such as OpenMath, it is premature 
  1829. to require any one particular format.</p>
  1830. </item>
  1831. <item>
  1832. <p>
  1833. There will always be situations where some non-standard format is preferable.
  1834. This is particularly true in situations where authors are describing new 
  1835. ideas.
  1836. It is anticipated that in the near term, there will be a variety 
  1837. of renderer-dependent implementations of the
  1838. <kw role = "attrib">definitionURL</kw> attribute.</p>
  1839. <ulist>
  1840. <item>
  1841. <p>A translation tool might simply prompt the user with the specified definition 
  1842. in situations where the proper semantics have been overridden, and in this 
  1843. case, human-readable definitions will be most useful.</p>
  1844. </item>
  1845. <item>
  1846. <p>Other software may utilize OpenMath encodings.</p>
  1847. </item>
  1848. <item>
  1849. <p>Still other software may use proprietary encodings, or look for definitions 
  1850. in any of several formats.</p>
  1851. </item>
  1852. </ulist>
  1853. <p>As a consequence, authors need to be aware that there is no guarantee a generic renderer will be able to take advantage of information pointed to by the 
  1854. <kw role = "attrib">definitionURL</kw> attribute. Of course, when widely-accepted standardized semantic encodings are available, the definitions pointed to can be replaced without modifying the original document. However, this is likely to be labor intensive.</p>
  1855. </item>
  1856. </ulist>
  1857. <p>There is no default value for the 
  1858. <kw role = "attrib">definitionURL</kw> attribute, i.e. the semantics are defined 
  1859. within the MathML fragment, and/or by the MathML default semantics.</p></def></gitem></glist></div4>
  1860. <div4>
  1861. <head>
  1862. <kw role = "attrib">encoding</kw></head>
  1863. <glist>
  1864. <gitem>
  1865. <label>annotation, annotation-xml, csymbol, semantics, all operator elements</label>
  1866. <def>
  1867. <p>indicates the encoding of the annotation, or in the case of
  1868. <kw>csymbol</kw> , 
  1869. <kw>semantics</kw> and operator elements, the syntax of the target referred to by
  1870. <kw>definitionURL</kw>. Predefined values are
  1871. <kw role = "attval">MathML-Presentation</kw>,
  1872. <kw role = "attval">MathML-Content</kw>. Other typical values:
  1873. <kw role = "attval">TeX</kw>,
  1874. <kw role = "attval">OpenMath</kw>.</p>
  1875. <p>The default value is "", i.e. unspecified.</p></def></gitem></glist></div4>
  1876. <div4>
  1877. <head>
  1878. <kw role = "attrib">nargs</kw></head>
  1879. <glist>
  1880. <gitem>
  1881. <label>declare</label>
  1882. <def>
  1883. <p>indicates number of arguments for function declarations. Pre-defined values: 
  1884. <kw role = "attval">nary</kw>, or any numeric string.</p>
  1885. <p>The default value is 
  1886. <kw role = "attval">1</kw>.</p></def></gitem></glist></div4>
  1887. <div4>
  1888. <head>
  1889. <kw role = "attrib">occurrence</kw></head>
  1890. <glist>
  1891. <gitem>
  1892. <label>declare</label>
  1893. <def>
  1894. <p>indicates occurrence for operator declarations. Pre-defined values:
  1895. <kw role = "attval">prefix</kw>,
  1896. <kw role = "attval">infix</kw>,
  1897. <kw role = "attval">function-model</kw>.</p>
  1898. <p>The default value is 
  1899. <kw role = "attval">function-model</kw>.</p></def></gitem></glist></div4>
  1900. <div4>
  1901. <head>
  1902. <kw role = "attrib">order</kw></head>
  1903. <glist>
  1904. <gitem>
  1905. <label>list</label>
  1906. <def>
  1907. <p>indicates ordering on the list. Predefined values:
  1908. <kw role = "attval">lexicographic</kw>,
  1909. <kw role = "attval">numeric</kw>.</p>
  1910. <p>The default value is 
  1911. <kw role = "attval">numeric</kw>.</p></def></gitem></glist></div4>
  1912. <div4 id = "contm_scope">
  1913. <head>
  1914. <kw role = "attrib">scope</kw></head>
  1915. <glist>
  1916. <gitem>
  1917. <label>declare</label>
  1918. <def>
  1919. <p>indicates scope of applicability of the declaration. Pre-defined values:
  1920. <kw role = "attval">local</kw>,
  1921. <kw role = "attval">global</kw> (<intref ref="interf_deprec">deprecated</intref>).
  1922. <ulist>
  1923. <item>
  1924. <p>
  1925. <kw role = "attval">local</kw> means the containing MathML element.</p></item>
  1926. <item>
  1927. <p>
  1928. <kw role = "attval">global</kw> means the containing <kw role="element">math</kw> element.</p></item>
  1929. </ulist>
  1930. </p>
  1931. <p>In MathML 2.0, a declare has been restricted to occur only at the beginning of a 
  1932. <kw role="element">math</kw> element. Thus, there is no difference between 
  1933. the two possible <kw role="attrib">scope</kw> values and the scope attribute may be 
  1934. safely ignored.
  1935. The <kw role = "attval">global</kw> attribute value has been 
  1936. <intref ref="interf_deprec">deprecated</intref> for this role 
  1937. as <kw role = "attval">local</kw> better represents the concept.
  1938. Ideally, one would like to make document-wide declarations by setting the value of the
  1939. <kw role = "attrib">scope</kw> attribute to be
  1940. <kw role = "attval">global-document</kw>. However, the proper mechanism for document-wide declarations very much depends on details of the way in which XML will be embedded in HTML, future XML style sheet mechanisms, and the underlying Document Object Model.</p>
  1941. <p>Since these supporting technologies are still in flux at present, the MathML specification does not include
  1942. <kw role = "attval">global-document</kw> as a pre-defined value of the
  1943. <kw role = "attrib">scope</kw> attribute. It is anticipated, however, that this issue will be revisited in future revisions of MathML as supporting technologies stabilize. In the near term, MathML implementors that wish to simulate the effect of a document-wide declaration are encouraged to pre-process documents in order to distribute document-wide declarations to each individual 
  1944. <kw role = "element">math</kw> element in the document.</p></def></gitem></glist></div4>
  1945.  
  1946. <div4 id = "contm_typeattrib">
  1947. <head>
  1948. <kw role = "attrib">type</kw></head>
  1949. <glist>
  1950. <gitem>
  1951. <label>cn</label>
  1952. <def>
  1953. <p>indicates type of the number. Predefined values:
  1954. <kw role = "attval">e-notation</kw>,
  1955. <kw role = "attval">integer</kw>,
  1956. <kw role = "attval">rational</kw>,
  1957. <kw role = "attval">real</kw>,
  1958. <kw role = "attval">float</kw>,
  1959. <kw role = "attval">complex-polar</kw>,
  1960. <kw role = "attval">complex-cartesian</kw>,
  1961. <kw role = "attval">constant</kw>.</p>
  1962. <p>The default value is 
  1963. <kw role = "attval">real</kw>.</p>
  1964. <p>Notes. Each data type implies that the data adheres to certain formatting conventions, detailed below. If the data fails to conform to the expected format, an error is generated. Details of the individual formats are:</p>
  1965. <glist>
  1966. <gitem>
  1967. <label>real</label>
  1968. <def>
  1969. <p>A real number is presented in decimal notation. Decimal notation consists of an optional sign
  1970. (<quote>+</quote> or 
  1971. <quote>-</quote>) followed by a string of digits possibly separated into an integer and a fractional part by a 
  1972. <quote>decimal point</quote>. Some examples are 0.3, 1, and -31.56. If a different
  1973. <kw role = "attrib">base</kw> is specified, then the digits are interpreted as being digits computed to that base.</p>
  1974. </def></gitem>
  1975.  
  1976.  
  1977.  
  1978. <gitem>
  1979. <label>e-notation</label>
  1980. <def>
  1981. <p>A real number may also be presented in scientific notation. Such numbers have two parts (a mantissa and an exponent) separated by
  1982. <quote>e</quote> or <quote>E</quote>. The first part is a real number, while the second part is an integer exponent indicating a power of the base. 
  1983. For example, 12.3e5 represents 12.3 times 10<sup>5</sup></p></def></gitem>
  1984. <gitem>
  1985. <label>integer</label>
  1986. <def>
  1987. <p>An integer is represented by an optional sign followed by a string of 1 or more 
  1988. <quote>digits</quote>. What a 
  1989. <quote>digit</quote> is depends on the 
  1990. <kw role = "attrib">base</kw> attribute. If 
  1991. <kw role = "attrib">base</kw> is present, it specifies the base for the digit encoding, and it specifies it base 10. Thus
  1992. <kw role = "attrib">base</kw>='16' specifies a hex encoding. When
  1993. <kw role = "attrib">base</kw> > 10, letters are added in alphabetical order as digits. The legitimate values for 
  1994. <kw role = "attrib">base</kw> are therefore between 2 and 36.</p></def></gitem>
  1995. <gitem>
  1996. <label>rational</label>
  1997. <def>
  1998. <p>A rational number is two integers separated by 
  1999. <kw role = "emptytag">sep</kw>. If 
  2000. <kw role = "attrib">base</kw> is present, it specifies the base used for the digit encoding of both integers.</p></def></gitem>
  2001. <gitem>
  2002. <label>complex-cartesian</label>
  2003. <def>
  2004. <p>A complex number is of the form two real point numbers separated by
  2005. <kw role = "emptytag">sep</kw>.</p></def></gitem>
  2006. <gitem>
  2007. <label>complex-polar</label>
  2008. <def>
  2009. <p>A complex number is specified in the form of a magnitude and an angle (in radians). The raw data is in the form of two real numbers separated by 
  2010. <kw role = "emptytag">sep</kw>.</p></def></gitem>
  2011. <gitem>
  2012. <label>constant</label>
  2013. <def>
  2014. <p>The 
  2015. <kw role = "attval">constant</kw> type is used to denote named constants. For example, an instance of
  2016. <code><![CDATA[<cn type="constant">π</cn>]]></code>should be interpreted as having the semantics of the mathematical constant Pi. The data for a constant 
  2017. <kw role = "element">cn</kw> tag may be one of the following common constants:
  2018. <table border = "1">
  2019. <tbody>
  2020. <tr>
  2021. <td>Symbol</td>
  2022. <td>Value</td></tr>
  2023. <tr>
  2024. <td>
  2025. <kw role = "entity">pi</kw></td>
  2026. <td>The usual
  2027. <kw role = "entity">pi</kw> of trigonometry: approximately 3.141592653...</td></tr>
  2028. <tr>
  2029. <td>
  2030. <kw role = "entity">ExponentialE</kw> (or
  2031. <kw role = "entity">ee</kw>)</td>
  2032. <td>The base for natural logarithms: approximately 2.718281828 ...</td></tr>
  2033. <tr>
  2034. <td>
  2035. <kw role = "entity">ImaginaryI</kw> (or
  2036. <kw role = "entity">ii</kw>)</td>
  2037. <td>Square root of -1</td></tr>
  2038. <tr>
  2039. <td>
  2040. <kw role = "entity">gamma</kw></td>
  2041. <td>Euler's constant: approximately 0.5772156649...</td></tr>
  2042. <tr>
  2043. <td>
  2044. <kw role = "entity">infin</kw> (or
  2045. <kw role = "entity">infty</kw>)</td>
  2046. <td>Infinity. Proper interpretation varies with context</td></tr>
  2047. <tr>
  2048. <td>
  2049. <kw role = "entity">true</kw></td>
  2050. <td>the logical constant 
  2051. <kw>true</kw></td></tr>
  2052. <tr>
  2053. <td>
  2054. <kw role = "entity">false</kw></td>
  2055. <td>the logical constant 
  2056. <kw>false</kw></td></tr>
  2057. <tr>
  2058. <td>
  2059. <kw role = "entity">NotANumber</kw> (or
  2060. <kw role = "entity">NaN</kw>)</td>
  2061. <td>represents the result of an ill-defined floating point division</td></tr></tbody></table></p></def></gitem></glist></def></gitem>
  2062. <gitem>
  2063. <label>ci</label>
  2064. <def>
  2065. <p>indicates type of the identifier. Predefined values:
  2066. <kw role = "attval">integer</kw>,
  2067. <kw role = "attval">rational</kw>,
  2068. <kw role = "attval">real</kw>,
  2069. <kw role = "attval">float</kw>,
  2070. <kw role = "attval">complex</kw>,
  2071. <kw role = "attval">complex-polar</kw>,
  2072. <kw role = "attval">complex-cartesian</kw>,
  2073. <kw role = "attval">constant</kw>, or the name of any content element. The meanings of the attribute values shared with 
  2074. <kw role="element">cn</kw> are the same as those listed for the <kw role = "element">cn</kw> element.  
  2075. The attribute value <kw role = "attval">complex</kw> is intended for use when an identifier 
  2076. represents a complex number but the particular representation (such as polar or cartesian) is
  2077. either not known or is irrelevant.</p>
  2078. <p>The default value is "", i.e. unspecified.</p></def></gitem>
  2079. <gitem>
  2080. <label>declare</label>
  2081. <def>
  2082. <p>indicates type of the identifier being declared. Predefined values: any content element name.</p>
  2083. <p>The default value is 
  2084. <kw role = "element">ci</kw> , i.e. a generic identifier</p></def></gitem>
  2085. <gitem>
  2086. <label>set</label>
  2087. <def>
  2088. <p>indicates type of the set. Predefined values:
  2089. <kw role = "attval">normal</kw>, 
  2090. <kw role = "attval">multiset</kw>.
  2091. <kw role = "attval">multiset</kw> indicates that repetitions are allowed.</p>
  2092. <p>The default value is 
  2093. <kw role = "attval">normal</kw>.</p></def></gitem>
  2094. <gitem>
  2095. <label>tendsto</label>
  2096. <def>
  2097. <p>is used to capture the notion of one quantity approaching another.  It occurs as a 
  2098. container so that it can more easily be used in the construction of a limit expression.
  2099. Predefined values: 
  2100. <kw role = "attval">above</kw>,
  2101. <kw role = "attval">below</kw>, 
  2102. <kw role = "attval">two-sided</kw>.</p>
  2103. <p>The default value is 
  2104. <kw role = "attval">above</kw>.</p></def></gitem></glist></div4></div3>
  2105. <div3>
  2106. <head>Attributes Modifying Content Markup Rendering</head>
  2107. <div4>
  2108. <head>
  2109. <kw role = "attrib">type</kw></head>
  2110. <p>The 
  2111. <kw role = "attrib">type</kw> attribute, in addition to conveying semantic information, can be interpreted to provide rendering information. For example in
  2112. <eg role = "mathml"><![CDATA[
  2113. <ci type="vector">V</ci>
  2114. ]]></eg>a renderer could display a bold
  2115. <mi>V</mi> for the vector.</p></div4>
  2116. <div4 id = "contm_genatt">
  2117. <head>General Attributes</head>
  2118. <p>All content elements support the following general attributes that can be used to modify the rendering of the markup.
  2119. <ulist>
  2120. <item>
  2121. <p>
  2122. <kw role = "attrib">class</kw></p></item>
  2123. <item>
  2124. <p>
  2125. <kw role = "attrib">style</kw></p></item>
  2126. <item>
  2127. <p>
  2128. <kw role = "attrib">id</kw></p></item>
  2129. <item>
  2130. <p>
  2131. <kw role = "attrib">other</kw></p></item></ulist></p>
  2132. <p>The 
  2133. <kw role = "attval">class</kw>, 
  2134. <kw role = "attval">style</kw> and 
  2135. <kw role = "attval">id</kw> attributes are intended for compatibility with Cascading Style Sheets (CSS), as described in 
  2136. <specref ref = "fund_globatt"/>.</p>
  2137. <p>Content or semantic tagging goes along with the (frequently implicit) premise that, if you know the semantics, you can always work out a presentation form. When an author's main goal is to mark up re-usable, evaluatable mathematical expressions, the exact rendering of the expression is probably not critical, provided that it is easily understandable. However, when an author's goal is more along the lines of providing enough additional semantic information to make a document more accessible by facilitating better visual rendering, voice rendering, or specialized processing, controlling the exact notation used becomes more of an issue.</p>
  2138. <p>MathML elements accept an attribute 
  2139. <kw role = "attrib">other</kw> (see
  2140. <specref ref = "interf_unspecified"/>), which can be used to specify things not specifically documented in MathML. On content tags, this attribute can be used by an author to express a 
  2141. <emph>preference</emph> between equivalent forms for a particular content element construct, where the selection of the presentation has nothing to do with the semantics. Examples might be
  2142. <ulist>
  2143. <item>
  2144. <p>inline or displayed equations</p></item>
  2145. <item>
  2146. <p>script-style fractions</p></item>
  2147. <item>
  2148. <p>use of 
  2149. <mi>x</mi> with a dot for a derivative over d
  2150. <mi>x</mi>/d
  2151. <mi>t</mi></p></item></ulist></p>
  2152. <p>Thus, if a particular renderer recognized a display attribute to select between script-style and display-style fractions, an author might write
  2153. <eg role = "mathml"><![CDATA[
  2154. <apply other='display="scriptstyle"'>
  2155.   <divide/>
  2156.   <mn> 1 </mn>
  2157.   <mi> x </mi>
  2158. </apply>
  2159. ]]></eg>to indicate that the rendering 1/
  2160. <mi>x</mi> is preferred.</p>
  2161. <p>The information provided in the 
  2162. <kw role = "attrib">other</kw> attribute is intended for use by specific renderers or processors, and therefore, the permitted values are determined by the renderer being used. It is legal for a renderer to ignore this information. This might be intentional, as in the case of a publisher imposing a house style, or simply because the renderer does not understand them, or is unable to carry them out.</p></div4></div3></div2>
  2163. <div2 id = "contm_elem">
  2164. <head>The Content Markup Elements</head>
  2165. <p>This section provides detailed descriptions of the MathML content tags. They are grouped in categories that broadly reflect the area of mathematics from which they come, and also the grouping in the MathML DTD. There is no linguistic difference in MathML between operators and functions. Their separation here and in the DTD is for reasons of historical usage.</p>
  2166. <p>When working with the content elements, it can be useful to keep in mind the following.
  2167. <ulist>
  2168. <item>
  2169. <p>The role of the content elements is analogous to data entry in a mathematical system.  The information that is provided is there to facilitate the successful parsing of an expression as the intended mathematical object by a receiving application.</p></item>
  2170. <item>
  2171. <p>MathML content elements do not by themselves
  2172. <quote>perform</quote> any mathematical evaluations or operations. They do not 
  2173. <quote>evaluate</quote> in a browser and any 
  2174. <quote>action</quote> that is ultimately taken on those objects is determined entirely by the receiving mathematical application. For example, editing programs and applications geared to computation for the lower grades would typically leave 3 + 4 as is, whereas computational systems targeting a more advanced audience might evaluate this as 7. Similarly, some computational systems might evaluate sin(0) to 0, whereas others would leave it unevaluated. Yet other computational systems might be unable to deal with pure symbolic expressions like sin(<mi>x</mi>) and may even regard them as data entry errors. None of this has any bearing on the correctness of the original MathML representation.  Where evaluation is mentioned at all in the descriptions below, it is merely to help clarify the meaning of the underlying operation.</p></item>
  2175. <item>
  2176. <p>Apart from the instances where there is an explicit interaction with presentation tagging, there is no required rendering (visual or aural) – only a suggested default.  As such, the presentations that are included in this section are merely to help communicate to the reader the intended mathematical meaning by association with the same expression written in a more traditional notation.</p></item></ulist></p>
  2177. <p>The available content elements are:
  2178. <ulist>
  2179. <item>
  2180. <p>token elements
  2181. <ulist>
  2182. <item><p><intref ref="contm_cn"><kw role="element">cn</kw></intref></p></item>
  2183. <item><p><intref ref="contm_ci"><kw role="element">ci</kw></intref></p></item>
  2184. <item><p><intref ref="contm_csymbol"><kw role="element">csymbol</kw></intref> (MathML 2.0)</p></item>
  2185. </ulist></p></item>
  2186.  
  2187. <item><p>basic content elements
  2188. <ulist>
  2189. <item><p><intref ref="contm_apply"><kw role="element">apply</kw></intref></p></item>
  2190. <item><p><intref ref="contm_reln"><kw role="element">reln</kw></intref> (deprecated)</p></item>
  2191.  
  2192. <item><p><intref ref="contm_fn"><kw role="element">fn</kw></intref> (deprecated for externally defined
  2193. functions)</p></item>
  2194. <item><p><intref ref="contm_interval"><kw role="element">interval</kw></intref></p></item>
  2195. <item><p><intref ref="contm_inverse"><kw role="element">inverse</kw></intref></p></item>
  2196. <item><p><intref ref="contm_sep"><kw role="element">sep</kw></intref></p></item>
  2197. <item><p><intref ref="contm_condition"><kw role="element">condition</kw></intref></p></item>
  2198. <item><p><intref ref="contm_declare"><kw role="element">declare</kw></intref></p></item>
  2199. <item><p><intref ref="contm_lambda"><kw role="element">lambda</kw></intref></p></item>
  2200. <item><p><intref ref="contm_compose"><kw role="element">compose</kw></intref></p></item>
  2201. <item><p><intref ref="contm_ident"><kw role="element">ident</kw></intref></p></item>
  2202. <item><p><intref ref="contm_domain"><kw role="element">domain</kw></intref> (MathML 2.0)</p></item>
  2203. <item><p><intref ref="contm_codomain"><kw role="element">codomain</kw></intref> (MathML 2.0)</p></item>
  2204. <item><p><intref ref="contm_image"><kw role="element">image</kw></intref> (MathML 2.0)</p></item>
  2205. <item><p><intref ref="contm_domainofapplication"><kw role="element">domainofapplication</kw></intref> (MathML 2.0)</p></item>
  2206. <item><p><intref ref="contm_piecewise"><kw role="element">piecewise</kw></intref> (MathML 2.0)</p></item>
  2207. <item><p><intref ref="contm_piecewise"><kw role="element">piece</kw></intref> (MathML 2.0)</p></item>
  2208. <item><p><intref ref="contm_piecewise"><kw role="element">otherwise</kw></intref> (MathML 2.0)</p></item>
  2209. </ulist></p></item>
  2210.  
  2211. <item><p>arithmetic, algebra and logic
  2212. <ulist>
  2213. <item><p><intref ref="contm_quotient"><kw role="element">quotient</kw></intref></p></item>
  2214. <item><p><intref ref="contm_exp"><kw role="element">exp</kw></intref></p></item>
  2215. <item><p><intref ref="contm_factorial"><kw role="element">factorial</kw></intref></p></item>
  2216. <item><p><intref ref="contm_divide"><kw role="element">divide</kw></intref></p></item>
  2217. <item><p><intref ref="contm_maxmin"><kw role="element">max</kw></intref> and 
  2218.   <intref ref="contm_maxmin"><kw role="element">min</kw></intref></p></item>
  2219. <item><p><intref ref="contm_minus"><kw role="element">minus</kw></intref></p></item>
  2220. <item><p><intref ref="contm_plus"><kw role="element">plus</kw></intref></p></item>
  2221. <item><p><intref ref="contm_power"><kw role="element">power</kw></intref></p></item>
  2222. <item><p><intref ref="contm_rem"><kw role="element">rem</kw></intref></p></item>
  2223. <item><p><intref ref="contm_times"><kw role="element">times</kw></intref></p></item>
  2224. <item><p><intref ref="contm_root"><kw role="element">root</kw></intref></p></item>
  2225. <item><p><intref ref="contm_gcd"><kw role="element">gcd</kw></intref></p></item>
  2226. <item><p><intref ref="contm_and"><kw role="element">and</kw></intref></p></item>
  2227. <item><p><intref ref="contm_or"><kw role="element">or</kw></intref></p></item>
  2228. <item><p><intref ref="contm_xor"><kw role="element">xor</kw></intref></p></item>
  2229. <item><p><intref ref="contm_not"><kw role="element">not</kw></intref></p></item>
  2230. <item><p><intref ref="contm_implies"><kw role="element">implies</kw></intref></p></item>
  2231. <item><p><intref ref="contm_forall"><kw role="element">forall</kw></intref></p></item>
  2232. <item><p><intref ref="contm_exists"><kw role="element">exists</kw></intref></p></item>
  2233. <item><p><intref ref="contm_abs"><kw role="element">abs</kw></intref></p></item>
  2234. <item><p><intref ref="contm_conjugate"><kw role="element">conjugate</kw></intref></p></item>
  2235. <item><p><intref ref="contm_arg"><kw role="element">arg</kw></intref> (MathML 2.0)</p></item>
  2236. <item><p><intref ref="contm_real"><kw role="element">real</kw></intref> (MathML 2.0)</p></item>
  2237. <item><p><intref ref="contm_imaginary"><kw role="element">imaginary</kw></intref> (MathML 2.0)</p></item>
  2238. <item><p><intref ref="contm_lcm"><kw role="element">lcm</kw></intref> (MathML 2.0)</p></item>
  2239. <item><p><intref ref="contm_floor"><kw role="element">floor</kw></intref> (MathML 2.0)</p></item>
  2240. <item><p><intref ref="contm_ceiling"><kw role="element">ceiling</kw></intref> (MathML 2.0)</p></item>
  2241. </ulist></p></item>
  2242. <item>
  2243. <p>relations
  2244. <ulist>
  2245. <item><p><intref ref="contm_eq"><kw role="element">eq</kw></intref></p></item>
  2246. <item><p><intref ref="contm_neq"><kw role="element">neq</kw></intref></p></item>
  2247. <item><p><intref ref="contm_gt"><kw role="element">gt</kw></intref></p></item>
  2248. <item><p><intref ref="contm_lt"><kw role="element">lt</kw></intref></p></item>
  2249. <item><p><intref ref="contm_geq"><kw role="element">geq</kw></intref></p></item>
  2250. <item><p><intref ref="contm_leq"><kw role="element">leq</kw></intref></p></item>
  2251. <item><p><intref ref="contm_equivalent"><kw role="element">equivalent</kw></intref> (MathML 2.0)</p></item>
  2252. <item><p><intref ref="contm_approx"><kw role="element">approx</kw></intref> (MathML 2.0)</p></item>
  2253. <item><p><intref ref="contm_factorof"><kw role="element">factorof</kw></intref> (MathML 2.0)</p></item>
  2254. </ulist></p></item>
  2255.  
  2256. <item><p>calculus and vector calculus
  2257. <ulist>
  2258. <item><p><intref ref="contm_int"><kw role="element">int</kw></intref></p></item>
  2259. <item><p><intref ref="contm_diff"><kw role="element">diff</kw></intref></p></item>
  2260. <item><p><intref ref="contm_partialdiff"><kw role="element">partialdiff</kw></intref></p></item>
  2261. <item><p><intref ref="contm_lowlimit"><kw role="element">lowlimit</kw></intref></p></item>
  2262. <item><p><intref ref="contm_uplimit"><kw role="element">uplimit</kw></intref></p></item>
  2263. <item><p><intref ref="contm_bvar"><kw role="element">bvar</kw></intref></p></item>
  2264. <item><p><intref ref="contm_degree"><kw role="element">degree</kw></intref></p></item>
  2265. <item><p><intref ref="contm_divergence"><kw role="element">divergence</kw></intref> (MathML 2.0)</p></item>
  2266. <item><p><intref ref="contm_grad"><kw role="element">grad</kw></intref> (MathML 2.0)</p></item>
  2267. <item><p><intref ref="contm_curl"><kw role="element">curl</kw></intref> (MathML 2.0)</p></item>
  2268. <item><p><intref ref="contm_laplacian"><kw role="element">laplacian</kw></intref> (MathML 2.0)</p></item>
  2269. </ulist></p></item>
  2270.  
  2271. <item><p>theory of sets
  2272. <ulist>
  2273. <item><p><intref ref="contm_set"><kw role="element">set</kw></intref></p></item>
  2274. <item><p><intref ref="contm_list"><kw role="element">list</kw></intref></p></item>
  2275. <item><p><intref ref="contm_union"><kw role="element">union</kw></intref></p></item>
  2276. <item><p><intref ref="contm_intersect"><kw role="element">intersect</kw></intref></p></item>
  2277. <item><p><intref ref="contm_in"><kw role="element">in</kw></intref></p></item>
  2278. <item><p><intref ref="contm_notin"><kw role="element">notin</kw></intref></p></item>
  2279. <item><p><intref ref="contm_subset"><kw role="element">subset</kw></intref></p></item>
  2280. <item><p><intref ref="contm_prsubset"><kw role="element">prsubset</kw></intref></p></item>
  2281. <item><p><intref ref="contm_notsubset"><kw role="element">notsubset</kw></intref></p></item>
  2282. <item><p><intref ref="contm_notprsubset"><kw role="element">notprsubset</kw></intref></p></item>
  2283. <item><p><intref ref="contm_setdiff"><kw role="element">setdiff</kw></intref></p></item>
  2284. <item><p><intref ref="contm_card"><kw role="element">card</kw></intref> (MathML 2.0)</p></item>
  2285. <item><p><intref ref="contm_cartesianproduct"><kw role="element">cartesianproduct</kw></intref> (MathML 2.0)</p></item>
  2286. </ulist></p></item>
  2287.  
  2288. <item><p>sequences and series
  2289. <ulist>
  2290. <item><p><intref ref="contm_sum"><kw role="element">sum</kw></intref></p></item>
  2291. <item><p><intref ref="contm_product"><kw role="element">product</kw></intref></p></item>
  2292. <item><p><intref ref="contm_limit"><kw role="element">limit</kw></intref></p></item>
  2293. <item><p><intref ref="contm_tendsto"><kw role="element">tendsto</kw></intref></p></item>
  2294. </ulist></p></item>
  2295.  
  2296. <item><p>elementary classical functions</p>
  2297.  
  2298. <p>
  2299. <ulist>
  2300. <item><p><intref ref="contm_exp"><kw role="element">exp</kw></intref></p></item>
  2301. <item><p><intref ref="contm_ln"><kw role="element">ln</kw></intref></p></item>
  2302. <item><p><intref ref="contm_log"><kw role="element">log</kw></intref></p></item>
  2303. <item><p><intref ref="contm_trig"><kw role="element">sin</kw></intref></p></item>
  2304. <item><p><intref ref="contm_trig"><kw role="element">cos</kw></intref></p></item>
  2305. <item><p><intref ref="contm_trig"><kw role="element">tan</kw></intref></p></item>
  2306. <item><p><intref ref="contm_trig"><kw role="element">sec</kw></intref></p></item>
  2307. <item><p><intref ref="contm_trig"><kw role="element">csc</kw></intref></p></item>
  2308. <item><p><intref ref="contm_trig"><kw role="element">cot</kw></intref></p></item>
  2309. <item><p><intref ref="contm_trig"><kw role="element">sinh</kw></intref></p></item>
  2310. <item><p><intref ref="contm_trig"><kw role="element">cosh</kw></intref></p></item>
  2311. <item><p><intref ref="contm_trig"><kw role="element">tanh</kw></intref></p></item>
  2312. <item><p><intref ref="contm_trig"><kw role="element">sech</kw></intref></p></item>
  2313. <item><p><intref ref="contm_trig"><kw role="element">csch</kw></intref></p></item>
  2314. <item><p><intref ref="contm_trig"><kw role="element">coth</kw></intref></p></item>
  2315. <item><p><intref ref="contm_trig"><kw role="element">arcsin</kw></intref></p></item>
  2316. <item><p><intref ref="contm_trig"><kw role="element">arccos</kw></intref></p></item>
  2317. <item><p><intref ref="contm_trig"><kw role="element">arctan</kw></intref></p></item>
  2318. <item><p><intref ref="contm_trig"><kw role="element">arccosh</kw></intref></p></item>
  2319. <item><p><intref ref="contm_trig"><kw role="element">arccot</kw></intref></p></item>
  2320. <item><p><intref ref="contm_trig"><kw role="element">arccoth</kw></intref></p></item>
  2321. <item><p><intref ref="contm_trig"><kw role="element">arccsc</kw></intref></p></item>
  2322. <item><p><intref ref="contm_trig"><kw role="element">arccsch</kw></intref></p></item>
  2323. <item><p><intref ref="contm_trig"><kw role="element">arcsec</kw></intref></p></item>
  2324. <item><p><intref ref="contm_trig"><kw role="element">arcsech</kw></intref></p></item>
  2325. <item><p><intref ref="contm_trig"><kw role="element">arcsinh</kw></intref></p></item>
  2326. <item><p><intref ref="contm_trig"><kw role="element">arctanh</kw></intref></p></item>
  2327. </ulist></p></item>
  2328.  
  2329. <item><p>statistics
  2330. <ulist>
  2331. <item><p><intref ref="contm_mean"><kw role="element">mean</kw></intref></p></item>
  2332. <item><p><intref ref="contm_sdev"><kw role="element">sdev</kw></intref></p></item>
  2333. <item><p><intref ref="contm_variance"><kw role="element">variance</kw></intref></p></item>
  2334. <item><p><intref ref="contm_median"><kw role="element">median</kw></intref></p></item>
  2335. <item><p><intref ref="contm_mode"><kw role="element">mode</kw></intref></p></item>
  2336. <item><p><intref ref="contm_moment"><kw role="element">moment</kw></intref></p></item>
  2337. <item><p><intref ref="contm_momentabout"><kw role="element">momentabout</kw></intref> (MathML 2.0)</p></item>
  2338. </ulist></p></item>
  2339.  
  2340. <item><p>linear algebra
  2341. <ulist>
  2342. <item><p><intref ref="contm_vector"><kw role="element">vector</kw></intref></p></item>
  2343. <item><p><intref ref="contm_matrix"><kw role="element">matrix</kw></intref></p></item>
  2344. <item><p><intref ref="contm_matrixrow"><kw role="element">matrixrow</kw></intref></p></item>
  2345. <item><p><intref ref="contm_determinant"><kw role="element">determinant</kw></intref></p></item>
  2346. <item><p><intref ref="contm_transpose"><kw role="element">transpose</kw></intref></p></item>
  2347. <item><p><intref ref="contm_selector"><kw role="element">selector</kw></intref></p></item>
  2348. <item><p><intref ref="contm_vectorproduct"><kw role="element">vectorproduct</kw></intref> (MathML 2.0)</p></item>
  2349. <item><p><intref ref="contm_scalarproduct"><kw role="element">scalarproduct</kw></intref> (MathML 2.0)</p></item>
  2350. <item><p><intref ref="contm_outerproduct"><kw role="element">outerproduct</kw></intref> (MathML 2.0)</p></item>
  2351. </ulist></p></item>
  2352.  
  2353. <item><p>semantic mapping elements
  2354. <ulist>
  2355. <item><p><intref ref="contm_annotation"><kw role="element">annotation</kw></intref></p></item>
  2356. <item><p><intref ref="contm_semantics"><kw role="element">semantics</kw></intref></p></item>
  2357. <item><p><intref ref="contm_annotation-xml"><kw role="element">annotation-xml</kw></intref></p></item>
  2358. </ulist></p></item>
  2359.  
  2360. <item><p>constant and symbol elements
  2361. <ulist>
  2362. <item><p><intref ref="contm_integers"><kw role="element">integers</kw></intref> (MathML2.0)</p></item>
  2363. <item><p><intref ref="contm_reals"><kw role="element">reals</kw></intref> (MathML2.0)</p></item>
  2364. <item><p><intref ref="contm_rationals"><kw role="element">rationals</kw></intref> (MathML2.0)</p></item>
  2365. <item><p><intref ref="contm_naturalnumbers"><kw role="element">naturalnumbers</kw></intref> (MathML2.0)</p></item>
  2366. <item><p><intref ref="contm_complexes"><kw role="element">complexes</kw></intref> (MathML2.0)</p></item>
  2367. <item><p><intref ref="contm_primes"><kw role="element">primes</kw></intref> (MathML2.0)</p></item>
  2368. <item><p><intref ref="contm_exponentiale"><kw role="element">exponentiale</kw></intref> (MathML2.0)</p></item>
  2369. <item><p><intref ref="contm_imaginaryi"><kw role="element">imaginaryi</kw></intref> (MathML2.0)</p></item>
  2370. <item><p><intref ref="contm_notanumber"><kw role="element">notanumber</kw></intref> (MathML2.0)</p></item>
  2371. <item><p><intref ref="contm_true"><kw role="element">true</kw></intref> (MathML2.0)</p></item>
  2372. <item><p><intref ref="contm_false"><kw role="element">false</kw></intref> (MathML2.0)</p></item>
  2373. <item><p><intref ref="contm_emptyset"><kw role="element">emptyset</kw></intref> (MathML2.0)</p></item>
  2374. <item><p><intref ref="contm_pi"><kw role="element">pi</kw></intref> (MathML2.0)</p></item>
  2375. <item><p><intref ref="contm_eulergamma"><kw role="element">eulergamma</kw></intref> (MathML2.0)</p></item>
  2376. <item><p><intref ref="contm_infinity"><kw role="element">infinity</kw></intref> (MathML2.0)</p></item>
  2377. </ulist></p></item>
  2378. </ulist></p>
  2379.  
  2380. <div3 id="contm_tokenel"><head>Token Elements</head>
  2381.  
  2382. <div4 id="contm_cn"><head>Number (<kw role="element">cn</kw>)</head>
  2383.  
  2384. <div5><head>Discussion</head>
  2385.  
  2386. <p>The <kw role="element">cn</kw> element is used to specify actual
  2387. numerical constants.  The content model must provide sufficient information
  2388. that a number may be entered as data into a computational system. By
  2389. default, it represents a signed real number in base 10. Thus, the content
  2390. normally consists of <kw>PCDATA</kw> restricted to a sign, a string of
  2391. decimal digits and possibly a decimal point, or alternatively one of the
  2392. predefined symbolic constants such as <kw role="entity">pi</kw>.</p>
  2393.  
  2394. <p>The <kw role="element">cn</kw> element uses the attribute <kw
  2395. role="attrib">type</kw> to represent other types of numbers such as, for
  2396. example, integer, rational, real or complex, and uses the attribute <kw
  2397. role="attrib">base</kw> to specify the numerical base.</p>
  2398.  
  2399. <p>In addition to simple <kw>PCDATA</kw>, <kw role="element">cn</kw>
  2400. accepts as content <kw>PCDATA</kw> separated by the (empty) element <kw
  2401. role="element">sep</kw>. This determines the different parts needed to
  2402. construct a rational or complex-cartesian number.</p>
  2403.  
  2404. <p>The <kw role="element">cn</kw> element may also contain arbitrary
  2405. presentation markup in its content (see <specref ref="presm"/>) so that its
  2406. presentation can be very elaborate.</p>
  2407.  
  2408. <p>Alternative input notations for numbers are possible, but must be
  2409. explicitly defined by using the <kw role="attrib">definitionURL</kw> and
  2410. <kw role="attrib">encoding</kw> attributes, to refer to a written
  2411. specification of how a sequence of real numbers separated by <kw
  2412. role="emptytag">sep</kw> should be interpreted.</p>
  2413. </div5>
  2414.  
  2415. <div5><head>Attributes</head>
  2416.  
  2417. <p>All attributes are <kw>CDATA</kw>:
  2418. <glist>
  2419. <gitem>
  2420. <label>type</label>
  2421. <def>
  2422. <p>Allowed values are
  2423. <kw role = "attval">real</kw>,
  2424. <kw role = "attval">integer</kw>,
  2425. <kw role = "attval">rational</kw>,
  2426. <kw role = "attval">complex-cartesian</kw>,
  2427. <kw role = "attval">complex-polar</kw>,
  2428. <kw role = "attval">constant</kw></p></def></gitem>
  2429. <gitem>
  2430. <label>base</label>
  2431. <def>
  2432. <p>Number (<kw>CDATA</kw> for XML DTD) between 2 and 36.</p></def></gitem>
  2433. <gitem>
  2434. <label>definitionURL</label>
  2435. <def>
  2436. <p>URL or URI pointing to an alternative definition.</p></def></gitem>
  2437. <gitem>
  2438. <label>encoding</label>
  2439. <def>
  2440. <p>Syntax of the alternative definition.</p></def></gitem></glist></p></div5>
  2441. <div5>
  2442. <head>Examples</head>
  2443. <eg role = "mathml"><![CDATA[
  2444. <cn type="real"> 12345.7 </cn>
  2445. <cn type="integer"> 12345 </cn>
  2446. <cn type="integer" base="16"> AB3 </cn>
  2447. <cn type="rational"> 12342 <sep/> 2342342 </cn>
  2448. <cn type="complex-cartesian"> 12.3 <sep/> 5 </cn>
  2449. <cn type="complex-polar"> 2 <sep/> 3.1415 </cn>
  2450. <cn type="constant">  π </cn>
  2451. ]]></eg></div5>
  2452. <div5>
  2453. <head>Default Rendering</head>
  2454. <p>By default, a contiguous block of 
  2455. <kw>PCDATA</kw> contained in a
  2456. <kw role = "element">cn</kw> element should render as if it were wrapped in an 
  2457. <kw role = "element">mn</kw> presentation element.
  2458. </p>
  2459. <p> If an application supports bidirectional text rendering, then the 
  2460. rendering within a <kw role = "element">cn</kw> element follows the Unicode
  2461. bidirectional rendering rules just as if it were wrapped in an 
  2462. <kw role = "element">mn</kw> presentation element.</p>
  2463. <p>Similarly, presentation markup contained in a 
  2464. <kw role = "element">cn</kw> element should render as it normally would. A mixture of 
  2465. <kw>PCDATA</kw> and presentation markup should render as if it were wrapped in an 
  2466. <kw role = "element">mrow</kw> element, with contiguous blocks of 
  2467. <kw>PCDATA</kw> wrapped in 
  2468. <kw role = "element">mn</kw> elements.</p>
  2469. <p>However, not all mathematical systems that encounter content based tagging do visual or aural rendering. The receiving applications are free to make use of a number in the manner in which they normally handle numerical data. Some systems might simplify the rational number 12342/2342342 to 6171/1171171 while pure floating point based systems might approximate this as 0.5269085385e-2. All numbers might be re-expressed in base 10. The role of MathML is simply to record enough information about the mathematical object and its structure so that it may be properly parsed.</p>
  2470. <p>The following renderings of the above MathML expressions are included both to help clarify the meaning of the corresponding MathML encoding and as suggestions for authors of rendering applications. In each case, no mathematical evaluation is intended or implied.
  2471. <ulist>
  2472. <item>
  2473. <p>12345.7</p></item>
  2474. <item>
  2475. <p>12345</p></item>
  2476. <item>
  2477. <p>AB3<sub>16</sub></p></item>
  2478. <item>
  2479. <p>12342 / 2342342</p></item>
  2480. <item>
  2481. <p>12.3 + 5 i</p></item>
  2482. <item>
  2483. <p>Polar( 2 , 3.1415 )</p></item>
  2484. <item>
  2485. <p>
  2486. <graphic role = "inline" source = "image/f4003.gif" alt = "\pi"/></p></item></ulist></p>
  2487. </div5></div4>
  2488. <div4 id = "contm_ci">
  2489. <head>Identifier (<kw role = "element">ci</kw>)</head>
  2490. <div5>
  2491. <head>Discussion</head>
  2492. <p>The 
  2493. <kw role = "element">ci</kw> element is used to name an identifier in a MathML expression (for example a variable). Such names are used to identify mathematical objects. By default they are assumed to represent complex scalars. The 
  2494. <kw role = "element">ci</kw> element may contain arbitrary presentation markup in its content (see 
  2495. <specref ref = "presm"/>) so that its presentation as a symbol can be very elaborate.</p>
  2496. <p>The 
  2497. <kw role = "element">ci</kw> element uses the
  2498. <kw role = "attrib">type</kw> attribute to specify the type of object that it represents. Valid types include
  2499. <kw role = "attval">integer</kw>,
  2500. <kw role = "attval">rational</kw>,
  2501. <kw role = "attval">real</kw>,
  2502. <kw role = "attval">float</kw>,
  2503. <kw role = "attval">complex</kw>,
  2504. <kw role = "attval">complex-polar</kw>,
  2505. <kw role = "attval">complex-cartesian</kw>,
  2506. <kw role = "attval">constant</kw>, and more generally, any of the names of the MathML container elements (e.g.
  2507. <kw role = "element">vector</kw>) or their type values. The
  2508. <kw role = "attrib">definitionURL</kw> and 
  2509. <kw role = "attrib">encoding</kw> attributes can be used to extend the definition of
  2510. <kw role = "element">ci</kw> to include other types. For example, a more advanced use might require a 
  2511. <kw role = "attval">vector(complex)</kw>.</p></div5>
  2512. <div5>
  2513. <head>Examples</head>
  2514. <eg role = "mathml"><![CDATA[
  2515. <ci> x </ci>
  2516. ]]></eg>
  2517. <eg role = "mathml"><![CDATA[
  2518. <ci type="vector"> V </ci>
  2519. ]]></eg>
  2520. <eg role = "mathml"><![CDATA[
  2521. <ci>
  2522.   <msub>
  2523.     <mi>x</mi>
  2524.     <mi>a</mi>
  2525.   </msub>
  2526. </ci>
  2527. ]]></eg></div5>
  2528. <div5>
  2529. <head>Default Rendering</head>
  2530. <p>If the content of a 
  2531. <kw role = "element">ci</kw> element is tagged using presentation tags, that presentation is used. If no such tagging is supplied then the 
  2532. <kw>PCDATA</kw> content would typically be rendered as if it were the content of an 
  2533. <kw role = "element">mi</kw> element.
  2534. </p>
  2535. <p> If an application supports bidirectional text rendering, then the 
  2536. rendering within a <kw role = "element">ci</kw> element follows the Unicode
  2537. bidirectional rendering rules just as if it were wrapped in an 
  2538. <kw role = "element">mi</kw> presentation element.</p>
  2539. <p>
  2540.  A renderer may wish to make use of the value of the type attribute to improve on this. For example, a symbol of type 
  2541. <kw role = "element">vector</kw> might be rendered using a bold face. Typical renderings of the above symbols are:
  2542. <ulist>
  2543. <item>
  2544. <p>
  2545. <graphic role = "inline" source = "image/f4004.gif" alt = "x"/></p></item>
  2546. <item>
  2547. <p>
  2548. <graphic role = "inline" source = "image/f4005.gif" alt = "V"/></p></item>
  2549. <item>
  2550. <p>
  2551. <graphic role = "inline" source = "image/f4006.gif" alt = "x_i"/></p></item></ulist></p></div5></div4>
  2552. <div4 id = "contm_csymbol">
  2553. <head>Externally defined symbol   (<kw role = "element">csymbol</kw>)</head>
  2554. <div5>
  2555. <head>Discussion</head>
  2556. <p>The 
  2557. <kw role = "element">csymbol</kw> element allows a writer to create an element in MathML whose semantics are externally defined (i.e. not in the core MathML content). The element can then be used in a MathML expression as for example an operator or constant. Attributes are used to give the syntax and location of the external definition of the symbol semantics.</p>
  2558. <p>Use of 
  2559. <kw role = "element">csymbol</kw> for referencing external semantics can be contrasted with use of the 
  2560. <kw role = "element">semantics</kw> to attach additional information in-line (ie. within the MathML fragment)  to a MathML construct. See 
  2561. <specref ref = "contm_synsem"/>.</p></div5>
  2562. <div5>
  2563. <head>Attributes</head>
  2564. <p>All attributes are 
  2565. <kw>CDATA</kw>:
  2566. <glist>
  2567. <gitem>
  2568. <label>definitionURL</label>
  2569. <def>
  2570. <p>Pointer to external definition of the semantics of the symbol. MathML does not specify a particular syntax in which this definition should be written.</p></def></gitem>
  2571. <gitem>
  2572. <label>encoding</label>
  2573. <def>
  2574. <p>Gives the syntax of the definition pointed to by definitionURL. An application can then test the value of this attribute to determine whether it is able to process the target of the 
  2575. <kw role = "attrib">definitionURL</kw>. This syntax might be text, or a formal syntax such as OpenMath.</p></def></gitem></glist></p></div5>
  2576. <div5>
  2577. <head>Examples</head>
  2578. <eg role = "mathml"><![CDATA[
  2579. <!-- reference to OpenMath formal syntax definition of Bessel function -->
  2580. <apply>
  2581.   <csymbol encoding="OpenMath" 
  2582.            definitionURL="http://www.openmath.org/cd/BesselFunctions.ocd">
  2583.     <msub><mi>J</mi><mn>0</mn></msub>
  2584.   </csymbol>
  2585.   <ci>y</ci>
  2586. </apply>
  2587.  
  2588. <!-- reference to human readable text description of Boltzmann's constant -->
  2589. <csymbol encoding="text" 
  2590.          definitionURL="www.example.org/universalconstants/Boltzmann.htm">
  2591.   k
  2592. </csymbol>
  2593. ]]></eg></div5>
  2594. <div5>
  2595. <head>Default Rendering</head>
  2596. <p>By default, a contiguous block of 
  2597. <kw>PCDATA</kw> contained in a 
  2598. <kw role = "element">csymbol</kw> element should render as if it were wrapped in an 
  2599. <kw role = "element">mo</kw> presentation element.</p>
  2600.  
  2601. <p> If an application supports bidirectional text rendering, then the 
  2602. rendering within a <kw role = "element">csymbol</kw> element follows the Unicode
  2603. bidirectional rendering rules just as if it were wrapped in an 
  2604. <kw role = "element">mo</kw> presentation element.</p>
  2605.  
  2606.  
  2607. <p>Similarly, presentation markup contained in a 
  2608. <kw role = "element">csymbol</kw> element should render as it normally would. A mixture of 
  2609. <kw>PCDATA</kw> and presentation markup should render as if it were contained wrapped in an 
  2610. <kw role = "element">mrow</kw> element, with contiguous blocks of 
  2611. <kw>PCDATA</kw> wrapped in 
  2612. <kw role = "element">mo</kw> elements. The examples above would render by default as
  2613. <ulist>
  2614. <item>
  2615. <p>
  2616. <graphic role = "inline" source = "image/f4007.gif" alt = "J_0(y)"/></p></item>
  2617. <item>
  2618. <p>
  2619. <graphic role = "inline" source = "image/f4008.gif" alt = "k"/></p></item></ulist></p>
  2620. <p>As 
  2621. <kw role = "element">csymbol</kw> is used to support reference to externally defined semantics, it is a MathML error to have embedded content MathML elements within the 
  2622. <kw role = "element">csymbol</kw> element.</p></div5></div4></div3>
  2623. <div3>
  2624. <head>Basic Content Elements</head>
  2625. <div4 id = "contm_apply">
  2626. <head>Apply (<kw role = "element">apply</kw>)</head>
  2627. <div5>
  2628. <head>Discussion</head>
  2629. <p>The 
  2630. <kw role = "element">apply</kw> element allows a function or operator to be applied to its arguments. Nearly all expression construction in MathML content markup is carried out by applying operators or functions to arguments. The first child of 
  2631. <kw role = "element">apply</kw> is the operator to be applied, with the other child elements as arguments or qualifiers.</p>
  2632. <p>The 
  2633. <kw role = "element">apply</kw> 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.</p>
  2634. <p>Proper usage depends on the operator that is being applied. For example, the 
  2635. <kw role = "element">plus</kw> operator may have zero or more arguments, while the 
  2636. <kw role = "element">minus</kw> operator requires one or two arguments to be properly formed.</p>
  2637. <p>If the object being applied as a function is not already one of the elements known to be a function (such as 
  2638. <kw role = "element">fn</kw>, 
  2639. <kw role = "element">sin</kw> or 
  2640. <kw role = "element">plus</kw>) then it is treated as if it were the content of an 
  2641. <kw role = "element">fn</kw> element.</p>
  2642. <p>Some operators such as 
  2643. <kw role = "element">diff</kw> and 
  2644. <kw role = "element">int</kw> make use of 
  2645. <quote>named</quote> arguments. These special arguments are elements that appear as children of the 
  2646. <kw role = "element">apply</kw> element and identify 
  2647. <quote>parameters</quote> such as the variable of differentiation or the domain of integration. These elements are discussed further in 
  2648. <specref ref = "contm_opwithqual"/>.</p></div5>
  2649. <div5>
  2650. <head>Examples</head>
  2651. <eg role = "mathml"><![CDATA[
  2652. <apply>
  2653.   <factorial/>
  2654.   <cn>3</cn>
  2655. </apply>
  2656. ]]></eg>
  2657. <eg role = "mathml"><![CDATA[
  2658. <apply>
  2659.   <plus/>
  2660.   <cn>3</cn>
  2661.   <cn>4</cn>
  2662. </apply>
  2663. ]]></eg>
  2664. <eg role = "mathml"><![CDATA[
  2665. <apply>
  2666.   <sin/>
  2667.   <ci>x</ci>
  2668. </apply>
  2669. ]]></eg></div5>
  2670. <div5>
  2671. <head>Default Rendering</head>
  2672. <p>A mathematical system that has been passed an 
  2673. <kw role = "element">apply</kw> element is free to do with it whatever it normally does with such mathematical data. It may be that no rendering is involved (e.g. a syntax validator), or that the 
  2674. <quote>function application</quote> is evaluated and that only the result is rendered (e.g. sin(0) 
  2675. <graphic role = "inline" source = "image/f4009.gif" alt = "\rightarrow"/> 0).</p>
  2676. <p>When an unevaluated 
  2677. <quote>function application</quote> is rendered there are a wide variety of appropriate renderings. The choice often depends on the function or operator being applied. Applications of basic operations such as 
  2678. <kw role = "element">plus</kw> are generally presented using an infix notation while applications of 
  2679. <kw role = "element">sin</kw> would use a more traditional functional notation such as sin(<mi>x</mi>). Consult the default rendering for the operator being applied.</p>
  2680. <p>Applications of user-defined functions (see 
  2681. <kw role = "element">csymbol</kw>, 
  2682. <kw role = "element">fn</kw>) that are not evaluated by the receiving or rendering application would typically render using a traditional functional notation unless an alternative presentation is specified using the 
  2683. <kw role = "element">semantics</kw> tag.</p></div5></div4>
  2684. <div4 id = "contm_reln">
  2685. <head>Relation (<kw role = "element">reln</kw>)</head>
  2686. <div5>
  2687. <head>Discussion</head>
  2688. <p>The 
  2689. <kw role = "element">reln</kw> element was used in MathML 1.0 to construct an equation or relation. Relations were constructed in a manner exactly analogous to the use of 
  2690. <kw role = "element">apply</kw>. This usage is <intref ref="interf_deprec">deprecated</intref> in MathML 2.0 in favor of the more generally usable 
  2691. <kw role = "element">apply</kw>.</p>
  2692. <p>The first child of 
  2693. <kw role = "element">reln</kw> is the relational operator to be applied, with the other child elements acting as arguments. See 
  2694. <specref ref = "contm_relation"/> for further details.</p></div5>
  2695. <div5>
  2696. <head>Examples</head>
  2697. <eg role = "mathml"><![CDATA[
  2698. <reln>
  2699.   <eq/>
  2700.   <ci> a </ci>
  2701.   <ci> b </ci>
  2702. </reln>
  2703. ]]></eg>
  2704. <eg role = "mathml"><![CDATA[
  2705. <reln>
  2706.   <lt/>
  2707.   <ci> a </ci>
  2708.   <ci> b </ci>
  2709. </reln>
  2710. ]]></eg></div5>
  2711. <div5>
  2712. <head>Default Rendering</head>
  2713. <ulist>
  2714. <item>
  2715. <p>
  2716. <graphic role = "inline" source = "image/f4010.gif" alt = "a = b"/></p></item>
  2717. <item>
  2718. <p>
  2719. <graphic role = "inline" source = "image/f4011.gif" alt = "a < b"/></p></item></ulist></div5></div4>
  2720. <div4 id = "contm_fn">
  2721. <head>Function (<kw role = "element">fn</kw>)</head>
  2722. <div5>
  2723. <head>Discussion</head>
  2724. <p>The 
  2725. <kw role = "element">fn</kw> element makes explicit the fact that a more general (possibly constructed) MathML object is being used in the same manner as if it were a pre-defined function such as 
  2726. <kw role = "element">sin</kw> or 
  2727. <kw role = "element">plus</kw>.</p>
  2728. <p> 
  2729. <kw role = "element">fn</kw> has exactly one child element, used to give the name (or presentation form) of the function. When   
  2730. <kw role = "element">fn</kw>  is used as the first child of an apply,  the number of following arguments is determined by the contents of  the  
  2731. <kw role = "element">fn</kw>. </p>
  2732. <p>In MathML 1.0, 
  2733. <kw role = "element">fn</kw> was also the primary mechanism used to extend the collection of 
  2734. <quote>known</quote> mathematical functions. This usage is now <intref
  2735. ref="interf_deprec">deprecated</intref> in favor of the more generally applicable 
  2736. <kw role = "element">csymbol</kw> element. (New functions may also be introduced by using 
  2737. <kw role = "element">declare</kw> in conjunction with a 
  2738. <kw role = "element">lambda</kw> expression.)</p></div5>
  2739. <div5>
  2740. <head>Examples</head>
  2741. <eg role = "mathml"><![CDATA[
  2742. <fn><ci> L </ci> </fn>
  2743. ]]></eg>
  2744. <eg role = "mathml"><![CDATA[
  2745. <apply>
  2746.   <fn>
  2747.   <apply>
  2748.     <plus/>
  2749.     <ci> f </ci>
  2750.     <ci> g </ci>
  2751.   </apply>
  2752.   </fn>
  2753.   <ci>z</ci>
  2754. </apply>
  2755. ]]></eg></div5>
  2756. <div5>
  2757. <head>Default Rendering</head>
  2758. <p>An 
  2759. <kw role = "element">fn</kw> object is rendered in the same way as its content. A rendering application may add additional adornments such as parentheses to clarify the meaning.
  2760. <ulist>
  2761. <item>
  2762. <p>
  2763. <graphic role = "inline" source = "image/f4012.gif" alt = "L"/></p></item>
  2764. <item>
  2765. <p>
  2766. <graphic role = "inline" source = "image/f4013.gif" alt = "(f+g)z"/></p></item></ulist></p></div5></div4>
  2767. <div4 id = "contm_interval">
  2768. <head>Interval (<kw role = "element">interval</kw>)</head>
  2769. <div5>
  2770. <head>Discussion</head>
  2771. <p>The 
  2772. <kw role = "element">interval</kw> element is used to represent simple mathematical intervals of the real number line. It takes an attribute
  2773. <kw role = "attrib">closure</kw>, which can take on any of the values
  2774. <kw role = "attval">open</kw>, 
  2775. <kw role = "attval">closed</kw>,
  2776. <kw role = "attval">open-closed</kw>, or
  2777. <kw role = "attval">closed-open</kw>, with a default value of
  2778. <kw role = "attval">closed</kw>.</p>
  2779. <p>More general domains are constructed by using the 
  2780. <kw role = "element">condition</kw> and 
  2781. <kw role = "element">bvar</kw> elements to bind free variables to constraints.</p>
  2782. <p>The 
  2783. <kw role = "element">interval</kw> element expects 
  2784. <emph>either</emph> two child elements that evaluate to real numbers 
  2785. <emph>or</emph> one child element that is a 
  2786. <kw role = "element">condition</kw> defining the 
  2787. <kw role = "element">interval</kw>.</p></div5>
  2788. <div5>
  2789. <head>Examples</head>
  2790. <eg role = "mathml"><![CDATA[
  2791. <interval>
  2792.   <ci> a </ci>
  2793.   <ci> b </ci>
  2794. </interval>
  2795. ]]></eg>
  2796. <eg role = "mathml"><![CDATA[
  2797. <interval closure="open-closed">
  2798.   <ci> a </ci>
  2799.   <ci> b </ci>
  2800. </interval>
  2801. ]]></eg></div5>
  2802. <div5>
  2803. <head>Default Rendering</head>
  2804. <ulist>
  2805. <item>
  2806. <p>
  2807. <graphic role = "inline" source = "image/f4014.gif" alt = "[a, b]"/></p></item>
  2808. <item>
  2809. <p>
  2810. <graphic role = "inline" source = "image/f4015.gif" alt = "(a, b]"/></p></item></ulist></div5></div4>
  2811. <div4 id = "contm_inverse">
  2812. <head>Inverse (<kw role = "element">inverse</kw>)</head>
  2813. <div5>
  2814. <head>Discussion</head>
  2815. <p>The 
  2816. <kw role = "element">inverse</kw> 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 
  2817. <kw role = "element">inverse</kw> in
  2818. <specref ref = "contm_inverseconstruct"/>). As with other MathML functions, 
  2819. <kw role = "element">inverse</kw> may either be applied to arguments, or it may appear alone, in which case it represents an abstract inversion operator acting on other functions.</p>
  2820. <p>A typical use of the 
  2821. <kw role = "element">inverse</kw> 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
  2822. <mi>f</mi><sup>(-1)</sup>(x). To associate a particular definition with
  2823. <mi>f</mi><sup>(-1)</sup>, use the
  2824. <kw role = "attrib">definitionURL</kw> and 
  2825. <kw role = "attrib">encoding</kw> attributes.</p></div5>
  2826. <div5>
  2827. <head>Examples</head>
  2828. <eg role = "mathml"><![CDATA[
  2829. <apply>
  2830.   <inverse/>
  2831.   <ci> f </ci>
  2832. </apply>
  2833. ]]></eg>
  2834. <eg role = "mathml"><![CDATA[
  2835. <apply>
  2836.   <inverse definitionURL="../MyDefinition.htm" encoding="text"/>
  2837.   <ci> f </ci>
  2838. </apply>
  2839. ]]></eg>
  2840. <eg role = "mathml"><![CDATA[
  2841. <apply>
  2842.   <apply><inverse/>
  2843.     <ci type="matrix"> a </ci>
  2844.   </apply>
  2845.   <ci> A </ci>
  2846. </apply>
  2847. ]]></eg>
  2848.  
  2849. </div5>
  2850.  
  2851. <div5><head>Default Rendering</head>
  2852.  
  2853. <p>The default rendering for a functional inverse makes use of a
  2854. parenthesized exponent as in <mi>f</mi><sup>(-1)</sup>(<mi>x</mi>).</p>
  2855. </div5>
  2856. </div4>
  2857.  
  2858. <div4 id="contm_sep"><head>Separator (<kw role="element">sep</kw>)</head>
  2859.  
  2860. <div5><head>Discussion</head>
  2861.  
  2862. <p>The <kw role="element">sep</kw> element is used to separate <kw>PCDATA</kw>
  2863. into separate tokens for parsing the contents of the various specialized
  2864. forms of the <kw role="element">cn</kw> elements. For example, <kw
  2865. role="element">sep</kw> is used when specifying the real and imaginary
  2866. parts of a complex number (see <specref ref="contm_tokenel"/>). If it
  2867. occurs between MathML elements, it is a MathML error.</p>
  2868. </div5>
  2869.  
  2870. <div5><head>Examples</head>
  2871.  
  2872. <eg role="mathml"><![CDATA[
  2873. <cn type="complex-cartesian"> 3 <sep/> 4 </cn>
  2874. ]]></eg>
  2875.  
  2876. </div5>
  2877.  
  2878. <div5><head>Default Rendering</head>
  2879.  
  2880. <p>The <kw role="element">sep</kw> element is not directly rendered (see
  2881. <specref ref="contm_tokenel"/>).</p>
  2882. </div5>
  2883. </div4>
  2884.  
  2885. <div4 id="contm_condition"><head>Condition (<kw role="element">condition</kw>)</head>
  2886.  
  2887. <div5><head>Discussion</head>
  2888.  
  2889. <p>The <kw role="element">condition</kw> element is used to place a
  2890. condition on one or more free variables or identifiers. The conditions may
  2891. be specified in terms of relations that are to be satisfied by the
  2892. variables, including general relationships such as set membership.</p>
  2893.  
  2894. <p>It is used to define general sets and lists in situations where the
  2895. elements cannot be explicitly enumerated. Condition contains either a
  2896. single <kw role="element">apply</kw> or <kw
  2897. role="element">reln</kw> element; the <kw role="element">apply</kw> element
  2898. is used to construct compound conditions. For example, it is used below to
  2899. describe the set of all <mi>x</mi> such that <mi>x</mi> < 5. See the
  2900. discussion on sets in <specref ref="contm_sets"/>. See <specref
  2901. ref="contm_conditions"/> for further details.</p>
  2902. </div5>
  2903.  
  2904. <div5><head>Examples</head>
  2905.  
  2906. <eg role="mathml-fragment"><![CDATA[
  2907. <condition>
  2908.   <apply><in/><ci> x </ci><ci type="set"> R </ci></apply>
  2909. </condition>
  2910. ]]></eg>
  2911. <eg role = "mathml-fragment"><![CDATA[
  2912. <condition>
  2913.   <apply>
  2914.     <and/>
  2915.     <apply><gt/><ci> x </ci><cn> 0 </cn></apply>
  2916.     <apply><lt/><ci> x </ci><cn> 1 </cn></apply>
  2917.   </apply>
  2918. </condition>
  2919. ]]></eg>
  2920. <eg role = "mathml"><![CDATA[
  2921. <apply>
  2922.   <max/>
  2923.   <bvar><ci> x </ci></bvar>
  2924.   <condition>
  2925.     <apply> <and/>
  2926.       <apply><gt/><ci> x </ci><cn> 0 </cn></apply>
  2927.       <apply><lt/><ci> x </ci><cn> 1 </cn></apply>
  2928.     </apply>
  2929.   </condition>
  2930.   <apply>
  2931.     <minus/>
  2932.     <ci> x </ci>
  2933.     <apply>
  2934.       <sin/>
  2935.       <ci> x </ci>
  2936.     </apply>
  2937.   </apply>
  2938. </apply>
  2939. ]]></eg></div5>
  2940. <div5>
  2941. <head>Default Rendering</head>
  2942. <ulist>
  2943. <item>
  2944. <p>
  2945. <graphic role = "inline" source = "image/f4016.gif" alt = "x \in \mathbb{R}"/></p></item>
  2946. <item>
  2947. <p>
  2948. <graphic role = "inline" source = "image/f4017.gif" alt = "x > 0 \land x < 1"/></p></item>
  2949. <item>
  2950. <p>
  2951. <graphic role = "inline" source = "image/f4018.gif" alt = "\max_{x}\{\,x-\sin x\mid 0<x<1\,\}"/></p></item></ulist></div5></div4>
  2952. <div4 id = "contm_declare">
  2953. <head>Declare (<kw role = "element">declare</kw>)</head>
  2954. <div5>
  2955. <head>Discussion</head>
  2956. <p>The 
  2957. <kw role = "element">declare</kw> construct has two primary roles. The first is to change or set the default attribute values for a specific mathematical object. The second is to establish an association between a
  2958. <quote>name</quote> and an object. Once a declaration is in effect, the
  2959. <quote>name</quote> object acquires the new attribute settings, and (if the second object is present) all the properties of the associated object.</p>
  2960. <p>The various attributes of the 
  2961. <kw role = "element">declare</kw> element assign properties to the object being declared or determine where the declaration is in effect.</p>
  2962. <p>The scope of a declaration is <quote>local</quote> to the surrounding container element. 
  2963. The <kw role = "attrib">scope</kw> attribute can only be assigned to 
  2964. <kw role = "attval">local</kw>, but is intended to support future extensions.
  2965. As discussed in 
  2966. <specref ref = "contm_scope"/>, MathML contains no provision for making document-wide declarations at present, though it is anticipated that this capability will be added in future revisions of MathML, when supporting technologies become available.</p>  
  2967. <p><kw role = "element">declare</kw> takes one or two children. The first child,  which 
  2968. is mandatory, is the object affected by the declaration. 
  2969. This is usually a <kw role = "element">ci</kw> element 
  2970. providing the identifier that is being declared as in:
  2971. <eg role = "mathml"><![CDATA[
  2972. <declare type="vector"> <ci> V </ci> </declare>
  2973. ]]></eg>The second child, which is optional, is a constructor initializing the variable:
  2974. <eg role = "mathml"><![CDATA[
  2975. <declare type="vector">
  2976.   <ci> V </ci>
  2977.   <vector>
  2978.     <cn> 1 </cn><cn> 2 </cn><cn> 3 </cn>
  2979.   </vector>
  2980. </declare>
  2981. ]]></eg></p>
  2982. <p>The constructor type and the type of the element declared must agree. For example, if the type attribute of the declaration is 
  2983. <kw role = "element">fn</kw>, the second child (constructor) must be an element equivalent to an
  2984. <kw role = "element">fn</kw> element. (This would include actual
  2985. <kw role = "element">fn</kw> elements,
  2986. <kw role = "element">lambda</kw> elements and any of the defined functions in the basic set of content tags.) If no type is specified in the declaration then the type attribute of the declared name is set to the type of the constructor (second child) of the declaration. The type attribute of the declaration can be especially useful in the special case of the second element being a semantic tag.</p></div5>
  2987. <div5>
  2988. <head>Attributes</head>
  2989. <p>All attributes are 
  2990. <kw>CDATA</kw>:
  2991. <glist>
  2992. <gitem>
  2993. <label>
  2994. <kw role = "attrib">type</kw></label>
  2995. <def>
  2996. <p>defines the MathML element type of the identifier declared.</p></def></gitem>
  2997. <gitem>
  2998. <label>
  2999. <kw role = "attrib">scope</kw></label>
  3000. <def>
  3001. <p>defines the scope of application of the declaration.</p></def></gitem>
  3002. <gitem>
  3003. <label>
  3004. <kw role = "attrib">nargs</kw></label>
  3005. <def>
  3006. <p>number of arguments for function declarations.</p></def></gitem>
  3007. <gitem>
  3008. <label>
  3009. <kw role = "attrib">occurrence</kw></label>
  3010. <def>
  3011. <p>describes operator usage as 
  3012. <kw role = "attval">prefix</kw>,
  3013. <kw role = "attval">infix</kw> or 
  3014. <kw role = "attval">function-model</kw> indications.</p></def></gitem>
  3015. <gitem>
  3016. <label>
  3017. <kw role = "attrib">definitionURL</kw></label>
  3018. <def>
  3019. <p>URI pointing to detailed semantics of the function.</p></def></gitem>
  3020. <gitem>
  3021. <label>
  3022. <kw role = "attrib">encoding</kw></label>
  3023. <def>
  3024. <p>syntax of the detailed semantics of the function.</p></def></gitem></glist></p></div5>
  3025. <div5>
  3026. <head>Examples</head>
  3027. <p>The declaration
  3028. <eg role = "mathml"><![CDATA[
  3029. <declare type="fn" nargs="2">
  3030.   <ci> f </ci>
  3031.   <apply>
  3032.     <plus/>
  3033.     <ci> F </ci><ci> G </ci>
  3034.   </apply>
  3035. </declare>
  3036. ]]></eg>
  3037. declares <mi>f</mi> to be a two-variable function with the property that
  3038. <mi>f</mi>(<mi>x</mi>, <mi>y</mi>) = (<mi>F</mi>+ <mi>G</mi>)(<mi>x</mi>, <mi>y</mi>).</p>
  3039.  
  3040. <p>The declaration
  3041. <eg role = "mathml"><![CDATA[
  3042. <declare type="fn">
  3043.   <ci> J </ci>
  3044.   <lambda>
  3045.     <bvar><ci> x </ci></bvar>
  3046.     <apply><ln/>
  3047.       <ci> x </ci>
  3048.     </apply>
  3049.   </lambda>
  3050. </declare>
  3051. ]]></eg>associates the name 
  3052. <mi>J</mi> with a one-variable function defined so that
  3053. <mi>J</mi>(<mi>y</mi>) = ln 
  3054. <mi>y</mi>. (Note that because of the type attribute of the 
  3055. <kw role = "element">declare</kw> element, the second argument must be something of function type 
  3056. , namely a known function like 
  3057. <kw role = "element">sin</kw>, or a 
  3058. <kw role = "element">lambda</kw> construct.)</p>
  3059. <p>The 
  3060. <kw role = "attrib">type</kw> attribute on the declaration is only necessary if the type cannot be inferred from the type of the second argument.</p>
  3061. <p>Even when a declaration is in effect it is still possible to override attributes values selectively as in 
  3062. <code><![CDATA[ <ci type="set"> S
  3063. </ci>]]></code>.  This capability is needed in order to write statements of the form 
  3064. <quote>Let 
  3065. <mi>s</mi> be a member of 
  3066. <mi>S</mi></quote>.</p></div5>
  3067. <div5>
  3068. <head>Default Rendering</head>
  3069. <p>Since the 
  3070. <kw role = "element">declare</kw> construct is not directly rendered, most declarations are likely to be invisible to a reader. However, declarations can produce quite different effects in an application which evaluates or manipulates MathML content. While the declaration
  3071. <eg role = "mathml"><![CDATA[
  3072. <declare>
  3073.   <ci> v </ci>
  3074.   <vector>
  3075.     <cn> 1 </cn>
  3076.     <cn> 2 </cn>
  3077.     <cn> 3 </cn>
  3078.   </vector>
  3079. </declare>
  3080. ]]></eg>
  3081. is active the symbol <mi>v</mi> acquires all the properties of the vector,
  3082. and even its dimension and components have meaningful values. This may
  3083. affect how <mi>v</mi> is rendered by some applications, as well as how it
  3084. is treated mathematically.</p>
  3085. </div5>
  3086. </div4>
  3087.  
  3088. <div4 id="contm_lambda"><head>Lambda (<kw role="element">lambda</kw>)</head>
  3089.  
  3090. <div5><head>Discussion</head>
  3091.  
  3092. <p>The <kw role="element">lambda</kw> element is used to construct a
  3093. user-defined function from an expression and one or more free
  3094. variables. The lambda construct with <mi>n</mi> internal variables takes
  3095. <mi>n</mi>+1 children. The first <mi>n</mi> children identify the variables
  3096. that are used as placeholders in the last child for actual parameter
  3097. values. See <specref ref="contm_constructor"/> for further details.</p>
  3098. </div5>
  3099.  
  3100. <div5><head>Examples</head>
  3101.  
  3102. <p>The first example presents a simple lambda construct.
  3103. <eg role = "mathml"><![CDATA[
  3104. <lambda>
  3105.   <bvar><ci> x </ci></bvar>
  3106.   <apply><sin/>
  3107.     <apply>
  3108.       <plus/>
  3109.       <ci> x </ci>
  3110.       <cn> 1 </cn>
  3111.     </apply>
  3112.   </apply>
  3113. </lambda>
  3114. ]]></eg></p>
  3115. <p>The next example constructs a one-argument function in which the argument 
  3116. <mi>b</mi> specifies the upper bound of a specific definite integral.
  3117. <eg role = "mathml"><![CDATA[
  3118. <lambda>
  3119.   <bvar><ci> b </ci></bvar>
  3120.   <apply>
  3121.     <int/>
  3122.     <bvar>
  3123.        <ci> x </ci>
  3124.     </bvar>
  3125.     <lowlimit>
  3126.        <ci> a </ci>
  3127.     </lowlimit>
  3128.     <uplimit>
  3129.        <ci> b </ci>
  3130.     </uplimit>
  3131.     <apply><fn><ci> f </ci></fn>
  3132.        <ci> x </ci>
  3133.     </apply>
  3134.   </apply>
  3135. </lambda>
  3136. ]]></eg>Such constructs are often used in conjunction with
  3137. <kw role = "element">declare</kw> to construct new functions.</p></div5>
  3138. <div5>
  3139. <head>Default Rendering</head>
  3140. <ulist>
  3141. <item><p>
  3142. <graphic role="inline" source="image/f4019.gif" alt="\lambda(x, \sin x + 1)"/></p></item>
  3143.  
  3144. <item><p>
  3145. <graphic role="inline" source="image/f4020.gif" alt="\lambda(b, \int_a^b f(x)\,\diffd x)"/></p></item>
  3146. </ulist>
  3147. </div5>
  3148. </div4>
  3149.  
  3150. <div4 id="contm_compose"><head>Function composition (<kw role="element">compose</kw>)</head>
  3151.  
  3152. <div5><head>Discussion</head>
  3153.  
  3154. <p>The <kw role="element">compose</kw> element represents the function
  3155. composition operator. Note that MathML makes no assumption about the domain
  3156. and codomain of the constituent functions in a composition; the domain of the
  3157. resulting composition may be empty.</p>
  3158.  
  3159. <p>To override the default semantics for the <kw
  3160. role="element">compose</kw> element, or to associate a more specific
  3161. definition for function composition, use the <kw
  3162. role="attrib">definitionURL</kw> and <kw
  3163. role="attrib">encoding</kw> attributes. See <specref ref="contm_funopqual"/>
  3164. for further details.</p>
  3165. </div5>
  3166.  
  3167. <div5><head>Examples</head>
  3168.  
  3169. <eg role="mathml"><![CDATA[
  3170. <apply>
  3171.   <compose/>
  3172.   <fn><ci> f </ci></fn>
  3173.   <fn><ci> g </ci></fn>
  3174. </apply>
  3175. ]]></eg>
  3176. <eg role = "mathml"><![CDATA[
  3177. <apply>
  3178.   <compose/>
  3179.   <ci type="fn"> f </ci>
  3180.   <ci type="fn"> g </ci>
  3181.   <ci type="fn"> h </ci>
  3182. </apply>
  3183. ]]></eg>
  3184. <eg role = "mathml"><![CDATA[
  3185. <apply>
  3186.   <apply><compose/>
  3187.     <fn><ci> f </ci></fn>
  3188.     <fn><ci> g </ci></fn>
  3189.   </apply>
  3190.   <ci> x </ci>
  3191. </apply>
  3192. ]]></eg>
  3193. <eg role = "mathml"><![CDATA[
  3194. <apply>
  3195.   <fn><ci> f </ci></fn>
  3196.   <apply>
  3197.     <fn><ci> g </ci></fn>
  3198.     <ci> x </ci>
  3199.   </apply>
  3200. </apply>
  3201. ]]></eg></div5>
  3202. <div5>
  3203. <head>Default Rendering</head>
  3204. <ulist>
  3205. <item><p>
  3206. <graphic role="inline" source="image/f4021.gif" alt="f \circ g"/></p></item>
  3207.  
  3208. <item><p>
  3209. <graphic role="inline" source="image/f4022.gif" alt="f \circ g \circ h"/></p></item>
  3210.  
  3211. <item><p>
  3212. <graphic role="inline" source="image/f4023.gif" alt="(f \circ g) (x)"/></p></item>
  3213.  
  3214. <item><p>
  3215. <graphic role="inline" source="image/f4024.gif" alt="f(g(x))"/></p></item>
  3216. </ulist>
  3217. </div5>
  3218. </div4>
  3219.  
  3220. <div4 id="contm_ident"><head>Identity function (<kw role="element">ident</kw>)</head>
  3221.  
  3222. <div5><head>Discussion</head>
  3223.  
  3224. <p>The <kw role="element">ident</kw> element represents the identity
  3225. function. MathML makes no assumption about the function space in which the
  3226. identity function resides. That is, proper interpretation of the domain
  3227. (and hence codomain) of the identity function depends on the context in which
  3228. it is used.</p>
  3229.  
  3230. <p>To override the default semantics for the <kw
  3231. role="element">ident</kw> element, or to associate a more specific
  3232. definition, use the <kw role="attrib">definitionURL</kw> and <kw
  3233. role="attrib">encoding</kw> attributes (see <specref
  3234. ref="contm_funopqual"/>).</p>
  3235. </div5>
  3236.  
  3237. <div5><head>Examples</head>
  3238.  
  3239. <eg role="mathml"><![CDATA[
  3240. <apply>
  3241.   <eq/>
  3242.   <apply><compose/>
  3243.     <fn><ci> f </ci></fn>
  3244.     <apply><inverse/>
  3245.       <fn><ci> f </ci></fn>
  3246.     </apply>
  3247.   </apply>
  3248.   <ident/>
  3249. </apply>
  3250. ]]></eg></div5>
  3251. <div5>
  3252. <head>Default Rendering</head>
  3253. <p>
  3254. <graphic role="inline" source="image/f4025.gif" alt="f \circ f^{-1} = \mathrm{id}"/></p>
  3255. </div5>
  3256. </div4>
  3257.  
  3258. <div4 id="contm_domain"><head>Domain (<kw role="element">domain</kw>)</head>
  3259.  
  3260. <div5><head>Discussion</head>
  3261.  
  3262. <p>The <kw role="element">domain</kw> element denotes the domain of a given function, which is the set of
  3263. values over which it is defined. </p>
  3264.  
  3265. <p>To override the default semantics for the 
  3266. <kw role="element">domain</kw> element, or to associate a more specific
  3267. definition, use the <kw role="attrib">definitionURL</kw> and <kw
  3268. role="attrib">encoding</kw> attributes (see <specref
  3269. ref="contm_funopqual"/>).</p>
  3270. </div5>
  3271.  
  3272. <div5><head>Examples</head>
  3273. <p>If <mi>f</mi> is a function from the reals to the rationals, then:
  3274.  
  3275. <eg role="mathml"><![CDATA[
  3276. <apply>
  3277.   <eq/>
  3278.   <apply><domain/>
  3279.     <fn><ci> f </ci></fn>
  3280.   </apply>
  3281.   <reals/>
  3282. </apply>
  3283. ]]></eg> </p></div5>
  3284. <div5>
  3285. <head>Default Rendering</head>
  3286. <p>
  3287. <graphic role="inline" source="image/new-domain.gif" alt="\mbox{domain}(f) = \mathbb{R}"/></p>
  3288. </div5>
  3289. </div4>
  3290.  
  3291. <div4 id="contm_codomain"><head>codomain (<kw role="element">codomain</kw>)</head>
  3292.  
  3293. <div5><head>Discussion</head>
  3294.  
  3295. <p>The <kw role="element">codomain</kw> element denotes the codomain of a given function, which is a set 
  3296. containing all values taken by the function. It is not necessarily the case that every point in
  3297. the codomain is generated by the function applied to some point of the domain. (For example I may know
  3298. that a function is integer-valued, so its codomain is the integers, without knowing (or stating) which
  3299. subset of the integers is mapped to by the function.)</p>
  3300. <p>Codomain is sometimes also called Range.</p>
  3301.  
  3302. <p>To override the default semantics for the 
  3303. <kw role="element">codomain</kw> element, or to associate a more specific
  3304. definition, use the <kw role="attrib">definitionURL</kw> and <kw
  3305. role="attrib">encoding</kw> attributes (see <specref
  3306. ref="contm_funopqual"/>).</p>
  3307. </div5>
  3308.  
  3309. <div5><head>Examples</head>
  3310. <p>If <mi>f</mi> is a function from the reals to the rationals, then:
  3311.  
  3312. <eg role="mathml"><![CDATA[
  3313. <apply>
  3314.   <eq/>
  3315.   <apply><codomain/>
  3316.     <fn><ci> f </ci></fn>
  3317.   </apply>
  3318.   <rationals/>
  3319. </apply>
  3320. ]]></eg></p></div5>
  3321. <div5>
  3322. <head>Default Rendering</head>
  3323. <p>
  3324. <graphic role="inline" source="image/new-codomain.gif" alt="\mbox{codomain} (f) = \mathbb{Q}"/></p>
  3325. </div5>
  3326. </div4>
  3327.  
  3328. <div4 id="contm_image"><head>Image (<kw role="element">image</kw>)</head>
  3329.  
  3330. <div5><head>Discussion</head>
  3331.  
  3332. <p>The <kw role="element">image</kw> element denotes the image of a given function, which is the set 
  3333. of values taken by the function. Every point in
  3334. the image is generated by the function applied to some point of the domain.</p>
  3335.  
  3336. <p>To override the default semantics for the 
  3337. <kw role="element">image</kw> element, or to associate a more specific
  3338. definition, use the <kw role="attrib">definitionURL</kw> and <kw
  3339. role="attrib">encoding</kw> attributes (see <specref
  3340. ref="contm_funopqual"/>).</p>
  3341. </div5>
  3342.  
  3343. <div5><head>Examples</head>
  3344. <p>The real <kw role="element">sin</kw> function is a function from the reals to the reals, 
  3345. taking values between -1 and 1.
  3346.  
  3347. <eg role="mathml"><![CDATA[
  3348. <apply>
  3349.   <eq/>
  3350.   <apply><image/>
  3351.     <sin/>
  3352.   </apply>
  3353.   <interval>
  3354.     <cn>-1</cn>
  3355.     <cn> 1</cn>
  3356.   </interval>
  3357. </apply>
  3358. ]]></eg></p></div5>
  3359. <div5>
  3360. <head>Default Rendering</head>
  3361. <p>
  3362. <graphic role="inline" source="image/new-image.gif"
  3363.      alt="\mbox{image}(\sin) = [-1 , 1]"/></p>
  3364. </div5>
  3365. </div4>
  3366.  
  3367. <div4 id="contm_domainofapplication"><head>Domain of Application (<kw role="element">domainofapplication</kw>)</head>
  3368.  
  3369. <div5><head>Discussion</head>
  3370.  
  3371. <p>The <kw role="element">domainofapplication</kw> element denotes the domain over which a given function
  3372. is being applied. It is intended to be a more general alternative to specification of this
  3373. domain using such qualifier elements as <kw role="element">bvar</kw>, <kw role="element">lowlimit</kw>
  3374. or <kw role="element">condition</kw>.</p>
  3375.  
  3376. <p>To override the default semantics for the 
  3377. <kw role="element">domainofapplication</kw> element, or to associate a more specific
  3378. definition, use the <kw role="attrib">definitionURL</kw> and <kw
  3379. role="attrib">encoding</kw> attributes (see <specref
  3380. ref="contm_funopqual"/>).</p>
  3381. </div5>
  3382.  
  3383. <div5><head>Examples</head>
  3384. <p>The integral of a function <mi>f</mi> over an arbitrary domain <mi>C</mi> .</p>
  3385.  
  3386. <eg role="mathml"><![CDATA[
  3387. <apply>
  3388.   <int/>
  3389.   <domainofapplication>
  3390.     <ci> C </ci>
  3391.   </domainofapplication>
  3392.   <ci> f </ci>
  3393. </apply>
  3394. ]]></eg></div5>
  3395. <div5>
  3396. <head>Default Rendering</head>
  3397. <p> The default rendering depends on the particular function being applied.</p>
  3398. <p>
  3399. <graphic role="inline" source="image/new-domainofapplication.gif" alt="\int_C f "/></p>
  3400. </div5>
  3401. </div4>
  3402.  
  3403.  
  3404. <div4 id="contm_piecewise"><head>Piecewise declaration 
  3405. (<kw role="element">piecewise</kw>, <kw role="element">piece</kw>,
  3406. <kw role="element">otherwise</kw>)
  3407. </head>
  3408.  
  3409. <div5><head>Discussion</head>
  3410.  
  3411. <p>The 
  3412. <kw role = "element">piecewise</kw>, 
  3413. <kw role = "element">piece</kw>, and 
  3414. <kw role = "element">otherwise</kw>  
  3415. elements are used to support <quote>piecewise</quote> declarations of the form <quote>
  3416.   <mi>H</mi>(<mi>x</mi>) = 0 if <mi>x</mi> less than 0,  
  3417.   <mi>H</mi>(<mi>x</mi>) =  1 otherwise</quote>.</p> 
  3418.  
  3419. <p> The declaration is constructed using the <kw role = "element">piecewise</kw> element.
  3420.   This contains one or more <kw role = "element">piece</kw> elements, and optionally
  3421.   one <kw role = "element">otherwise</kw> element. Each <kw role = "element">piece</kw>
  3422.   element contains exactly two children. The first child defines the value taken by the <kw role = "element">piecewise</kw>
  3423. expression when the condition specified in the associated second child of the <kw role = "element">piece</kw> is true.</p>
  3424.  
  3425. <p> <kw role = "element">otherwise</kw> allows the specification of a value to be taken by the
  3426.  <kw role = "element">piecewise</kw> function when none of the conditions  (second child elements of the
  3427.   <kw role = "element">piece</kw> elements) is true, i.e. a default value.</p>
  3428.  
  3429.  <p>It should be noted that no <quote>order of execution</quote> is implied by the ordering of the  <kw role = "element">piece</kw>
  3430.  child elements within  <kw role = "element">piecewise</kw>. It is the responsibility of the author
  3431.  to ensure that the subsets of the function domain defined by the second children of the <kw role = "element">piece</kw>    elements are disjoint,
  3432.  or that, where they overlap, the values of the corresponding first children of the <kw role = "element">piece</kw>
  3433.  elements coincide. If this is not the case, the meaning of the expression is undefined.</p>
  3434.  
  3435. <p>The <kw role="element">piecewise</kw> elements are <emph>constructors </emph>
  3436.  (see <specref ref="contm_constructor"/>).</p>
  3437. </div5>
  3438.  
  3439. <div5><head>Examples</head>
  3440.  
  3441. <eg role = "mathml"><![CDATA[
  3442. <piecewise>
  3443.   <piece>
  3444.       <cn> 0 </cn>
  3445.       <apply><lt/><ci> x </ci> <cn> 0 </cn></apply>
  3446.   </piece>
  3447.   <otherwise>
  3448.       <ci> x </ci>
  3449.   </otherwise>
  3450. </piecewise>
  3451. ]]></eg>
  3452.  
  3453. <p> The following might be a definition of abs (<mi>x</mi>)
  3454.  
  3455. <eg role = "mathml"><![CDATA[
  3456. <apply>
  3457. <eq/>
  3458. <apply>
  3459.   <abs/>
  3460.   <ci> x </ci>
  3461. </apply>
  3462. <piecewise>
  3463.   <piece>
  3464.       <apply><minus/><ci> x </ci></apply>
  3465.       <apply><lt/><ci> x </ci> <cn> 0 </cn></apply>
  3466.   </piece>
  3467.   <piece>
  3468.       <cn> 0 </cn>
  3469.       <apply><eq/><ci> x </ci> <cn> 0 </cn></apply>
  3470.   </piece>
  3471.   <piece>
  3472.       <ci> x </ci>
  3473.       <apply><gt/><ci> x </ci> <cn> 0 </cn></apply>
  3474.   </piece>
  3475. </piecewise>
  3476. </apply>
  3477. ]]></eg> </p>
  3478.  
  3479. </div5>
  3480.  
  3481. <div5><head>Default Rendering</head>
  3482. <graphic role="display" source="image/new-piecewise.gif" alt="|x| = 
  3483.  \left\{\begin{array}{ll}-x& \mbox{if } x < 0\\0& \mbox{if } x = 0
  3484. \\ x& \mbox{if } x > 0\end{array}\right."/>
  3485. </div5>
  3486. </div4>
  3487.  
  3488.  
  3489.  
  3490.  
  3491. </div3>
  3492.  
  3493. <div3><head>Arithmetic, Algebra and Logic</head>
  3494.  
  3495. <div4 id="contm_quotient"><head>Quotient (<kw role="element">quotient</kw>)</head>
  3496.  
  3497. <div5><head>Discussion</head>
  3498.  
  3499. <p>The <kw role="element">quotient</kw> element is the operator used for
  3500. division modulo a particular base. When the <kw
  3501. role="element">quotient</kw> operator is applied to integer arguments
  3502. <mi>a</mi> and <mi>b</mi>, the result is the <quote>quotient of
  3503. <mi>a</mi> divided by <mi>b</mi></quote>. That is, <kw
  3504. role="element">quotient</kw> returns the unique integer <mi>q</mi> such
  3505. that <mi>a</mi> = <mi>q</mi> <mi>b</mi> + <mi>r</mi>. (In common usage,
  3506. <mi>q</mi> is called the quotient and <mi>r</mi> is the remainder.)</p>
  3507.  
  3508. <p>The <kw role="element">quotient</kw> element takes the attribute <kw
  3509. role="attrib">definitionURL</kw> and <kw
  3510. role="attrib">encoding</kw> attributes, which can be used to override the
  3511. default semantics.</p>
  3512.  
  3513. <p>The <kw role="element">quotient</kw> element is a <emph>binary
  3514. arithmetic operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  3515. </div5>
  3516.  
  3517. <div5><head>Example</head>
  3518.  
  3519. <eg role="mathml"><![CDATA[
  3520. <apply>
  3521.   <quotient/>
  3522.   <ci> a </ci>
  3523.   <ci> b </ci>
  3524. </apply>
  3525. ]]></eg>
  3526. <p>Various mathematical applications will use this data in different ways. Editing applications might choose an image such as shown below, while a computationally based application would evaluate it to 2 when
  3527. <mi>a</mi>=13 and 
  3528. <mi>b</mi>=5.</p></div5>
  3529. <div5>
  3530. <head>Default Rendering</head>
  3531. <p>There is no commonly used notation for this concept. Some possible renderings are
  3532. <ulist>
  3533. <item>
  3534. <p>quotient of 
  3535. <mi>a</mi> divided by 
  3536. <mi>b</mi></p></item>
  3537. <item>
  3538. <p>integer part of 
  3539. <mi>a</mi> / <mi>b</mi></p></item>
  3540.  
  3541. <item><p>
  3542. <graphic role="inline" source="image/f4026.gif" alt="\lfloor a/b \rfloor"/></p></item>
  3543. </ulist></p>
  3544. </div5>
  3545. </div4>
  3546.  
  3547. <div4 id="contm_factorial"><head>Factorial (<kw role="element">factorial</kw>)</head>
  3548.  
  3549. <div5><head>Discussion</head>
  3550.  
  3551. <p>The <kw role="element">factorial</kw> element is used to construct factorials.</p>
  3552.  
  3553. <p>The <kw role="element">factorial</kw> element takes the <kw
  3554. role="attrib">definitionURL</kw> and <kw
  3555. role="attrib">encoding</kw> attributes, which can be used to override the
  3556. default semantics.</p>
  3557.  
  3558. <p>The <kw role="element">factorial</kw> element is a 
  3559. <emph>unary arithmetic operator</emph> (see 
  3560. <specref ref = "contm_funopqual"/>).</p></div5>
  3561. <div5>
  3562. <head>Example</head>
  3563. <eg role = "mathml"><![CDATA[
  3564. <apply>
  3565.   <factorial/>
  3566.   <ci> n </ci>
  3567. </apply>
  3568. ]]></eg>
  3569. <p>If this were evaluated at 
  3570. <mi>n</mi> = 5 it would evaluate to 120.</p></div5>
  3571. <div5>
  3572. <head>Default Rendering</head>
  3573. <p>
  3574. <graphic role="inline" source="image/f4027.gif" alt="n!"/></p>
  3575. </div5>
  3576. </div4>
  3577.  
  3578. <div4 id="contm_divide"><head>Division (<kw role="element">divide</kw>)</head>
  3579.  
  3580. <div5><head>Discussion</head>
  3581.  
  3582. <p>The <kw role="element">divide</kw> element is the division operator.</p>
  3583.  
  3584. <p>The <kw role="element">divide</kw> element takes the <kw
  3585. role="attrib">definitionURL</kw> and <kw
  3586. role="attrib">encoding</kw> attributes, which can be used to override the
  3587. default semantics.</p>
  3588.  
  3589. <p>The <kw role="element">divide</kw> element is a 
  3590. <emph>binary arithmetic operator</emph> (see 
  3591. <specref ref = "contm_funopqual"/>).</p></div5>
  3592. <div5>
  3593. <head>Example</head>
  3594. <eg role = "mathml"><![CDATA[
  3595. <apply>
  3596.   <divide/>
  3597.   <ci> a </ci>
  3598.   <ci> b </ci>
  3599. </apply>
  3600. ]]></eg>
  3601. <p>As a MathML expression, this does not evaluate. However, on receiving such an expression, some applications may attempt to evaluate and simplify the value. For example, when 
  3602. <mi>a</mi>=5 and 
  3603. <mi>b</mi>=2 some mathematical applications may evaluate this to 2.5 while others will treat is as a rational number.</p></div5>
  3604. <div5>
  3605. <head>Default Rendering</head>
  3606. <p>
  3607. <graphic role = "inline" source = "image/f4028.gif" alt = "a/b"/></p></div5></div4>
  3608. <div4 id = "contm_maxmin">
  3609. <head>Maximum and minimum (<kw role = "element">max</kw>, 
  3610. <kw role = "element">min</kw>)</head>
  3611. <div5>
  3612. <head>Discussion</head>
  3613. <p>The elements 
  3614. <kw role = "element">max</kw> and 
  3615. <kw role = "element">min</kw> are used to compare the values of their arguments. They return the maximum and minimum of these values respectively.</p>
  3616. <p>The 
  3617. <kw role = "element">max</kw> and 
  3618. <kw role = "element">min</kw> elements take the 
  3619. <kw role = "attrib">definitionURL</kw> and 
  3620. <kw role = "attrib">encoding</kw> attributes that can be used to override the default semantics.</p>
  3621. <p>The 
  3622. <kw role = "element">max</kw> and 
  3623. <kw role = "element">min</kw> elements are 
  3624. <emph>n-ary arithmetic operators</emph> (see 
  3625. <specref ref = "contm_funopqual"/>).</p></div5>
  3626. <div5>
  3627. <head>Examples</head>
  3628. <p>When the objects are to be compared explicitly they are listed as arguments to the function as in:
  3629. <eg role = "mathml"><![CDATA[
  3630. <apply>
  3631.   <max/>
  3632.   <ci> a </ci>
  3633.   <ci> b </ci>
  3634. </apply>
  3635. ]]></eg>The elements to be compared may also be described using bound variables with a 
  3636. <kw role = "element">condition</kw> element and an expression to be maximized (or minimized), as in:
  3637. <eg role = "mathml"><![CDATA[
  3638. <apply>
  3639.   <min/>
  3640.   <bvar><ci>x</ci></bvar>
  3641.   <condition>
  3642.     <apply><notin/><ci> x </ci><ci type="set"> B </ci></apply>
  3643.   </condition>
  3644.   <apply>
  3645.       <power/>
  3646.     <ci> x </ci>
  3647.     <cn> 2 </cn>
  3648.   </apply>
  3649. </apply>
  3650. ]]></eg>Note that the bound variable must be stated even if it might
  3651. be implicit in conventional notation. In MathML1.0, the bound variable
  3652. and expression to be evaluated (<mi>x</mi>)  could be omitted in the
  3653. example below: this usage is <intref
  3654. ref="interf_deprec">deprecated</intref> in MathML2.0 in favor of
  3655. explicitly stating the bound variable and expression in all cases: 
  3656. <eg role = "mathml"><![CDATA[
  3657. <apply>
  3658.   <max/>
  3659.   <bvar><ci>x</ci></bvar>
  3660.   <condition>
  3661.     <apply><and/>
  3662.       <apply><in/><ci>x</ci><ci type="set">B</ci></apply>
  3663.       <apply><notin/><ci>x</ci><ci type="set">C</ci></apply>
  3664.     </apply>
  3665.   </condition>
  3666.   <ci>x</ci>
  3667. </apply>
  3668. ]]></eg></p></div5>
  3669. <div5>
  3670. <head>Default Rendering</head>
  3671. <ulist>
  3672. <item><p>
  3673. <graphic role="inline" source="image/f4029.gif" alt="\max\{a,b\}"/></p></item>
  3674.  
  3675. <item><p>
  3676. <graphic role="inline" source="image/f4030.gif" alt="\min_{x}\{\,x^{2}\mid x\notin B\,\}"/></p></item>
  3677.  
  3678. <item><p>
  3679. <graphic role="inline" source="image/f4031.gif" alt="\max\{\,x\in B\land x\notin C\,\}"/></p></item>
  3680. </ulist>
  3681. </div5>
  3682. </div4>
  3683.  
  3684. <div4 id="contm_minus"><head>Subtraction (<kw role="element">minus</kw>)</head>
  3685.  
  3686. <div5><head>Discussion</head>
  3687.  
  3688. <p>The <kw role="element">minus</kw> element is the subtraction operator.</p>
  3689.  
  3690. <p>The <kw role="element">minus</kw> element takes the <kw
  3691. role="attrib">definitionURL</kw> and <kw
  3692. role="attrib">encoding</kw> attributes, which can be used to override the
  3693. default semantics.</p>
  3694.  
  3695. <p>The <kw role="element">minus</kw> element can be used as a <emph>unary
  3696. arithmetic operator</emph> (e.g. to represent - <mi>x</mi>), or as a
  3697. <emph>binary arithmetic operator</emph> (e.g. to represent <mi>x</mi>-
  3698. <mi>y</mi>).</p>
  3699. </div5>
  3700.  
  3701. <div5><head>Example</head>
  3702.  
  3703. <eg role="mathml"><![CDATA[
  3704. <apply> <minus/>
  3705.   <ci> x </ci>
  3706.   <ci> y </ci>
  3707. </apply>
  3708. ]]></eg>
  3709. <p>If this were evaluated at 
  3710. <mi>x</mi>=5 and 
  3711. <mi>y</mi>=2 it would yield 3.</p></div5>
  3712. <div5>
  3713. <head>Default Rendering</head>
  3714. <p>
  3715. <graphic role="inline" source="image/f4032.gif" alt="x-y"/></p>
  3716. </div5>
  3717. </div4>
  3718.  
  3719. <div4 id="contm_plus"><head>Addition (<kw role="element">plus</kw>)</head>
  3720.  
  3721. <div5><head>Discussion</head>
  3722.  
  3723. <p>The <kw role="element">plus</kw> element is the addition operator.</p>
  3724.  
  3725. <p>The <kw role="element">plus</kw> element takes the <kw
  3726. role="attrib">definitionURL</kw> and <kw
  3727. role="attrib">encoding</kw> attributes, which can be used to override the
  3728. default semantics.</p>
  3729.  
  3730. <p>The <kw role="element">plus</kw> element is an <emph>n-ary arithmetic
  3731. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  3732. </div5>
  3733.  
  3734. <div5><head>Example</head>
  3735.  
  3736. <eg role="mathml"><![CDATA[
  3737. <apply>
  3738.   <plus/>
  3739.   <ci> x </ci>
  3740.   <ci> y </ci>
  3741.   <ci> z </ci>
  3742. </apply>
  3743. ]]></eg>
  3744. <p>If this were evaluated at 
  3745. <mi>x</mi> = 5, 
  3746. <mi>y</mi> = 2 and 
  3747. <mi>z</mi> = 1 it would yield 8.</p>
  3748. </div5>
  3749.  
  3750. <div5><head>Default Rendering</head>
  3751.  
  3752. <graphic  source="image/f4033.gif" alt="x+y+z"/>
  3753. </div5>
  3754. </div4>
  3755.  
  3756. <div4 id="contm_power"><head>Exponentiation (<kw role="element">power</kw>)</head>
  3757.  
  3758. <div5><head>Discussion</head>
  3759.  
  3760. <p>The <kw role="element">power</kw> element is a generic exponentiation
  3761. operator. That is, when applied to arguments <mi>a</mi> and <mi>b</mi>, it
  3762. returns the value of <quote><mi>a</mi> to the power of
  3763. <mi>b</mi></quote>.</p>
  3764. <p>The 
  3765. <kw role = "element">power</kw> element takes the 
  3766. <kw role = "attrib">definitionURL</kw> and 
  3767. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  3768. <p>The 
  3769. <kw role = "element">power</kw> element is a  
  3770. <emph>binary arithmetic operator</emph> (see 
  3771. <specref ref = "contm_funopqual"/>).</p></div5>
  3772. <div5>
  3773. <head>Example</head>
  3774. <eg role = "mathml"><![CDATA[
  3775. <apply>
  3776.   <power/>
  3777.   <ci> x </ci>
  3778.   <cn> 3 </cn>
  3779. </apply>
  3780. ]]></eg>
  3781. <p>If this were evaluated at 
  3782. <mi>x</mi>= 5 it would yield 125.</p></div5>
  3783. <div5>
  3784. <head>Default Rendering</head>
  3785. <p>
  3786. <graphic role="inline" source="image/f4034.gif" alt="x^3"/></p>
  3787. </div5>
  3788. </div4>
  3789.  
  3790. <div4 id="contm_rem"><head>Remainder (<kw role="element">rem</kw>)</head>
  3791.  
  3792. <div5><head>Discussion</head>
  3793.  
  3794. <p>The <kw role="element">rem</kw> element is the operator that returns the
  3795. <quote>remainder</quote> of a division modulo a particular base. When the
  3796. <kw role="element">rem</kw> operator is applied to integer arguments
  3797. <mi>a</mi> and <mi>b</mi>, the result is the <quote>remainder of
  3798. <mi>a</mi> divided by <mi>b</mi></quote>. That is, <kw
  3799. role="element">rem</kw> returns the unique integer, <mi>r</mi> such that
  3800. <mi>a</mi> = <mi>q</mi> <mi>b</mi>+ <mi>r</mi>, where <mi>r</mi> <
  3801. <mi>q</mi>. (In common usage, <mi>q</mi> is called the quotient and
  3802. <mi>r</mi> is the remainder.)</p>
  3803. <p>The 
  3804. <kw role = "element">rem</kw> element takes the 
  3805. <kw role = "attrib">definitionURL</kw> and 
  3806. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  3807. <p>The 
  3808. <kw role = "element">rem</kw> element is a 
  3809. <emph>binary arithmetic operator</emph> (see 
  3810. <specref ref = "contm_funopqual"/>).</p></div5>
  3811. <div5>
  3812. <head>Example</head>
  3813. <eg role = "mathml"><![CDATA[
  3814. <apply>
  3815.   <rem/>
  3816.   <ci> a </ci>
  3817.   <ci> b </ci>
  3818. </apply>
  3819. ]]></eg>
  3820. <p>If this were evaluated at 
  3821. <mi>a</mi> = 15 and 
  3822. <mi>b</mi> = 8 it would yield 7.</p></div5>
  3823. <div5>
  3824. <head>Default Rendering</head>
  3825. <p>
  3826. <graphic role = "inline" source = "image/f4035.gif" alt = "a \mod b"/></p></div5></div4>
  3827. <div4 id="contm_times">
  3828. <head>Multiplication (<kw role = "element">times</kw>)</head>
  3829. <div5>
  3830. <head>Discussion</head>
  3831. <p>The 
  3832. <kw role = "element">times</kw> element is the multiplication operator.</p>
  3833. <p>
  3834. <kw role = "element">times</kw> takes the 
  3835. <kw role = "attrib">definitionURL</kw> and 
  3836. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p></div5>
  3837. <div5>
  3838. <head>Example</head>
  3839. <eg role = "mathml"><![CDATA[
  3840. <apply>
  3841.   <times/>
  3842.   <ci> a </ci>
  3843.   <ci> b </ci>
  3844. </apply>
  3845. ]]></eg>
  3846. <p>If this were evaluated at 
  3847. <mi>a</mi> = 5.5 and 
  3848. <mi>b</mi> = 3 it would yield 16.5.</p></div5>
  3849. <div5>
  3850. <head>Default Rendering</head>
  3851. <p>
  3852. <graphic role="inline" source="image/f4036.gif" alt="a b"/></p>
  3853. </div5>
  3854. </div4>
  3855.  
  3856. <div4 id="contm_root"><head>Root (<kw role="element">root</kw>)</head>
  3857.  
  3858. <div5><head>Discussion</head>
  3859.  
  3860. <p>The <kw role="element">root</kw> element is used to construct roots. The
  3861. kind of root to be taken is specified by a <kw
  3862. role="element">degree</kw> element, which should be given as the second child
  3863. of the <kw role="element">apply</kw> element enclosing the <kw
  3864. role="element">root</kw> element. Thus, square roots correspond to the case
  3865. where <kw role="element">degree</kw> contains the value 2, cube roots
  3866. correspond to 3, and so on. If no <kw role="element">degree</kw> is
  3867. present, a default value of 2 is used.</p>
  3868.  
  3869. <p>The <kw role="element">root</kw> element takes the <kw
  3870. role="attrib">definitionURL</kw> and <kw
  3871. role="attrib">encoding</kw> attributes, which can be used to override the
  3872. default semantics.</p>
  3873.  
  3874. <p>The <kw role="element">root</kw> element is an 
  3875. <emph>operator taking qualifiers</emph> (see 
  3876. <specref ref = "contm_opwithqual"/>).</p></div5>
  3877. <div5>
  3878. <head>Example</head>
  3879. <p>The 
  3880. <mi>n</mi>th root of 
  3881. <mi>a</mi> is is given by
  3882. <eg role = "mathml"><![CDATA[
  3883. <apply>
  3884.   <root/>
  3885.   <degree><ci type='integer'> n </ci></degree>
  3886.   <ci> a </ci>
  3887. </apply>
  3888. ]]></eg></p></div5>
  3889. <div5>
  3890. <head>Default Rendering</head>
  3891. <p>
  3892. <graphic role = "inline" source = "image/f4037.gif" alt = "\sqrt[n]{a}"/></p></div5></div4>
  3893.  
  3894. <div4 id="contm_gcd"><head>Greatest common divisor (<kw role="element">gcd</kw>)</head>
  3895.  
  3896. <div5><head>Discussion</head>
  3897.  
  3898. <p>The <kw role="element">gcd</kw> element is used to denote the greatest
  3899. common divisor of its arguments.</p>
  3900.  
  3901. <p>The <kw role="element">gcd</kw> takes the <kw
  3902. role="attrib">definitionURL</kw> and <kw
  3903. role="attrib">encoding</kw> attributes, which can be used to override the
  3904. default semantics.</p>
  3905.  
  3906. <p>The <kw role="element">gcd</kw> element is an 
  3907. <emph>n-ary operator</emph> (see 
  3908. <specref ref = "contm_funopqual"/>).</p></div5>
  3909. <div5>
  3910. <head>Example</head>
  3911. <eg role = "mathml"><![CDATA[
  3912. <apply> <gcd/>
  3913.   <ci> a </ci>
  3914.   <ci> b </ci>
  3915.   <ci> c </ci>
  3916. </apply>
  3917. ]]></eg>
  3918. <p>If this were evaluated at 
  3919. <mi>a</mi> = 15, 
  3920. <mi>b</mi> = 21, 
  3921. <mi>c</mi> = 48, it would yield 3.</p></div5>
  3922. <div5>
  3923. <head>Default Rendering</head>
  3924. <p>
  3925. <graphic role="inline" source="image/f4038.gif" alt="\gcd(a, b, c)"/></p>
  3926. <p>This default rendering is English-language locale specific: other locales 
  3927. may have different default renderings.</p>
  3928. </div5>
  3929. </div4>
  3930.  
  3931. <div4 id="contm_and"><head>And (<kw role="element">and</kw>)</head>
  3932.  
  3933. <div5><head>Discussion</head>
  3934.  
  3935. <p>The <kw role="element">and</kw> element is the boolean 
  3936. <quote>and</quote> operator.</p>
  3937. <p>The 
  3938. <kw role = "element">and</kw> element takes the 
  3939. <kw role = "attrib">definitionURL</kw> and 
  3940. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  3941. <p>The 
  3942. <kw role = "element">and</kw> element is an 
  3943. <emph>n-ary logical operator</emph> (see 
  3944. <specref ref = "contm_funopqual"/>).</p></div5>
  3945. <div5>
  3946. <head>Example</head>
  3947. <eg role = "mathml"><![CDATA[
  3948. <apply>
  3949.   <and/>
  3950.   <ci> a </ci>
  3951.   <ci> b </ci>
  3952. </apply>
  3953. ]]></eg>
  3954. <p>If this were evaluated and both 
  3955. <mi>a</mi> and 
  3956. <mi>b</mi> had truth values of 
  3957. <kw role = "attval">true</kw>, then the result would be 
  3958. <kw role = "attval">true</kw>.</p></div5>
  3959. <div5>
  3960. <head>Default Rendering</head>
  3961. <p>
  3962. <graphic role="display" source="image/f4039.gif" alt="a \land b"/></p>
  3963. </div5>
  3964. </div4>
  3965.  
  3966. <div4 id="contm_or"><head>Or (<kw role="element">or</kw>)</head>
  3967.  
  3968. <div5><head>Discussion</head>
  3969.  
  3970. <p>The <kw role="element">or</kw> element is the boolean 
  3971. <quote>or</quote> operator.</p>
  3972. <p>The 
  3973. <kw role = "element">or</kw> element takes the 
  3974. <kw role = "attrib">definitionURL</kw> and 
  3975. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  3976. <p>The 
  3977. <kw role = "element">or</kw> element is an 
  3978. <emph>n-ary logical operator</emph> (see 
  3979. <specref ref = "contm_funopqual"/>).</p></div5>
  3980. <div5>
  3981. <head>Example</head>
  3982. <eg role = "mathml"><![CDATA[
  3983. <apply>
  3984.   <or/>
  3985.   <ci> a </ci>
  3986.   <ci> b </ci>
  3987. </apply>
  3988. ]]></eg></div5>
  3989. <div5>
  3990. <head>Default Rendering</head>
  3991. <p>
  3992. <graphic role="display" source="image/f4040.gif" alt="a \lor b"/></p>
  3993. </div5>
  3994. </div4>
  3995.  
  3996. <div4 id="contm_xor"><head>Exclusive Or (<kw role="element">xor</kw>)</head>
  3997.  
  3998. <div5><head>Discussion</head>
  3999.  
  4000. <p>The <kw role="element">xor</kw> element is the boolean <quote>exclusive
  4001. or</quote> operator.</p>
  4002.  
  4003. <p><kw role="element">xor</kw> takes the <kw
  4004. role="attrib">definitionURL</kw> and <kw
  4005. role="attrib">encoding</kw> attributes, which can be used to override the
  4006. default semantics.</p>
  4007.  
  4008. <p>The <kw role="element">xor</kw> element is an <emph>n-ary logical
  4009. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  4010. </div5>
  4011.  
  4012. <div5><head>Example</head>
  4013.  
  4014. <eg role="mathml"><![CDATA[
  4015. <apply>
  4016.   <xor/>
  4017.   <ci> a </ci>
  4018.   <ci> b </ci>
  4019. </apply>
  4020. ]]></eg>
  4021.  
  4022. </div5>
  4023.  
  4024. <div5><head>Default Rendering</head>
  4025.  
  4026. <p><graphic role="inline" source="image/f4041.gif" alt="a \xor b"/></p>
  4027. </div5>
  4028. </div4>
  4029.  
  4030. <div4 id="contm_not"><head>Not (<kw role="element">not</kw>)</head>
  4031.  
  4032. <p>The <kw role="element">not</kw> operator is the boolean
  4033. <quote>not</quote> operator.</p>
  4034. <p>The 
  4035. <kw role = "element">not</kw> element takes the attribute 
  4036. <kw role = "attrib">definitionURL</kw> and 
  4037. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4038. <p>The 
  4039. <kw role = "element">not</kw> element is a 
  4040. <emph>unary logical operator</emph> (see 
  4041. <specref ref = "contm_funopqual"/>).</p>
  4042. <div5>
  4043. <head>Example</head>
  4044. <eg role = "mathml"><![CDATA[
  4045. <apply>
  4046.   <not/>
  4047.   <ci> a </ci>
  4048. </apply>
  4049. ]]></eg>
  4050.  
  4051. </div5>
  4052.  
  4053. <div5><head>Default Rendering</head>
  4054.  
  4055. <graphic role="display" source="image/f4042.gif" alt="\neg a"/>
  4056. </div5>
  4057. </div4>
  4058.  
  4059. <div4 id="contm_implies"><head>Implies (<kw role="element">implies</kw>)</head>
  4060.  
  4061. <div5><head>Discussion</head>
  4062.  
  4063. <p>The <kw role="element">implies</kw> element is the boolean relational operator 
  4064. <quote>implies</quote>.</p>
  4065. <p>The 
  4066. <kw role = "element">implies</kw> element takes the 
  4067. <kw role = "attrib">definitionURL</kw> and 
  4068. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4069. <p>The 
  4070. <kw role = "element">implies</kw> element is a 
  4071. <emph>binary logical operator</emph> (see 
  4072. <specref ref = "contm_relation"/>).</p></div5>
  4073. <div5>
  4074. <head>Example</head>
  4075. <eg role = "mathml"><![CDATA[
  4076. <apply>
  4077.   <implies/>
  4078.   <ci> A </ci>
  4079.   <ci> B </ci>
  4080. </apply>
  4081. ]]></eg>
  4082. <p>Mathematical applications designed for the evaluation of such expressions would evaluate this to 
  4083. <kw role = "attval">true</kw> when 
  4084. <mi>a</mi> =
  4085. <kw role = "attval">false</kw> and 
  4086. <mi>b</mi> = 
  4087. <kw role = "attval">true</kw>.</p></div5>
  4088. <div5>
  4089. <head>Default Rendering</head>
  4090. <p>
  4091. <graphic role = "display" source = "image/f4043.gif" alt = "A \Rightarrow B"/></p></div5></div4>
  4092.  
  4093. <div4 id="contm_forall"><head>Universal quantifier (<kw role = "element">forall</kw>)</head>
  4094.  
  4095. <div5><head>Discussion</head>
  4096.  
  4097. <p>The 
  4098. <kw role = "element">forall</kw> element represents the universal quantifier of logic. It must be used in conjunction with one or more bound variables, an optional 
  4099. <kw role = "element">condition</kw> element, and an assertion, which should take the form of an 
  4100. <kw role = "element">apply</kw> element. In MathML 1.0, the
  4101. <kw role = "element">reln</kw> element was also permitted here: this usage is now deprecated.</p>
  4102. <p>The 
  4103. <kw role = "element">forall</kw> element takes the 
  4104. <kw role = "attrib">definitionURL</kw> and 
  4105. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4106. <p>The 
  4107. <kw role = "element">forall</kw> element is a 
  4108. <emph>quantifier</emph> (see 
  4109. <specref ref = "contm_opwithqual"/>).</p></div5>
  4110. <div5>
  4111. <head>Examples</head>
  4112. <p>The first example encodes a simple identity.
  4113. <eg role = "mathml"><![CDATA[
  4114. <apply>
  4115.   <forall/>
  4116.   <bvar><ci> x </ci></bvar>
  4117.   <apply><eq/>
  4118.     <apply>
  4119.       <minus/><ci> x </ci><ci> x </ci>
  4120.     </apply>
  4121.     <cn>0</cn>
  4122.   </apply>
  4123. </apply>
  4124. ]]></eg></p>
  4125. <p>The next example is more involved, and makes use of an optional 
  4126. <kw role = "element">condition</kw> element.
  4127. <eg role = "mathml"><![CDATA[
  4128. <apply>
  4129.   <forall/>
  4130.   <bvar><ci> p </ci></bvar>
  4131.   <bvar><ci> q </ci></bvar>
  4132.   <condition>
  4133.     <apply><and/>
  4134.       <apply><in/><ci> p </ci><rationals/></apply>
  4135.       <apply><in/><ci> q </ci><rationals/></apply>
  4136.       <apply><lt/><ci> p </ci><ci> q </ci></apply>
  4137.     </apply>
  4138.   </condition>
  4139.   <apply><lt/>
  4140.       <ci> p </ci>
  4141.       <apply>
  4142.           <power/>
  4143.         <ci> q </ci>
  4144.         <cn> 2 </cn>
  4145.       </apply>
  4146.   </apply>
  4147. </apply>
  4148. ]]></eg></p>
  4149. <p>The final example uses both the 
  4150. <kw role = "element">forall</kw> and
  4151. <kw role = "element">exists</kw> quantifiers.
  4152. <eg role = "mathml"><![CDATA[
  4153. <apply>
  4154.   <forall/>
  4155.   <bvar><ci> n </ci></bvar>
  4156.   <condition>
  4157.     <apply><and/>
  4158.       <apply><gt/><ci> n </ci><cn> 0 </cn></apply>
  4159.       <apply><in/><ci> n </ci><integers/></apply>
  4160.     </apply>
  4161.   </condition>
  4162.   <apply>
  4163.     <exists/>
  4164.     <bvar><ci> x </ci></bvar>
  4165.     <bvar><ci> y </ci></bvar>
  4166.     <bvar><ci> z </ci></bvar>
  4167.     <condition>
  4168.       <apply><and/>
  4169.         <apply><in/><ci> x </ci><integers/></apply>
  4170.         <apply><in/><ci> y </ci><integers/></apply>
  4171.         <apply><in/><ci> z </ci><integers/></apply>
  4172.       </apply>
  4173.     </condition>
  4174.     <apply>
  4175.       <eq/>
  4176.       <apply>
  4177.         <plus/>
  4178.         <apply><power/><ci> x </ci><ci> n </ci></apply>
  4179.         <apply><power/><ci> y </ci><ci> n </ci></apply>
  4180.       </apply>
  4181.       <apply><power/><ci> z </ci><ci> n </ci></apply>
  4182.     </apply>
  4183.   </apply>
  4184. </apply>
  4185. ]]></eg></p></div5>
  4186. <div5>
  4187. <head>Default Rendering</head>
  4188. <ulist>
  4189. <item><p>
  4190. <graphic role="inline" source="image/f4044.gif" alt="\forall x: x-x=0"/></p></item>
  4191.  
  4192. <item><p>
  4193. <graphic role="inline" source="image/f4045.gif" alt="\forall p \in \mathbb{Q}, q \in \mathbb{Q}, p < q: p < q^2"/></p></item>
  4194.  
  4195. <item><p>
  4196. <graphic role="inline" source="image/f4046.gif" alt="\forall n>0, n \in \mathbb{Z}: \exists x \in \mathbb{Z}, y \in \mathbb{Z}, z \in  \mathbb{Z}: x^n+y^n=z^n"/></p></item>
  4197. </ulist>
  4198. </div5>
  4199. </div4>
  4200.  
  4201. <div4 id="contm_exists"><head>Existential quantifier (<kw role="element">exists</kw>)</head>
  4202.  
  4203. <div5><head>Discussion</head>
  4204.  
  4205. <p>The <kw role="element">exists</kw> element represents the existential
  4206. quantifier of logic. It must be used in conjunction with one or more bound
  4207. variables, an optional <kw role="element">condition</kw> element, and an
  4208. assertion, which may take the form of either an <kw
  4209. role="element">apply</kw> or <kw role="element">reln</kw> element.</p>
  4210.  
  4211. <p>The <kw role="element">exists</kw> element takes the <kw
  4212. role="attrib">definitionURL</kw> and <kw
  4213. role="attrib">encoding</kw> attributes, which can be used to override the
  4214. default semantics.</p>
  4215.  
  4216. <p>The <kw role="element">exists</kw> element is a
  4217. <emph>quantifier</emph> (see <specref ref="contm_opwithqual"/>).</p></div5>
  4218.  
  4219. <div5><head>Example</head>
  4220.  
  4221. <p>The following example encodes the sense of the expression 
  4222. <quote>there exists an 
  4223. <mi>x</mi> such that 
  4224. <mi>f</mi>(<mi>x</mi>) = 0</quote>.
  4225. <eg role = "mathml"><![CDATA[
  4226. <apply>
  4227.   <exists/>
  4228.   <bvar><ci> x </ci></bvar>
  4229.   <apply><eq/>
  4230.     <apply>
  4231.       <fn><ci> f </ci></fn>
  4232.       <ci> x </ci>
  4233.     </apply>
  4234.     <cn>0</cn>
  4235.   </apply>
  4236. </apply>
  4237. ]]></eg>
  4238. </p>
  4239. </div5>
  4240.  
  4241. <div5><head>Default Rendering</head>
  4242.  
  4243. <graphic  source="image/f4047.gif" alt="\exists x: f(x)=0"/>
  4244. </div5>
  4245. </div4>
  4246.  
  4247. <div4 id="contm_abs"><head>Absolute Value (<kw role="element">abs</kw>)</head>
  4248.  
  4249. <div5><head>Discussion</head>
  4250.  
  4251. <p>The <kw role="element">abs</kw> element represents the absolute value of
  4252. a real quantity or the modulus of a complex quantity.</p>
  4253.  
  4254. <p>The <kw role="element">abs</kw> element takes the <kw
  4255. role="attrib">definitionURL</kw> and <kw
  4256. role="attrib">encoding</kw> attributes, which can be used to override the
  4257. default semantics.</p>
  4258.  
  4259. <p>The <kw role="element">abs</kw> element is a <emph>unary arithmetic
  4260. operator</emph> (see <specref ref="contm_funopqual"/>).</p></div5>
  4261.  
  4262. <div5><head>Example</head>
  4263.  
  4264. <p>The following example encodes the absolute value of 
  4265. <mi>x</mi>.
  4266. <eg role = "mathml"><![CDATA[
  4267. <apply>
  4268.   <abs/>
  4269.   <ci> x </ci>
  4270. </apply>
  4271. ]]></eg>
  4272. </p>
  4273. </div5>
  4274.  
  4275. <div5><head>Default Rendering</head>
  4276.  
  4277. <p><graphic role="inline" source="image/f4048.gif" alt="|x|"/></p>
  4278. </div5>
  4279. </div4>
  4280.  
  4281. <div4 id="contm_conjugate"><head>Complex conjugate (<kw role="element">conjugate</kw>)</head>
  4282.  
  4283. <div5><head>Discussion</head>
  4284.  
  4285. <p>The <kw role="element">conjugate</kw> element represents the complex
  4286. conjugate of a complex quantity.</p>
  4287.  
  4288. <p>The <kw role="element">conjugate</kw> element takes the <kw
  4289. role="attrib">definitionURL</kw> and <kw
  4290. role="attrib">encoding</kw> attributes, which can be used to override the
  4291. default semantics.</p>
  4292.  
  4293. <p>The <kw role="element">conjugate</kw> element is a <emph>unary
  4294. arithmetic operator</emph> (see <specref ref="contm_funopqual"/>).</p></div5>
  4295.  
  4296. <div5><head>Example</head>
  4297.  
  4298. <p>The following example encodes the conjugate of 
  4299. <mi>x</mi> + i
  4300. <mi>y</mi>.
  4301. <eg role = "mathml"><![CDATA[
  4302. <apply>
  4303.   <conjugate/>
  4304.   <apply>
  4305.     <plus/>
  4306.     <ci> x </ci>
  4307.     <apply><times/>
  4308.       <cn> ⅈ </cn>
  4309.       <ci> y </ci>
  4310.     </apply>
  4311.   </apply>
  4312. </apply>
  4313. ]]></eg>
  4314. </p>
  4315. </div5>
  4316.  
  4317. <div5><head>Default Rendering</head>
  4318.  
  4319. <graphic role="display" source="image/f4049.gif" alt="\overline{x + \ii y}"/>
  4320. </div5>
  4321. </div4>
  4322.  
  4323. <div4 id="contm_arg"><head>Argument (<kw role="element">arg</kw>)</head>
  4324.  
  4325. <div5><head>Discussion</head>
  4326.  
  4327. <p>The <kw role="element">arg</kw> operator (introduced in MathML 2.0)
  4328. gives the <quote>argument</quote> of a complex number, which is the angle
  4329. (in radians) it makes with the positive real axis. Real negative numbers
  4330. have argument equal to + <graphic role="inline" source="image/f4003.gif"
  4331. alt="\pi"/>.</p>
  4332.  
  4333. <p>The <kw role="element">arg</kw> element takes the <kw
  4334. role="attrib">definitionURL</kw> and <kw
  4335. role="attrib">encoding</kw> attributes, which can be used to override the
  4336. default semantics.</p>
  4337.  
  4338. <p>The <kw role="element">arg</kw> element is a <emph>unary arithmetic
  4339. operator</emph> (see <specref ref="contm_funopqual"/>).</p></div5>
  4340.  
  4341. <div5><head>Example</head>
  4342.  
  4343. <p>The following example encodes the argument operation on
  4344. <mi>x</mi> + i
  4345. <mi>y</mi>.
  4346. <eg role = "mathml"><![CDATA[
  4347. <apply>
  4348.   <arg/>
  4349.   <apply><plus/>
  4350.     <ci> x </ci>
  4351.     <apply><times/>
  4352.       <cn> ⅈ </cn>
  4353.       <ci> y </ci>
  4354.     </apply>
  4355.   </apply>
  4356. </apply>
  4357. ]]></eg>
  4358. </p>
  4359. </div5>
  4360.  
  4361. <div5><head>Default Rendering</head>
  4362.  
  4363. <graphic source="image/f4050.gif" alt="\arg(x + \ii y)"/>
  4364. </div5>
  4365. </div4>
  4366.  
  4367. <div4 id="contm_real"><head>Real part (<kw role="element">real</kw>)</head>
  4368.  
  4369. <div5><head>Discussion</head>
  4370.  
  4371. <p>The <kw role="element">real</kw> operator (introduced in MathML 2.0)
  4372. gives the real part of a complex number, that is the x component in
  4373. <mi>x</mi> + i <mi>y</mi></p>
  4374.  
  4375. <p>The <kw role="element">real</kw> element takes the attributes <kw
  4376. role="attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the
  4377. default semantics.</p>
  4378.  
  4379. <p>The <kw role="element">real</kw> element is a <emph>unary arithmetic
  4380. operator</emph> (see <specref ref="contm_funopqual"/>).</p></div5>
  4381.  
  4382. <div5><head>Example</head>
  4383.  
  4384. <p>The following example encodes the real operation on
  4385. <mi>x</mi> + i
  4386. <mi>y</mi>.
  4387. <eg role = "mathml"><![CDATA[
  4388. <apply>
  4389.   <real/>
  4390.   <apply><plus/>
  4391.     <ci> x </ci>
  4392.     <apply><times/>
  4393.       <cn> ⅈ </cn>
  4394.       <ci> y </ci>
  4395.     </apply>
  4396.   </apply>
  4397. </apply>
  4398. ]]></eg>
  4399. A MathML-aware evaluation system would return the 
  4400. <mi>x</mi> component, suitably encoded.</p>
  4401. </div5>
  4402.  
  4403. <div5><head>Default Rendering</head>
  4404.  
  4405. <graphic source="image/f4051.gif" alt="\Re(x + \ii y)"/>
  4406. </div5>
  4407. </div4>
  4408.  
  4409. <div4 id="contm_imaginary"><head>Imaginary part (<kw role="element">imaginary</kw>)</head>
  4410.  
  4411. <div5><head>Discussion</head>
  4412.  
  4413. <p>The <kw role="element">imaginary</kw> operator (introduced in MathML
  4414. 2.0) gives the imaginary part of a complex number, that is, the y component
  4415. in <mi>x</mi> + i <mi>y</mi>.</p>
  4416.  
  4417. <p>The <kw role="element">imaginary</kw> element takes the attributes <kw
  4418. role="attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the
  4419. default semantics.</p>
  4420.  
  4421. <p>The <kw role="element">imaginary</kw> element is a <emph>unary
  4422. arithmetic operator</emph> (see <specref ref="contm_funopqual"/>).</p></div5>
  4423.  
  4424. <div5><head>Example</head>
  4425.  
  4426. <p>The following example encodes the imaginary operation on <mi>x</mi> + i
  4427. <mi>y</mi>.
  4428. <eg role = "mathml"><![CDATA[
  4429. <apply>
  4430.   <imaginary/>
  4431.   <apply><plus/>
  4432.     <ci> x </ci>
  4433.     <apply><times/>
  4434.       <cn> ⅈ </cn>
  4435.       <ci> y </ci>
  4436.     </apply>
  4437.   </apply>
  4438. </apply>
  4439. ]]></eg>A MathML-aware evaluation system would return the 
  4440. <mi>y</mi> component, suitably encoded.</p></div5>
  4441. <div5>
  4442. <head>Default Rendering</head>
  4443. <p>
  4444. <graphic source = "image/f4052.gif" alt = "\Im(x + \ii y)"/></p></div5></div4>
  4445.  
  4446. <div4 id="contm_lcm">
  4447. <head>Lowest common multiple (<kw role = "element">lcm</kw>)</head>
  4448. <div5>
  4449. <head>Discussion</head>
  4450. <p>The 
  4451. <kw role = "element">lcm</kw> element (introduced in MathML 2.0) is used to denote the lowest common
  4452.  multiple of its arguments.</p>
  4453. <p>The 
  4454. <kw role = "element">lcm</kw> takes the 
  4455. <kw role = "attrib">definitionURL</kw> and 
  4456. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4457. <p>The 
  4458. <kw role = "element">lcm</kw> element is an 
  4459. <emph>n-ary operator</emph> (see 
  4460. <specref ref = "contm_funopqual"/>).</p></div5>
  4461. <div5>
  4462. <head>Example</head>
  4463. <eg role = "mathml"><![CDATA[
  4464. <apply> <lcm/>
  4465.   <ci> a </ci>
  4466.   <ci> b </ci>
  4467.   <ci> c </ci>
  4468. </apply>
  4469. ]]></eg>
  4470. <p>If this were evaluated at 
  4471. <mi>a</mi> = 2, 
  4472. <mi>b</mi> = 4, 
  4473. <mi>c</mi> = 6 it would yield 12.</p></div5>
  4474. <div5>
  4475. <head>Default Rendering</head>
  4476. <p>
  4477. <graphic role = "inline" source = "image/new-lcm.gif" alt = "\mathrm{lcm}(a, b, c)"/></p>
  4478. <p>This default rendering is English-language locale specific: other locales 
  4479. may have different default renderings.</p>
  4480. </div5></div4>
  4481.  
  4482. <div4 id="contm_floor">
  4483. <head>Floor (<kw role = "element">floor</kw>)</head>
  4484. <div5>
  4485. <head>Discussion</head>
  4486. <p>The 
  4487. <kw role = "element">floor</kw> element (introduced in MathML 2.0) is used to denote the 
  4488. round-down (towards -infinity) operator.</p>
  4489. <p>The 
  4490. <kw role = "element">floor</kw> takes the 
  4491. <kw role = "attrib">definitionURL</kw> and 
  4492. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4493. <p>The 
  4494. <kw role = "element">floor</kw> element is a 
  4495. <emph>unary operator</emph> (see 
  4496. <specref ref = "contm_funopqual"/>).</p></div5>
  4497. <div5>
  4498. <head>Example</head>
  4499. <eg role = "mathml"><![CDATA[
  4500. <apply> <floor/>
  4501.   <ci> a </ci>
  4502. </apply>
  4503. ]]></eg>
  4504. <p>If this were evaluated at 
  4505. <mi>a</mi> = 15.015, 
  4506.  it would yield 15.</p>
  4507. <eg role = "mathml"><![CDATA[
  4508. <apply> <forall/>
  4509.   <bvar><ci> a </ci></bvar>
  4510.   <apply><and/>
  4511.     <apply><leq/>
  4512.       <apply><floor/>
  4513.         <ci>a</ci>
  4514.       </apply>
  4515.       <ci>a</ci>
  4516.     </apply>    
  4517.     <apply><lt/>
  4518.       <ci>a</ci>
  4519.       <apply><plus/>
  4520.         <apply><floor/>
  4521.           <ci>a</ci>
  4522.         </apply>
  4523.         <cn>1</cn>
  4524.       </apply>
  4525.     </apply>
  4526.   </apply>
  4527. </apply>
  4528. ]]></eg>
  4529.  
  4530.  </div5>
  4531. <div5>
  4532. <head>Default Rendering</head>
  4533. <p>
  4534. <graphic role = "inline" source = "image/new-floor.gif" alt = "\lfloor{a}\rfloor"/></p></div5></div4>
  4535.  
  4536.  
  4537. <div4 id="contm_ceiling">
  4538. <head>Ceiling (<kw role = "element">ceiling</kw>)</head>
  4539. <div5>
  4540. <head>Discussion</head>
  4541. <p>The 
  4542. <kw role = "element">ceiling</kw> element (introduced in MathML 2.0) is used to denote the 
  4543. round-up (towards +infinity) operator.</p>
  4544. <p>The 
  4545. <kw role = "element">ceiling</kw> takes the 
  4546. <kw role = "attrib">definitionURL</kw> and 
  4547. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4548. <p>The 
  4549. <kw role = "element">ceiling</kw> element is a 
  4550. <emph>unary operator</emph> (see 
  4551. <specref ref = "contm_funopqual"/>).</p></div5>
  4552. <div5>
  4553. <head>Example</head>
  4554. <eg role = "mathml"><![CDATA[
  4555. <apply> <ceiling/>
  4556.   <ci> a </ci>
  4557. </apply>
  4558. ]]></eg>
  4559. <p>If this were evaluated at 
  4560. <mi>a</mi> = 15.015, 
  4561.  it would yield 16.</p>
  4562. <eg role = "mathml"><![CDATA[
  4563. <apply> <forall/>
  4564.   <bvar><ci> a </ci></bvar>
  4565.   <apply><and/>
  4566.     <apply><lt/>
  4567.       <apply><minus/>
  4568.         <apply><ceiling/>
  4569.           <ci>a</ci>
  4570.         </apply>
  4571.         <cn>1</cn>
  4572.       </apply>
  4573.       <ci>a</ci>
  4574.     </apply>
  4575.     <apply><leq/>
  4576.       <ci>a</ci>
  4577.       <apply><ceiling/>
  4578.         <ci>a</ci>
  4579.       </apply>
  4580.     </apply>    
  4581.   </apply>
  4582. </apply>
  4583. ]]></eg>
  4584.  
  4585.  
  4586.  </div5>
  4587. <div5>
  4588. <head>Default Rendering</head>
  4589. <p>
  4590. <graphic role = "inline" source = "image/new-ceiling.gif" alt = "\lceil{a}\rceil"/></p>
  4591. </div5></div4>
  4592.  
  4593. </div3>
  4594.  
  4595. <div3><head>Relations</head>
  4596.  
  4597. <div4 id="contm_eq"><head>Equals (<kw role="element">eq</kw>)</head>
  4598.  
  4599. <div5><head>Discussion</head>
  4600.  
  4601. <p>The <kw role="element">eq</kw> element is the relational operator
  4602. <quote>equals</quote>.</p>
  4603. <p>The 
  4604. <kw role = "element">eq</kw> element takes the 
  4605. <kw role = "attrib">definitionURL</kw> and 
  4606. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4607. <p>The 
  4608. <kw role = "element">equals</kw> element is an 
  4609. <emph>n-ary relation</emph> (see 
  4610. <specref ref = "contm_opwithqual"/>).</p></div5>
  4611. <div5>
  4612. <head>Example</head>
  4613. <eg role = "mathml"><![CDATA[
  4614. <apply>
  4615.   <eq/>
  4616.   <ci> a </ci>
  4617.   <ci> b </ci>
  4618. </apply>
  4619. ]]></eg>
  4620.  
  4621. <p>If this were tested at <mi>a</mi> = 5.5 and <mi>b</mi> = 6 it would
  4622. yield the truth value <kw>false</kw>.</p>
  4623. </div5>
  4624.  
  4625. <div5><head>Default Rendering</head>
  4626.  
  4627. <p><graphic role="inline" source="image/f4053.gif" alt="a = b"/></p>
  4628. </div5>
  4629. </div4>
  4630.  
  4631. <div4 id="contm_neq"><head>Not Equals (<kw role="element">neq</kw>)</head>
  4632.  
  4633. <div5><head>Discussion</head>
  4634.  
  4635. <p>The <kw role="element">neq</kw> element is the <quote>not equal
  4636. to</quote> relational operator.</p>
  4637.  
  4638. <p><kw role="element">neq</kw> takes the <kw
  4639. role="attrib">definitionURL</kw> and <kw
  4640. role="attrib">encoding</kw> attributes, which can be used to override the
  4641. default semantics.</p>
  4642.  
  4643. <p>The <kw role="element">neq</kw> element is a <emph>binary
  4644. relation</emph> (see <specref ref="contm_relation"/>).</p>
  4645. </div5>
  4646.  
  4647. <div5><head>Example</head>
  4648.  
  4649. <eg role="mathml"><![CDATA[
  4650. <apply>
  4651.   <neq/>
  4652.   <ci> a </ci>
  4653.   <ci> b </ci>
  4654. </apply>
  4655. ]]></eg>
  4656.  
  4657. <p>If this were tested at <mi>a</mi> = 5.5 and <mi>b</mi> = 6 it would
  4658. yield the truth value <kw>true</kw>.</p>
  4659. </div5>
  4660.  
  4661. <div5><head>Default Rendering</head>
  4662. <p><graphic role="display" source="image/f4054.gif" alt="a \neq b"/></p>
  4663. </div5>
  4664. </div4>
  4665.  
  4666. <div4 id="contm_gt"><head>Greater than (<kw role="element">gt</kw>)</head>
  4667.  
  4668. <div5><head>Discussion</head>
  4669.  
  4670. <p>The <kw role="element">gt</kw> element is the <quote>greater
  4671. than</quote> relational operator.</p>
  4672.  
  4673. <p>The <kw role="element">gt</kw> element takes the <kw
  4674. role="attrib">definitionURL</kw> and <kw
  4675. role="attrib">encoding</kw> attributes, which can be used to override the
  4676. default semantics.</p>
  4677.  
  4678. <p>The <kw role="element">gt</kw> element is an <emph>n-ary
  4679. relation</emph> (see <specref ref="contm_relation"/>).</p>
  4680. </div5>
  4681.  
  4682. <div5><head>Example</head>
  4683.  
  4684. <eg role="mathml"><![CDATA[
  4685. <apply>
  4686.   <gt/>
  4687.   <ci> a </ci>
  4688.   <ci> b </ci>
  4689. </apply>
  4690. ]]></eg>
  4691. <p>If this were tested at 
  4692. <mi>a</mi> = 5.5 and 
  4693. <mi>b</mi> = 6 it would yield the truth value 
  4694. <kw>false</kw>.</p></div5>
  4695. <div5>
  4696. <head>Default Rendering</head>
  4697. <p>
  4698. <graphic role="inline" source="image/f4055.gif" alt="a > b"/></p>
  4699. </div5>
  4700. </div4>
  4701.  
  4702. <div4 id="contm_lt"><head>Less Than (<kw role="element">lt</kw>)</head>
  4703.  
  4704. <div5><head>Discussion</head>
  4705.  
  4706. <p>The <kw role="element">lt</kw> element is the <quote>less than</quote>
  4707. relational operator.</p>
  4708.  
  4709. <p>The <kw role="element">lt</kw> element takes the <kw
  4710. role="attrib">definitionURL</kw> and <kw
  4711. role="attrib">encoding</kw> attributes, which can be used to override the
  4712. default semantics.</p>
  4713.  
  4714. <p>The <kw role="element">lt</kw> element is an <emph>n-ary
  4715. relation</emph> (see <specref ref="contm_relation"/>).</p>
  4716. </div5>
  4717.  
  4718. <div5><head>Example</head>
  4719.  
  4720. <eg role="mathml"><![CDATA[
  4721. <apply>
  4722.   <lt/>
  4723.   <ci> a </ci>
  4724.   <ci> b </ci>
  4725. </apply>
  4726. ]]></eg>
  4727. <p>If this were tested at 
  4728. <mi>a</mi> = 5.5 and 
  4729. <mi>b</mi> = 6 it would yield the truth value 
  4730. <quote>true</quote>.</p></div5>
  4731. <div5>
  4732. <head>Default Rendering</head>
  4733. <p>
  4734. <graphic role="inline" source="image/f4056.gif" alt="a < b"/></p>
  4735. </div5>
  4736. </div4>
  4737.  
  4738. <div4 id="contm_geq"><head>Greater Than or Equal (<kw role="element">geq</kw>)</head>
  4739.  
  4740. <div5><head>Discussion</head>
  4741.  
  4742. <p>The <kw role="element">geq</kw> element is the relational operator
  4743. <quote>greater than or equal</quote>.</p>
  4744. <p>The 
  4745. <kw role = "element">geq</kw> element takes the 
  4746. <kw role = "attrib">definitionURL</kw> and 
  4747. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4748. <p>The 
  4749. <kw role = "element">geq</kw> element is an 
  4750. <emph>n-ary relation</emph> (see 
  4751. <specref ref = "contm_relation"/>).</p></div5>
  4752. <div5>
  4753. <head>Example</head>
  4754. <eg role = "mathml"><![CDATA[
  4755. <apply>
  4756.   <geq/>
  4757.   <ci> a </ci>
  4758.   <ci> b </ci>
  4759. </apply>
  4760. ]]></eg>
  4761. <p>If this were tested for 
  4762. <mi>a</mi> = 5.5 and 
  4763. <mi>b</mi> = 5.5 it would yield the truth value 
  4764. <kw>true</kw>.</p></div5>
  4765. <div5>
  4766. <head>Default Rendering</head>
  4767. <p>
  4768. <graphic role="display" source="image/f4057.gif" alt="a \geq b"/></p>
  4769. </div5>
  4770. </div4>
  4771.  
  4772. <div4 id="contm_leq"><head>Less Than or Equal (<kw role="element">leq</kw>)</head>
  4773.  
  4774. <div5><head>Discussion</head>
  4775.  
  4776. <p>The <kw role="element">leq</kw> element is the relational operator
  4777. <quote>less than or equal</quote>.</p>
  4778. <p>The 
  4779. <kw role = "element">leq</kw> element takes the 
  4780. <kw role = "attrib">definitionURL</kw> and 
  4781. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  4782. <p>The 
  4783. <kw role = "element">leq</kw> element is an 
  4784. <emph>n-ary relation</emph> (see 
  4785. <specref ref = "contm_relation"/>).</p></div5>
  4786. <div5>
  4787. <head>Example</head>
  4788. <eg role = "mathml"><![CDATA[
  4789. <apply>
  4790.   <leq/>
  4791.   <ci> a </ci>
  4792.   <ci> b </ci>
  4793. </apply>
  4794. ]]></eg>
  4795. <p>If 
  4796. <mi>a</mi> = 5.4 and
  4797. <mi>b</mi> = 5.5 this will yield the truth value 
  4798. <kw>true</kw>.</p></div5>
  4799. <div5>
  4800. <head>Default Rendering</head>
  4801. <p>
  4802. <graphic role="display" source="image/f4058.gif" alt="a \leq b"/></p>
  4803. </div5>
  4804. </div4>
  4805.  
  4806. <div4 id="contm_equivalent"><head>Equivalent (<kw role="element">equivalent</kw>)</head>
  4807.  
  4808. <div5><head>Discussion</head>
  4809.  
  4810. <p>The <kw role="element">equivalent</kw> element is the
  4811. <quote>equivalence</quote> relational operator.</p>
  4812. <p>The 
  4813. <kw role = "element">equivalent</kw> element takes the attributes 
  4814. <kw role = "attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the default semantics.</p>
  4815. <p>The 
  4816. <kw role = "element">equivalent</kw> element is an 
  4817. <emph>n-ary relation</emph> (see 
  4818. <specref ref = "contm_opwithqual"/>).</p></div5>
  4819. <div5>
  4820. <head>Example</head>
  4821. <eg role = "mathml"><![CDATA[
  4822. <apply>
  4823.   <equivalent/>
  4824.   <ci> a </ci>
  4825.   <apply>
  4826.     <not/>
  4827.     <apply> <not/> <ci> a </ci> </apply>
  4828.   </apply>
  4829. </apply>
  4830. ]]></eg>
  4831. <p>This yields the truth value 
  4832. <kw>true</kw> for all values of 
  4833. <mi>a</mi>.</p></div5>
  4834. <div5>
  4835. <head>Default Rendering</head>
  4836. <p>
  4837. <graphic source="image/f4059.gif" alt="a \equiv \neg(\neg a)"/></p>
  4838. </div5>
  4839. </div4>
  4840.  
  4841. <div4 id="contm_approx"><head>Approximately (<kw role="element">approx</kw>)</head>
  4842.  
  4843. <div5><head>Discussion</head>
  4844.  
  4845. <p>The <kw role="element">approx</kw> element is the relational operator
  4846. <quote>approximately equal</quote>. This is a generic relational operator and no specific arithmetic precision is implied</p>
  4847. <p>The 
  4848. <kw role = "element">approx</kw> element takes the attributes 
  4849. <kw role = "attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the default semantics.</p>
  4850. <p>The 
  4851. <kw role = "element">approx</kw> element is a 
  4852. <emph>binary relation</emph> (see 
  4853. <specref ref = "contm_opwithqual"/>).</p></div5>
  4854. <div5>
  4855. <head>Example</head>
  4856. <eg role = "mathml"><![CDATA[
  4857. <apply>
  4858.   <approx/>
  4859.   <cn type="rational"> 22 <sep/> 7 </cn>
  4860.   <cn type="constant"> π </cn>
  4861. </apply>
  4862. ]]></eg></div5>
  4863. <div5>
  4864. <head>Default Rendering</head>
  4865. <p>
  4866. <graphic source="image/f4060.gif" alt="a \approx b"/></p>
  4867. </div5>
  4868. </div4>
  4869.  
  4870.  
  4871.  
  4872. <div4 id="contm_factorof"><head>Factor Of (<kw role="element">factorof</kw>)</head>
  4873.  
  4874. <div5><head>Discussion</head>
  4875.  
  4876. <p>The <kw role="element">factorof</kw> element is the relational operator
  4877. element on two integers <mi>a</mi> and <mi>b</mi> specifying whether
  4878. one is an integer factor of the other.</p>
  4879.  
  4880. <p>The <kw role="element">factorof</kw> element takes the <kw
  4881. role="attrib">definitionURL</kw> and <kw
  4882. role="attrib">encoding</kw> attributes, which can be used to override the
  4883. default semantics.</p>
  4884.  
  4885. <p>The <kw role="element">factorof</kw> element is an <emph>binary relational operator</emph>
  4886.  (see <specref ref="contm_relation"/>).</p>
  4887. </div5>
  4888.  
  4889. <div5><head>Example</head>
  4890.  
  4891. <eg role="mathml"><![CDATA[
  4892. <apply>
  4893.   <factorof/>
  4894.     <ci> a </ci>
  4895.     <ci> b </ci>
  4896. </apply>
  4897. ]]></eg>
  4898.  
  4899. </div5>
  4900.  
  4901. <div5><head>Default Rendering</head>
  4902. <graphic role="display" source="image/new-factorof.gif" alt="a | b"/>
  4903. </div5>
  4904. </div4>
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910. </div3>
  4911.  
  4912. <div3><head>Calculus and Vector Calculus</head>
  4913.  
  4914. <div4 id="contm_int"><head>Integral (<kw role="element">int</kw>)</head>
  4915.  
  4916. <div5><head>Discussion</head>
  4917.  
  4918. <p>The <kw role="element">int</kw> element is the operator element for an
  4919. integral. The lower limit, upper limit and bound variable are given by
  4920. (optional) child elements <kw role="element">lowlimit</kw>, <kw
  4921. role="element">uplimit</kw> and <kw role="element">bvar</kw> in the
  4922. enclosing <kw role="element">apply</kw> element. The integrand is also
  4923. specified as a child element of the enclosing <kw role="element">apply</kw>
  4924. element.</p>
  4925.  
  4926. <p>The domain of integration may be specified by using either an <kw
  4927. role="element">interval</kw> element or a <kw
  4928. role="element">condition</kw> element. In such cases, if a bound variable
  4929. of integration is intended, it must be specified explicitly.  (The
  4930. condition may involve more than one symbol.)</p>
  4931.  
  4932. <p>The <kw role="element">int</kw> element takes the <kw
  4933. role="attrib">definitionURL</kw> and <kw
  4934. role="attrib">encoding</kw> attributes, which can be used to override the
  4935. default semantics.</p>
  4936.  
  4937. <p>The <kw role="element">int</kw> element is an <emph>operator taking
  4938. qualifiers</emph> (see <specref ref="contm_opwithqual"/>).</p>
  4939. </div5>
  4940.  
  4941. <div5><head>Examples</head>
  4942.  
  4943. <p>This example specifies a <kw role="element">lowlimit</kw>, <kw
  4944. role="element">uplimit</kw>, and <kw role="element">bvar</kw>.
  4945.  
  4946. <eg role="mathml"><![CDATA[
  4947. <apply>
  4948.   <int/>
  4949.   <bvar>
  4950.     <ci> x </ci>
  4951.   </bvar>
  4952.   <lowlimit>
  4953.     <cn> 0 </cn>
  4954.   </lowlimit>
  4955.   <uplimit>
  4956.     <ci> a </ci>
  4957.   </uplimit>
  4958.   <apply>
  4959.     <ci> f </ci>
  4960.     <ci> x </ci>
  4961.   </apply>
  4962. </apply>
  4963. ]]></eg></p>
  4964. <p>This example specifies the domain of integration with an
  4965. <kw role = "element">interval</kw> element.
  4966. <eg role = "mathml"><![CDATA[
  4967. <apply>
  4968.   <int/>
  4969.   <bvar>
  4970.     <ci> x </ci>
  4971.   </bvar>
  4972.   <interval>
  4973.     <ci> a </ci>
  4974.     <ci> b </ci>
  4975.   </interval>
  4976.   <apply><cos/>
  4977.     <ci> x </ci>
  4978.   </apply>
  4979. </apply>
  4980. ]]></eg></p>
  4981. <p>The final example specifies the domain of integration with a
  4982. <kw role = "element">condition</kw> element.
  4983. <eg role = "mathml"><![CDATA[
  4984. <apply>
  4985.   <int/>
  4986.   <bvar>
  4987.     <ci> x </ci>
  4988.   </bvar>
  4989.   <condition>
  4990.     <apply><in/>
  4991.       <ci> x </ci>
  4992.       <ci type="set"> D </ci>
  4993.     </apply>
  4994.   </condition>
  4995.   <apply><ci type="fn"> f </ci>
  4996.     <ci> x </ci>
  4997.   </apply>
  4998. </apply>
  4999. ]]></eg>
  5000. </p>
  5001. </div5>
  5002.  
  5003. <div5><head>Default Rendering</head>
  5004. <graphic role="display" source="image/f4061.gif" alt="\int_0^a f(x) \,\diffd x"/>
  5005. <graphic role="display" source="image/f4062.gif" alt="\int_a^b \cos x \,\diffd x"/>
  5006. <graphic role="display" source="image/f4063.gif" alt="\int_{x \in D} f(x) \,\diffd x"/>
  5007. </div5>
  5008. </div4>
  5009.  
  5010.  
  5011. <div4 id="contm_diff">
  5012. <head>Differentiation (<kw role="element">diff</kw>)</head>
  5013. <div5>
  5014. <head>Discussion</head>
  5015. <p>The <kw role="element">diff</kw> element is the differentiation operator
  5016. element for functions of a single variable.  It may be applied directly to
  5017. an actual function such as sine or cosine, thereby denoting a function which is
  5018. the derivative of the original function, or it can be applied to an expression
  5019. involving a single variable such as sin(<mi>x</mi>), or cos(<mi>x</mi>). or a
  5020. polynomial in <mi>x</mi>.   For the expression case the actual variable is
  5021. designated by a <kw role="element">bvar</kw> element that is a child of the
  5022. containing <kw role="element">apply</kw> element. The <kw
  5023. role="element">bvar</kw> element may also contain a <kw
  5024. role="element">degree</kw> element, which specifies the order of the
  5025. derivative to be taken.</p>
  5026. <p>The <kw role="element">diff</kw> element takes the <kw
  5027. role="attrib">definitionURL</kw> and <kw role="attrib">encoding</kw>
  5028. attributes, which can be used to override the
  5029. default semantics.</p>
  5030. <p>The <kw role="element">diff</kw> element is an <emph>operator taking
  5031. qualifiers</emph> (see <specref ref="contm_opwithqual"/>).</p>
  5032. </div5>
  5033. <div5>
  5034. <head>Examples</head>
  5035. <p> The derivative of a function <mi>f</mi> (often displayed as <emph>f'</emph>)
  5036. can be written as:</p>
  5037. <eg role="mathml"><![CDATA[
  5038. <apply>
  5039.   <diff/>
  5040.   <ci> f </ci>
  5041. </apply>
  5042. ]]></eg>
  5043. <p> The derivative with respect to <mi>x</mi> of an expression in <mi>x</mi>
  5044. such as <emph>f (x)</emph>
  5045. can be written as:</p>
  5046. <eg role="mathml"><![CDATA[
  5047. <apply>
  5048.   <diff/>
  5049.   <bvar>
  5050.     <ci> x </ci>
  5051.   </bvar>
  5052.   <apply><ci type="fn"> f </ci>
  5053.     <ci> x </ci>
  5054.   </apply>
  5055. </apply>
  5056. ]]></eg>
  5057. </div5>
  5058. <div5>
  5059. <head>Default Rendering</head>
  5060. <graphic role="display" source="image/newdiff.gif" alt="f\,'"/>
  5061. <graphic role="display" source="image/f4064.gif" alt="\frac{\diffd f(x)}{\diffd
  5062. x}"/>
  5063. </div5>
  5064. </div4>
  5065.  
  5066.  
  5067.  
  5068. <div4 id="contm_partialdiff"><head>Partial Differentiation (<kw role="element">partialdiff</kw>)</head>
  5069. <div5>
  5070. <head>Discussion</head>
  5071.  
  5072. <p>The <kw role="element">partialdiff</kw> element is the partial
  5073. differentiation operator element for functions or algebraic expressions in several 
  5074. variables. </p>
  5075.  
  5076. <p>In the case of algebraic expressions, the bound variables are given by <kw role="element">bvar</kw>
  5077. elements, which are children of the containing <kw
  5078. role="element">apply</kw> element. The <kw role="element">bvar</kw> elements
  5079. may also contain  <kw role="element">degree</kw> element, which specify
  5080. the order of the partial derivative to be taken in that variable.</p>
  5081.  
  5082. <p>For the expression case the actual variable is
  5083. designated by a <kw role="element">bvar</kw> element that is a child of the
  5084. containing <kw role="element">apply</kw> element. The <kw
  5085. role="element">bvar</kw> elements may also contain a <kw
  5086. role="element">degree</kw> element, which specifies the order of the
  5087. derivative to be taken.</p>
  5088.  
  5089. <p>Where a total degree of differentiation must be specified, this is indicated by use of a
  5090. <kw role="element">degree</kw> element at the top level, i.e. without any associated
  5091. <kw role="element">bvar</kw>, as a child
  5092. of the containing <kw role="element">apply</kw> element.</p>
  5093.  
  5094. <p>For the case of partial differentiation of a function, the containing  <kw role="element">apply</kw> takes
  5095. two child elements: firstly a list of indices indicating by position 
  5096. which coordinates are involved in
  5097. constructing the partial derivatives, and secondly the actual function to be partially differentiated.
  5098.  The coordinates may be repeated.
  5099. </p>
  5100.  
  5101. <p>The <kw role="element">partialdiff</kw> element takes the <kw
  5102. role="attrib">definitionURL</kw> and <kw role="attrib">encoding</kw>
  5103. attributes, which can be used to override the
  5104. default semantics.</p>
  5105.  
  5106. <p>The <kw role="element">partialdiff</kw> element is an <emph>operator taking
  5107. qualifiers</emph> (see <specref ref="contm_opwithqual"/>).</p>
  5108. </div5>
  5109.  
  5110.  
  5111. <div5>
  5112. <head>Examples</head>
  5113. <eg role="mathml"><![CDATA[
  5114. <apply><partialdiff/>
  5115.  <bvar><ci> x </ci><degree><ci> m </ci></degree></bvar>
  5116.  <bvar><ci> y </ci><degree><ci> n </ci></degree></bvar>
  5117.  <degree><ci> k </ci></degree>
  5118.  <apply><ci type="fn"> f </ci>
  5119.   <ci> x </ci>
  5120.   <ci> y </ci>
  5121.  </apply>
  5122. </apply>
  5123. ]]></eg>
  5124.  
  5125.  
  5126.  
  5127. <eg role="mathml"><![CDATA[
  5128. <apply><partialdiff/>
  5129.  <bvar><ci> x </ci></bvar>
  5130.  <bvar><ci> y </ci></bvar>
  5131.  <apply><ci type="fn"> f </ci>
  5132.   <ci> x </ci>
  5133.   <ci> y </ci>
  5134.  </apply>
  5135. </apply>
  5136. ]]></eg>
  5137.  
  5138.  
  5139. <eg role="mathml"><![CDATA[
  5140. <apply><partialdiff/>
  5141. <list><cn>1</cn><cn>1</cn><cn>3</cn></list>
  5142. <ci type="fn">f</ci>
  5143. </apply>
  5144. ]]></eg>
  5145.  
  5146.  
  5147. </div5>
  5148. <div5>
  5149. <head>Default Rendering</head>
  5150. <graphic role="display" source="image/newpdiff.gif" alt="\left( \frac{\partial ^{k}}{\partial x^{m}\,\partial y^{n}}\right) f(x,y)"/>
  5151. <graphic role="display" source="image/newpdiff2.gif" alt = "\frac{\partial ^{2}}{\partial x\,\partial y}f(x,y)"/>
  5152. <graphic role="display" source="image/newpdiff3.gif" alt="D_{1,1,3}(f)"/>
  5153. </div5>
  5154. </div4>
  5155.  
  5156. <div4 id="contm_lowlimit"><head>Lower limit (<kw role="element">lowlimit</kw>)</head>
  5157.  
  5158. <div5><head>Discussion</head>
  5159.  
  5160. <p>The <kw role="element">lowlimit</kw> element is the container element
  5161. used to indicate the <quote>lower limit</quote> of an operator using
  5162. qualifiers. For example, in an integral, it can be used to specify the
  5163. lower limit of integration. Similarly, it can be used to specify the lower
  5164. limit of an index for a sum or product.</p>
  5165.  
  5166. <p>The meaning of the <kw role="element">lowlimit</kw> element depends on
  5167. the context it is being used in. For further details about how
  5168. <emph>qualifiers</emph> are used in conjunction with operators taking
  5169. qualifiers, consult <specref ref="contm_opwithqual"/>.</p>
  5170. </div5>
  5171.  
  5172. <div5><head>Example</head>
  5173.  
  5174. <eg role="mathml"><![CDATA[
  5175. <apply>
  5176.   <int/>
  5177.   <bvar>
  5178.     <ci> x </ci>
  5179.   </bvar>
  5180.   <lowlimit>
  5181.     <ci> a </ci>
  5182.   </lowlimit>
  5183.   <uplimit>
  5184.     <ci> b </ci>
  5185.   </uplimit>
  5186.   <apply><ci type="fn"> f </ci>
  5187.      <ci> x </ci>
  5188.   </apply>
  5189. </apply>
  5190. ]]></eg></div5>
  5191. <div5>
  5192. <head>Default Rendering</head>
  5193. <p>The default rendering of the 
  5194. <kw role = "element">lowlimit</kw> element and its contents depends on the context. In the preceding example, it should be rendered as a subscript to the integral sign:
  5195. <graphic role = "display" source = "image/f4066.gif" alt = "\int_a^b f(x) \, \diffd x"/></p>
  5196. <p>Consult the descriptions of individual operators that make use of the
  5197. <kw role="element">lowlimit</kw> construct for default renderings.</p>
  5198. </div5>
  5199. </div4>
  5200.  
  5201. <div4 id="contm_uplimit"><head>Upper limit (<kw role="element">uplimit</kw>)</head>
  5202.  
  5203. <div5><head>Discussion</head>
  5204.  
  5205. <p>The <kw role="element">uplimit</kw> element is the container element
  5206. used to indicate the <quote>upper limit</quote> of an operator using
  5207. qualifiers. For example, in an integral, it can be used to specify the
  5208. upper limit of integration. Similarly, it can be used to specify the upper
  5209. limit of an index for a sum or product.</p>
  5210.  
  5211. <p>The meaning of the <kw role="element">uplimit</kw> element depends on
  5212. the context it is being used in. For further details about how
  5213. <emph>qualifiers</emph> are used in conjunction with operators taking
  5214. qualifiers, consult <specref ref="contm_opwithqual"/>.</p>
  5215. </div5>
  5216.  
  5217. <div5><head>Example</head>
  5218.  
  5219. <eg role="mathml"><![CDATA[
  5220. <apply>
  5221.   <int/>
  5222.   <bvar>
  5223.      <ci> x </ci>
  5224.   </bvar>
  5225.   <lowlimit>
  5226.      <ci> a </ci>
  5227.   </lowlimit>
  5228.   <uplimit>
  5229.      <ci> b </ci>
  5230.   </uplimit>
  5231.   <apply><ci type="fn"> f </ci>
  5232.      <ci> x </ci>
  5233.   </apply>
  5234. </apply>
  5235. ]]></eg>
  5236.  
  5237. </div5>
  5238.  
  5239. <div5><head>Default Rendering</head>
  5240.  
  5241. <p>The default rendering of the <kw role="element">uplimit</kw> element and
  5242. its contents depends on the context. In the preceding example, it should be
  5243. rendered as a superscript to the integral sign: <graphic role="display"
  5244. source="image/f4066.gif" alt="\int_a^b f(x) \, \diffd x"/></p>
  5245.  
  5246. <p>Consult the descriptions of individual operators that make use of the
  5247. <kw role="element">uplimit</kw> construct for default renderings.</p>
  5248. </div5>
  5249. </div4>
  5250.  
  5251. <div4 id="contm_bvar"><head>Bound variable (<kw role="element">bvar</kw>)</head>
  5252.  
  5253. <div5><head>Discussion</head>
  5254.  
  5255. <p>The <kw role="element">bvar</kw> element is the container element for
  5256. the <quote>bound variable</quote> of an operation. For example, in an
  5257. integral it specifies the variable of integration. In a derivative, it
  5258. indicates the variable with respect to which a function is being
  5259. differentiated. When the <kw role="element">bvar</kw> element is used to
  5260. qualify a derivative, the <kw role="element">bvar</kw> element may contain
  5261. a child <kw role="element">degree</kw> element that specifies the order of
  5262. the derivative with respect to that variable. The <kw
  5263. role="element">bvar</kw> element is also used for the internal variable in
  5264. sums and products and for the bound variable used with the universal and
  5265. existential quantifiers <kw role="element">forall</kw> and <kw
  5266. role="element">exists</kw>.</p>
  5267.  
  5268. <p>The meaning of the <kw role="element">bvar</kw> element depends on the
  5269. context it is being used in. For further details about how
  5270. <emph>qualifiers</emph> are used in conjunction with operators taking
  5271. qualifiers, consult <specref ref="contm_opwithqual"/>.</p>
  5272. </div5>
  5273.  
  5274. <div5><head>Examples</head>
  5275.  
  5276. <eg role="mathml"><![CDATA[
  5277. <apply>
  5278.   <diff/>
  5279.   <bvar>
  5280.     <ci> x </ci>
  5281.     <degree>
  5282.       <cn> 2 </cn>
  5283.     </degree>
  5284.   </bvar>
  5285.   <apply>
  5286.     <power/>
  5287.     <ci> x </ci>
  5288.     <cn> 4 </cn>
  5289.   </apply>
  5290. </apply>
  5291. ]]></eg>
  5292. <eg role = "mathml"><![CDATA[
  5293. <apply>
  5294.   <int/>
  5295.   <bvar><ci> x </ci></bvar>
  5296.   <condition>
  5297.     <apply><in/><ci> x </ci><ci> D </ci></apply>
  5298.   </condition>
  5299.   <apply><ci type="fn"> f </ci>
  5300.     <ci> x </ci>
  5301.   </apply>
  5302. </apply>
  5303. ]]></eg></div5>
  5304. <div5>
  5305. <head>Default Rendering</head>
  5306. <p>The default rendering of the 
  5307. <kw role = "element">bvar</kw> element and its contents depends on the context. In the preceding examples, it should be rendered as the 
  5308. <mi>x</mi> in the d<mi>x</mi> of the integral, and as the 
  5309. <mi>x</mi> in the denominator of the derivative symbol, respectively:
  5310. <graphic role = "display" source = "image/f4067.gif" alt = "\frac{\diffd x^4}{\diffd x^2}"/>
  5311. <graphic role = "display" source = "image/f4068.gif" alt = "\int_{x \in D} f(x) \, \diffd x"/></p>
  5312. <p>Note that in the case of the derivative, the default rendering of the 
  5313. <kw role = "element">degree</kw> child of the 
  5314. <kw role = "element">bvar</kw> element is as an exponent.</p>
  5315. <p>Consult the descriptions of individual operators that make use of the
  5316. <kw role="element">bvar</kw> construct for default renderings.</p>
  5317. </div5>
  5318. </div4>
  5319.  
  5320. <div4 id="contm_degree"><head>Degree (<kw role="element">degree</kw>)</head>
  5321.  
  5322. <div5><head>Discussion</head>
  5323.  
  5324. <p>The <kw role="element">degree</kw> element is the container element for
  5325. the <quote>degree</quote> or <quote>order</quote> of an operation. There
  5326. are a number of basic mathematical constructs that come in families, such as
  5327. derivatives and moments. Rather than introduce special elements for each of
  5328. these families, MathML uses a single general construct, the <kw
  5329. role="element">degree</kw> element for this concept of
  5330. <quote>order</quote>.</p>
  5331. <p>The meaning of the 
  5332. <kw role = "element">degree</kw> element depends on the context it is being used in. For further details about how
  5333. <emph>qualifiers</emph> are used in conjunction with operators taking qualifiers, consult 
  5334. <specref ref = "contm_opwithqual"/>.</p></div5>
  5335. <div5>
  5336. <head>Example</head>
  5337. <eg role = "mathml"><![CDATA[
  5338. <apply>
  5339.   <partialdiff/>
  5340.   <bvar>
  5341.     <ci> x </ci>
  5342.     <degree>
  5343.       <ci> n </ci>
  5344.     </degree>
  5345.   </bvar>
  5346.   <bvar>
  5347.     <ci> y </ci>
  5348.     <degree>
  5349.       <ci> m </ci>
  5350.     </degree>
  5351.   </bvar>
  5352.   <apply><sin/>
  5353.     <apply> <times/>
  5354.       <ci> x </ci>
  5355.       <ci> y </ci>
  5356.     </apply>
  5357.   </apply>
  5358. </apply>
  5359. ]]></eg></div5>
  5360. <div5>
  5361. <head>Default Rendering</head>
  5362. <p>The default rendering of the 
  5363. <kw role = "element">degree</kw> element and its contents depends on the context. In the preceding example, the 
  5364. <kw role = "element">degree</kw> elements would be rendered as the exponents in the differentiation symbols:
  5365. <graphic role = "display" source = "image/f4069.gif" alt = "\frac{\partial^{n+m}}{\partial x^n \partial y^m} \sin(xy)"/></p>
  5366. <p>Consult the descriptions of individual operators that make use of the
  5367. <kw role="element">degree</kw> construct for default renderings.</p>
  5368. </div5>
  5369. </div4>
  5370.  
  5371. <div4 id="contm_divergence"><head>Divergence (<kw role="element">divergence</kw>)</head>
  5372.  
  5373. <div5><head>Discussion</head>
  5374.  
  5375. <p>The <kw role="element">divergence</kw> element is the vector calculus
  5376. divergence operator, often called div.</p>
  5377.  
  5378. <p>The <kw role="element">divergence</kw> element takes the attributes <kw
  5379. role="attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the
  5380. default semantics.</p>
  5381.  
  5382. <p>The <kw role="element">divergence</kw> element is a 
  5383. <emph>unary calculus operator</emph> (see 
  5384. <specref ref = "contm_funopqual"/>).</p></div5>
  5385. <div5>
  5386. <head>Example</head>
  5387. <eg role = "mathml"><![CDATA[
  5388. <apply>
  5389.   <divergence/>
  5390.   <ci> a </ci>
  5391. </apply>
  5392. ]]></eg>
  5393. </div5>
  5394.  
  5395. <div5><head>Default Rendering</head>
  5396. <p><graphic source="image/f4070.gif" alt="\mathop{\mathrm{div}} a"/></p>
  5397. </div5>
  5398. </div4>
  5399.  
  5400. <div4 id="contm_grad"><head>Gradient (<kw role="element">grad</kw>)</head>
  5401.  
  5402. <div5><head>Discussion</head>
  5403.  
  5404. <p>The <kw role="element">grad</kw> element is the vector calculus gradient
  5405. operator, often called grad.</p>
  5406.  
  5407. <p>The <kw role="element">grad</kw> element takes the attributes <kw
  5408. role="attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the
  5409. default semantics.</p>
  5410.  
  5411. <p>The <kw role="element">grad</kw> element is a <emph>unary calculus
  5412. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5413. </div5>
  5414.  
  5415. <div5><head>Example</head>
  5416.  
  5417. <eg role="mathml"><![CDATA[
  5418. <apply>
  5419.   <grad/>
  5420.   <ci> f</ci>
  5421. </apply>
  5422. ]]></eg>
  5423.  
  5424. <p>Where for example <mi>f</mi> is a scalar function of three real variables.</p>
  5425. </div5>
  5426.  
  5427. <div5><head>Default Rendering</head>
  5428. <graphic source="image/f4071.gif" alt="\mathop{\mathrm{grad}} f"/>
  5429. </div5>
  5430. </div4>
  5431.  
  5432. <div4 id="contm_curl"><head>Curl (<kw role="element">curl</kw>)</head>
  5433.  
  5434. <div5><head>Discussion</head>
  5435.  
  5436. <p>The <kw role="element">curl</kw> element is the vector calculus curl operator.</p>
  5437.  
  5438. <p>The <kw role="element">curl</kw> element takes the attributes <kw
  5439. role="attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the
  5440. default semantics.</p>
  5441.  
  5442. <p>The <kw role="element">curl</kw> element is a <emph>unary calculus
  5443. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5444. </div5>
  5445.  
  5446. <div5><head>Example</head>
  5447.  
  5448. <eg role="mathml"><![CDATA[
  5449. <apply>
  5450.   <curl/>
  5451.   <ci> a </ci>
  5452. </apply>
  5453. ]]></eg>
  5454. <p>Where for example 
  5455. <mi>a</mi> is a vector field.</p>
  5456. </div5>
  5457.  
  5458. <div5><head>Default Rendering</head>
  5459. <graphic source="image/f4072.gif" alt="\mathop{\mathrm{curl}} a"/>
  5460. </div5>
  5461. </div4>
  5462.  
  5463. <div4 id="contm_laplacian"><head>Laplacian (<kw role="element">laplacian</kw>)</head>
  5464.  
  5465. <div5><head>Discussion</head>
  5466.  
  5467. <p>The <kw role="element">laplacian</kw> element is the vector calculus
  5468. laplacian operator.</p>
  5469.  
  5470. <p>The <kw role="element">laplacian</kw> element takes the attributes <kw
  5471. role="attrib">encoding</kw> and <kw>definitionURL</kw> that can be used to override the
  5472. default semantics.</p>
  5473.  
  5474. <p>The <kw role="element">laplacian</kw> element is an <emph>unary calculus
  5475. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5476. </div5>
  5477.  
  5478. <div5><head>Example</head>
  5479.  
  5480. <eg role="mathml"><![CDATA[
  5481. <apply>
  5482.   <eq/>
  5483.   <apply><laplacian/>
  5484.     <ci> f </ci>
  5485.   </apply>
  5486.   <apply>
  5487.     <divergence/>
  5488.     <apply><grad/>
  5489.       <ci> f </ci>
  5490.     </apply>
  5491.   </apply>
  5492. </apply>
  5493. ]]></eg>
  5494. <p>Where for example
  5495. <mi>f</mi> is a scalar function of three real variables.</p></div5>
  5496. <div5>
  5497. <head>Default Rendering</head>
  5498. <graphic source = "image/f4073.gif" alt = "\nabla^2 f"/></div5></div4></div3>
  5499. <div3 id = "contm_sets">
  5500. <head>Theory of Sets</head>
  5501. <div4 id = "contm_set">
  5502. <head>Set (<kw role = "element">set</kw>)</head>
  5503. <div5>
  5504. <head>Discussion</head>
  5505. <p>The 
  5506. <kw role = "element">set</kw> element is the container element that constructs a set of elements. The elements of a set can be defined either by explicitly listing the elements, or by using the
  5507. <kw role = "element">bvar</kw> and 
  5508. <kw role = "element">condition</kw> elements.</p>
  5509. <p>The 
  5510. <kw role = "element">set</kw> element is a 
  5511. <emph>constructor element</emph> (see 
  5512. <specref ref = "contm_constructor"/>).</p></div5>
  5513. <div5>
  5514. <head>Examples</head>
  5515. <eg role = "mathml"><![CDATA[
  5516. <set>
  5517.   <ci> b </ci>
  5518.   <ci> a </ci>
  5519.   <ci> c </ci>
  5520. </set>
  5521. ]]></eg>
  5522. <p>This constructs the set {b, a, c}</p>
  5523. <eg role = "mathml"><![CDATA[
  5524. <set>
  5525.   <bvar><ci> x </ci></bvar>
  5526.   <condition>
  5527.     <apply><and/>
  5528.       <apply><lt/>
  5529.         <ci> x </ci>
  5530.         <cn> 5 </cn>
  5531.       </apply>
  5532.       <apply><in/>
  5533.         <ci> x </ci>
  5534.         <naturalnumbers/>
  5535.       </apply>
  5536.     </apply>
  5537.   </condition>
  5538.   <ci> x </ci>
  5539. </set>
  5540. ]]></eg>
  5541. <p>This constructs the set of all natural numbers less than 5, ie. the set {0, 1, 2, 3, 4}</p>
  5542. </div5>
  5543. <div5>
  5544. <head>Default Rendering</head>
  5545. <ulist>
  5546. <item>
  5547. <p>
  5548. <graphic role = "inline" source = "image/f4074.gif" alt = "\{ a, b, c \}"/></p></item>
  5549. <item>
  5550. <p>
  5551. <graphic role = "inline" source = "image/new-setexample.gif" alt = "\{ x \mid x < 5 \land x \in \mathbb{N} \}"/></p></item></ulist></div5></div4>
  5552. <div4 id = "contm_list">
  5553. <head>List (<kw role = "element">list</kw>)</head>
  5554. <div5>
  5555. <head>Discussion</head>
  5556. <p>The 
  5557. <kw role = "element">list</kw> element is the container element that constructs a list of elements. Elements can be defined either by explicitly listing the elements, or by using the 
  5558. <kw role = "element">bvar</kw> and
  5559. <kw role = "element">condition</kw> elements.</p>
  5560. <p>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 
  5561. <kw role = "attrib">order</kw> attribute.</p>
  5562. <p>The 
  5563. <kw role = "element">list</kw> element is a 
  5564. <emph>constructor element</emph> (see 
  5565. <specref ref = "contm_constructor"/>).</p></div5>
  5566. <div5>
  5567. <head>Examples</head>
  5568. <eg role = "mathml"><![CDATA[
  5569. <list>
  5570.   <ci> a </ci>
  5571.   <ci> b </ci>
  5572.   <ci> c </ci>
  5573. </list>
  5574. ]]></eg>
  5575. <eg role = "mathml"><![CDATA[
  5576. <list order="numeric">
  5577.   <bvar><ci> x </ci></bvar>
  5578.   <condition>
  5579.     <apply><lt/>
  5580.       <ci> x </ci>
  5581.       <cn> 5 </cn>
  5582.     </apply>
  5583.   </condition>
  5584.   <ci> x </ci>
  5585. </list>
  5586. ]]></eg></div5>
  5587. <div5>
  5588. <head>Default Rendering</head>
  5589. <ulist>
  5590. <item><p>
  5591. <graphic role="inline" source="image/f4076.gif" alt="[ a, b, c ]"/></p></item>
  5592.  
  5593. <item><p>
  5594. <graphic role="inline" source="image/f4077.gif" alt="[ x \mid x < 5 ]"/></p></item>
  5595. </ulist>
  5596. </div5>
  5597. </div4>
  5598.  
  5599. <div4 id="contm_union"><head>Union (<kw role="element">union</kw>)</head>
  5600.  
  5601. <div5><head>Discussion</head>
  5602.  
  5603. <p>The <kw role="element">union</kw> element is the operator for a
  5604. set-theoretic union or join of two (or more) sets.</p>
  5605.  
  5606. <p>The <kw role="attrib">union</kw> attribute takes the <kw
  5607. role="attrib">definitionURL</kw> and <kw
  5608. role="attrib">encoding</kw> attributes, which can be used to override the
  5609. default semantics.</p>
  5610.  
  5611. <p>The <kw role="element">union</kw> element is an <emph>n-ary set
  5612. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5613. </div5>
  5614.  
  5615. <div5><head>Example</head>
  5616.  
  5617. <eg role="mathml"><![CDATA[
  5618. <apply>
  5619.   <union/>
  5620.   <ci> A </ci>
  5621.   <ci> B </ci>
  5622. </apply>
  5623. ]]></eg>
  5624.  
  5625. </div5>
  5626.  
  5627. <div5><head>Default Rendering</head>
  5628. <graphic role="display" source="image/f4078.gif" alt="A \cup B"/>
  5629. </div5>
  5630. </div4>
  5631.  
  5632. <div4 id="contm_intersect"><head>Intersect (<kw role="element">intersect</kw>)</head>
  5633.  
  5634. <div5><head>Discussion</head>
  5635.  
  5636. <p>The <kw role="element">intersect</kw> element is the operator for the
  5637. set-theoretic intersection or meet of two (or more) sets.</p>
  5638.  
  5639. <p>The <kw role="element">intersect</kw> element takes the <kw
  5640. role="attrib">definitionURL</kw> and <kw
  5641. role="attrib">encoding</kw> attributes, which can be used to override the
  5642. default semantics.</p>
  5643.  
  5644. <p>The <kw role="element">intersect</kw> element is an <emph>n-ary set
  5645. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5646. </div5>
  5647.  
  5648. <div5><head>Example</head>
  5649.  
  5650. <eg role="mathml"><![CDATA[
  5651. <apply>
  5652.   <intersect/>
  5653.   <ci type="set"> A </ci>
  5654.   <ci type="set"> B </ci>
  5655. </apply>
  5656. ]]></eg>
  5657.  
  5658. </div5>
  5659.  
  5660. <div5><head>Default Rendering</head>
  5661. <graphic role="display" source="image/f4079.gif" alt="A \cap B"/>
  5662. </div5>
  5663. </div4>
  5664.  
  5665. <div4 id="contm_in"><head>Set inclusion (<kw role="element">in</kw>)</head>
  5666.  
  5667. <div5><head>Discussion</head>
  5668.  
  5669. <p>The <kw role="element">in</kw> element is the relational operator used
  5670. for a set-theoretic inclusion (<quote>is in</quote> or <quote>is a member
  5671. of</quote>).</p>
  5672.  
  5673. <p>The <kw role="element">in</kw> element takes the <kw
  5674. role="attrib">definitionURL</kw> and <kw
  5675. role="attrib">encoding</kw> attributes, which can be used to override the
  5676. default semantics.</p>
  5677.  
  5678. <p>The <kw role="element">in</kw> element is a <emph>binary set
  5679. relation</emph> (see <specref ref="contm_relation"/>).</p>
  5680. </div5>
  5681.  
  5682. <div5><head>Example</head>
  5683.  
  5684. <eg role="mathml"><![CDATA[
  5685. <apply>
  5686.   <in/>
  5687.   <ci> a </ci>
  5688.   <ci type="set"> A </ci>
  5689. </apply>
  5690. ]]></eg>
  5691.  
  5692. </div5>
  5693.  
  5694. <div5><head>Default Rendering</head>
  5695. <graphic role="display" source="image/f4080.gif" alt="a \in A"/>
  5696. </div5>
  5697. </div4>
  5698.  
  5699. <div4 id="contm_notin"><head>Set exclusion (<kw role="element">notin</kw>)</head>
  5700.  
  5701. <div5><head>Discussion</head>
  5702.  
  5703. <p>The <kw role="element">notin</kw> element is the relational operator
  5704. element used for set-theoretic exclusion (<quote>is not in</quote> or
  5705. <quote>is not a member of</quote>).</p>
  5706.  
  5707. <p>The <kw role="element">notin</kw> element takes the <kw
  5708. role="attrib">definitionURL</kw> and <kw
  5709. role="attrib">encoding</kw> attributes, which can be used to override the
  5710. default semantics.</p>
  5711.  
  5712. <p>The <kw role="element">notin</kw> element is a <emph>binary set
  5713. relation</emph> (see <specref ref="contm_relation"/>).</p>
  5714. </div5>
  5715.  
  5716. <div5><head>Example</head>
  5717.  
  5718. <eg role="mathml"><![CDATA[
  5719. <apply>
  5720.   <notin/>
  5721.   <ci> a </ci>
  5722.   <ci> A </ci>
  5723. </apply>
  5724. ]]></eg>
  5725.  
  5726. </div5>
  5727.  
  5728. <div5><head>Default Rendering</head>
  5729. <graphic role="display" source="image/f4081.gif" alt="a \notin A"/>
  5730. </div5>
  5731. </div4>
  5732.  
  5733. <div4 id="contm_subset"><head>Subset (<kw role="element">subset</kw>)</head>
  5734.  
  5735. <div5><head>Discussion</head>
  5736.  
  5737. <p>The <kw role="element">subset</kw> element is the relational operator
  5738. element for a set-theoretic containment (<quote>is a subset
  5739. of</quote>).</p>
  5740.  
  5741. <p>The <kw role="element">subset</kw> element takes the <kw
  5742. role="attrib">definitionURL</kw> and <kw
  5743. role="attrib">encoding</kw> attributes, which can be used to override the
  5744. default semantics.</p>
  5745.  
  5746. <p>The <kw role="element">subset</kw> element is an <emph>n-ary set
  5747. relation</emph> (see <specref ref="contm_relation"/>).</p>
  5748. </div5>
  5749.  
  5750. <div5><head>Example</head>
  5751.  
  5752. <eg role="mathml"><![CDATA[
  5753. <apply>
  5754.   <subset/>
  5755.   <ci> A </ci>
  5756.   <ci> B </ci>
  5757. </apply>
  5758. ]]></eg>
  5759.  
  5760. </div5>
  5761.  
  5762. <div5><head>Default Rendering</head>
  5763. <graphic role="display" source="image/f4082.gif" alt="A \subseteq B"/>
  5764. </div5>
  5765. </div4>
  5766.  
  5767. <div4 id="contm_prsubset"><head>Proper Subset (<kw role="element">prsubset</kw>)</head>
  5768.  
  5769. <div5><head>Discussion</head>
  5770.  
  5771. <p>The <kw role="element">prsubset</kw> element is the relational operator
  5772. element for set-theoretic proper containment (<quote>is a proper subset
  5773. of</quote>).</p>
  5774.  
  5775. <p>The <kw role="element">prsubset</kw> element takes the <kw
  5776. role="attrib">definitionURL</kw> and <kw
  5777. role="attrib">encoding</kw> attributes, which can be used to override the
  5778. default semantics.</p>
  5779.  
  5780. <p>The <kw role="element">subset</kw> element is an <emph>n-ary set
  5781. relation</emph> (see <specref ref="contm_relation"/>).</p>
  5782. </div5>
  5783.  
  5784. <div5><head>Example</head>
  5785.  
  5786. <eg role="mathml"><![CDATA[
  5787. <apply>
  5788.   <prsubset/>
  5789.   <ci> A </ci>
  5790.   <ci> B </ci>
  5791. </apply>
  5792. ]]></eg>
  5793.  
  5794. </div5>
  5795.  
  5796. <div5><head>Default Rendering</head>
  5797. <graphic role="display" source="image/f4083.gif" alt="A \subset B"/>
  5798. </div5>
  5799. </div4>
  5800.  
  5801. <div4 id="contm_notsubset"><head>Not Subset (<kw role="element">notsubset</kw>)</head>
  5802.  
  5803. <div5><head>Discussion</head>
  5804.  
  5805. <p>The <kw role="element">notsubset</kw> element is the relational operator
  5806. element for the set-theoretic relation <quote>is not a subset
  5807. of</quote>.</p>
  5808.  
  5809. <p>The <kw role="element">notsubset</kw> element takes the <kw
  5810. role="attrib">definitionURL</kw> and <kw
  5811. role="attrib">encoding</kw> attributes, which can be used to override the
  5812. default semantics.</p>
  5813.  
  5814. <p>The <kw role="element">notsubset</kw> element is a <emph>binary set
  5815. relation</emph> (see <specref ref="contm_relation"/>).</p>
  5816. </div5>
  5817.  
  5818. <div5><head>Example</head>
  5819.  
  5820. <eg role="mathml"><![CDATA[
  5821. <apply>
  5822.   <notsubset/>
  5823.   <ci> A </ci>
  5824.   <ci> B </ci>
  5825. </apply>
  5826. ]]></eg>
  5827.  
  5828. </div5>
  5829.  
  5830. <div5><head>Default Rendering</head>
  5831. <graphic role="display" source="image/f4084.gif" alt="A \not\subset B"/>
  5832. </div5>
  5833. </div4>
  5834.  
  5835. <div4 id="contm_notprsubset"><head>Not Proper Subset (<kw role="element">notprsubset</kw>)</head>
  5836.  
  5837. <div5><head>Discussion</head>
  5838.  
  5839. <p>The <kw role="element">notprsubset</kw> element is the operator element
  5840. for the set-theoretic relation <quote>is not a proper subset
  5841. of</quote>.</p>
  5842.  
  5843. <p>The <kw role="element">notprsubset</kw> takes the <kw
  5844. role="attrib">definitionURL</kw> and <kw
  5845. role="attrib">encoding</kw> attributes, which can be used to override the
  5846. default semantics.</p>
  5847.  
  5848. <p>The <kw role="element">notprsubset</kw> element is a <emph>binary set
  5849. relation</emph> (see <specref ref="contm_relation"/>).</p>
  5850. </div5>
  5851.  
  5852. <div5><head>Example</head>
  5853.  
  5854. <eg role="mathml"><![CDATA[
  5855. <apply>
  5856.   <notprsubset/>
  5857.   <ci> A </ci>
  5858.   <ci> B </ci>
  5859. </apply>
  5860. ]]></eg>
  5861.  
  5862. </div5>
  5863.  
  5864. <div5><head>Default Rendering</head>
  5865. <graphic role="display" source="image/f4085.gif" alt="A \nsubseteq B"/>
  5866. </div5>
  5867. </div4>
  5868.  
  5869. <div4 id="contm_setdiff"><head>Set Difference (<kw role="element">setdiff</kw>)</head>
  5870.  
  5871. <div5><head>Discussion</head>
  5872.  
  5873. <p>The <kw role="element">setdiff</kw> element is the operator element for
  5874. a set-theoretic difference of two sets.</p>
  5875.  
  5876. <p>The <kw role="element">setdiff</kw> element takes the <kw
  5877. role="attrib">definitionURL</kw> and <kw
  5878. role="attrib">encoding</kw> attributes, which can be used to override the
  5879. default semantics.</p>
  5880.  
  5881. <p>The <kw role="element">setdiff</kw> element is a <emph>binary set
  5882. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5883. </div5>
  5884.  
  5885. <div5><head>Example</head>
  5886.  
  5887. <eg role="mathml"><![CDATA[
  5888. <apply>
  5889.   <setdiff/>
  5890.   <ci> A </ci>
  5891.   <ci> B </ci>
  5892. </apply>
  5893. ]]></eg>
  5894.  
  5895. </div5>
  5896.  
  5897. <div5><head>Default Rendering</head>
  5898. <graphic role="display" source="image/f4086.gif" alt="A \setminus B"/>
  5899. </div5>
  5900. </div4>
  5901.  
  5902. <div4 id="contm_card"><head>Cardinality (<kw role="element">card</kw>)</head>
  5903.  
  5904. <div5><head>Discussion</head>
  5905.  
  5906. <p>The <kw role="element">card</kw> element is the operator element for
  5907. the size or cardinality of a set.</p>
  5908.  
  5909. <p>The <kw role="element">card</kw> element takes the attributes <kw
  5910. role="attrib">definitionURL</kw> and <kw>encoding</kw> that can be used to override the
  5911. default semantics.</p>
  5912.  
  5913. <p>The <kw role="element">card</kw> element is a <emph>unary set
  5914. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5915. </div5>
  5916.  
  5917. <div5><head>Example</head>
  5918.  
  5919. <eg role="mathml"><![CDATA[
  5920. <apply>
  5921.   <eq/>
  5922.   <apply><card/>
  5923.     <ci> A </ci>
  5924.   </apply>
  5925.   <ci> 5 </ci>
  5926. </apply>
  5927. ]]></eg>
  5928.  
  5929. <p>where A is a set with 5 elements.</p>
  5930. </div5>
  5931.  
  5932. <div5><head>Default Rendering</head>
  5933. <graphic role="display" source="image/f4087.gif" alt="| A | = 5"/>
  5934. </div5>
  5935. </div4>
  5936.  
  5937. <div4 id="contm_cartesianproduct"><head>Cartesian product (<kw role="element">cartesianproduct</kw>)</head>
  5938.  
  5939. <div5><head>Discussion</head>
  5940.  
  5941. <p>The <kw role="element">cartesianproduct</kw> element is the operator element for
  5942. the Cartesian product of two or more sets. If <mi>A</mi> and <mi>B</mi> are two sets, then
  5943. the Cartesian product of <mi>A</mi> and <mi>B</mi> is the set of all pairs <mi>(a,b)</mi> 
  5944. with <mi>a</mi> in <mi>A</mi> and <mi>b</mi> in <mi>B</mi>. </p>
  5945.  
  5946. <p>The <kw role="element">cartesianproduct</kw> element takes the attributes <kw
  5947. role="attrib">definitionURL</kw> and <kw>encoding</kw> that can be used to override the
  5948. default semantics.</p>
  5949.  
  5950. <p>The <kw role="element">cartesianproduct</kw> element is a <emph>n-ary set
  5951. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  5952. </div5>
  5953.  
  5954. <div5><head>Example</head>
  5955.  
  5956. <eg role="mathml"><![CDATA[
  5957.   <apply><cartesianproduct/>
  5958.     <ci> A </ci>
  5959.     <ci> B </ci>
  5960.   </apply>
  5961. ]]></eg>
  5962.  
  5963. <eg role="mathml"><![CDATA[
  5964.   <apply><cartesianproduct/>
  5965.     <reals/>
  5966.     <reals/>
  5967.     <reals/>
  5968.   </apply>
  5969. ]]></eg>
  5970.  
  5971.  
  5972. </div5>
  5973.  
  5974. <div5><head>Default Rendering</head>
  5975. <graphic role="display" source="image/cartesianproduct1.gif" alt="A \times B"/>
  5976. <graphic role="display" source="image/cartesianproduct2.gif" alt="\mathbb{R} \times \mathbb{R} \times \mathbb{R}"/>
  5977. <graphic role="display" source="image/cartesianproduct3.gif" alt="\mathbb{R}^3"/>
  5978. </div5>
  5979. </div4>
  5980.  
  5981. </div3>
  5982.  
  5983. <div3><head>Sequences and Series</head>
  5984.  
  5985. <div4 id="contm_sum"><head>Sum (<kw role="element">sum</kw>)</head>
  5986.  
  5987. <div5><head>Discussion</head>
  5988.  
  5989. <p>The <kw role="element">sum</kw> element denotes the summation
  5990. operator. Upper and lower limits for the index of a sum can be specified using 
  5991. <kw role="element">uplimit</kw>    and <kw role="element">lowlimit</kw>. More general 
  5992. domains for the indices can be specified using a <kw role="element">condition</kw> 
  5993. involving the bound variables. The index for the summation is specified by a 
  5994. <kw role="element">bvar</kw> element.</p>
  5995.  
  5996. <p>The <kw role="element">sum</kw> element takes the <kw
  5997. role="attrib">definitionURL</kw> and <kw
  5998. role="attrib">encoding</kw> attributes, which can be used to override the
  5999. default semantics.</p>
  6000.  
  6001. <p>The <kw role="element">sum</kw> element is an <emph>operator taking
  6002. qualifiers</emph> (see <specref ref="contm_opwithqual"/>).</p>
  6003. </div5>
  6004.  
  6005. <div5><head>Examples</head>
  6006.  
  6007. <eg role="mathml"><![CDATA[
  6008. <apply>
  6009.   <sum/>
  6010.   <bvar>
  6011.     <ci> x </ci>
  6012.   </bvar>
  6013.   <lowlimit>
  6014.     <ci> a </ci>
  6015.   </lowlimit>
  6016.   <uplimit>
  6017.     <ci> b </ci>
  6018.   </uplimit>
  6019.   <apply><ci type="fn"> f </ci>
  6020.     <ci> x </ci>
  6021.   </apply>
  6022. </apply>
  6023.  
  6024. <apply>
  6025.   <sum/>
  6026.   <bvar>
  6027.     <ci> x </ci>
  6028.   </bvar>
  6029.   <condition>
  6030.     <apply> <in/>
  6031.       <ci> x </ci>
  6032.       <ci type="set"> B </ci>
  6033.     </apply>
  6034.   </condition>
  6035.   <apply><ci type="fn"> f </ci>
  6036.     <ci> x </ci>
  6037.   </apply>
  6038. </apply>
  6039. ]]></eg>
  6040.  
  6041. </div5>
  6042.  
  6043. <div5><head>Default Rendering</head>
  6044. <graphic role="display" source="image/f4088.gif" alt="\sum_{x=a}^b f(x)"/>
  6045. <graphic role="display" source="image/f4089.gif" alt="\sum_{x \in B} f(x)"/>
  6046. </div5>
  6047. </div4>
  6048.  
  6049. <div4 id="contm_product"><head>Product (<kw role="element">product</kw>)</head>
  6050.  
  6051. <div5><head>Discussion</head>
  6052.  
  6053. <p>The <kw role="element">product</kw> element denotes the product
  6054. operator. Upper and lower limits for the index of a product can be specified using 
  6055. <kw role="element">uplimit</kw>    and <kw role="element">lowlimit</kw>. More general 
  6056. domains for the indices can be specified using a <kw role="element">condition</kw> 
  6057. involving the bound variables. The index for the product is specified by a 
  6058. <kw role="element">bvar</kw> element.</p>
  6059.  
  6060. <p>The <kw role="element">product</kw> element takes the <kw
  6061. role="attrib">definitionURL</kw> and <kw
  6062. role="attrib">encoding</kw> attributes, which can be used to override the
  6063. default semantics.</p>
  6064.  
  6065. <p>The <kw role="element">product</kw> element is an <emph>operator taking
  6066. qualifiers</emph> (see <specref ref="contm_opwithqual"/>).</p>
  6067. </div5>
  6068.  
  6069. <div5><head>Examples</head>
  6070.  
  6071. <eg role="mathml"><![CDATA[
  6072. <apply>
  6073.   <product/>
  6074.   <bvar>
  6075.     <ci> x </ci>
  6076.   </bvar>
  6077.   <lowlimit>
  6078.     <ci> a </ci>
  6079.   </lowlimit>
  6080.   <uplimit>
  6081.     <ci> b </ci>
  6082.   </uplimit>
  6083.   <apply><ci type="fn"> f </ci>
  6084.     <ci> x </ci>
  6085.   </apply>
  6086. </apply>
  6087.  
  6088. <apply>
  6089.   <product/>
  6090.   <bvar>
  6091.     <ci> x </ci>
  6092.   </bvar>
  6093.   <condition>
  6094.     <apply> <in/>
  6095.       <ci> x </ci>
  6096.       <ci type="set"> B </ci>
  6097.     </apply>
  6098.   </condition>
  6099.   <apply><ci type="fn"> f </ci>
  6100.     <ci> x </ci>
  6101.   </apply>
  6102. </apply>
  6103. ]]></eg>
  6104.  
  6105. </div5>
  6106.  
  6107. <div5><head>Default Rendering</head>
  6108. <p>
  6109. <graphic role="display" source="image/f4090.gif" alt="\prod_{x=a}^b f(x)"/>
  6110. <graphic role="display" source="image/f4091.gif" alt="\prod_{x \in B} f(x)"/>
  6111. </p>
  6112. </div5>
  6113. </div4>
  6114.  
  6115. <div4 id="contm_limit"><head>Limit (<kw role="element">limit</kw>)</head>
  6116.  
  6117. <div5><head>Discussion</head>
  6118.  
  6119. <p>The <kw role="element">limit</kw> element represents the operation of
  6120. taking a limit of a sequence. The limit point is expressed by specifying a
  6121. <kw role="element">lowlimit</kw> and a <kw role="element">bvar</kw>, or by
  6122. specifying a <kw role="element">condition</kw> on one or more bound
  6123. variables.</p>
  6124.  
  6125. <p>The <kw role="element">limit</kw> element takes the <kw
  6126. role="attrib">definitionURL</kw> and <kw
  6127. role="attrib">encoding</kw> attributes, which can be used to override the
  6128. default semantics.</p>
  6129.  
  6130. <p>The <kw role="element">limit</kw> element is an <emph>operator taking
  6131. qualifiers</emph> (see <specref ref="contm_opwithqual"/>).</p>
  6132. </div5>
  6133.  
  6134. <div5><head>Examples</head>
  6135.  
  6136. <eg role="mathml"><![CDATA[
  6137. <apply>
  6138.   <limit/>
  6139.   <bvar>
  6140.     <ci> x </ci>
  6141.   </bvar>
  6142.   <lowlimit>
  6143.     <cn> 0 </cn>
  6144.   </lowlimit>
  6145.   <apply><sin/>
  6146.     <ci> x </ci>
  6147.   </apply>
  6148. </apply>
  6149. ]]></eg>
  6150. <eg role = "mathml"><![CDATA[
  6151. <apply>
  6152.   <limit/>
  6153.   <bvar>
  6154.     <ci> x </ci>
  6155.   </bvar>
  6156.   <condition>
  6157.     <apply>
  6158.       <tendsto type="above"/>
  6159.       <ci> x </ci>
  6160.       <ci> a </ci>
  6161.     </apply>
  6162.   </condition>
  6163.   <apply><sin/>
  6164.      <ci> x </ci>
  6165.   </apply>
  6166. </apply>
  6167. ]]></eg></div5>
  6168. <div5>
  6169. <head>Default Rendering</head>
  6170. <graphic role="display" source="image/f4092.gif" alt="\lim_{x \to 0} \sin x"/>
  6171. <graphic role="display" source="image/f4093.gif" alt="\lim_{x \searrow a} \sin x"/>
  6172. </div5>
  6173. </div4>
  6174.  
  6175. <div4 id="contm_tendsto"><head>Tends To (<kw role="element">tendsto</kw>)</head>
  6176.  
  6177. <div5><head>Discussion</head>
  6178.  
  6179. <p>The <kw role="element">tendsto</kw> element is used to express the
  6180. relation that a quantity is tending to a specified value.</p>
  6181.  
  6182. <p>The <kw role="element">tendsto</kw> element takes the attributes <kw
  6183. role="attrib">type</kw> to set the direction from which the limiting
  6184. value is approached.</p>
  6185.  
  6186. <p>The <kw role="element">tendsto</kw> element is a <emph>binary relational
  6187. operator</emph> (see <specref ref="contm_relation"/>).</p>
  6188. </div5>
  6189.  
  6190. <div5><head>Examples</head>
  6191.  
  6192. <eg role="mathml"><![CDATA[
  6193. <apply>
  6194.   <tendsto type="above"/>
  6195.   <apply>
  6196.     <power/>
  6197.     <ci> x </ci>
  6198.     <cn> 2 </cn>
  6199.   </apply>
  6200.   <apply>
  6201.     <power/>
  6202.     <ci> a </ci>
  6203.     <cn> 2 </cn>
  6204.   </apply>
  6205. </apply>
  6206. ]]></eg>
  6207. <p>To express (<mi>x</mi>, 
  6208. <mi>y</mi>)
  6209. <graphic role = "inline" source = "image/f4009.gif" alt = "\rightarrow"/>(<mi>f</mi>(<mi>x</mi>, 
  6210. <mi>y</mi>), 
  6211. <mi>g</mi>(<mi>x</mi>,
  6212. <mi>y</mi>)), one might use vectors, as in:
  6213. <eg role = "mathml"><![CDATA[
  6214. <apply>
  6215.   <tendsto/>
  6216.   <vector>
  6217.      <ci> x </ci>
  6218.      <ci> y </ci>
  6219.   </vector>
  6220.   <vector>
  6221.     <apply><ci type="fn"> f </ci>
  6222.       <ci> x </ci>
  6223.       <ci> y </ci>
  6224.     </apply>
  6225.     <apply><ci type="fn"> g </ci>
  6226.       <ci> x </ci>
  6227.       <ci> y </ci>
  6228.     </apply>
  6229.   </vector>
  6230. </apply>
  6231. ]]></eg>
  6232. </p>
  6233. </div5>
  6234.  
  6235. <div5><head>Default Rendering</head>
  6236.  
  6237. <graphic role="display" source="image/f4094.gif" alt="x^{2} \searrow a^{2}"/>
  6238. <graphic role="display" source="image/f4095.gif" alt="(x, y) \rightarrow (f(x, y), g(x, y))"/>
  6239. </div5>
  6240. </div4>
  6241. </div3>
  6242.  
  6243. <div3 id="contm_elemclass"><head>Elementary classical functions</head>
  6244.  
  6245. <div4 id="contm_trig"><head>common trigonometric functions </head>
  6246.  
  6247. <p>The names of the common trigonometric functions supported by MathML are
  6248. listed below. Since their standard interpretations are widely known, they
  6249. are discussed as a group.
  6250. <table border = "1">
  6251. <tbody>
  6252. <tr>
  6253. <td><kw role="element">sin</kw></td>
  6254. <td><kw role="element">cos</kw></td>
  6255. <td><kw role="element">tan</kw></td></tr>
  6256. <tr>
  6257. <td><kw role="element">sec</kw></td>
  6258. <td><kw role="element">csc</kw></td>
  6259. <td><kw role="element">cot</kw></td></tr>
  6260. <tr>
  6261. <td><kw role="element">sinh</kw></td>
  6262. <td><kw role="element">cosh</kw></td>
  6263. <td><kw role="element">tanh</kw></td></tr>
  6264. <tr>
  6265. <td><kw role="element">sech</kw></td>
  6266. <td><kw role="element">csch</kw></td>
  6267. <td><kw role="element">coth</kw></td></tr>
  6268. <tr>
  6269. <td><kw role="element">arcsin</kw></td>
  6270. <td><kw role="element">arccos</kw></td>
  6271. <td><kw role="element">arctan</kw></td></tr>
  6272. <tr>
  6273. <td><kw role="element">arccosh</kw></td>
  6274. <td><kw role="element">arccot</kw></td>
  6275. <td><kw role="element">arccoth</kw></td></tr>
  6276. <tr>
  6277. <td><kw role="element">arccsc</kw></td>
  6278. <td><kw role="element">arccsch</kw></td>
  6279. <td><kw role="element">arcsec</kw></td></tr>
  6280. <tr>
  6281. <td><kw role="element">arcsech</kw></td>
  6282. <td><kw role="element">arcsinh</kw></td>
  6283. <td><kw role="element">arctanh</kw></td></tr></tbody></table></p>
  6284.  
  6285. <div5><head>Discussion</head>
  6286.  
  6287. <p>These operator elements denote the standard trigonometrical functions.</p>
  6288.  
  6289. <p>These elements all take the <kw role="attrib">definitionURL</kw> and <kw
  6290. role="attrib">encoding</kw> attributes, which can be used to override the
  6291. default semantics.</p>
  6292.  
  6293. <p>They are all <emph>unary trigonometric operators</emph>. (see <specref
  6294. ref="contm_funopqual"/>).</p>
  6295. </div5>
  6296.  
  6297. <div5><head>Examples</head>
  6298.  
  6299. <eg role="mathml"><![CDATA[
  6300. <apply>
  6301.   <sin/>
  6302.   <ci> x </ci>
  6303. </apply>
  6304. ]]></eg>
  6305. <eg role = "mathml"><![CDATA[
  6306. <apply>
  6307.   <sin/>
  6308.   <apply>
  6309.     <plus/>
  6310.     <apply><cos/>
  6311.       <ci> x </ci>
  6312.     </apply>
  6313.     <apply>
  6314.       <power/>
  6315.       <ci> x </ci>
  6316.       <cn> 3 </cn>
  6317.     </apply>
  6318.   </apply>
  6319. </apply>
  6320. ]]></eg></div5>
  6321. <div5>
  6322. <head>Default Rendering</head>
  6323. <ulist>
  6324. <item><p>
  6325. <graphic role="display" source="image/f4096.gif" alt="\sin x"/></p></item>
  6326.  
  6327. <item><p>
  6328. <graphic role="display" source="image/f4097.gif" alt="\sin(\cos x + x^3)"/></p></item>
  6329. </ulist>
  6330. </div5>
  6331. </div4>
  6332.  
  6333. <div4 id="contm_exp"><head>Exponential (<kw role="element">exp</kw>)</head>
  6334.  
  6335. <div5><head>Discussion</head>
  6336.  
  6337. <p>The <kw role="element">exp</kw> element represents the exponential
  6338. function associated with the inverse of the <kw role="element">ln</kw>
  6339. function. In particular, exp(1) is approximately 2.718281828.</p>
  6340.  
  6341. <p>The <kw role="element">exp</kw> element takes the <kw
  6342. role="attrib">definitionURL</kw> and <kw
  6343. role="attrib">encoding</kw> attributes, which may be used to override the
  6344. default semantics.</p>
  6345.  
  6346. <p>The <kw role="element">exp</kw> element is a <emph>unary arithmetic
  6347. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  6348. </div5>
  6349.  
  6350. <div5><head>Example</head>
  6351.  
  6352. <eg role="mathml"><![CDATA[
  6353. <apply>
  6354.   <exp/>
  6355.   <ci> x </ci>
  6356. </apply>
  6357. ]]></eg>
  6358.  
  6359. </div5>
  6360.  
  6361. <div5><head>Default Rendering</head>
  6362. <graphic role="display" source="image/f4098.gif" alt="\eulere^x"/>
  6363. </div5>
  6364. </div4>
  6365.  
  6366. <div4 id="contm_ln"><head>Natural Logarithm (<kw role="element">ln</kw>)</head>
  6367.  
  6368. <div5><head>Discussion</head>
  6369.  
  6370. <p>The <kw role="element">ln</kw> element represents the natural logarithm
  6371. function.</p>
  6372.  
  6373. <p>The <kw role="element">ln</kw> element takes the <kw
  6374. role="attrib">definitionURL</kw> and <kw
  6375. role="attrib">encoding</kw> attributes, which can be used to override the
  6376. default semantics.</p>
  6377.  
  6378. <p>The <kw role="element">ln</kw> element is a <emph>unary calculus
  6379. operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  6380. </div5>
  6381.  
  6382. <div5><head>Example</head>
  6383.  
  6384. <eg role="mathml"><![CDATA[
  6385. <apply>
  6386.   <ln/>
  6387.   <ci> a </ci>
  6388. </apply>
  6389. ]]></eg>
  6390. <p>If 
  6391. <mi>a</mi> = 
  6392. <mi>e</mi>, (where <mi>e</mi> is the base of the natural logarithms) this will yield the value 1.</p>
  6393. </div5>
  6394.  
  6395. <div5><head>Default Rendering</head>
  6396. <graphic role="display" source="image/f4099.gif" alt="\ln a"/>
  6397. </div5>
  6398. </div4>
  6399.  
  6400. <div4 id="contm_log"><head>Logarithm (<kw role="element">log</kw>)</head>
  6401.  
  6402. <div5><head>Discussion</head>
  6403.  
  6404. <p>The <kw role="element">log</kw> element is the operator that returns a
  6405. logarithm to a given base. The base may be specified using a <kw
  6406. role="element">logbase</kw> element, which should be the first element
  6407. following <kw role="element">log</kw>, i.e. the second child of the
  6408. containing <kw role="element">apply</kw> element. If the <kw
  6409. role="element">logbase</kw> element is not present, a default base of 10 is
  6410. assumed.</p>
  6411.  
  6412. <p>The <kw role="element">log</kw> element takes the <kw
  6413. role="attrib">definitionURL</kw> and <kw
  6414. role="attrib">encoding</kw> attributes, which can be used to override the
  6415. default semantics.</p>
  6416.  
  6417. <p>The <kw role="element">log</kw> element can be used as either an
  6418. <emph>operator taking qualifiers</emph> or a <emph>unary calculus
  6419. operator</emph> (see <specref ref="contm_opwithqual"/>).</p>
  6420. </div5>
  6421.  
  6422. <div5><head>Example</head>
  6423.  
  6424. <eg role="mathml"><![CDATA[
  6425. <apply>
  6426.   <log/>
  6427.   <logbase>
  6428.     <cn> 3 </cn>
  6429.   </logbase>
  6430.   <ci> x </ci>
  6431. </apply>
  6432. ]]></eg>
  6433.  
  6434. <p>This markup represents <quote>the base 3 logarithm of x</quote>. For
  6435. natural logarithms base e, the <kw role="element">ln</kw> element should be
  6436. used instead.</p>
  6437. </div5>
  6438.  
  6439. <div5><head>Default Rendering</head>
  6440. <graphic role="display" source="image/f4100.gif" alt="\log_3 x"/>
  6441. </div5>
  6442. </div4>
  6443. </div3>
  6444.  
  6445. <div3><head>Statistics</head>
  6446.  
  6447. <div4 id="contm_mean"><head>Mean (<kw role="element">mean</kw>)</head>
  6448.  
  6449. <div5><head>Discussion</head>
  6450.  
  6451. <p><kw role="element">mean</kw> is the operator element representing a <emph>mean</emph>
  6452. or average.</p>
  6453.  
  6454. <p><kw role="element">mean</kw> takes the <kw
  6455. role="attrib">definitionURL</kw> and <kw
  6456. role="attrib">encoding</kw> attributes, which can be used to override the
  6457. default semantics.</p>
  6458. </div5>
  6459.  
  6460. <div5><head>Example</head>
  6461.  
  6462. <p><kw role="element">mean</kw> is an <emph>n-ary operator</emph> (see 
  6463. <specref ref="contm_funopqual"/>).
  6464.  
  6465. <eg role="mathml"><![CDATA[
  6466. <apply>
  6467.   <mean/>
  6468.   <ci> X </ci>
  6469. </apply>
  6470. ]]></eg></p></div5>
  6471. <div5>
  6472. <head>Default Rendering</head>
  6473. <p>
  6474. <graphic role="inline" source="image/f4101.gif" alt="\bar{X}"/> or
  6475. <graphic role="inline" source="image/f4102.gif" alt="\langle X \rangle"/></p>
  6476. </div5>
  6477. </div4>
  6478.  
  6479. <div4 id="contm_sdev"><head>Standard Deviation (<kw role="element">sdev</kw>)</head>
  6480.  
  6481. <div5><head>Discussion</head>
  6482.  
  6483. <p><kw role="element">sdev</kw> is the operator element representing the
  6484. statistical <emph>standard deviation</emph> operator.</p>
  6485.  
  6486. <p><kw role="element">sdev</kw> takes the <kw
  6487. role="attrib">definitionURL</kw> and <kw
  6488. role="attrib">encoding</kw> attributes, which can be used to override the
  6489. default semantics.</p>
  6490. </div5>
  6491.  
  6492. <div5><head>Example</head>
  6493.  
  6494. <p><kw role="element">sdev</kw> is an <emph>n-ary operator</emph> (see 
  6495. <specref ref="contm_funopqual"/>).
  6496.  
  6497. <eg role="mathml"><![CDATA[
  6498. <apply>
  6499.   <sdev/>
  6500.   <ci> X </ci>
  6501. </apply>
  6502. ]]></eg>
  6503. </p>
  6504. </div5>
  6505.  
  6506. <div5><head>Default Rendering</head>
  6507. <graphic role="display" source="image/f4103.gif" alt="\sigma(X)"/>
  6508. </div5>
  6509. </div4>
  6510.  
  6511. <div4 id="contm_variance"><head>Variance (<kw role="element">variance</kw>)</head>
  6512.  
  6513. <div5><head>Discussion</head>
  6514.  
  6515. <p><kw role="element">variance</kw> is the operator element representing the
  6516. statistical <emph>variance</emph> operator.</p>
  6517.  
  6518. <p><kw role="element">variance</kw> takes the <kw
  6519. role="attrib">definitionURL</kw> and <kw
  6520. role="attrib">encoding</kw> attributes, which can be used to override the
  6521. default semantics.</p>
  6522. </div5>
  6523.  
  6524. <div5><head>Example</head>
  6525.  
  6526. <p><kw role="element">variance</kw> is an <emph>n-ary operator</emph> (see 
  6527. <specref ref="contm_funopqual"/>).
  6528.  
  6529. <eg role="mathml"><![CDATA[
  6530. <apply>
  6531.   <variance/>
  6532.   <ci> X </ci>
  6533. </apply>
  6534. ]]></eg>
  6535. </p>
  6536. </div5>
  6537.  
  6538. <div5><head>Default Rendering</head>
  6539. <graphic role="display" source="image/f4104.gif" alt="\sigma(X)^2"/>
  6540. </div5>
  6541. </div4>
  6542.  
  6543. <div4 id="contm_median"><head>Median (<kw role="element">median</kw>)</head>
  6544.  
  6545. <div5><head>Discussion</head>
  6546.  
  6547. <p><kw role="element">median</kw> is the operator element representing the statistical 
  6548. <emph>median</emph> operator.</p>
  6549.  
  6550. <p><kw role="element">median</kw> takes the <kw
  6551. role="attrib">definitionURL</kw> and <kw
  6552. role="attrib">encoding</kw> attributes, which can be used to override the
  6553. default semantics.</p>
  6554. </div5>
  6555.  
  6556. <div5><head>Example</head>
  6557.  
  6558. <p><kw role="element">median</kw> is an <emph>n-ary operator</emph> (see 
  6559. <specref ref="contm_funopqual"/>).
  6560.  
  6561. <eg role="mathml"><![CDATA[
  6562. <apply>
  6563.   <median/>
  6564.   <ci> X </ci>
  6565. </apply>
  6566. ]]></eg>
  6567. </p>
  6568. </div5>
  6569.  
  6570. <div5><head>Default Rendering</head>
  6571. <graphic role="display" source="image/f4105.gif" alt="\mathrm{median}(X)"/>
  6572. </div5>
  6573. </div4>
  6574.  
  6575. <div4 id="contm_mode"><head>Mode (<kw role="element">mode</kw>)</head>
  6576.  
  6577. <div5><head>Discussion</head>
  6578.  
  6579. <p><kw role="element">mode</kw> is the operator element representing the statistical
  6580. <emph>mode</emph> operator.</p>
  6581.  
  6582. <p><kw role="element">mode</kw> takes the <kw
  6583. role="attrib">definitionURL</kw> and <kw
  6584. role="attrib">encoding</kw> attributes, which can be used to override the
  6585. default semantics.</p>
  6586. </div5>
  6587.  
  6588. <div5><head>Example</head>
  6589.  
  6590. <p><kw role="element">mode</kw> is an <emph>n-ary operator</emph> (see 
  6591. <specref ref="contm_funopqual"/>).
  6592.  
  6593. <eg role="mathml"><![CDATA[
  6594. <apply>
  6595.   <mode/>
  6596.   <ci> X </ci>
  6597. </apply>
  6598. ]]></eg>
  6599. </p>
  6600. </div5>
  6601.  
  6602. <div5><head>Default Rendering</head>
  6603. <graphic role="display" source="image/f4106.gif" alt="\mathrm{mode}(X)"/>
  6604. </div5>
  6605. </div4>
  6606.  
  6607. <div4 id="contm_moment"><head>Moment (<kw role="element">moment</kw>)</head>
  6608.  
  6609. <div5><head>Discussion</head>
  6610.  
  6611. <p>The <kw role="element">moment</kw> element represents the statistical
  6612. <emph>moment</emph> operator. Use the qualifier <kw role="element">degree</kw> for the <mi>n</mi> in
  6613. <quote> <mi>n</mi>-th moment</quote>. Use the qualifier <kw role="element">momentabout</kw>
  6614.  for the <mi>p</mi> in
  6615. <quote>moment about <mi>p</mi></quote>.</p>
  6616.  
  6617. <p><kw role="element">moment</kw> takes the <kw
  6618. role="attrib">definitionURL</kw> and <kw
  6619. role="attrib">encoding</kw> attributes, which can be used to override the
  6620. default semantics.</p>
  6621. </div5>
  6622.  
  6623. <div5><head>Example</head>
  6624.  
  6625. <p><kw role="element">moment</kw> is an <emph>operator taking qualifiers</emph> (see 
  6626. <specref ref="contm_opwithqual"/>). The third moment of the distribution
  6627. <mi>X</mi> about the point <mi>p</mi> is written:
  6628.  
  6629. <eg role="mathml"><![CDATA[
  6630. <apply>
  6631.   <moment/>
  6632.   <degree>
  6633.     <cn> 3 </cn>
  6634.   </degree>
  6635.   <momentabout>
  6636.     <ci> p </ci>
  6637.   </momentabout>
  6638.   <ci> X </ci>
  6639. </apply>
  6640. ]]></eg>
  6641. </p>
  6642. </div5>
  6643.  
  6644. <div5><head>Default Rendering</head>
  6645. <graphic role="display" source="image/f4107.gif" alt="\langle X^3 \rangle"/>
  6646. </div5>
  6647. </div4>
  6648.  
  6649. <div4 id="contm_momentabout"><head>Point of Moment (<kw role="element">momentabout</kw>)</head>
  6650.  
  6651. <div5><head>Discussion</head>
  6652.  
  6653. <p>The <kw role="element">momentabout</kw> element is a <emph>qualifier</emph> element used with the 
  6654. <kw role="element">moment</kw> element to represent statistical
  6655. moments.  Use the qualifier <kw role="element">momentabout</kw> for the <mi>p</mi> in
  6656. <quote>moment about <mi>p</mi></quote>.</p>
  6657.  
  6658. <p><kw role="element">momentabout</kw> takes the <kw
  6659. role="attrib">definitionURL</kw> and <kw
  6660. role="attrib">encoding</kw> attributes, which can be used to override the
  6661. default semantics.</p>
  6662. </div5>
  6663.  
  6664. <div5><head>Example</head>
  6665.  
  6666. <p> The third moment of the distribution
  6667. <mi>X</mi> about the point <mi>p</mi> is written:
  6668.  
  6669. <eg role="mathml"><![CDATA[
  6670. <apply>
  6671.   <moment/>
  6672.   <degree>
  6673.     <cn> 3 </cn>
  6674.   </degree>
  6675.   <momentabout>
  6676.     <ci> p </ci>
  6677.   </momentabout>
  6678.   <ci> X </ci>
  6679. </apply>
  6680. ]]></eg>
  6681. </p>
  6682. </div5>
  6683.  
  6684. <div5><head>Default Rendering</head>
  6685. <graphic role="display" source="image/f4107.gif" alt="\langle X^3 \rangle"/>
  6686. </div5>
  6687. </div4>
  6688.  
  6689. </div3>
  6690.  
  6691. <div3><head>Linear Algebra</head>
  6692.  
  6693. <div4 id="contm_vector"><head>Vector (<kw role="element">vector</kw>)</head>
  6694.  
  6695. <div5><head>Discussion</head>
  6696.  
  6697. <p><kw role="element">vector</kw> is the container element for a
  6698. vector. The child elements form the components of the vector.</p>
  6699.  
  6700. <p>For purposes of interaction with matrices and matrix multiplication,
  6701. vectors are regarded as equivalent to a matrix consisting of a single
  6702. column, and the transpose of a vector behaves the same as a matrix
  6703. consisting of a single row.</p>
  6704. </div5>
  6705.  
  6706. <div5><head>Example</head>
  6707.  
  6708. <p><kw role="element">vector</kw> is a <emph>constructor</emph> element (see 
  6709. <specref ref="contm_constructor"/>).
  6710.  
  6711. <eg role="mathml"><![CDATA[
  6712. <vector>
  6713.   <cn> 1 </cn>
  6714.   <cn> 2 </cn>
  6715.   <cn> 3 </cn>
  6716.   <ci> x </ci>
  6717. </vector>
  6718. ]]></eg>
  6719. </p>
  6720. </div5>
  6721.  
  6722. <div5><head>Default Rendering</head>
  6723. <graphic role="display" source="image/f4108.gif" alt="\left(\begin{array}{c} 1 \\ 2 \\ 3 \\ x \end{array} \right)"/>
  6724.  
  6725. <p>(1, 2, 3, 
  6726. <mi>x</mi>)</p>
  6727. </div5>
  6728. </div4>
  6729.  
  6730. <div4 id="contm_matrix"><head>Matrix (<kw role="element">matrix</kw>)</head>
  6731.  
  6732. <div5><head>Discussion</head>
  6733.  
  6734. <p>The <kw role="element">matrix</kw> element is the container element for
  6735. matrix rows, which are represented by <kw
  6736. role="element">matrixrow</kw>. The <kw role="element">matrixrow</kw>s
  6737. contain the elements of a matrix.</p>
  6738. </div5>
  6739.  
  6740. <div5><head>Example</head>
  6741.  
  6742. <p><kw role="element">matrix</kw> is a  <emph>constructor</emph> element (see 
  6743. <specref ref="contm_constructor"/>).
  6744.  
  6745. <eg role="mathml"><![CDATA[
  6746. <matrix>
  6747.   <matrixrow>
  6748.     <cn> 0 </cn> <cn> 1 </cn> <cn> 0 </cn>
  6749.   </matrixrow>
  6750.   <matrixrow>
  6751.     <cn> 0 </cn> <cn> 0 </cn> <cn> 1 </cn>
  6752.   </matrixrow>
  6753.   <matrixrow>
  6754.     <cn> 1 </cn> <cn> 0 </cn> <cn> 0 </cn>
  6755.   </matrixrow>
  6756. </matrix>
  6757. ]]></eg>
  6758. </p>
  6759. </div5>
  6760.  
  6761. <div5><head>Default Rendering</head>
  6762. <graphic role="display" source="image/f4109.gif" alt="A = \left(\begin{array}{ccc} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{array} \right)"/>
  6763. </div5>
  6764. </div4>
  6765.  
  6766. <div4 id="contm_matrixrow"><head>Matrix row (<kw role="element">matrixrow</kw>)</head>
  6767.  
  6768. <div5><head>Discussion</head>
  6769.  
  6770. <p>The <kw role="element">matrixrow</kw> element is the <emph>container</emph> element
  6771. for the rows of a matrix.</p>
  6772. </div5>
  6773.  
  6774. <div5><head>Example</head>
  6775.  
  6776. <p><kw role="element">matrixrow</kw> is a  constructor element (see 
  6777. <specref ref="contm_constructor"/>).
  6778.  
  6779. <eg role="mathml"><![CDATA[
  6780. <matrixrow>
  6781.   <cn> 1 </cn>
  6782.   <cn> 2 </cn>
  6783. </matrixrow>
  6784. <matrixrow>
  6785.   <cn> 3 </cn>
  6786.   <ci> x </ci>
  6787. </matrixrow>
  6788. ]]></eg>
  6789. </p>
  6790. </div5>
  6791.  
  6792. <div5><head>Default Rendering</head>
  6793.  
  6794. <p>Matrix rows are not directly rendered by themselves outside of the
  6795. context of a matrix.</p>
  6796. </div5>
  6797. </div4>
  6798.  
  6799. <div4 id="contm_determinant"><head>Determinant (<kw role="element">determinant</kw>)</head>
  6800.  
  6801. <div5><head>Discussion</head>
  6802.  
  6803. <p>The <kw role="element">determinant</kw> element is the operator for constructing the determinant of a matrix.</p>
  6804.  
  6805. <p><kw role="element">determinant</kw> takes the <kw
  6806. role="attrib">definitionURL</kw> and <kw
  6807. role="attrib">encoding</kw> attributes, which can be used to override the
  6808. default semantics.</p>
  6809. </div5>
  6810.  
  6811. <div5><head>Example</head>
  6812.  
  6813. <p><kw role="element">determinant</kw> is a <emph>unary operator</emph> (see
  6814. <specref ref="contm_funopqual"/>).
  6815.  
  6816. <eg role="mathml"><![CDATA[
  6817. <apply>
  6818.   <determinant/>
  6819.   <ci type="matrix"> A </ci>
  6820. </apply>
  6821. ]]></eg>
  6822. </p>
  6823. </div5>
  6824.  
  6825. <div5><head>Default Rendering</head>
  6826. <graphic role="display" source="image/f4110.gif" alt="\det A"/>
  6827. </div5>
  6828. </div4>
  6829.  
  6830. <div4 id="contm_transpose"><head>Transpose (<kw role="element">transpose</kw>)</head>
  6831.  
  6832. <div5><head>Discussion</head>
  6833.  
  6834. <p>The <kw role="element">transpose</kw> element is the operator for
  6835. constructing the transpose of a matrix.</p>
  6836.  
  6837. <p><kw role="element">transpose</kw> takes the <kw
  6838. role="attrib">definitionURL</kw> and <kw
  6839. role="attrib">encoding</kw> attributes, which can be used to override the
  6840. default semantics.</p>
  6841. </div5>
  6842.  
  6843. <div5><head>Example</head>
  6844.  
  6845. <p><kw role="element">transpose</kw> is a 
  6846. <emph>unary operator</emph> (see 
  6847. <specref ref = "contm_funopqual"/>).
  6848. <eg role = "mathml"><![CDATA[
  6849. <apply>
  6850.   <transpose/>
  6851.   <ci type="matrix"> A </ci>
  6852. </apply>
  6853. ]]></eg>
  6854. </p>
  6855. </div5>
  6856.  
  6857. <div5><head>Default Rendering</head>
  6858. <graphic role="display" source="image/f4111.gif" alt="A^{\mathrm{T}}"/>
  6859. </div5>
  6860. </div4>
  6861.  
  6862. <div4 id="contm_selector"><head>Selector (<kw role="element">selector</kw>)</head>
  6863.  
  6864. <div5><head>Discussion</head>
  6865.  
  6866. <p>The <kw role="element">selector</kw> element is the operator for
  6867. indexing into vectors matrices and lists. It accepts one or more
  6868. arguments. The first argument identifies the vector, matrix or list from
  6869. which the selection is taking place, and the second and subsequent
  6870. arguments, if any, indicate the kind of selection taking place.</p>
  6871.  
  6872. <p>When <kw role="element">selector</kw> is used with a single argument, it
  6873. should be interpreted as giving the sequence of all elements in the list,
  6874. vector or matrix given. The ordering of elements in the sequence for a
  6875. matrix is understood to be first by column, then by row. That is, for a
  6876. matrix ( <mi>a</mi><sub><mi>i</mi>,<mi>j</mi></sub>), where the indices
  6877. denote row and column, the ordering would be <mi>a</mi> <sub>1,1</sub>,
  6878. <mi>a</mi> <sub>1,2</sub>, ...  <mi>a</mi> <sub>2,1</sub>, <mi>a</mi><sub>2,2</sub> ... etc.</p>
  6879.  
  6880. <p>When three arguments are given, the last one is ignored for a list or vector, 
  6881. and in the case of a matrix, the second and third arguments specify the row 
  6882. and column of the selected element.</p>
  6883.  
  6884. <p>When two arguments are given, and the first is a vector or list, the 
  6885. second argument specifies an element in the list or vector. When a matrix 
  6886. and only one index 
  6887. <mi>i</mi> is specified as in
  6888. <eg role = "mathml"><![CDATA[
  6889. <apply>
  6890.   <selector/>
  6891.   <matrix>
  6892.     <matrixrow>
  6893.       <cn> 1 </cn> <cn> 2 </cn>
  6894.     </matrixrow>
  6895.     <matrixrow>
  6896.       <cn> 3 </cn> <cn> 4 </cn>
  6897.     </matrixrow>
  6898.   </matrix>
  6899.   <cn> 1 </cn>
  6900. </apply>
  6901. ]]></eg> 
  6902. it refers to the 
  6903. <mi>i</mi>-th matrixrow. Thus, the preceding example selects the following row:
  6904. <eg role = "mathml"><![CDATA[
  6905. <matrixrow> <cn> 1 </cn> <cn> 2 </cn> </matrixrow>
  6906. ]]></eg></p>
  6907. <p>
  6908. <kw role = "element">selector</kw> takes the 
  6909. <kw role = "attrib">definitionURL</kw> and 
  6910. <kw role = "attrib">encoding</kw> attributes, which can be used to override the default semantics.</p>
  6911. <p>
  6912. <kw role = "element">selector</kw> is classified as an n-ary linear algebra operator even though it can take only one, two, or three arguments.</p></div5>
  6913. <div5>
  6914. <head>Example</head>
  6915. <eg role = "mathml"><![CDATA[
  6916. <apply>
  6917.   <selector/>
  6918.   <ci type="matrix"> A </ci>
  6919.   <cn> 3 </cn>
  6920.   <cn> 2 </cn>
  6921. </apply>
  6922. ]]></eg>
  6923.  
  6924. </div5>
  6925.  
  6926. <div5><head>Default Rendering</head>
  6927.  
  6928. <p>The <kw role="element">selector</kw> construct renders in a manner that indicates
  6929. which sub-element of the parent object is selected.  For vectors and matrices this is
  6930. normally done by specifying the parent object together with subscripted indices. 
  6931. For example, the selection</p>
  6932. <eg role = "mathml"><![CDATA[
  6933. <apply>
  6934.   <selector/>
  6935.   <ci type="vector">V</ci>
  6936.   <cn> 1 </cn>
  6937. </apply>
  6938. ]]></eg> 
  6939. <p>would have a default rendering of
  6940. <graphic role="display" source="image/selector.gif" alt="V_1"/>
  6941. </p>
  6942. <p>Selecting the (1,2) element of a 2 by 2 matrix would have a default rendering as
  6943. <graphic role="display" source="image/selector2.gif" 
  6944. alt="{\left[\begin{array}{cc}1&2\\3&4\end{array}\right]}_{1,2}"/>
  6945. </p>
  6946. </div5>
  6947. </div4>
  6948.  
  6949. <div4 id="contm_vectorproduct"><head>Vector product (<kw role="element">vectorproduct</kw>)</head>
  6950.  
  6951. <div5><head>Discussion</head>
  6952.  
  6953. <p>The <kw role="element">vectorproduct</kw> is the operator element for
  6954. deriving the vector product of two vectors.</p>
  6955.  
  6956. <p>The <kw role="element">vectorproduct</kw> element takes the attributes
  6957. <kw role="attrib">definitionURL</kw> and <kw>encoding</kw> that can be used to override
  6958. the default semantics.</p>
  6959.  
  6960. <p>The <kw role="element">vectorproduct</kw> element is a <emph>binary
  6961. vector operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  6962. </div5>
  6963.  
  6964. <div5><head>Example</head>
  6965.  
  6966. <eg role="mathml"><![CDATA[
  6967. <apply>
  6968.   <eq/>
  6969.   <apply><vectorproduct/>
  6970.     <ci type="vector"> A </ci>
  6971.     <ci type="vector"> B </ci>
  6972.   </apply>
  6973.   <apply><times/>
  6974.     <ci> a </ci>
  6975.     <ci> b </ci>
  6976.     <apply><sin/>
  6977.       <ci> θ </ci>
  6978.     </apply>
  6979.     <ci type="vector"> N </ci>
  6980.   </apply>
  6981. </apply>
  6982. ]]></eg>
  6983.  
  6984. <p>where <mi>A</mi> and <mi>B</mi> are vectors, <mi>N</mi> is a unit vector orthogonal to <mi>A</mi> and <mi>B</mi>,
  6985.  <mi>a</mi>, <mi>b</mi> are the magnitudes of
  6986. A, B and <graphic role="inline" source="image/f4112.gif" alt="\theta"/>is
  6987. the angle between A and B.</p>
  6988. </div5>
  6989.  
  6990. <div5><head>Default Rendering</head>
  6991. <graphic role="display" source="image/f4113.gif"
  6992.         alt="A \times B = a b \sin\theta N"/>
  6993. </div5>
  6994. </div4>
  6995.  
  6996. <div4 id="contm_scalarproduct"><head>Scalar product (<kw role="element">scalarproduct</kw>)</head>
  6997.  
  6998. <div5><head>Discussion</head>
  6999.  
  7000. <p>The <kw role="element">scalarproduct</kw> is the operator element for
  7001. deriving the scalar product of two vectors.</p>
  7002.  
  7003. <p>The <kw role="element">scalarproduct</kw> element takes the attributes
  7004. <kw role="attrib">definitionURL</kw> and <kw>encoding</kw> that can be used to override
  7005. the default semantics.</p>
  7006.  
  7007. <p>The <kw role="element">scalarproduct</kw> element is a <emph>binary
  7008. vector operator</emph> (see <specref ref="contm_funopqual"/>).</p>
  7009. </div5>
  7010.  
  7011. <div5><head>Example</head>
  7012.  
  7013. <eg role="mathml"><![CDATA[
  7014. <apply>
  7015.   <eq/>
  7016.   <apply><scalarproduct/>
  7017.     <ci type="vector"> A </ci>
  7018.     <ci type="vector">B </ci>
  7019.   </apply>
  7020.   <apply><times/>
  7021.     <ci> a </ci>
  7022.     <ci> b </ci>
  7023.     <apply><cos/>
  7024.       <ci> θ </ci>
  7025.     </apply>
  7026.   </apply>
  7027. </apply>
  7028. ]]></eg>
  7029.  
  7030. <p>where A and B are vectors, <mi>a</mi>, <mi>b</mi> are the magnitudes of
  7031. A, B and <graphic role="inline" source="image/f4112.gif" alt="\theta"/>is
  7032. the angle between A and B.</p>
  7033. </div5>
  7034.  
  7035. <div5><head>Default Rendering</head>
  7036. <graphic role="display" source="image/f4114.gif" alt="A.B"/>
  7037. </div5>
  7038. </div4>
  7039.  
  7040. <div4 id="contm_outerproduct"><head>Outer product (<kw role="element">outerproduct</kw>)</head>
  7041.  
  7042. <div5><head>Discussion</head>
  7043.  
  7044. <p>The <kw role="element">outerproduct</kw> is the operator element for
  7045. deriving the outer product of two vectors.</p>
  7046.  
  7047. <p>The <kw role="element">outerproduct</kw> element takes the attributes
  7048. <kw role="attrib">definitionURL</kw> and <kw>encoding</kw> that can be used to override
  7049. the default semantics.</p>
  7050.  
  7051. <p>The <kw role="element">outerproduct</kw> element is a 
  7052. <emph>binary vector operator</emph> (see <specref
  7053. ref="contm_funopqual"/>).</p>
  7054. </div5>
  7055.  
  7056. <div5><head>Example</head>
  7057.  
  7058. <eg role="mathml"><![CDATA[
  7059. <apply>
  7060.   <outerproduct/>
  7061.   <ci type="vector">A</ci>
  7062.   <ci type="vector">B</ci>
  7063. </apply>
  7064. ]]></eg>
  7065.  
  7066. <p>where A and B are vectors.</p>
  7067. </div5>
  7068.  
  7069. <div5><head>Default Rendering</head>
  7070. <graphic role="display" source="image/f4114.gif" alt="A.B"/>
  7071. </div5>
  7072. </div4>
  7073. </div3>
  7074.  
  7075. <div3><head>Semantic Mapping Elements</head>
  7076.  
  7077. <p>This section explains the use of the semantic mapping elements <kw
  7078. role="element">semantics</kw>, <kw role="element">annotation</kw> and <kw
  7079. role="element">annotation-xml</kw>.</p>
  7080.  
  7081. <div4 id="contm_annotation"><head>Annotation (<kw role="element">annotation</kw>)</head>
  7082.  
  7083. <div5><head>Discussion</head>
  7084.  
  7085. <p>The <kw role="element">annotation</kw> element is the container element
  7086. for a semantic annotation in a non-XML format.</p>
  7087.  
  7088. <p>The <kw role="element">annotation</kw> element takes the attribute <kw
  7089. role="attrib">encoding</kw> to define the encoding being used.</p>
  7090. </div5>
  7091.  
  7092. <div5><head>Example</head>
  7093.  
  7094. <p>The <kw role="element">annotation</kw> element is a semantic mapping
  7095. element.  It is always used with <kw role="element">semantics</kw>.
  7096.  
  7097. <eg role="mathml"><![CDATA[
  7098. <semantics>
  7099.   <apply>
  7100.     <plus/>
  7101.     <apply><sin/>
  7102.       <ci> x </ci>
  7103.     </apply>
  7104.     <cn> 5 </cn>
  7105.   </apply>
  7106.   <annotation encoding="TeX">
  7107.     \sin x + 5
  7108.   </annotation>
  7109. </semantics>
  7110. ]]></eg>
  7111. </p>
  7112. </div5>
  7113.  
  7114. <div5><head>Default Rendering</head>
  7115.  
  7116. <p>None. The information contained in annotations may optionally be used by
  7117. a renderer able to process the kind of annotation given.</p>
  7118. </div5>
  7119. </div4>
  7120.  
  7121. <div4 id="contm_semantics"><head>Semantics (<kw role="element">semantics</kw>)</head>
  7122.  
  7123. <div5><head>Discussion</head>
  7124.  
  7125. <p>The <kw role="element">semantics</kw> element is the container element
  7126. that associates additional representations with a given MathML
  7127. construct. The <kw role="element">semantics</kw> element has as its first
  7128. child the expression being annotated, and the subsequent children are the
  7129. annotations. There is no restriction on the kind of annotation that can be
  7130. attached using the semantics element. For example, one might give a &TeX;
  7131. encoding, or computer algebra input in an annotation.</p>
  7132.  
  7133. <p>The representations that are XML based are enclosed in an <kw
  7134. role="element">annotation-xml</kw> element while those representations that
  7135. are to be parsed as <kw>PCDATA</kw> are enclosed in an <kw
  7136. role="element">annotation</kw> element.</p>
  7137.  
  7138. <p>The <kw role="element">semantics</kw> element takes the <kw
  7139. role="attrib">definitionURL</kw> and <kw
  7140. role="attrib">encoding</kw> attributes, which can be used to reference an
  7141. external source for some or all of the semantic information.</p>
  7142.  
  7143. <p>An important purpose of the <kw role="element">semantics</kw> construct
  7144. is to associate specific semantics with a particular presentation, or
  7145. additional presentation information with a content construct. The default
  7146. rendering of a <kw role="element">semantics</kw> element is the default
  7147. rendering of its first child. When a MathML-presentation annotation is
  7148. provided, a MathML renderer may optionally use this information to render
  7149. the MathML construct. This would typically be the case when the first child
  7150. is a MathML content construct and the annotation is provided to give a
  7151. preferred rendering differing from the default for the content
  7152. elements.</p>
  7153.  
  7154. <p>Use of <kw role="element">semantics</kw> to attach additional
  7155. information in-line to a MathML construct can be contrasted with use of the
  7156. <kw role="element">csymbol</kw> for referencing external semantics.  See
  7157. <specref ref="contm_csymbol"/></p>
  7158. </div5>
  7159.  
  7160. <div5><head>Examples</head>
  7161.  
  7162. <p>The <kw role="element">semantics</kw> element is a semantic mapping element.
  7163.  
  7164. <eg role="mathml-extension"><![CDATA[
  7165. <semantics>
  7166.   <apply>
  7167.     <plus/>
  7168.     <apply>
  7169.       <sin/>
  7170.       <ci> x </ci>
  7171.     </apply>
  7172.     <cn> 5 </cn>
  7173.   </apply>
  7174.   <annotation encoding="Maple">
  7175.     sin(x) + 5
  7176.   </annotation>
  7177.   <annotation-xml encoding="MathML-Presentation">
  7178.     ...
  7179.     ...
  7180.   </annotation-xml>
  7181.   <annotation encoding="Mathematica">
  7182.     Sin[x] + 5
  7183.   </annotation>
  7184.   <annotation encoding="TeX">
  7185.     \sin x + 5
  7186.   </annotation>
  7187.   <annotation-xml encoding="OpenMath">
  7188.     <OMA xmlns="http://www.openmath.org/OpenMath">
  7189.       <OMS cd="transc1" name="sin"/>
  7190.       <OMI>5</OMI>
  7191.     </OMA>
  7192.   </annotation-xml>
  7193. </semantics>
  7194. ]]></eg>
  7195. </p>
  7196. </div5>
  7197.  
  7198. <div5><head>Default Rendering</head>
  7199.  
  7200. <p>The default rendering of a <kw role="element">semantics</kw> element is
  7201. the default rendering of its first child.</p>
  7202. </div5>
  7203. </div4>
  7204.  
  7205. <div4 id="contm_annotation-xml"><head>XML-based annotation (<kw role="element">annotation-xml</kw>)</head>
  7206.  
  7207. <div5><head>Discussion</head>
  7208.  
  7209. <p>The <kw role="element">annotation-xml</kw> container element is used to
  7210. contain representations that are XML based. It is always used together with
  7211. the <kw role="element">semantics</kw> element, and takes the attribute <kw
  7212. role="attrib">encoding</kw> to define the encoding being used.</p>
  7213.  
  7214. <p><kw role="element">annotation-xml</kw> is a semantic mapping element.</p>
  7215. </div5>
  7216.  
  7217. <div5><head>Example</head>
  7218.  
  7219. <eg role="mathml-extension"><![CDATA[
  7220. <semantics>
  7221.   <apply>
  7222.     <plus/>
  7223.     <apply><sin/>
  7224.       <ci> x </ci>
  7225.     </apply>
  7226.     <cn> 5 </cn>
  7227.   </apply>
  7228.   <annotation-xml encoding="OpenMath">
  7229.     <OMA><OMS name="plus" cd="arith1"/>
  7230.       <OMA><OMS name="sin" cd="transc1"/>
  7231.         <OMV name="x"/>
  7232.       </OMA>
  7233.       <OMI>5</OMI>
  7234.     </OMA>
  7235.   </annotation-xml>
  7236. </semantics>
  7237. ]]></eg>
  7238.  
  7239. <p>See also the discussion of <kw role="element">semantics</kw> above.</p>
  7240. </div5>
  7241.  
  7242. <div5><head>Default Rendering</head>
  7243.  
  7244. <p>None. The information may optionally be used by a renderer able to
  7245. process the kind of annotation given.</p>
  7246. </div5>
  7247. </div4>
  7248. </div3>
  7249.  
  7250. <div3><head>Constant and Symbol Elements</head>
  7251.  
  7252. <p>This section explains the use of the Constant and Symbol elements.</p>
  7253.  
  7254. <div4 id="contm_integers"><head>integers (<kw role="element">integers</kw>)</head>
  7255.  
  7256. <div5><head>Discussion</head>
  7257.  
  7258. <p><kw role="element">integers</kw> represents the set of all integers.</p>
  7259. </div5>
  7260.  
  7261. <div5><head>Example</head>
  7262.  
  7263. <p>
  7264.  
  7265. <eg role="mathml"><![CDATA[
  7266. <apply>
  7267.   <in/>
  7268.   <cn type="integer"> 42 </cn>
  7269.   <integers/>
  7270. </apply>
  7271. ]]></eg>
  7272. </p>
  7273. </div5>
  7274.  
  7275. <div5><head>Default Rendering</head>
  7276. <graphic role="display" source="image/new-integers.gif" alt="42 \in \mathbb{Z}"/>
  7277. </div5>
  7278. </div4>
  7279.  
  7280. <div4 id="contm_reals"><head>reals (<kw role="element">reals</kw>)</head>
  7281.  
  7282. <div5><head>Discussion</head>
  7283.  
  7284. <p><kw role="element">reals</kw> represents the set of all real numbers.</p>
  7285. </div5>
  7286.  
  7287. <div5><head>Example</head>
  7288.  
  7289. <p>
  7290.  
  7291. <eg role="mathml"><![CDATA[
  7292. <apply>
  7293.   <in/>
  7294.   <cn type="real"> 44.997 </cn>
  7295.   <reals/>
  7296. </apply>
  7297. ]]></eg>
  7298. </p>
  7299. </div5>
  7300.  
  7301. <div5><head>Default Rendering</head>
  7302. <graphic role="display" source="image/new-reals.gif" alt="44.997 \in \mathbb{R}"/>
  7303. </div5>
  7304. </div4>
  7305.  
  7306. <div4 id="contm_rationals"><head>Rational Numbers (<kw role="element">rationals</kw>)</head>
  7307.  
  7308. <div5><head>Discussion</head>
  7309.  
  7310. <p><kw role="element">rationals</kw> represents the set of all rational numbers.</p>
  7311. </div5>
  7312.  
  7313. <div5><head>Example</head>
  7314.  
  7315. <p>
  7316.  
  7317. <eg role="mathml"><![CDATA[
  7318. <apply>
  7319.   <in/>
  7320.   <cn type="rational"> 22 <sep/>7</cn>
  7321.   <rationals/>
  7322. </apply>
  7323. ]]></eg>
  7324. </p>
  7325. </div5>
  7326.  
  7327. <div5><head>Default Rendering</head>
  7328. <graphic role="display" source="image/new-rationals.gif" alt="22/7 \in \mathbb{Q}"/>
  7329. </div5>
  7330. </div4>
  7331.  
  7332. <div4 id="contm_naturalnumbers"><head>Natural Numbers (<kw role="element">naturalnumbers</kw>)</head>
  7333.  
  7334. <div5><head>Discussion</head>
  7335.  
  7336. <p><kw role="element">naturalnumbers</kw> represents the set of all natural
  7337. numbers, ie. non-negative integers.</p>
  7338. </div5>
  7339.  
  7340. <div5><head>Example</head>
  7341.  
  7342. <p>
  7343.  
  7344. <eg role="mathml"><![CDATA[
  7345. <apply>
  7346.   <in/>
  7347.   <cn type="integer">1729</cn>
  7348.   <naturalnumbers/>
  7349. </apply>
  7350. ]]></eg>
  7351. </p>
  7352. </div5>
  7353.  
  7354. <div5><head>Default Rendering</head>
  7355. <graphic role="display" source="image/new-naturalnumbers.gif" alt="1729 \in \mathbb{N}"/>
  7356. </div5>
  7357. </div4>
  7358.  
  7359. <div4 id="contm_complexes"><head>complexes (<kw role="element">complexes</kw>)</head>
  7360.  
  7361. <div5><head>Discussion</head>
  7362.  
  7363. <p><kw role="element">complexes</kw> represents the set of all complex
  7364. numbers, i.e. numbers which may have a real and an imaginary part.</p>
  7365. </div5>
  7366.  
  7367. <div5>
  7368. <head>Example</head>
  7369. <p>
  7370. <eg role = "mathml"><![CDATA[
  7371. <apply>
  7372.   <in/>
  7373.   <cn type="complex-cartesian">17<sep/>29</cn>
  7374.   <complexes/>
  7375. </apply>
  7376. ]]></eg></p></div5>
  7377. <div5>
  7378. <head>Default Rendering</head>
  7379. <graphic role = "display" source = "image/new-complexes.gif" alt = "17+29\ii \in \mathbb{C}"/></div5></div4>
  7380.  
  7381. <div4 id="contm_primes">
  7382. <head>primes (<kw role = "element">primes</kw>)</head>
  7383. <div5>
  7384. <head>Discussion</head>
  7385. <p>
  7386. <kw role = "element">primes</kw> represents the set of all natural prime
  7387. numbers, i.e. integers greater than 1 which have no positive integer factor
  7388. other than themselves and 1.</p>
  7389. </div5> 
  7390.  
  7391. <div5>
  7392. <head>Example</head>
  7393. <p>
  7394. <eg role = "mathml"><![CDATA[
  7395. <apply>
  7396.   <in/>
  7397.   <cn type="integer">17</cn>
  7398.   <primes/>
  7399. </apply>
  7400. ]]></eg></p></div5>
  7401. <div5>
  7402. <head>Default Rendering</head>
  7403. <graphic role = "display" source = "image/new-primes.gif" alt = "17 \in \mathbb{P}"/></div5></div4>
  7404.  
  7405. <div4 id="contm_exponentiale"><head>Exponential e (<kw role="element">exponentiale</kw>)</head>
  7406.  
  7407. <div5><head>Discussion</head>
  7408.  
  7409. <p><kw role="element">exponentiale</kw> represents the mathematical
  7410. constant which is the exponential base of the natural logarithms, commonly
  7411. written <emph>e</emph>. It is approximately 2.718281828..</p>
  7412. </div5>
  7413.  
  7414. <div5><head>Example</head>
  7415.  
  7416. <p>
  7417.  
  7418. <eg role="mathml"><![CDATA[
  7419. <apply> <eq/>
  7420.   <apply>
  7421.     <ln/>
  7422.     <exponentiale/>
  7423.   </apply>
  7424.   <cn>1</cn>
  7425. </apply>]]></eg>
  7426. </p>
  7427. </div5>
  7428.  
  7429. <div5><head>Default Rendering</head>
  7430. <graphic role="display" source="image/new-exponentiale.gif" alt="\ln \eulere = 1"/>
  7431. </div5>
  7432. </div4>
  7433.  
  7434. <div4 id="contm_imaginaryi"><head>Imaginary i (<kw role="element">imaginaryi</kw>)</head>
  7435.  
  7436. <div5><head>Discussion</head>
  7437.  
  7438. <p><kw role="element">imaginaryi</kw> represents the mathematical constant
  7439. which is the square root of -1, commonly written <emph>i</emph>.</p>
  7440. </div5>
  7441.  
  7442. <div5><head>Example</head>
  7443.  
  7444. <p>
  7445.  
  7446. <eg role="mathml"><![CDATA[
  7447. <apply> <eq/>
  7448.   <apply>
  7449.     <power/>
  7450.     <imaginaryi/>
  7451.     <cn>2</cn>
  7452.   </apply>
  7453.   <cn>-1</cn>
  7454. </apply>]]></eg>
  7455. </p>
  7456. </div5>
  7457.  
  7458. <div5><head>Default Rendering</head>
  7459. <graphic role="display" source="image/new-imaginaryi.gif" alt="\ii^2 = -1"/>
  7460. </div5>
  7461. </div4>
  7462.  
  7463. <div4 id="contm_notanumber"><head>Not A Number (<kw role="element">notanumber</kw>)</head>
  7464.  
  7465. <div5><head>Discussion</head>
  7466.  
  7467. <p><kw role="element">notanumber</kw> represents the result of an
  7468. ill-defined floating point operation, sometimes also called
  7469. <emph>NaN</emph>.</p>
  7470. </div5>
  7471.  
  7472. <div5><head>Example</head>
  7473.  
  7474. <p>
  7475.  
  7476. <eg role="mathml"><![CDATA[
  7477. <apply> <eq/>
  7478.   <apply>
  7479.     <divide/>
  7480.     <cn>0</cn>
  7481.     <cn>0</cn>
  7482.   </apply>
  7483.   <notanumber/>
  7484. </apply>]]></eg>
  7485. </p>
  7486. </div5>
  7487.  
  7488. <div5><head>Default Rendering</head>
  7489. <graphic role="display" source="image/new-notanumber.gif" alt="0/0 = \mbox{NaN}"/>
  7490. </div5>
  7491. </div4>
  7492.  
  7493. <div4 id="contm_true"><head>True (<kw role="element">true</kw>)</head>
  7494.  
  7495. <div5><head>Discussion</head>
  7496.  
  7497. <p><kw role="element">true</kw> represents the logical constant for truth.</p>
  7498. </div5>
  7499.  
  7500. <div5><head>Example</head>
  7501.  
  7502. <p>
  7503. <eg role="mathml"><![CDATA[
  7504. <apply> <eq/>
  7505.   <apply>
  7506.     <or/>
  7507.     <true/>
  7508.     <ci type = "logical">P</ci>
  7509.   </apply>
  7510.   <true/>
  7511. </apply>]]></eg>
  7512. </p>
  7513. </div5>
  7514.  
  7515. <div5><head>Default Rendering</head>
  7516. <graphic role="display" source="image/new-true.gif" alt="\mbox{true} \lor\ P = \mbox{true}"/>
  7517. </div5>
  7518. </div4>
  7519.  
  7520. <div4 id="contm_false"><head>False (<kw role="element">false</kw>)</head>
  7521.  
  7522. <div5><head>Discussion</head>
  7523.  
  7524. <p><kw role="element">false</kw> represents the logical constant for falsehood.</p>
  7525. </div5>
  7526.  
  7527. <div5><head>Example</head>
  7528.  
  7529. <p>
  7530.  
  7531. <eg role="mathml"><![CDATA[
  7532. <apply> <eq/>
  7533.   <apply>
  7534.     <and/>
  7535.     <false/>
  7536.     <ci type = "logical">P</ci>
  7537.   </apply>
  7538.   <false/>
  7539. </apply>]]></eg>
  7540. </p>
  7541. </div5>
  7542.  
  7543. <div5><head>Default Rendering</head>
  7544. <graphic role="display" source="image/new-false.gif" alt="\mbox{false} \land\ P = \mbox{false}"/>
  7545. </div5>
  7546. </div4>
  7547.  
  7548. <div4 id="contm_emptyset"><head>Empty Set (<kw role="element">emptyset</kw>)</head>
  7549.  
  7550. <div5><head>Discussion</head>
  7551.  
  7552. <p><kw role="element">emptyset</kw> represents the empty set.</p>
  7553. </div5>
  7554.  
  7555. <div5><head>Example</head>
  7556.  
  7557. <p>
  7558.  
  7559. <eg role="mathml"><![CDATA[
  7560.   <apply>
  7561.     <neq/>
  7562.     <integers/>
  7563.     <emptyset/>
  7564.   </apply>
  7565.   ]]></eg>
  7566. </p>
  7567. </div5>
  7568.  
  7569. <div5><head>Default Rendering</head>
  7570. <graphic role="display" source="image/new-emptyset.gif" alt="\mathbb{Z} \neq \emptyset"/>
  7571. </div5>
  7572. </div4>
  7573.  
  7574. <div4 id="contm_pi"><head>pi (<kw role="element">pi</kw>)</head>
  7575.  
  7576. <div5><head>Discussion</head>
  7577.  
  7578. <p><kw role="element">pi</kw> represents the mathematical constant which is
  7579. the ratio of a circle's circumference to its diameter, approximately
  7580. 3.141592653.</p>
  7581. </div5>
  7582.  
  7583. <div5><head>Example</head>
  7584.  
  7585. <p>
  7586.  
  7587. <eg role="mathml"><![CDATA[
  7588.   <apply>
  7589.     <approx/>
  7590.     <pi/>
  7591.     <cn type = "rational">22<sep/>7</cn>
  7592.   </apply>
  7593.   ]]></eg>
  7594. </p>
  7595. </div5>
  7596.  
  7597. <div5><head>Default Rendering</head>
  7598. <graphic role="display" source="image/new-pi.gif" alt="\pi \approx 22/7"/>
  7599. </div5>
  7600. </div4>
  7601.  
  7602. <div4 id="contm_eulergamma"><head>Euler gamma (<kw role="element">eulergamma</kw>)</head>
  7603.  
  7604. <div5><head>Discussion</head>
  7605.  
  7606. <p><kw role="element">eulergamma</kw> represents Euler's constant,
  7607. approximately 0.5772156649</p>
  7608. </div5>
  7609.  
  7610. <div5><head>Example</head>
  7611.  
  7612. <p>
  7613. <eg role="mathml"><![CDATA[
  7614.   <eulergamma/>
  7615. ]]></eg>
  7616. </p>
  7617. </div5>
  7618.  
  7619. <div5><head>Default Rendering</head>
  7620. <graphic role="display" source="image/new-eulergamma.gif" alt="\gamma"/>
  7621. </div5>
  7622. </div4>
  7623.  
  7624. <div4 id="contm_infinity"><head>infinity (<kw role="element">infinity</kw>)</head>
  7625.  
  7626. <div5><head>Discussion</head>
  7627.  
  7628. <p><kw role="element">infinity</kw> represents the concept of
  7629. infinity. Proper interpretation depends on context.</p>
  7630. </div5>
  7631.  
  7632. <div5><head>Example</head>
  7633.  
  7634. <p>
  7635. <eg role="mathml"><![CDATA[
  7636.   <infinity/>
  7637. ]]></eg>
  7638. </p>
  7639.  
  7640. </div5>
  7641.  
  7642. <div5><head>Default Rendering</head>
  7643. <graphic role="display" source="image/new-infinity.gif" alt="\infty"/>
  7644. </div5>
  7645. </div4>
  7646. </div3>
  7647. </div2>
  7648. </div1>
  7649.