1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276
|
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Content Markup</title><style type="text/css">
.egmeta {
color:#5555AA;font-style:italic;font-family:serif;font-weight:bold;
}
table.syntax {
font-size: 75%;
background-color: #DDDDDD;
border: thin solid;
}
table.syntax td {
border: solid thin;
}
table.syntax th {
text-align: left;
}
table.attributes td { padding-left:0.5em; padding-right:0.5em; }
table.attributes td.attname { white-space:nowrap; vertical-align:top;}
table.attributes td.attdesc { background-color:#F0F0FF; padding-left:2em; padding-right:2em}
th.uname {font-size: 50%; text-align:left;}
code { font-family: monospace; }
div.constraint,
div.issue,
div.note,
div.notice { margin-left: 2em; }
li p { margin-top: 0.3em;
margin-bottom: 0.3em; }
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
margin: 4px}
a.mainindex {font-weight: bold;}
li.sitem {list-style-type: none;}
.error { color: red }
div.mathml-example {border:solid thin black;
padding: 0.5em;
margin: 0.5em 0 0.5em 0;
}
div.strict-mathml-example {border:solid thin black;
padding: 0.5em;
margin: 0.5em 0 0.5em 0;
}
div.strict-mathml-example h5 {
margin-top: -0.3em;
margin-bottom: -0.5em;}
var.meta {background-color:green}
var.transmeta {background-color:red}
pre.mathml {padding: 0.5em;
background-color: #FFFFDD;}
pre.mathml-fragment {padding: 0.5em;
background-color: #FFFFDD;}
pre.strict-mathml {padding: 0.5em;
background-color: #FFFFDD;}
.minitoc { border-style: solid;
border-color: #0050B2;
border-width: 1px ;
padding: 0.3em;}
.attention { border-style: solid;
border-width: 1px ;
color: #5D0091;
background: #F9F5DE;
border-color: red;
margin-left: 1em;
margin-right: 1em;
margin-top: 0.25em;
margin-bottom: 0.25em; }
.attribute-Name { background: #F9F5C0; }
.method-Name { background: #C0C0F9; }
.IDL-definition { border-style: solid;
border-width: 1px ;
color: #001000;
background: #E0FFE0;
border-color: #206020;
margin-left: 1em;
margin-right: 1em;
margin-top: 0.25em;
margin-bottom: 0.25em; }
.baseline {vertical-align: baseline}
#eqnoc1 {width: 10%}
#eqnoc2 {width: 80%; text-align: center; }
#eqnoc3 {width: 10%; text-align: right; }
div.div1 {margin-bottom: 1em;}
.h3style {
text-align: left;
font-family: sans-serif;
font-weight: normal;
color: #0050B2;
font-size: 125%;
}
h4 { text-align: left;
font-family: sans-serif;
font-weight: normal;
color: #0050B2; }
h5 { text-align: left;
font-family: sans-serif;
font-weight: bold;
color: #0050B2; }
th {background: #E0FFE0;}
p, blockquote, h4 { font-family: sans-serif; }
dt, dd, dl, ul, li { font-family: sans-serif; }
pre, code { font-family: monospace }
a.termref {
text-decoration: none;
color: black;
}
sub.diff-link {background-color: black; color: white; font-family:
sans-serif; font-weight: bold;}
.diff-add { background-color: #FFFF99}
.diff-del { background-color: #FF9999; text-decoration: line-through }
.diff-chg { background-color: #99FF99 }
.diff-off { }
.mathml-render {
font-family: serif;
font-size: 130%;
border: solid 4px green;
padding-left: 1em;
padding-right: 1em;
}
</style><link rel="stylesheet" type="text/css" href="../../../StyleSheets/TR/W3C-REC.css">
</head>
<body>
<h1><a name="contm" id="contm"></a>4 Content Markup
</h1>
<!-- TOP NAVIGATION BAR -->
<div class="minitoc">
Overview: <a href="Overview-d.html">Mathematical Markup Language (MathML) Version 3.0</a><br>
Previous: 3 <a href="chapter3-d.html">Presentation Markup</a><br>
Next: 5 <a href="chapter5-d.html">Mixing Markup Languages for Mathematical Expressions</a><br><br>4 <a href="chapter4-d.html">Content Markup</a><br> 4.1 <a href="chapter4-d.html#contm.intro">Introduction</a><br> 4.1.1 <a href="chapter4-d.html#id.4.1.1">The Intent of Content Markup</a><br> 4.1.2 <a href="chapter4-d.html#contm.rendering">The Structure and Scope of Content MathML Expressions</a><br> 4.1.3 <a href="chapter4-d.html#contm.strict">Strict Content MathML</a><br> 4.1.4 <a href="chapter4-d.html#contm.cds">Content Dictionaries</a><br> 4.1.5 <a href="chapter4-d.html#id.4.1.5">Content MathML Concepts</a><br> 4.2 <a href="chapter4-d.html#contm.core">Content MathML Elements Encoding Expression Structure</a><br> 4.2.1 <a href="chapter4-d.html#contm.cn">Numbers <code><cn></code></a><br> 4.2.1.1 <a href="chapter4-d.html#contm.rendering.numbers">Rendering <code><cn></code>-Represented Numbers </a><br> 4.2.1.2 <a href="chapter4-d.html#contm.cn.strict">Strict uses of <code><cn></code></a><br> 4.2.1.3 <a href="chapter4-d.html#contm.cn.extended">Non-Strict uses of <code><cn></code></a><br> 4.2.2 <a href="chapter4-d.html#contm.ci">Content Identifiers <code><ci></code></a><br> 4.2.2.1 <a href="chapter4-d.html#contm.ci.strict">Strict uses of <code><ci></code></a><br> 4.2.2.2 <a href="chapter4-d.html#contm.ci.extended">Non-Strict uses of <code><ci></code></a><br> 4.2.2.3 <a href="chapter4-d.html#contm.rendering.ci">Rendering Content Identifiers</a><br> 4.2.3 <a href="chapter4-d.html#contm.csymbol">Content Symbols <code><csymbol></code></a><br> 4.2.3.1 <a href="chapter4-d.html#contm.csymbol.strict">Strict uses of <code><csymbol></code></a><br> 4.2.3.2 <a href="chapter4-d.html#contm.csymbol.extended">Non-Strict uses of <code><csymbol></code></a><br> 4.2.3.3 <a href="chapter4-d.html#contm.rendering.csymbol">Rendering Symbols</a><br> 4.2.4 <a href="chapter4-d.html#contm.cs">String Literals <code><cs></code></a><br> 4.2.5 <a href="chapter4-d.html#contm.apply">Function Application <code><apply></code></a><br> 4.2.5.1 <a href="chapter4-d.html#contm.applications.strict">Strict Content MathML</a><br> 4.2.5.2 <a href="chapter4-d.html#contm.rendering.applications">Rendering Applications</a><br> 4.2.6 <a href="chapter4-d.html#contm.binding">Bindings and Bound Variables <code><bind></code>
and <code><bvar></code></a><br> 4.2.6.1 <a href="chapter4-d.html#contm.bind">Bindings</a><br> 4.2.6.2 <a href="chapter4-d.html#contm.bvar">Bound Variables</a><br> 4.2.6.3 <a href="chapter4-d.html#contm.alpharenmaing">Renaming Bound Variables</a><br> 4.2.6.4 <a href="chapter4-d.html#contm.rendering.binders">Rendering Binding Constructions</a><br> 4.2.7 <a href="chapter4-d.html#contm.sharing">Structure Sharing <code><share></code></a><br> 4.2.7.1 <a href="chapter4-d.html#contm.share">The <code>share</code> element</a><br> 4.2.7.2 <a href="chapter4-d.html#contm.acyclicity">An Acyclicity Constraint</a><br> 4.2.7.3 <a href="chapter4-d.html#contm.share.binding">Structure Sharing and Binding</a><br> 4.2.7.4 <a href="chapter4-d.html#contm.rendering.share">Rendering Expressions with Structure Sharing</a><br> 4.2.8 <a href="chapter4-d.html#contm.semantics">Attribution via <code>semantics</code></a><br> 4.2.9 <a href="chapter4-d.html#contm.cerror">Error Markup <code><cerror></code></a><br> 4.2.10 <a href="chapter4-d.html#contm.cbytes">Encoded Bytes <code><cbytes></code></a><br> 4.3 <a href="chapter4-d.html#contm.structure.extended">Content MathML for Specific Structures</a><br> 4.3.1 <a href="chapter4-d.html#contm.container">Container Markup</a><br> 4.3.1.1 <a href="chapter4-d.html#contm.container.constructor">Container Markup for Constructor Symbols</a><br> 4.3.1.2 <a href="chapter4-d.html#contm.lambda.container">Container Markup for Binding Constructors</a><br> 4.3.2 <a href="chapter4-d.html#contm.bind.apply">Bindings with <code><apply></code></a><br> 4.3.3 <a href="chapter4-d.html#contm.qualifiers">Qualifiers</a><br> 4.3.3.1 <a href="chapter4-d.html#contm.domainofapplication.qualifier">Uses of
<code><domainofapplication></code>,
<code><interval></code>,
<code><condition></code>,
<code><lowlimit></code> and
<code><uplimit></code></a><br> 4.3.3.2 <a href="chapter4-d.html#contm.degree">Uses of <code><degree></code></a><br> 4.3.3.3 <a href="chapter4-d.html#contm.otherqualifiers">Uses of <code><momentabout></code> and <code><logbase></code></a><br> 4.3.4 <a href="chapter4-d.html#contm.opclasses">Operator Classes</a><br> 4.3.4.1 <a href="chapter4-d.html#contm.nary">N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)</a><br> 4.3.4.2 <a href="chapter4-d.html#contm.nary.setlist">N-ary Constructors for set and list (class nary-setlist-constructor)</a><br> 4.3.4.3 <a href="chapter4-d.html#contm.nary.reln">N-ary Relations (classes nary-reln, nary-set-reln)</a><br> 4.3.4.4 <a href="chapter4-d.html#contm.nary.unary">N-ary/Unary Operators (classes nary-minmax, nary-stats)</a><br> 4.3.4.5 <a href="chapter4-d.html#contm.binary">Binary Operators (classes binary-arith, binary-logical, binary-reln, binary-linalg, binary-set)</a><br> 4.3.4.6 <a href="chapter4-d.html#contm.unary">Unary Operators (classes unary-arith, unary-linalg, unary-functional, unary-set, unary-elementary, unary-veccalc)</a><br> 4.3.4.7 <a href="chapter4-d.html#contm.constant">Constants (classes constant-arith, constant-set)</a><br> 4.3.4.8 <a href="chapter4-d.html#contm.quantifier">Quantifiers (class quantifier)</a><br> 4.3.4.9 <a href="chapter4-d.html#contm.otherclass">Other Operators (classes lambda, interval, int, diff partialdiff, sum, product, limit)</a><br> 4.3.5 <a href="chapter4-d.html#id.4.3.5">Non-strict Attributes</a><br> 4.4 <a href="chapter4-d.html#contm.opel">Content MathML for Specific Operators and Constants</a><br> 4.4.1 <a href="chapter4-d.html#contm.basicfun">Functions and Inverses</a><br> 4.4.1.1 <a href="chapter4-d.html#contm.interval">Interval <code><interval></code></a><br> 4.4.1.2 <a href="chapter4-d.html#contm.inverse">Inverse <code><inverse></code></a><br> 4.4.1.3 <a href="chapter4-d.html#contm.lambda">Lambda <code><lambda></code></a><br> 4.4.1.4 <a href="chapter4-d.html#contm.compose">Function composition <code><compose/></code></a><br> 4.4.1.5 <a href="chapter4-d.html#contm.ident">Identity function <code><ident/></code></a><br> 4.4.1.6 <a href="chapter4-d.html#contm.domain">Domain <code><domain/></code></a><br> 4.4.1.7 <a href="chapter4-d.html#contm.codomain">codomain <code><codomain/></code></a><br> 4.4.1.8 <a href="chapter4-d.html#contm.image">Image <code><image/></code></a><br> 4.4.1.9 <a href="chapter4-d.html#contm.piecewise">Piecewise declaration (<code><piecewise></code>, <code><piece></code>, <code><otherwise></code>)</a><br> 4.4.2 <a href="chapter4-d.html#id.4.4.2">Arithmetic, Algebra and Logic</a><br> 4.4.2.1 <a href="chapter4-d.html#contm.quotient">Quotient <code><quotient/></code></a><br> 4.4.2.2 <a href="chapter4-d.html#contm.factorial">Factorial <code><factorial/></code></a><br> 4.4.2.3 <a href="chapter4-d.html#contm.divide">Division <code><divide/></code></a><br> 4.4.2.4 <a href="chapter4-d.html#contm.max">Maximum <code><max/></code></a><br> 4.4.2.5 <a href="chapter4-d.html#contm.min">Minimum <code><min/></code></a><br> 4.4.2.6 <a href="chapter4-d.html#contm.minus">Subtraction <code><minus/></code></a><br> 4.4.2.7 <a href="chapter4-d.html#contm.plus">Addition <code><plus/></code></a><br> 4.4.2.8 <a href="chapter4-d.html#contm.power">Exponentiation <code><power/></code></a><br> 4.4.2.9 <a href="chapter4-d.html#contm.rem">Remainder <code><rem/></code></a><br> 4.4.2.10 <a href="chapter4-d.html#contm.times">Multiplication <code><times/></code></a><br> 4.4.2.11 <a href="chapter4-d.html#contm.root">Root <code><root/></code></a><br> 4.4.2.12 <a href="chapter4-d.html#contm.gcd">Greatest common divisor <code><gcd/></code></a><br> 4.4.2.13 <a href="chapter4-d.html#contm.and">And <code><and/></code></a><br> 4.4.2.14 <a href="chapter4-d.html#contm.or">Or <code><or/></code></a><br> 4.4.2.15 <a href="chapter4-d.html#contm.xor">Exclusive Or <code><xor/></code></a><br> 4.4.2.16 <a href="chapter4-d.html#contm.not">Not <code><not/></code></a><br> 4.4.2.17 <a href="chapter4-d.html#contm.implies">Implies <code><implies/></code></a><br> 4.4.2.18 <a href="chapter4-d.html#contm.forall">Universal quantifier <code><forall/></code></a><br> 4.4.2.19 <a href="chapter4-d.html#contm.exists">Existential quantifier <code><exists/></code></a><br> 4.4.2.20 <a href="chapter4-d.html#contm.abs">Absolute Value <code><abs/></code></a><br> 4.4.2.21 <a href="chapter4-d.html#contm.conjugate">Complex conjugate <code><conjugate/></code></a><br> 4.4.2.22 <a href="chapter4-d.html#contm.arg">Argument <code><arg/></code></a><br> 4.4.2.23 <a href="chapter4-d.html#contm.real">Real part <code><real/></code></a><br> 4.4.2.24 <a href="chapter4-d.html#contm.imaginary">Imaginary part <code><imaginary/></code></a><br> 4.4.2.25 <a href="chapter4-d.html#contm.lcm">Lowest common multiple <code><lcm/></code></a><br> 4.4.2.26 <a href="chapter4-d.html#contm.floor">Floor <code><floor/></code></a><br> 4.4.2.27 <a href="chapter4-d.html#contm.ceiling">Ceiling <code><ceiling/></code></a><br> 4.4.3 <a href="chapter4-d.html#id.4.4.3">Relations</a><br> 4.4.3.1 <a href="chapter4-d.html#contm.eq">Equals <code><eq/></code></a><br> 4.4.3.2 <a href="chapter4-d.html#contm.neq">Not Equals <code><neq/></code></a><br> 4.4.3.3 <a href="chapter4-d.html#contm.gt">Greater than <code><gt/></code></a><br> 4.4.3.4 <a href="chapter4-d.html#contm.lt">Less Than <code><lt/></code></a><br> 4.4.3.5 <a href="chapter4-d.html#contm.geq">Greater Than or Equal <code><geq/></code></a><br> 4.4.3.6 <a href="chapter4-d.html#contm.leq">Less Than or Equal <code><leq/></code></a><br> 4.4.3.7 <a href="chapter4-d.html#contm.equivalent">Equivalent <code><equivalent/></code></a><br> 4.4.3.8 <a href="chapter4-d.html#contm.approx">Approximately <code><approx/></code></a><br> 4.4.3.9 <a href="chapter4-d.html#contm.factorof">Factor Of <code><factorof/></code></a><br> 4.4.4 <a href="chapter4-d.html#id.4.4.4">Calculus and Vector Calculus</a><br> 4.4.4.1 <a href="chapter4-d.html#contm.int">Integral <code><int/></code></a><br> 4.4.4.2 <a href="chapter4-d.html#contm.diff">Differentiation <code><diff/></code></a><br> 4.4.4.3 <a href="chapter4-d.html#contm.partialdiff">Partial Differentiation <code><partialdiff/></code></a><br> 4.4.4.4 <a href="chapter4-d.html#contm.divergence">Divergence <code><divergence/></code></a><br> 4.4.4.5 <a href="chapter4-d.html#contm.grad">Gradient <code><grad/></code></a><br> 4.4.4.6 <a href="chapter4-d.html#contm.curl">Curl <code><curl/></code></a><br> 4.4.4.7 <a href="chapter4-d.html#contm.laplacian">Laplacian <code><laplacian/></code></a><br> 4.4.5 <a href="chapter4-d.html#contm.sets">Theory of Sets</a><br> 4.4.5.1 <a href="chapter4-d.html#contm.set">Set <code><set></code></a><br> 4.4.5.2 <a href="chapter4-d.html#contm.list">List <code><list></code></a><br> 4.4.5.3 <a href="chapter4-d.html#contm.union">Union <code><union/></code></a><br> 4.4.5.4 <a href="chapter4-d.html#contm.intersect">Intersect <code><intersect/></code></a><br> 4.4.5.5 <a href="chapter4-d.html#contm.in">Set inclusion <code><in/></code></a><br> 4.4.5.6 <a href="chapter4-d.html#contm.notin">Set exclusion <code><notin/></code></a><br> 4.4.5.7 <a href="chapter4-d.html#contm.subset">Subset <code><subset/></code></a><br> 4.4.5.8 <a href="chapter4-d.html#contm.prsubset">Proper Subset <code><prsubset/></code></a><br> 4.4.5.9 <a href="chapter4-d.html#contm.notsubset">Not Subset <code><notsubset/></code></a><br> 4.4.5.10 <a href="chapter4-d.html#contm.notprsubset">Not Proper Subset <code><notprsubset/></code></a><br> 4.4.5.11 <a href="chapter4-d.html#contm.setdiff">Set Difference <code><setdiff/></code></a><br> 4.4.5.12 <a href="chapter4-d.html#contm.card">Cardinality <code><card/></code></a><br> 4.4.5.13 <a href="chapter4-d.html#contm.cartesianproduct">Cartesian product <code><cartesianproduct/></code></a><br> 4.4.6 <a href="chapter4-d.html#id.4.4.6">Sequences and Series</a><br> 4.4.6.1 <a href="chapter4-d.html#contm.sum">Sum <code><sum/></code></a><br> 4.4.6.2 <a href="chapter4-d.html#contm.product">Product <code><product/></code></a><br> 4.4.6.3 <a href="chapter4-d.html#contm.limit">Limits <code><limit/></code></a><br> 4.4.6.4 <a href="chapter4-d.html#contm.tendsto">Tends To <code><tendsto/></code></a><br> 4.4.7 <a href="chapter4-d.html#contm.elemclass">Elementary classical functions</a><br> 4.4.7.1 <a href="chapter4-d.html#contm.trig">Common trigonometric functions </a><br> 4.4.7.2 <a href="chapter4-d.html#contm.exp">Exponential <code><exp/></code></a><br> 4.4.7.3 <a href="chapter4-d.html#contm.ln">Natural Logarithm <code><ln/></code></a><br> 4.4.7.4 <a href="chapter4-d.html#contm.log">Logarithm <code><log/></code></a><br> 4.4.8 <a href="chapter4-d.html#id.4.4.8">Statistics</a><br> 4.4.8.1 <a href="chapter4-d.html#contm.mean">Mean <code><mean/></code></a><br> 4.4.8.2 <a href="chapter4-d.html#contm.sdev">Standard Deviation <code><sdev/></code></a><br> 4.4.8.3 <a href="chapter4-d.html#contm.variance">Variance <code><variance/></code></a><br> 4.4.8.4 <a href="chapter4-d.html#contm.median">Median <code><median/></code></a><br> 4.4.8.5 <a href="chapter4-d.html#contm.mode">Mode <code><mode/></code></a><br> 4.4.8.6 <a href="chapter4-d.html#contm.moment">Moment (<code><moment/></code>, <code><momentabout></code>)</a><br> 4.4.9 <a href="chapter4-d.html#id.4.4.9">Linear Algebra</a><br> 4.4.9.1 <a href="chapter4-d.html#contm.vector">Vector <code><vector></code></a><br> 4.4.9.2 <a href="chapter4-d.html#contm.matrix">Matrix <code><matrix></code></a><br> 4.4.9.3 <a href="chapter4-d.html#contm.matrixrow">Matrix row <code><matrixrow></code></a><br> 4.4.9.4 <a href="chapter4-d.html#contm.determinant">Determinant <code><determinant/></code></a><br> 4.4.9.5 <a href="chapter4-d.html#contm.transpose">Transpose <code><transpose/></code></a><br> 4.4.9.6 <a href="chapter4-d.html#contm.selector">Selector <code><selector/></code></a><br> 4.4.9.7 <a href="chapter4-d.html#contm.vectorproduct">Vector product <code><vectorproduct/></code></a><br> 4.4.9.8 <a href="chapter4-d.html#contm.scalarproduct">Scalar product <code><scalarproduct/></code></a><br> 4.4.9.9 <a href="chapter4-d.html#contm.outerproduct">Outer product <code><outerproduct/></code></a><br> 4.4.10 <a href="chapter4-d.html#contm.constantsandsymbols">Constant and Symbol Elements</a><br> 4.4.10.1 <a href="chapter4-d.html#contm.integers">integers <code><integers/></code></a><br> 4.4.10.2 <a href="chapter4-d.html#contm.reals">reals <code><reals/></code></a><br> 4.4.10.3 <a href="chapter4-d.html#contm.rationals">Rational Numbers <code><rationals/></code></a><br> 4.4.10.4 <a href="chapter4-d.html#contm.naturalnumbers">Natural Numbers <code><naturalnumbers/></code></a><br> 4.4.10.5 <a href="chapter4-d.html#contm.complexes">complexes <code><complexes/></code></a><br> 4.4.10.6 <a href="chapter4-d.html#contm.primes">primes <code><primes/></code></a><br> 4.4.10.7 <a href="chapter4-d.html#contm.exponentiale">Exponential e <code><exponentiale/></code></a><br> 4.4.10.8 <a href="chapter4-d.html#contm.imaginaryi">Imaginary i <code><imaginaryi/></code></a><br> 4.4.10.9 <a href="chapter4-d.html#contm.notanumber">Not A Number <code><notanumber/></code></a><br> 4.4.10.10 <a href="chapter4-d.html#contm.true">True <code><true/></code></a><br> 4.4.10.11 <a href="chapter4-d.html#contm.false">False <code><false/></code></a><br> 4.4.10.12 <a href="chapter4-d.html#contm.emptyset">Empty Set <code><emptyset/></code></a><br> 4.4.10.13 <a href="chapter4-d.html#contm.pi">pi <code><pi/></code></a><br> 4.4.10.14 <a href="chapter4-d.html#contm.eulergamma">Euler gamma <code><eulergamma/></code></a><br> 4.4.10.15 <a href="chapter4-d.html#contm.infinity">infinity <code><infinity/></code></a><br> 4.5 <a href="chapter4-d.html#contm.deprecated">Deprecated Content Elements</a><br> 4.5.1 <a href="chapter4-d.html#contm.declare">Declare <code><declare></code></a><br> 4.6 <a href="chapter4-d.html#contm.p2s">The Strict Content MathML Transformation</a><br></div>
<div class="div1">
<div class="div2">
<h2><a name="contm.intro" id="contm.intro"></a>4.1 Introduction
</h2>
<div class="div3">
<h3><a name="id.4.1.1" id="id.4.1.1"></a>4.1.1 The Intent of Content Markup
</h3>
<p>The intent of Content Markup is to provide an explicit encoding of
the <em>underlying mathematical meaning</em> of an expression,
rather than any particular rendering for the expression. Mathematics
is distinguished both by its use of rigorous formal logic to define
and analyze mathematical concepts, and by the use of a (relatively)
formal notational system to represent and communicate those concepts.
However, mathematics and its presentation should not be viewed as one
and the same thing. Mathematical notation, though more rigorous than
natural language, is nonetheless at times ambiguous,
context-dependent, and varies from community to community. In some
cases, heuristics may adequately infer mathematical semantics from
mathematical notation. But in many others cases, it is preferable to
work directly with the underlying, formal, mathematical objects.
Content Markup provides a rigorous, extensible semantic framework and
a markup language for this purpose.
</p>
<p>The difficulties in inferring semantics from a presentation stem
from the fact that there are many to one mappings from presentation to
semantics and vice versa. For example the mathematical construct
"<var>H</var> multiplied by <var>e</var>" is often
encoded using an explicit operator as in
<var>H</var> × <var>e</var>. In different
presentational contexts, the multiplication operator might be
invisible "<var>H</var> <var>e</var>", or rendered
as the spoken word "times". Generally, many different
presentations are possible depending on the context and style
preferences of the author or reader. Thus, given
"<var>H</var> <var>e</var>" out of context it may be
impossible to decide if this is the name of a chemical or a
mathematical product of two variables <var>H</var> and
<var>e</var>. Mathematical presentation also varies across cultures
and geographical regions. For example, many notations for long
division are in use in different parts of the world today. Notations
may lose currency, for example the use of musical sharp and flat
symbols to denote maxima and minima <a href="appendixh-d.html#Chaundy1954">[Chaundy1954]</a>. A
notation in use in 1644 for the multiplication mentioned above was
<img src="image/f4001.gif" alt="\blacksquare" align="middle"><var>H</var><var>e</var> <a href="appendixh-d.html#Cajori1928">[Cajori1928]</a>.
</p>
<p>By encoding the underlying mathematical structure explicitly,
without regard to how it is presented aurally or visually, it is
possible to interchange information more precisely between systems
that semantically process mathematical objects. In the trivial example
above, such a system could substitute values for the variables
<var>H</var> and <var>e</var> and evaluate the result. Important
application areas include computer algebra systems, automatic
reasoning system, industrial and scientific applications,
multi-lingual translation systems, mathematical search, and
interactive textbooks.
</p>
<p>The organization of this chapter is as follows. In <a href="chapter4-d.html#contm.core">Section 4.2 Content MathML Elements Encoding Expression Structure</a>, a core collection of elements comprising Strict
Content Markup are described. Strict Content Markup is sufficient to
encode general expression trees in a semantically rigorous way. It is
in one-to-one correspondence with OpenMath element set. OpenMath is a
standard for representing formal mathematical objects and semantics
through the use of extensible Content Dictionaries. Strict Content
Markup defines a mechanism for associating precise mathematical
semantics with expression trees by referencing OpenMath Content
Dictionaries. The next two sections introduce markup that is more
convenient than Strict markup for some purposes, somewhat less formal
and verbose. In <a href="chapter4-d.html#contm.structure.extended">Section 4.3 Content MathML for Specific Structures</a>, markup is
introduced for representing a small number of mathematical idioms,
such as limits on integrals, sums and product. These constructs may
all be rewritten as Strict Content Markup expressions, and rules for
doing so are given. In <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>, elements are
introduced for many common function, operators and constants. This
section contains many examples, including equivalent Strict Content
expressions. In <a href="chapter4-d.html#contm.deprecated">Section 4.5 Deprecated Content Elements</a>, elements from
MathML 1 and 2 whose use is now discouraged are listed.
Finally, <a href="chapter4-d.html#contm.p2s">Section 4.6 The Strict Content MathML Transformation</a> summarizes the algorithm for
translating arbitrary Content Markup into Strict Content Markup. It
collects together in sequence all the rewrite rules introduced
throughout the rest of the chapter.
</p>
</div>
<div class="div3">
<h3><a name="contm.rendering" id="contm.rendering"></a>4.1.2 The Structure and Scope of Content MathML Expressions
</h3>
<p>Content MathML represents mathematical objects as <em>expression trees</em>. The
notion of constructing a general expression tree is e.g. that of applying an operator to
sub-objects. For example, the sum "<var>x</var>+<var>y</var>" can be
thought of as an application of the addition operator to two arguments <var>x</var> and
<var>y</var>. And the expression "cos(Ï€)" as the application of the
cosine function to the number π.
</p>
<p>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 represent function application or other mathematical constructions that
build up a compound objects. 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 nodes underneath the internal node.
</p>
<p>The semantics of general mathematical expressions 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 referring
to mathematical concepts outside of the base collection, allowing
them to be represented, as well.
</p>
<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.
</p>
<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. There are different approaches for
rendering Content MathML formulae, ranging from native implementations of the
MathML elements to declarative notation definitions, to XSLT style
sheets. Because rendering requirements for Content MathML vary
widely, MathML 3 does not provide a normative specification for
rendering. Instead, typical renderings are suggested by way of examples.
</p>
</div>
<div class="div3">
<h3><a name="contm.strict" id="contm.strict"></a>4.1.3 Strict Content MathML
</h3>
<p>In MathML 3, a subset, or profile, of Content MathML is defined: <em>Strict Content
MathML</em>. This uses a minimal, but sufficient, set of elements to represent the meaning of a
mathematical expression in a uniform structure, while the full Content MathML grammar is
backward compatible with MathML 2.0, and generally tries to strike a more pragmatic
balance between verbosity and formality.
</p>
<p>Content MathML provides a large number of predefined functions
encoded as empty elements (e.g. <code>sin</code>, <code>log</code>, etc.)
and a variety of constructs for forming compound objects
(e.g. <code>set</code>, <code>interval</code>, etc.). By contrast, Strict
Content MathML uses a single element (<code>csymbol</code>) with an
attribute pointing to an external definition in extensible content
dictionaries to represent all functions, and uses only
<code>apply</code> and <code>bind</code> for building up compound
objects. The token elements such as <code>ci</code> and <code>cn</code> are
also considered part of Strict Content MathML, but with a more
restricted set of attributes and with content restricted to
text.
</p>
<p>Strict Content MathML is designed to be compatible with OpenMath (in
fact it is an XML encoding of OpenMath Objects in the sense of <a href="appendixg-d.html#OpenMath2004">[OpenMath2004]</a>).
OpenMath is a standard for representing formal mathematical
objects and semantics through the use of extensible Content Dictionaries. The table below
gives an element-by-element correspondence between the OpenMath XML encoding of OpenMath
objects and Strict Content MathML.
</p>
<table border="1" id="contm.om.correspondence">
<thead>
<tr>
<th>Strict Content MathML</th>
<th>OpenMath</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="chapter4-d.html#contm.cn"><code>cn</code></a></td>
<td><code>OMI</code>, <code>OMF</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.csymbol"><code>csymbol</code></a></td>
<td><code>OMS</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.ci"><code>ci</code></a></td>
<td><code>OMV</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.cs"><code>cs</code></a></td>
<td><code>OMSTR</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.apply"><code>apply</code></a></td>
<td><code>OMA</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.binding"><code>bind</code></a></td>
<td><code>OMBIND</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.binding"><code>bvar</code></a></td>
<td><code>OMBVAR</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.sharing"><code>share</code></a></td>
<td><code>OMR</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.semantics"><code>semantics</code></a></td>
<td><code>OMATTR</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.semantics"><code>annotation</code></a>,
<a href="chapter4-d.html#contm.semantics"><code>annotation-xml</code></a></td>
<td><code>OMATP</code>, <code>OMFOREIGN</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.cerror"><code>cerror</code></a></td>
<td><code>OME</code></td>
</tr>
<tr>
<td><a href="chapter4-d.html#contm.cbytes"><code>cbytes</code></a></td>
<td><code>OMB</code></td>
</tr>
</tbody>
</table>
<p>In MathML 3, formal semantics Content MathML expressions are
given by specifying equivalent Strict Content MathML expressions.
Since Strict Content MathML expressions all have carefully-defined
semantics given in terms of OpenMath Content Dictionaries, all
Content MathML expressions inherit well-defined semantics in this
way. To make the correspondence exact, an algorithm is
given in terms of transformation rules that are applied to
rewrite non-Strict MathML constructs into a strict equivalents. The
individual rules are introduced in context throughout the chapter.
In <a href="chapter4-d.html#contm.p2s">Section 4.6 The Strict Content MathML Transformation</a>, the algorithm as a whole is
described.
</p>
<p>As most transformation rules relate to
classes of MathML elements that have similar argument structure,
they are introduced in <a href="chapter4-d.html#contm.opclasses">Section 4.3.4 Operator Classes</a> where these
classes are defined. Some special case rules for specific elements
are given in Section <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. Transformations in
<a href="chapter4-d.html#contm.core">Section 4.2 Content MathML Elements Encoding Expression Structure</a> concern non-Strict usages of the core
Content MathML elements, those in <a href="chapter4-d.html#contm.structure.extended">Section 4.3 Content MathML for Specific Structures</a> concern the rewriting of some
additional structures not directly supported in Strict Content MathML.
</p>
<p>The full algorithm described in<a href="chapter4-d.html#contm.p2s">Section 4.6 The Strict Content MathML Transformation</a> is
complete in the sense that it gives every Content MathML expression a specific
meaning in terms of a Strict Content MathML expression. This means
it has to give specific strict interpretations to some expressions
whose meaning was insufficiently specified in MathML2. The intention
of this algorithm is to be faithful to mathematical intuitions.
However edge cases may remain where the normative interpretation of
the algorithm may break earlier intuitions.
</p>
<p>A conformant MathML processor need
not implement this transformation. The existence of these
transformation rules does not imply that a system must treat
equivalent expressions identically. In particular systems may give
different presentation renderings for expressions that the
transformation rules imply are mathematically equivalent.
</p>
</div>
<div class="div3">
<h3><a name="contm.cds" id="contm.cds"></a>4.1.4 Content Dictionaries
</h3>
<p>Due to the nature of mathematics, any method for formalizing
the meaning of the mathematical expressions must be
extensible. The key to extensibility is the ability to define
new functions and other symbols to expand the terrain of
mathematical discourse. To do this, two things are required: a
mechanism for representing symbols not already defined by
Content MathML, and a means of associating a specific
mathematical meaning with them in an unambiguous way. In MathML
3, the <code>csymbol</code> element provides the means to represent
new symbols, while <em>Content Dictionaries</em> are the way
in which mathematical semantics are described. The association
is accomplished via attributes of the <code>csymbol</code> element
that point at a definition in a CD. The syntax and usage of
these attributes are described in detail in <a href="chapter4-d.html#contm.csymbol">Section 4.2.3 Content Symbols <code><csymbol></code></a>.
</p>
<p>Content Dictionaries are structured documents for the
definition of mathematical concepts; see the OpenMath standard,
<a href="appendixg-d.html#OpenMath2004">[OpenMath2004]</a>.
To maximize modularity and reuse, a
Content Dictionary typically contains a relatively small
collection of definitions for closely related concepts. The
OpenMath Society maintains a large set of public Content Dictionaries
including the MathML CD group that including contains definitions
for all pre-defined symbols in MathML.
There is a process for contributing privately
developed CDs to the OpenMath Society repository to facilitate
discovery and reuse. MathML 3 does not require CDs be publicly
available, though in most situations the goals of semantic
markup will be best served by referencing public CDs available
to all user agents.
</p>
<p>In the text below, descriptions of semantics for predefined
MathML symbols refer to the Content Dictionaries developed by
the OpenMath Society in conjunction with the W3C Math Working
Group. It is important to note, however, that this information
is informative, and not normative. In general, the precise
mathematical semantics of predefined symbols are not not fully
specified by the MathML 3 Recommendation, and the only normative
statements about symbol semantics are those present in the text
of this chapter. The semantic definitions provided by the
OpenMath Content CDs are intended to be sufficient for
most applications, and are generally compatible with the
semantics specified for analogous constructs in the MathML 2.0
Recommendation. However, in contexts where highly precise
semantics are required (e.g. communication between computer
algebra systems, within formal systems such as theorem provers,
etc.) it is the responsibility of the relevant community of
practice to verify, extend or replace definitions provided by
OpenMath CDs as appropriate.
</p>
</div>
<div class="div3">
<h3><a name="id.4.1.5" id="id.4.1.5"></a>4.1.5 Content MathML Concepts
</h3>
<p>The basic building blocks of Content MathML expressions are
numbers, identifiers and symbols. These building blocks are combined
using function applications and binding operators. It is important to
have a basic understanding of these key mathematical concepts, and how
they are reflected in the design of Content MathML. For the
convenience of the reader, these concepts are reviewed here.
</p>
<p>In the expression "<var>x</var>+<var>y</var>",
<var>x</var> is a mathematical variable, meaning an identifier that
represents a quantity with no fixed value. It may have other
properties, such as being an integer, but its value is not a fixed
property. By contrast, the plus sign is an identifier that represents a
fixed and externally defined object, namely the addition function.
Such an identifier is termed a <em>symbol</em>, to distinguish it
from a variable. Common elementary functions and operators all have
fixed, external definitions, and are hence symbols. Content MathML
uses the <code>ci</code> element to represent variables, and the
<code>csymbol</code> to represent symbols.
</p>
<p>The most fundamental way in which symbols and variables are
combined is function application. Content MathML makes a crucial
semantic distinction between a function itself (a symbol such as the
sine function, or a variable such as <var>f</var>) and the result of
applying the function to arguments. The <a href="chapter4-d.html#contm.apply"><code>apply</code></a> element groups the function
with its arguments syntactically, and represents the expression
resulting from applying that function to its arguments.
</p>
<p>Mathematically, variables are divided into <em>bound</em> and
<em>free</em> variables. Bound variables are variables that are
assigned a special role by a binding operator within a certain scope.
For example, the index variable within a summation is a bound
variable. They can be characterized as variables with the property
that they can be renamed consistently throughout the binding scope
without changing the underlying meaning of the expression. Variables
that are not bound are termed free variables.
Because the logical distinction between bound and free variables is
important for well-defined semantics, Content MathML differentiates
between the application of a function to a free variable,
e.g. <var>f</var>(<var>x</var>) and the operation of binding a
variable within a scope. The <a href="chapter4-d.html#contm.bind"><code>bind</code></a> element is used the delineate
the binding scope, and group the binding operator with its bound
variables, which are indicated by the <code>bvar</code> element.
</p>
<p>In Strict Content markup, the <code>bind</code> element is the only way
of performing variable binding. In non-Strict usage, however, markup
is provided that more closely resembles well-known idiomatic
notations, such as the "limit" notations for sums and
integrals. These constructs often implicitly bind variables, such as
the variable of integration, or the index variable in a sum. MathML
terms the elements used to represent the auxiliary data such as limits
required by these constructions <em>qualifier</em> elements.
</p>
<p>Expressions involving qualifiers follow one of a small number of
idiomatic patterns, each of which applies to class of similar binding
operators. For example, sums and products are in the same class
because they use index variables following the same pattern. The
Content MathML operator classes are described in detail in <a href="chapter4-d.html#contm.opclasses">Section 4.3.4 Operator Classes</a>.
</p>
<p>Each Content MathML element is described in a section below that
begins with a table summarizing the key information about the element.
For elements that have different Strict and non-Strict
usage, these syntax tables are divided to clearly separate the two cases. The element's content
model is given in the <b>Content</b> row, linked to the MathML
Schema in <a href="appendixa-d.html">Appendix A Parsing MathML</a>. The <b>Attributes</b>, and
<b>Attribute Values</b> rows similarly link to the schema. Where
applicable, the <b>Class</b> row specifies the operator class, which
indicate how many arguments the operator represented by this element
takes, and also in many cases determines the mapping to Strict Content
MathML, as described in <a href="chapter4-d.html#contm.opclasses">Section 4.3.4 Operator Classes</a>. Finally,
the <b>Qualifiers</b> row clarifies whether the operator takes
qualifiers and if so, which. Both specify how many siblings may follow
the operator element in an <code>apply</code>; see <a href="chapter4-d.html#contm.apply">Section 4.2.5 Function Application <code><apply></code></a> and <a href="chapter4-d.html#contm.qualifiers">Section 4.3.3 Qualifiers</a> for
details).
</p>
</div>
</div>
<div class="div2">
<h2><a name="contm.core" id="contm.core"></a>4.2 Content MathML Elements Encoding Expression Structure
</h2>
<p>In this section we will present the elements for encoding the structure of content
MathML expressions. These elements are the only ones used for the Strict Content MathML
encoding. Concretely, we have
</p>
<ul>
<li>
<p>basic expressions, i.e. <a href="chapter4-d.html#contm.cn">Numbers</a>, <a href="chapter4-d.html#contm.cs">string literals</a>, <a href="chapter4-d.html#contm.cbytes">encoded
bytes</a>, <a href="chapter4-d.html#contm.csymbol">Symbols</a>, and <a href="chapter4-d.html#contm.ci">Identifiers</a>.
</p>
</li>
<li>
<p>derived expressions, i.e.
<a href="chapter4-d.html#contm.apply">function applications</a> and
<a href="chapter4-d.html#contm.binding">binding expressions</a>, and
</p>
</li>
<li>
<p><a href="chapter4-d.html#contm.semantics">semantic annotations</a></p>
</li>
<li>
<p><a href="chapter4-d.html#contm.cerror">error markup</a></p>
</li>
</ul>
<p>
Full Content MathML allows further elements presented in
<a href="chapter4-d.html#contm.structure.extended">Section 4.3 Content MathML for Specific Structures</a> and <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>, and allows a richer
content model presented in this section. Differences in Strict and non-Strict
usage of are highlighted in the sections discussing each of the Strict element below.
</p>
<div class="div3">
<h3><a name="contm.cn" id="contm.cn"></a>4.2.1 Numbers <code><cn></code></h3>
<table id="contm.cn.syntax" class="syntax">
<thead>
<tr>
<th></th>
<th colspan="2">Schema Fragment (Strict)</th>
<th colspan="2">Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td colspan="2"><a href="chapter4-d.html#contm.cn">Cn</a></td>
<td colspan="2"><a href="chapter4-d.html#contm.cn">Cn</a></td>
</tr>
<tr>
<th>Attributes</th>
<td colspan="2"><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_type">type</a></td>
<td colspan="2"><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a>, <a href="appendixa-d.html#parsing_type">type</a>?, <a href="appendixa-d.html#parsing_base">base</a>?
</td>
</tr>
<tr>
<th><code>type</code> Attribute Values
</th>
<td>
"integer" |
"real" |
"double" |
"hexdouble"
</td>
<td> </td>
<td>
"integer" |
"real" |
"double" |
"hexdouble" |
"e-notation" |
"rational" |
"complex-cartesian" |
"complex-polar" |
"constant" | text
</td>
<td>default is real</td>
</tr>
<tr>
<th><code>base</code> Attribute Values
</th>
<td colspan="2"></td>
<td>
<a href="appendixa-d.html#parsing_integer">integer</a>
</td>
<td>default is 10</td>
</tr>
<tr>
<th>Content</th>
<td colspan="2">text</td>
<td colspan="2">(text | <a href="appendixa-d.html#parsing_mglyph">mglyph</a> | <a href="appendixa-d.html#parsing_sep">sep</a> | <a href="appendixa-d.html#parsing_PresentationExpression">PresentationExpression</a>)*
</td>
</tr>
</tbody>
</table>
<p>The <code>cn</code> element is the Content MathML element used to
represent numbers. Strict Content MathML supports integers, real numbers,
and double precision floating point numbers. In these types of numbers,
the content of <code>cn</code> is text. Additionally, <code>cn</code>
supports rational numbers and complex numbers in which the different
parts are separated by use of the <code>sep</code> element. Constructs
using <code>sep</code> may be rewritten in Strict Content MathML as
constructs using <code>apply</code> as described below.
</p>
<p> The <code>type</code> attribute specifies which kind of number is
represented in the <code>cn</code> element. The default value is
"real". Each type implies that the content be of
a certain form, as detailed below.
</p>
<div class="div4">
<h4><a name="contm.rendering.numbers" id="contm.rendering.numbers"></a>4.2.1.1 Rendering <code><cn></code>-Represented Numbers
</h4>
<p>The default rendering of the text content of <code>cn</code> is the same as that of the Presentation element <code>mn</code>, with suggested variants in the
case of attributes or <code>sep</code> being used, as listed below.
</p>
</div>
<div class="div4">
<h4><a name="contm.cn.strict" id="contm.cn.strict"></a>4.2.1.2 Strict uses of <code><cn></code></h4>
<p>In Strict Content MathML, the <code>type</code> attribute is mandatory, and may only take the values
"integer", "real", "hexdouble" or
"double":
</p>
<dl>
<dt class="label">integer</dt>
<dd>An integer is represented by an optional sign followed by a string of
one or more decimal "digits".
</dd>
<dt class="label">real</dt>
<dd>A real number is presented in radix notation. Radix notation consists of an
optional sign ("+" or "-") followed by a string of
digits possibly separated into an integer and a fractional part by a
decimal point. Some examples are 0.3, 1, and -31.56.
</dd>
<dt class="label">double</dt>
<dd>This type is used to mark up those double-precision
floating point numbers that can be represented in the IEEE 754
standard format <a href="appendixh-d.html#IEEE754">[IEEE754]</a>. This includes a subset of the (mathematical) real
numbers, negative zero, positive and negative real infinity
and a set of "not a number" values. The lexical rules for
interpreting the text content of a <code>cn</code> as an IEEE
double are specified by <a href="http://www.w3.org/TR/xmlschema-2/#double">Section
3.1.2.5</a> of XML Schema Part 2: Datatypes Second Edition
<a href="appendixh-d.html#XMLSchemaDatatypes">[XMLSchemaDatatypes]</a>. For example, -1E4, 1267.43233E12, 12.78e-2,
12 , -0, 0 and INF are all valid doubles in this format.
</dd>
<dt class="label">hexdouble</dt>
<dd>
<p>This type is used to directly represent the 64 bits of an
IEEE 754 double-precision floating point number as a 16 digit
hexadecimal number. Thus the number represents mantissa, exponent, and sign
from lowest to highest bits using a least significant byte ordering.
This consists of a string of 16 digits 0-9, A-F.
The following example
represents a NaN value. Note that certain IEEE doubles, such as the
NaN in the example, cannot be represented in the lexical format for
the "double" type.
</p>
<div class="mathml-example" id="contm.cn.hexdouble.ex"><pre class="mathml">
<cn type="hexdouble">7F800000</cn></pre><p>Sample Presentation</p><pre class="mathml">
<mn>0x7F800000</mn></pre><blockquote>
<p><img src="image/contm_cn_hexdouble_ex.gif" alt="{\mn{0x7F800000}}"></p>
</blockquote>
</div>
</dd>
</dl>
</div>
<div class="div4">
<h4><a name="contm.cn.extended" id="contm.cn.extended"></a>4.2.1.3 Non-Strict uses of <code><cn></code></h4>
<p>The <code>base</code> attribute is used to specify how the content is
to be parsed. The attribute value is a base 10 positive integer
giving the value of base in which the text content of the <code>cn</code>
is to be interpreted. The <code>base</code> attribute should only be
used on elements with type "integer" or
"real". Its use on <code>cn</code> elements of other type
is deprecated. The default value for <code>base</code> is
"10".
</p>
<p>Additional values for the <code>type</code> attribute element for supporting
e-notations for real numbers, rational numbers, complex numbers and selected important
constants. As with the "integer", "real",
"double" and "hexdouble" types, each of these types
implies that the content be of a certain form. If the <code>type</code> attribute is
omitted, it defaults to "real".
</p>
<dl>
<dt class="label">integer</dt>
<dd>
<p>Integers can be represented with respect to a base different from
10: If <code>base</code> is present, it specifies (in base 10) the base for the digit encoding.
Thus <code>base</code>='16' specifies a hexadecimal
encoding. When <code>base</code> > 10, Latin letters (A-Z, a-z) are used in
alphabetical order as digits. The case of letters used as digits is not
significant. The following example encodes the base 10 number 32736.
</p>
<div class="mathml-example" id="cn.base.ex"><pre class="mathml"><cn base="16">7FE0</cn></pre><p>Sample Presentation</p><pre class="mathml">
<msub><mn>7FE0</mn><mn>16</mn></msub></pre><blockquote>
<p><img src="image/cn_base_ex.gif" alt="{\mn{7FE0}\sb{16}}"></p>
</blockquote>
</div>
<p>
When <code>base</code> > 36, some integers cannot be represented using
numbers and letters alone. For example, while
</p><pre class="mathml"><cn base="1000">10F</cn></pre><p>
arguably represents the number written in base 10 as 1,000,015, the number
written in base 10 as 1,000,037 cannot be represented using letters and
numbers alone when <code>base</code> is 1000. Consequently, support
for additional characters (if any) that may be used for digits when <code>base</code> > 36 is application specific.
</p>
</dd>
<dt class="label">real</dt>
<dd>Real numbers can be represented with respect to a base
different than 10. If a <code>base</code> attribute is present, then the digits are
interpreted as being digits computed relative to that base (in the same way as
described for type "integer").
</dd>
<dt class="label">e-notation</dt>
<dd>
<p>A real number may be presented in scientific notation using this type. Such
numbers have two parts (a significand and an exponent)
separated by a <code><sep/></code> element. The
first part is a real number, while the
second part is an integer exponent indicating a power of the base.
</p>
<p> For example, <code><cn type="e-notation">12.3<sep/>5</cn></code>
represents 12.3 times 10<sup>5</sup>. The default presentation of this example is
12.3e5. Note that this type is primarily useful for backwards compatibility with
MathML 2, and in most cases, it is preferable to use the "double"
type, if the number to be represented is in the range of IEEE doubles:
</p>
</dd>
<dt class="label">rational</dt>
<dd>
<p>A rational number is given as two integers to be used as the numerator and
denominator of a quotient. The numerator and denominator are
separated by <code><sep/></code>.
</p>
<div class="mathml-example" id="cn.rational.ex"><pre class="mathml"><cn type="rational">22<sep/>7</cn></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>22</mn><mo>/</mo><mn>7</mn></mrow></pre><blockquote>
<p><img src="image/cn_rational_ex.gif" alt="{{22}/{7}}"></p>
</blockquote>
</div>
</dd>
<dt class="label">complex-cartesian</dt>
<dd>
<p>A complex cartesian number is given as two numbers specifying the real and
imaginary parts. The real and imaginary parts are separated
by the <code><sep/></code> element, and each part has
the format of a real number as described above.
</p>
<div class="mathml-example" id="cn.cc.ex"><pre class="mathml">
<cn type="complex-cartesian"> 12.3 <sep/> 5 </cn>
</pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mn>12.3</mn><mo>+</mo><mn>5</mn><mo>&#x2062;</mo><mi>i</mi>
</mrow></pre><blockquote>
<p><img src="image/cn_cc_ex.gif" alt="{{\mn{12.3}}+{5}\unicode{8290}i}"></p>
</blockquote>
</div>
</dd>
<dt class="label">complex-polar</dt>
<dd>
<p>A complex polar number is given as two numbers specifying
the magnitude and angle. The magnitude and angle are separated
by the <code><sep/></code> element, and each part has
the format of a real number as described above.
</p>
<div class="mathml-example" id="cn.cp.ex"><pre class="mathml">
<cn type="complex-polar"> 2 <sep/> 3.1415 </cn></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mn>2</mn>
<mo>&#x2062;</mo>
<msup>
<mi>e</mi>
<mrow><mi>i</mi><mo>&#x2062;</mo><mn>3.1415</mn></mrow>
</msup>
</mrow></pre><blockquote>
<p><img src="image/cn_cp_ex.gif" alt="{ {2} \unicode{8290} {\msup{e}{{i\unicode{8290}{\mn{3.1415}}}}} }"></p>
</blockquote><pre class="mathml">
<mrow>
<mi>Polar</mi>
<mo>&#x2061;</mo>
<mfenced><mn>2</mn><mn>3.1415</mn></mfenced>
</mrow></pre><blockquote>
<p><img src="image/cn_cp_ex-2.gif" alt="{ \mathop{\minormal{Polar}} {\left({2},{\mn{3.1415}}\right)} }"></p>
</blockquote>
</div>
</dd>
<dt class="label">constant</dt>
<dd>
<p>If the value <code>type</code> is "constant",
then the content should be a Unicode representation of a
well-known constant. Some important constants and their
common Unicode representations are listed below.
</p>
<p>This <code>cn</code> type is primarily for backward
compatibility with MathML 1.0. MathML 2.0 introduced many
empty elements, such as <code><pi/></code> to
represent constants, and using these representations or
a Strict csymbol representation is preferred.
</p>
</dd>
</dl>
<p>In addition to the additional values of the type attribute, the
content of <code>cn</code> element can contain (in addition to the
<code>sep</code> element allowed in Strict Content MathML) <code>mglyph</code>
elements to refer to characters not currently available in Unicode, or
a general presentation construct (see <a href="chapter3-d.html#presm.summary">Section 3.1.9 Summary of Presentation Elements</a>),
which is used for rendering (see <a href="chapter4-d.html#contm.rendering">Section 4.1.2 The Structure and Scope of Content MathML Expressions</a>).
</p>
<p><em>Mapping to Strict Content MathML</em></p>
<p>If a <code>base</code> attribute is present, it specifies the base used for the digit
encoding of both integers. The use of <code>base</code> with
"rational" numbers is deprecated.
</p>
<div class="strict-mathml-example">
<h5><a name="contm-strict-cn-sep" id="contm-strict-cn-sep"></a>Rewrite: cn sep
</h5>
<p>If there are <code>sep</code> children of the <code>cn</code>,
then intervening text may be rewritten as <code>cn</code>
elements. If the <code>cn</code> element containing <code>sep</code>
also has a <code>base</code> attribute, this is copied to each
of the <code>cn</code> arguments of the resulting symbol, as
shown below.
</p><pre class="mathml">
<cn type="<span class="egmeta">rational</span>" base="<span class="egmeta">b</span>"><span class="egmeta">n</span><sep/><span class="egmeta">d</span></cn></pre><p> is rewritten to</p><pre class="mathml">
<apply><csymbol cd="<span class="egmeta">nums1</span>"><span class="egmeta">rational</span></csymbol>
<cn type="integer" base="<span class="egmeta">b</span>"><span class="egmeta">n</span></cn>
<cn type="integer" base="<span class="egmeta">b</span>"><span class="egmeta">d</span></cn>
</apply></pre><p>The symbol used in the result depends on the <code>type</code> attribute according to the following table:
</p>
<table id="contm.table-cntype" border="1">
<thead>
<tr>
<th>type attribute</th>
<th>OpenMath Symbol</th>
</tr>
</thead>
<tbody>
<tr>
<td>e-notation</td>
<td><a href="http://www.openmath.org/cd/bigfloat1.xhtml#bigfloat">bigfloat</a></td>
</tr>
<tr>
<td>rational</td>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#rational">rational</a></td>
</tr>
<tr>
<td>complex-cartesian</td>
<td><a href="http://www.openmath.org/cd/complex1.xhtml#complex_cartesian">complex_cartesian</a></td>
</tr>
<tr>
<td>complex-polar</td>
<td><a href="http://www.openmath.org/cd/complex1.xhtml#complex_polar">complex_polar</a></td>
</tr>
</tbody>
</table>
<p>Note: In the case of <a href="http://www.openmath.org/cd/bigfloat1.xhtml#bigfloat">bigfloat</a> the symbol
takes three arguments, <code><cn type="integer">10</cn></code> should be inserted as the second argument, denoting the base of the exponent used.
</p>
<p>If the <code>type</code> attribute has a different value, or if there is more than one <code><sep/></code> element, then the intervening expressions are converted as above, but a system-dependent choice of symbol for the head of
the application must be used.
</p>
<p>If a base attribute has been used then the resulting expression is not Strict Content MathML, and each of the arguments needs
to be recursively processed.
</p>
</div>
<div class="strict-mathml-example">
<h5><a name="contm.cn-base" id="contm.cn-base"></a>Rewrite: cn based_integer
</h5>
<p>A <code>cn</code> element with a base attribute other than 10 is rewritten as follows. (A base attribute with value 10 is simply removed) .
</p><pre class="mathml">
<cn type="<span class="egmeta">integer</span>" base="<span class="egmeta">16</span>"><span class="egmeta">FF60</span></cn></pre><pre class="strict-mathml">
<apply><csymbol cd="nums1"><span class="egmeta">based_integer</span></csymbol>
<cn type="integer"><span class="egmeta">16</span></cn>
<cs><span class="egmeta">FF60</span></cs>
</apply></pre><p>If the original element specified type "integer"
or if there is no type attribute, but the content of the
element just consists of the characters [a-zA-Z0-9] and white space
then the symbol used as the head in the resulting application should
be <a href="http://www.openmath.org/cd/nums1.xhtml#based_integer">based_integer</a> as shown. Otherwise it
should be should be <a href="http://www.openmath.org/cd/nums1.xhtml#based_float">based_float</a>.
</p>
</div>
<div class="strict-mathml-example">
<h5><a name="contm.cn.strict.const" id="contm.cn.strict.const"></a>Rewrite: cn constant
</h5>
<p>In Strict Content MathML, constants should be represented using
<code>csymbol</code> elements. A number of important constants are defined in the
<a href="http://www.openmath.org/cd/nums1.xhtml">nums1</a> content dictionary. An expression of the form
</p><pre class="mathml"><cn type="constant"><span class="egmeta">c</span></cn></pre><p>
has the Strict Content MathML equivalent
</p><pre class="strict-mathml"><csymbol cd="nums1"><span class="egmeta">c2</span></csymbol></pre><p>
where <code>c2</code> corresponds to <code>c</code> as specified in the following table.
</p>
<table id="contm.table-pragnum" border="1">
<thead>
<tr>
<th>Content</th>
<th>Description</th>
<th>OpenMath Symbol</th>
</tr>
</thead>
<tbody>
<tr>
<td>U+03C0 (<code>&pi;</code>)
</td>
<td>The usual <var>Ï€</var> of trigonometry: approximately 3.141592653...
</td>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#pi">pi</a></td>
</tr>
<tr>
<td>U+2147 (<code>&ExponentialE;</code> or <code>&ee;</code>)
</td>
<td>The base for natural logarithms: approximately 2.718281828...</td>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#e">e</a></td>
</tr>
<tr>
<td>U+2148 (<code>&ImaginaryI;</code> or <code>&ii;</code>)
</td>
<td>Square root of -1</td>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#i">i</a></td>
</tr>
<tr>
<td>U+03B3 (<code>&gamma;</code>)
</td>
<td>Euler's constant: approximately 0.5772156649...</td>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#gamma">gamma</a></td>
</tr>
<tr>
<td>U+221E (<code>&infin;</code> or <code>&infty;</code>)
</td>
<td>Infinity. Proper interpretation varies with context</td>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#infinity">infinity</a></td>
</tr>
</tbody>
</table>
</div>
<div class="strict-mathml-example">
<h5><a name="contm.cn.pres" id="contm.cn.pres"></a>Rewrite: cn presentation mathml
</h5>
<p>If the <code>cn</code> contains Presentation MathML markup, then it may
be rewritten to Strict MathML using variants of the rules above where
the arguments of the constructor are <code>ci</code> elements annotated
with the supplied Presentation MathML.
</p>
<p>A <code>cn</code> expression with non-text content of the form
</p><pre class="mathml">
<cn type="<span class="egmeta">rational</span>"> <span class="egmeta">P</span> <sep/> <span class="egmeta">Q</span> </cn></pre><p>
is transformed to Strict Content MathML by rewriting it to
</p><pre class="strict-mathml">
<apply><csymbol cd="<span class="egmeta">nums1</span>"><span class="egmeta">rational</span></csymbol>
<semantics>
<ci><span class="egmeta">p</span></ci>
<annotation-xml encoding="MathML-Presentation">
<span class="egmeta">P</span>
</annotation-xml>
</semantics>
<semantics>
<ci><span class="egmeta">q</span></ci>
<annotation-xml encoding="MathML-Presentation">
<span class="egmeta">Q</span>
</annotation-xml>
</semantics>
</apply></pre><p>
Where the identifier names, p and q, (which have to be a text string) should be
determined from the presentation MathML content, in a system defined way, perhaps as
in the above example by taking the character data of the element ignoring any element
markup. Systems doing such rewriting should ensure that constructs using the same
Presentation MathML content are rewritten to <code>semantics</code> elements using the
same <code>ci</code>, and that conversely constructs that use different MathML should be
rewritten to different identifier names (even if the Presentation MathML has the same character data).
</p>
<p>A related special case arises when a <code>cn</code> element
contains character data not permitted in Strict Content MathML
usage, e.g. non-digit, alphabetic characters. Conceptually, this is
analogous to a <code>cn</code> element containing a presentation
markup <code>mtext</code> element, and could be rewritten accordingly.
However, since the resulting annotation would contain no additional
rendering information, such instances should be rewritten directly
as <code>ci</code> elements, rather than as a <code>semantics</code>
construct.
</p>
</div>
</div>
</div>
<div class="div3">
<h3><a name="contm.ci" id="contm.ci"></a>4.2.2 Content Identifiers <code><ci></code></h3>
<table class="syntax">
<thead>
<tr>
<th></th>
<th>Schema Fragment (Strict)</th>
<th>Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.ci">Ci</a></td>
<td><a href="chapter4-d.html#contm.ci">Ci</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_type">type</a>?
</td>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a>, <a href="appendixa-d.html#parsing_type">type</a>?
</td>
</tr>
<tr>
<th><code>type</code> Attribute Values
</th>
<td>
"integer"|
"rational"|
"real"|
"complex"|
"complex-polar"|
"complex-cartesian"|
"constant"|
"function"|
"vector"|
"list"|
"set"|
"matrix"
</td>
<td> string</td>
</tr>
<tr>
<th>Qualifiers</th>
<td></td>
<td>
<a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a>,
<a href="appendixa-d.html#parsing_degree">degree</a>,
<a href="appendixa-d.html#parsing_momentabout">momentabout</a>,
<a href="appendixa-d.html#parsing_logbase">logbase</a>
</td>
</tr>
<tr>
<th>Content</th>
<td>text</td>
<td>text | <a href="appendixa-d.html#parsing_mglyph">mglyph</a> | <a href="appendixa-d.html#parsing_PresentationExpression">PresentationExpression</a></td>
</tr>
</tbody>
</table>
<p>Content MathML uses the <code>ci</code> element (mnemonic for "content
identifier") to construct a variable. Content identifiers
represent "mathematical variables" which have
properties, but no fixed value. For example, <var>x</var> and <var>y</var> are variables
in the expression "<var>x</var>+<var>y</var>", and the variable
<var>x</var> would be represented as
</p><pre class="strict-mathml"><ci>x</ci></pre><p>
In MathML, variables are distinguished from symbols, which have fixed, external
definitions, and are represented by the <a href="chapter4-d.html#contm.csymbol">csymbol</a> element.
</p>
<p>After white space normalization the content of a <code>ci</code> element is interpreted as a
name that identifies it. Two variables are considered equal, if and only if their names
are identical and in the same scope (see <a href="chapter4-d.html#contm.binding">Section 4.2.6 Bindings and Bound Variables <code><bind></code>
and <code><bvar></code></a> for a
discussion).
</p>
<div class="div4">
<h4><a name="contm.ci.strict" id="contm.ci.strict"></a>4.2.2.1 Strict uses of <code><ci></code></h4>
<p>The <code>ci</code> element uses the <code>type</code> attribute to specify the basic type of
object that it represents. In Strict Content MathML, the set of permissible values is
"integer", "rational", "real",
"complex", "complex-polar",
"complex-cartesian", "constant", "function",
<code>vector</code>, <code>list</code>, <code>set</code>, and <code>matrix</code>. These values correspond
to the symbols
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#integer_type">integer_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#rational_type">rational_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#real_type">real_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#complex_polar_type">complex_polar_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#complex_cartesian_type">complex_cartesian_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#constant_type">constant_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#fn_type">fn_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#vector_type">vector_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#list_type">list_type</a>,
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#set_type">set_type</a>, and
<a href="http://www.openmath.org/cd/mathmltypes.xhtml#matrix_type">matrix_type</a> in the
<a href="http://www.openmath.org/cd/mathmltypes.xhtml">mathmltypes</a> Content Dictionary: In this sense the following two expressions are considered equivalent:
</p>
<div class="strict-mathml-example" id="contm.ci.mathmltypes"><pre class="mathml"><ci type="integer">n</ci></pre><pre class="strict-mathml">
<semantics>
<ci>n</ci>
<annotation-xml cd="mathmltypes" name="type" encoding="MathML-Content">
<csymbol cd="mathmltypes">integer_type</csymbol>
</annotation-xml>
</semantics></pre></div>
</div>
<div class="div4">
<h4><a name="contm.ci.extended" id="contm.ci.extended"></a>4.2.2.2 Non-Strict uses of <code><ci></code></h4>
<p>The <code>ci</code> element allows any string value for the <code>type</code>
attribute, in particular any of the names of the MathML container elements or their type
values.
</p>
<p>For a more advanced treatment of types, the <code>type</code> attribute is
inappropriate. Advanced types require significant structure of their own (for example,
<var>vector(complex)</var>) and are probably best constructed as mathematical objects and
then associated with a MathML expression through use of the <code>semantics</code>
element. See <a href="appendixh-d.html#MathMLTypes">[MathMLTypes]</a> for more examples.
</p>
<p><em>Mapping to Strict Content MathML</em></p>
<div class="strict-mathml-example">
<h5><a name="contm.ci.strict.ex" id="contm.ci.strict.ex"></a>Rewrite: ci type annotation
</h5>
<p>In Strict Content, type attributes are represented via
semantic attribution. An expression of the form
</p><pre class="mathml"><ci type="<span class="egmeta">T</span>"><span class="egmeta">n</span></ci></pre><p>
is rewritten to
</p><pre class="strict-mathml">
<semantics>
<ci><span class="egmeta">n</span></ci>
<annotation-xml cd="mathmltypes" name="type" encoding="MathML-Content">
<ci><span class="egmeta">T</span></ci>
</annotation-xml>
</semantics></pre></div>
<p>The <code>ci</code> element can contain
<code>mglyph</code> elements to refer to characters not currently available in Unicode, or a
general presentation construct (see <a href="chapter3-d.html#presm.summary">Section 3.1.9 Summary of Presentation Elements</a>), which is used for
rendering (see <a href="chapter4-d.html#contm.rendering">Section 4.1.2 The Structure and Scope of Content MathML Expressions</a>).
</p>
<div class="strict-mathml-example">
<h5><a name="contm.ci.pres" id="contm.ci.pres"></a>Rewrite: ci presentation mathml
</h5>
<p>A <code>ci</code> expression with non-text content of the form
</p><pre class="mathml"><ci> <span class="egmeta">P</span> </ci></pre><p>
is transformed to Strict Content MathML by rewriting it to
</p><pre class="strict-mathml">
<semantics>
<ci><span class="egmeta">p</span></ci>
<annotation-xml encoding="MathML-Presentation">
<span class="egmeta">P</span>
</annotation-xml>
</semantics></pre><p>
Where the identifier name, p, (which has to be a text string) should be
determined from the presentation MathML content, in a system defined way, perhaps as
in the above example by taking the character data of the element ignoring any element
markup. Systems doing such rewriting should ensure that constructs using the same
Presentation MathML content are rewritten to <code>semantics</code> elements using the
same <code>ci</code>, and that conversely constructs that use different MathML should be
rewritten to different identifier names (even if the Presentation MathML has the same character data).
</p>
</div>
<div class="strict-mathml-example" id="contm.ci.c2">
<p> The following example encodes an atomic
symbol that displays visually as <var>C</var><sup>2</sup> and that,
for purposes of content, is treated as a single symbol
</p><pre class="mathml">
<ci>
<msup><mi>C</mi><mn>2</mn></msup>
</ci></pre><p>The Strict Content MathML equivalent is</p><pre class="strict-mathml">
<semantics>
<ci>C2</ci>
<annotation-xml encoding="MathML-Presentation">
<msup><mi>C</mi><mn>2</mn></msup>
</annotation-xml>
</semantics></pre><p>Sample Presentation</p><pre class="mathml">
<msup><mi>C</mi><mn>2</mn></msup></pre><blockquote>
<p><img src="image/contm_ci_c2.gif" alt="{\msup{C}{{2}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.rendering.ci" id="contm.rendering.ci"></a>4.2.2.3 Rendering Content Identifiers
</h4>
<p>If the content of a <code>ci</code> element consists of Presentation MathML, that
presentation is used. If no such tagging is supplied then the text
content is rendered as if it were the content of an <code>mi</code> element. If an
application supports bidirectional text rendering, then the rendering follows the
Unicode bidirectional rendering.
</p>
<p>The <code>type</code> attribute can be interpreted to
provide rendering information. For example in
</p><pre class="mathml"><ci type="vector">V</ci></pre><p>
a renderer could display a bold V for the vector.
</p>
</div>
</div>
<div class="div3">
<h3><a name="contm.csymbol" id="contm.csymbol"></a>4.2.3 Content Symbols <code><csymbol></code></h3>
<table class="syntax">
<thead>
<tr>
<th></th>
<th>Schema Fragment (Strict)</th>
<th>Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.csymbol">Csymbol</a></td>
<td><a href="chapter4-d.html#contm.csymbol">Csymbol</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_cd">cd</a></td>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a>, <a href="appendixa-d.html#parsing_type">type</a>?, <a href="appendixa-d.html#parsing_cd">cd</a>?
</td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_SymbolName">SymbolName</a></td>
<td>text | <a href="appendixa-d.html#parsing_mglyph">mglyph</a> | <a href="appendixa-d.html#parsing_PresentationExpression">PresentationExpression</a></td>
</tr>
<tr>
<th>Qualifiers</th>
<td></td>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>, <a href="appendixa-d.html#parsing_DomainQ">DomainQ</a>, <a href="appendixa-d.html#parsing_degree">degree</a>, <a href="appendixa-d.html#parsing_momentabout">momentabout</a>, <a href="appendixa-d.html#parsing_logbase">logbase</a></td>
</tr>
</tbody>
</table>
<p>A <code>csymbol</code> is used to refer to a specific,
mathematically-defined concept with an external definition. In the
expression "<var>x</var>+<var>y</var>", the plus sign is
a symbol since it has a specific, external definition, namely the addition function.
MathML 3 calls such an identifier a
<em>symbol</em>. Elementary functions and common mathematical
operators are all examples of symbols. Note that the term
"symbol" is used here in an abstract sense and has no
connection with any particular presentation of the construct on screen
or paper.
</p>
<div class="div4">
<h4><a name="contm.csymbol.strict" id="contm.csymbol.strict"></a>4.2.3.1 Strict uses of <code><csymbol></code></h4>
<p>The <code>csymbol</code> identifies the specific mathematical concept
it represents by referencing its definition via attributes.
Conceptually, a reference to an external definition is merely a URI,
i.e. a label uniquely identifying the definition. However, to be
useful for communication between user agents, external definitions
must be shared.
</p>
<p>For this reason, several longstanding efforts have
been organized to develop systematic, public repositories of
mathematical definitions. Most notable of these, the OpenMath Society
repository of Content Dictionaries (CDs) is extensive, open and
active. In MathML 3, OpenMath CDs are the preferred source of external
definitions. In particular, the definitions of pre-defined MathML 3
operators and functions are given in terms of OpenMath CDs.
</p>
<p>MathML 3 provides two mechanisms for referencing external definitions or content
dictionaries. The first, using the <code>cd</code> attribute, follows conventions
established by OpenMath specifically for referencing CDs. This is the
form required in Strict Content MathML. The second, using the
<code>definitionURL</code> attribute, is backward compatible with MathML 2, and can be used
to reference CDs or any other source of definitions that can be
identified by a URI. It is described in the following section
</p>
<p>When referencing OpenMath CDs, the preferred method is to use the <code>cd</code>
attribute as follows. Abstractly, OpenMath symbol definitions are identified by a triple
of values: a <em>symbol name</em>, a <em>CD name</em>, and a <em>CD base</em>,
which is a URI that disambiguates CDs of the same name. To associate such a triple with a
<code>csymbol</code>, the content of the <code>csymbol</code> specifies the symbol name, and the
name of the Content Dictionary is given using the <code>cd</code> attribute. The CD base is
determined either from the document embedding the <code>math</code> element which contains the
<code>csymbol</code> by a mechanism given by the embedding document format, or by system
defaults, or by the <code>cdgroup</code> attribute , which is optionally specified on the
enclosing <code>math</code> element; see <a href="chapter2-d.html#interf.toplevel.atts">Section 2.2.1 Attributes</a>. In the absence
of specific information <code>http://www.openmath.org/cd</code> is assumed as the CD base
for all <code>csymbol</code> elements <code>annotation</code>, and <code>annotation-xml</code>. This
is the CD base for the collection of standard CDs maintained by the OpenMath Society.
</p>
<p>The <code>cdgroup</code> specifies a URL to an OpenMath CD Group file. For a detailed
description of the format of a CD Group file, see Section 4.4.2 (CDGroups)
in <a href="appendixg-d.html#OpenMath2004">[OpenMath2004]</a>. Conceptually, a CD group file is a list of
pairs consisting of a CD name, and a corresponding CD base. When a <code>csymbol</code>
references a CD name using the <code>cd</code> attribute, the name is looked up in the CD
Group file, and the associated CD base value is used for that <code>csymbol</code>. When a CD
Group file is specified, but a referenced CD name does not appear in the group file, or
there is an error in retrieving the group file, the referencing <code>csymbol</code> is not
defined. However, the handling of the resulting error is not defined, and is the
responsibility of the user agent.
</p>
<p>While references to external definitions are URIs, it is strongly recommended that CD
files be retrievable at the location obtained by interpreting the URI as a URL. In
particular, other properties of the symbol being defined may be available by inspecting
the Content Dictionary specified. These include not only the symbol definition, but also
examples and other formal properties. Note, however, that there are multiple encodings
for OpenMath Content Dictionaries, and it is up to the user agent to correctly determine
the encoding when retrieving a CD.
</p>
</div>
<div class="div4">
<h4><a name="contm.csymbol.extended" id="contm.csymbol.extended"></a>4.2.3.2 Non-Strict uses of <code><csymbol></code></h4>
<p>In addition to the forms described above, the <code>csymbol</code> and element can contain
<code>mglyph</code> elements to refer to characters not currently available in Unicode, or a
general presentation construct (see <a href="chapter3-d.html#presm.summary">Section 3.1.9 Summary of Presentation Elements</a>), which is used for
rendering (see <a href="chapter4-d.html#contm.rendering">Section 4.1.2 The Structure and Scope of Content MathML Expressions</a>). In this case, when
writing to Strict Content MathML, the csymbol should be treated as a
<code>ci</code> element, and rewritten using <a href="chapter4-d.html#contm.ci.pres">Rewrite: ci presentation mathml</a>.
</p>
<p>External definitions (in OpenMath CDs or elsewhere) may also be specified directly for
a <code>csymbol</code> using the <code>definitionURL</code> attribute. When used to reference
OpenMath symbol definitions, the abstract triple of (symbol name, CD name, CD base) is
mapped to a fully-qualified URI as follows:
</p><pre><code>URI = </code><var>cdbase</var><code> + '/' + </code><var>cd-name</var><code> + '#' + </code><var>symbol-name</var></pre><p>
For example,
</p><pre>(plus, arith1, http://www.openmath.org/cd)</pre><p>
is mapped to
</p><pre><code>http://www.openmath.org/cd/arith1#plus</code></pre><p>
The resulting URI is specified as the value of the <code>definitionURL</code> attribute.
</p>
<p>This form of reference is useful for backwards compatibility with MathML2 and to
facilitate the use of Content MathML within URI-based frameworks (such as RDF <a href="appendixh-d.html#rdf">[rdf]</a> in the Semantic Web or OMDoc <a href="appendixh-d.html#OMDoc1.2">[OMDoc1.2]</a>). Another benefit is
that the symbol name in the CD does not need to correspond to the content of the
<code>csymbol</code> element. However, in general, this method results in much longer MathML
instances. Also, in situations where CDs are under development, the use of a CD Group
file allows the locations of CDs to change without a change to the markup. A third
drawback to <code>definitionURL</code> is that unlike the <code>cd</code> attribute, it is not
limited to referencing symbol definitions in OpenMath content dictionaries. Hence, it is
not in general possible for a user agent to automatically determine the proper
interpretation for <code>definitionURL</code> values without further information about the
context and community of practice in which the MathML instance occurs.
</p>
<p>Both the <code>cd</code> and <code>definitionURL</code> mechanisms of external reference
may be used within a single MathML instance. However, when both a <code>cd</code> and a
<code>definitionURL</code> attribute are specified on a single <code>csymbol</code>, the
<code>cd</code> attribute takes precedence.
</p>
<p><em>Mapping to Strict Content MathML</em></p>
<p>In non-Strict usage <code>csymbol</code> allows the use of
a <code>type</code> attribute.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.csymbol.strict.ex" id="contm.csymbol.strict.ex"></a>Rewrite: csymbol type annotation
</h5>
<p>In Strict Content, type attributes are represented via
semantic attribution. An expression of the form
</p><pre class="mathml"><csymbol type="<span class="egmeta">T</span>">symbolname</csymbol></pre><p>
is rewritten to
</p><pre class="strict-mathml">
<semantics>
<csymbol>symbolname</csymbol>
<annotation-xml cd="mathmltypes" name="type" encoding="MathML-Content">
<ci><span class="egmeta">T</span></ci>
</annotation-xml>
</semantics></pre></div>
</div>
<div class="div4">
<h4><a name="contm.rendering.csymbol" id="contm.rendering.csymbol"></a>4.2.3.3 Rendering Symbols
</h4>
<p>If the content of a <code>csymbol</code> element is tagged using presentation tags,
that presentation is used. If no such tagging is supplied then the text
content is rendered as if it were the content of an <code>mi</code> element. In
particular if an application supports bidirectional text rendering, then the
rendering follows the Unicode bidirectional rendering.
</p>
</div>
</div>
<div class="div3">
<h3><a name="contm.cs" id="contm.cs"></a>4.2.4 String Literals <code><cs></code></h3>
<table class="syntax">
<thead>
<tr>
<th></th>
<th>Schema Fragment (Strict)</th>
<th>Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.cs">Cs</a></td>
<td><a href="chapter4-d.html#contm.cs">Cs</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a></td>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>text</td>
<td>text</td>
</tr>
</tbody>
</table>
<p>The <code>cs</code> element encodes "string literals"
which may be used in Content MathML expressions.
</p>
<p>The content of cs is text; no
Presentation MathML constructs are allowed even when used in
non-strict markup. Specifically, <code>cs</code> may not contain
<code>mglyph</code> elements, and the content does not undergo white space
normalization.
</p>
<div class="mathml-example" id="contm.cs.ex">
<p>Content MathML</p><pre class="mathml">
<set>
<cs>A</cs><cs>B</cs><cs> </cs>
</set></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>{</mo>
<ms>A</ms>
<mo>,</mo>
<ms>B</ms>
<mo>,</mo>
<ms>&#xa0;&#xa0;</ms>
<mo>}</mo>
</mrow></pre><blockquote>
<p><img src="image/cs-ex.gif" alt="{\left.\middle\{\mbox{\textquotedbl A\textquotedbl},\mbox{\textquotedbl B\textquotedbl },\mbox{\textquotedbl\ \ \textquotedbl }\middle\}\right.}"></p>
</blockquote>
</div>
</div>
<div class="div3">
<h3><a name="contm.apply" id="contm.apply"></a>4.2.5 Function Application <code><apply></code></h3>
<table class="syntax">
<thead>
<tr>
<th></th>
<th colspan="2">Schema Fragment (Strict)</th>
<th colspan="2">Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td colspan="2"><a href="chapter4-d.html#contm.apply">Apply</a></td>
<td colspan="2"><a href="chapter4-d.html#contm.apply">Apply</a></td>
</tr>
<tr>
<th>Attributes</th>
<td colspan="2"><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a></td>
<td colspan="2"><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td colspan="2"><a href="appendixa-d.html#parsing_ContExp">ContExp</a>+
</td>
<td colspan="2"><a href="appendixa-d.html#parsing_ContExp">ContExp</a>+
|
(<a href="appendixa-d.html#parsing_ContExp">ContExp</a>,
<a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_Qualifier">Qualifier</a>?,
<a href="appendixa-d.html#parsing_ContExp">ContExp</a>*)
</td>
</tr>
</tbody>
</table>
<p>The most fundamental way of building a compound object in
mathematics is by applying a function or an operator to some
arguments.
</p>
<div class="div4">
<h4><a name="contm.applications.strict" id="contm.applications.strict"></a>4.2.5.1 Strict Content MathML
</h4>
<p>In MathML, the <code>apply</code> element is used to build an expression tree that
represents the application a function or operator to its arguments. The
resulting tree corresponds to a complete mathematical expression. Roughly
speaking, this means a piece of mathematics that could be surrounded by
parentheses or "logical brackets" without changing its meaning.
</p>
<p>For example, (<var>x</var> + <var>y</var>) might be encoded as
</p><pre class="mathml"><apply><csymbol cd="arith1">plus</csymbol><ci>x</ci><ci>y</ci></apply></pre><p>
The opening and closing tags of <code>apply</code> specify exactly the scope of any
operator or function. The most typical way of using <code>apply</code> is simple and
recursive. Symbolically, the content model can be described as:
</p><pre class="mathml-extension"><apply> <em>op</em> [ <em>a</em> <em>b</em> ...] </apply></pre><p>
where the <em>operands</em> <em>a</em>, <em>b</em>, ... are MathML
expression trees themselves, and <em>op</em> is a MathML expression tree that
represents an operator or function. Note that <code>apply</code> constructs can be
nested to arbitrary depth.
</p>
<p>An <code>apply</code> may in principle have any number of operands. For example,
(<var>x</var> + <var>y</var> + <var>z</var>) can be encoded as
</p><pre class="mathml">
<apply><csymbol cd="arith1">plus</csymbol>
<ci>x</ci>
<ci>y</ci>
<ci>z</ci>
</apply></pre><p>
Note that MathML also allows applications without operands, e.g. to represent functions like <code>random()</code>, or <code>current-date()</code>.
</p>
<p>Mathematical expressions involving a mixture of operations result in nested
occurrences of <code>apply</code>. For example, <var>a</var> <var>x</var> + <var>b</var>
would be encoded as
</p><pre class="mathml">
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<ci>a</ci>
<ci>x</ci>
</apply>
<ci>b</ci>
</apply></pre><p>There is no need to introduce parentheses or to resort to
operator precedence in order to parse expressions correctly. The
<code>apply</code> tags provide the proper grouping for the re-use
of the expressions within other constructs. Any expression
enclosed by an <code>apply</code> element is well-defined, coherent
object whose interpretation does not depend on the surrounding
context. This is in sharp contrast to presentation markup,
where the same expression may have very different meanings in
different contexts. For example, an expression with a visual
rendering such as (<var>F</var>+<var>G</var>)(<var>x</var>)
might be a product, as in
</p><pre class="mathml">
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="arith1">plus</csymbol>
<ci>F</ci>
<ci>G</ci>
</apply>
<ci>x</ci>
</apply></pre><p>
or it might indicate the application of the function <var>F</var> + <var>G</var> to
the argument <var>x</var>. This is indicated by constructing the sum
</p><pre class="mathml"><apply><csymbol cd="arith1">plus</csymbol><ci>F</ci><ci>G</ci></apply></pre><p>
and applying it to the argument <var>x</var> as in
</p><pre class="mathml">
<apply>
<apply><csymbol cd="arith1">plus</csymbol>
<ci>F</ci>
<ci>G</ci>
</apply>
<ci>x</ci>
</apply></pre><p>
In both cases, the interpretation of the outer <code>apply</code> is
explicit and unambiguous, and does not change regardless of
where the expression is used.
</p>
<p>The preceding example also illustrates that in an
<code>apply</code> construct, both the function and the arguments
may be simple identifiers or more complicated expressions.
</p>
<p>The <code>apply</code> element is conceptually necessary in order to distinguish
between a function or operator, and an instance of its use. The expression
constructed by applying a function to 0 or more arguments is always an element from
the codomain of the function. Proper usage depends on the operator that is being
applied. For example, the <code>plus</code> operator may have zero or more arguments,
while the <code>minus</code> operator requires one or two arguments in order to be properly
formed.
</p>
</div>
<div class="div4">
<h4><a name="contm.rendering.applications" id="contm.rendering.applications"></a>4.2.5.2 Rendering Applications
</h4>
<p>Strict Content MathML applications are rendered as mathematical
function applications. If
<code> <span class="egmeta">F</span> </code> denotes the rendering of
<code> <span class="egmeta">f</span> </code> and
<code> <span class="egmeta">Ai</span> </code>
the rendering of
<code> <span class="egmeta">ai</span> </code>, the the sample
rendering of a simple application is as follows:
</p>
<div class="mathml-example" id="contm.render.apply">
<p>Content MathML</p><pre class="mathml">
<apply> <span class="egmeta">f</span>
<span class="egmeta">a1</span>
<span class="egmeta">a2</span>
<span class="egmeta">...</span>
<span class="egmeta">an</span>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<span class="egmeta">F</span>
<mo>&#x2061;</mo>
<mrow>
<mo fence="true">(</mo>
<span class="egmeta">A1</span>
<mo separator="true">,</mo>
<span class="egmeta">...</span>
<mo separator="true">,</mo>
<span class="egmeta">A2</span>
<mo separator="true">,</mo>
<span class="egmeta">An</span>
<mo fence="true">)</mo>
</mrow>
</mrow></pre></div>
<p>Non-Strict MathML applications may also be used with qualifiers. In the absence of
any more specific rendering rules for well-known operators, rendering
should follow the sample presentation below, motivated by the typical
presentation for <code>sum</code>. Let
<code> <span class="egmeta">Op</span> </code> denote the rendering of
<code> <span class="egmeta">op</span> </code>,
<code> <span class="egmeta">X</span> </code>
the rendering of
<code> <span class="egmeta">x</span> </code>, and so on. Then:
</p>
<div class="mathml-example" id="contm.render.apply.limit">
<p>Content MathML</p><pre class="mathml">
<apply> <span class="egmeta">op</span>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication> <span class="egmeta">d</span> </domainofapplication>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munder>
<span class="egmeta">Op</span>
<mrow> <span class="egmeta">X</span> <mo>&#x2208;</mo><!--ELEMENT OF--> <span class="egmeta">D</span> </mrow>
</munder>
<mo>&#x2061;</mo><!--FUNCTION APPLICATION-->
<mrow>
<mo fence="true">(</mo>
<span class="egmeta">Expression-in-X</span>
<mo fence="true">)</mo>
</mrow>
</mrow></pre></div>
</div>
</div>
<div class="div3">
<h3><a name="contm.binding" id="contm.binding"></a>4.2.6 Bindings and Bound Variables <code><bind></code>
and <code><bvar></code></h3>
<p>Many complex mathematical expressions are constructed with the use of bound
variables, and bound variables are an important concept of logic and formal
languages. Variables become <em>bound</em> in the scope of an expression through
the use of a quantifier. Informally, they can be thought of as the "dummy variables"
in expressions such as integrals, sums, products, and the logical quantifiers "for
all" and "there exists". A bound variable is characterized by the property that
systematically renaming the variable (to a name not already appearing in the
expression) does not change the meaning of the expression.
</p>
<div class="div4">
<h4><a name="contm.bind" id="contm.bind"></a>4.2.6.1 Bindings
</h4>
<table class="syntax">
<thead>
<tr>
<th></th>
<th>Schema Fragment (Strict)</th>
<th>Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.bind">Bind</a></td>
<td><a href="chapter4-d.html#contm.bind">Bind</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a></td>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>
<a href="appendixa-d.html#parsing_ContExp">ContExp</a>,
<a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>*,
<a href="appendixa-d.html#parsing_ContExp">ContExp</a>
</td>
<td>
<a href="appendixa-d.html#parsing_ContExp">ContExp</a>,
<a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>*,
<a href="appendixa-d.html#parsing_Qualifier">Qualifier</a>*,
<a href="appendixa-d.html#parsing_ContExp">ContExp</a>+
</td>
</tr>
</tbody>
</table>
<p>Binding expressions are represented as MathML expression trees using the <code>bind</code>
element. Its first child is a MathML expression that represents a binding operator, for
example integral operator. This is followed by a non-empty list of <code>bvar</code>
elements denoting the bound variables, and then the final child which is a general
Content MathML expression, known as the <em>body</em> of the binding.
</p>
</div>
<div class="div4">
<h4><a name="contm.bvar" id="contm.bvar"></a>4.2.6.2 Bound Variables
</h4>
<table class="syntax">
<thead>
<tr>
<th></th>
<th>Schema Fragment (Strict)</th>
<th>Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.bvar">BVar</a></td>
<td><a href="chapter4-d.html#contm.bvar">BVar</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a></td>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ci">ci</a> | <a href="appendixa-d.html#parsing_semantics-ci">semantics-ci</a></td>
<td>
(<a href="appendixa-d.html#parsing_ci">ci</a> | <a href="appendixa-d.html#parsing_semantics-ci">semantics-ci</a>), <a href="appendixa-d.html#parsing_degree">degree</a>? |
<a href="appendixa-d.html#parsing_degree">degree</a>?, (<a href="appendixa-d.html#parsing_ci">ci</a> | <a href="appendixa-d.html#parsing_semantics-ci">semantics-ci</a>
</td>
</tr>
</tbody>
</table>
<p>The <code>bvar</code> element is used to denote the bound variable of a binding
expression, e.g. in sums, products, and quantifiers or user defined functions.
</p>
<p>The content of a <code>bvar</code> element is an <em>annotated variable</em>,
i.e. either a content identifier represented by a <code>ci</code> element or a
<code>semantics</code> element whose first child is an annotated variable. The
<em>name</em> of an annotated variable of the second kind is the name of its first
child. The <em>name</em> of a bound variable is that of the annotated variable
in the <code>bvar</code> element.
</p>
<p>Bound variables are identified by comparing their names. Such
identification can be made explicit by placing an <code>id</code> on the <code>ci</code>
element in the <code>bvar</code> element and referring to it using the <code>xref</code>
attribute on all other instances. An example of this approach is
</p><pre class="mathml">
<bind><csymbol cd="quant1">forall</csymbol>
<bvar><ci id="var-x">x</ci></bvar>
<apply><csymbol cd="relation1">lt</csymbol>
<ci xref="var-x">x</ci>
<cn>1</cn>
</apply>
</bind></pre><p>
This <code>id</code> based approach is especially helpful when constructions
involving bound variables are nested.
</p>
<p>It is sometimes necessary to associate additional
information with a bound variable. The information might be
something like a detailed mathematical type, an alternative
presentation or encoding or a domain of application. Such
associations are accomplished in the standard way by replacing
a <code>ci</code> element (even inside the <code>bvar</code> element)
by a <code>semantics</code> element containing both the <code>ci</code>
and the additional information. Recognition of an instance of
the bound variable is still based on the actual <code>ci</code>
elements and not the <code>semantics</code> elements or anything
else they may contain. The <code>id</code> based-approach
outlined above may still be used.
</p>
<p>The following example encodes forall <var>x</var>. <var>x</var>+<var>y</var>=<var>y</var>+<var>x</var>.
</p><pre class="mathml">
<bind><csymbol cd="quant1">forall</csymbol>
<bvar><ci>x</ci></bvar>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="arith1">plus</csymbol><ci>x</ci><ci>y</ci></apply>
<apply><csymbol cd="arith1">plus</csymbol><ci>y</ci><ci>x</ci></apply>
</apply>
</bind></pre><p>In non-Strict Content markup, the <code>bvar</code> element is used in
a number of idiomatic constructs. These are described in <a href="chapter4-d.html#contm.qualifiers">Section 4.3.3 Qualifiers</a> and <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>.
</p>
</div>
<div class="div4">
<h4><a name="contm.alpharenmaing" id="contm.alpharenmaing"></a>4.2.6.3 Renaming Bound Variables
</h4>
<p>It is a defining property of bound variables that they can be renamed
consistently in the scope of their parent <code>bind</code> element. This operation, sometimes known as <em>α-conversion</em>,
preserves the semantics of the expression.
</p>
<p>A bound variable <var>x</var> may be renamed to say <var>y</var> so long as <var>y</var> does not occur free in the body of the binding, or in any annotations of
the bound variable, <var>x</var> to be renamed, or later bound variables.
</p>
<p>If a bound variable <var>x</var> is renamed, all free occurrences of <var>x</var> in annotations in its <code>bvar</code> element, any following <code>bvar</code> children of the <code>bind</code> and in the expression in the body of the <code>bind</code> should be renamed.
</p>
<p> In the example in the previous section, note how renaming
<var>x</var> to <var>z</var> produces the equivalent expression forall
<var>z</var>. <var>z</var>+<var>y</var>=<var>y</var>+<var>z</var>,
whereas <var>x</var> may not be renamed to <var>y</var>, as
<var>y</var> is free in the body of the binding and would be
<em>captured</em>, producing the expression forall
<var>y</var>. <var>y</var>+<var>y</var>=<var>y</var>+<var>y</var>
which is not equivalent to the original expression.
</p>
</div>
<div class="div4">
<h4><a name="contm.rendering.binders" id="contm.rendering.binders"></a>4.2.6.4 Rendering Binding Constructions
</h4>
<p>If
<code> <span class="egmeta">b</span> </code> and
<code> <span class="egmeta">s</span> </code> are Content MathML expressions
that render as the Presentation MathML expressions
<code> <span class="egmeta">B</span> </code> and
<code> <span class="egmeta">S</span> </code>
then the sample rendering of a binding element is as follows:
</p>
<div class="mathml-example" id="contm.bvar.render">
<p>Content MathML</p><pre class="mathml">
<bind> <span class="egmeta">b</span>
<bvar> <span class="egmeta">x1</span> </bvar>
<bvar> <span class="egmeta">...</span> </bvar>
<bvar> <span class="egmeta">xn</span> </bvar>
<span class="egmeta">s</span>
</bind></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<span class="egmeta">B</span>
<mrow>
<span class="egmeta">x1</span>
<mo separator="true">,</mo>
<span class="egmeta">...</span>
<mo separator="true">,</mo>
<span class="egmeta">xn</span>
</mrow>
<mo separator="true">.</mo>
<span class="egmeta">S</span>
</mrow></pre></div>
</div>
</div>
<div class="div3">
<h3><a name="contm.sharing" id="contm.sharing"></a>4.2.7 Structure Sharing <code><share></code></h3>
<p>To conserve space in the XML encoding, MathML expression trees can make use of
structure sharing.
</p>
<div class="div4">
<h4><a name="contm.share" id="contm.share"></a>4.2.7.1 The <code>share</code> element
</h4>
<table class="syntax">
<thead>
<tr>
<th></th>
<th colspan="2">Schema Fragment</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td colspan="2"><a href="chapter4-d.html#contm.share">Share</a></td>
</tr>
<tr>
<th>Attributes</th>
<td colspan="2">
<a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>,
<a href="appendixa-d.html#parsing_src">src</a>
</td>
</tr>
<tr>
<th><code>src</code> Attribute Values
</th>
<td><var>URI</var></td>
</tr>
<tr>
<th>Content</th>
<td colspan="2">Empty</td>
</tr>
</tbody>
</table>
<p>The <code>share</code> element has an <code>href</code> attribute used to
to reference a MathML expression tree. The value of the
<code>href</code> attribute is a URI specifying the <code>id</code>
attribute of the root node of the expression tree. When building a
MathML expression tree, the <code>share</code> element is equivalent to a copy of the MathML
expression tree referenced by the <code>href</code> attribute. Note that this copy is
<em>structurally equal</em>, but not identical to the element referenced. The
values of the <code>share</code> will often be relative URI references, in which case they
are resolved using the base URI of the document containing the <code>share</code> element.
</p>
<p>For instance, the mathematical object <var>f(f(f(a,a),f(a,a)),f(f(a,a),f(a,a)))</var> can
be encoded as either one of the following representations (and some intermediate versions as well).
</p>
<table id="contm.share.table">
<tbody>
<tr>
<td>
<pre class="mathml">
<apply><ci>f</ci>
<apply><ci>f</ci>
<apply><ci>f</ci>
<ci>a</ci>
<ci>a</ci>
</apply>
<apply><ci>f</ci>
<ci>a</ci>
<ci>a</ci>
</apply>
</apply>
<apply><ci>f</ci>
<apply><ci>f</ci>
<ci>a</ci>
<ci>a</ci>
</apply>
<apply><ci>f</ci>
<ci>a</ci>
<ci>a</ci>
</apply>
</apply>
</apply></pre>
</td>
<td>
<pre class="mathml">
<apply><ci>f</ci>
<apply id="t1"><ci>f</ci>
<apply id="t11"><ci>f</ci>
<ci>a</ci>
<ci>a</ci>
</apply>
<share href="#t11"/>
</apply>
<share href="#t1"/>
</apply></pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="div4">
<h4><a name="contm.acyclicity" id="contm.acyclicity"></a>4.2.7.2 An Acyclicity Constraint
</h4>
<p>Say that an element <em>dominates</em> all its children and all
elements they dominate. Say also that a
<code>share</code> element dominates its target, i.e. the element that carries the
<code>id</code> attribute pointed to by the <code>href</code> attribute. For instance in the
representation on the right above, the <code>apply</code> element with <code>id="t1"</code> and also the
second <code>share</code> (with <code>href="t11"</code>) both dominate the
<code>apply</code> element with <code>id="t11"</code>.
</p>
<p>The occurrences of the <code>share</code> element must obey the following global
<em>acyclicity constraint</em>: An element may not dominate itself. For example, the
following representation violates this constraint:
</p><pre class="error">
<apply id="badid1"><csymbol cd="arith1">divide</csymbol>
<cn>1</cn>
<apply><csymbol cd="arith1">plus</csymbol>
<cn>1</cn>
<share href="#badid1"/>
</apply>
</apply></pre><p>Here, the <code>apply</code> element with <code>id="badid1"</code> dominates its third child,
which dominates the <code>share</code> element, which dominates its target: the element with
<code>id="badid1"</code>. So by transitivity, this element dominates itself. By the
acyclicity constraint, the example is not a valid MathML expression tree. It
might be argued that such an expression could be given the interpretation of the continued fraction
<img src="image/contfrac1.gif" alt=" \frac{1}{1 + \frac{1}{1 + \frac{1}{1 + \ldots}}}" align="middle">.
However, the procedure of building an expression tree by replacing
<code>share</code> element does not terminate for such an
expression, and hence such expressions are not allowed by Content MathML.
</p>
<p>Note that the acyclicity constraints is not restricted to such simple cases, as the following
example shows:
</p><pre class="error">
<apply id="bar"> <apply id="baz">
<csymbol cd="arith1">plus</csymbol> <csymbol cd="arith1">plus</csymbol>
<cn>1</cn> <cn>1</cn>
<share href="#baz"/> <share href="#bar"/>
</apply> </apply></pre><p>
Here, the <code>apply</code> with <code>id="bar"</code> dominates its third child, the
<code>share</code> with <code>href="#baz"</code>. That element dominates its target <code>apply</code>
(with <code>id="baz"</code>), which in turn dominates its third child, the <code>share</code>
with <code>href="#bar"</code>. Finally, the <code>share</code> with
<code>href="#bar"</code> dominates its target, the original
<code>apply</code> element with <code>id="bar"</code>. So this pair of representations
ultimately violates the acyclicity constraint.
</p>
</div>
<div class="div4">
<h4><a name="contm.share.binding" id="contm.share.binding"></a>4.2.7.3 Structure Sharing and Binding
</h4>
<p>Note that the <code>share</code> element is a <em>syntactic</em> referencing mechanism:
a <code>share</code> element stands for the exact element it points to. In particular,
referencing does not interact with binding in a semantically intuitive way, since it
allows a phenomenon called <em>variable capture</em> to
occur. Consider an example:
</p><pre class="mathml">
<bind id="outer"><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<apply><ci>f</ci>
<bind id="inner"><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<share id="copy" href="#orig"/>
</bind>
<apply id="orig"><ci>g</ci><ci>x</ci></apply>
</apply>
</bind></pre><p>
This represents a term
<img src="image/lamshare1.gif" alt="\lambda{x}.f(\lambda{x}.g(x),g(x))" align="middle">
which has two sub-terms of the form
<img src="image/lamshare2.gif" alt="g(x)" align="middle">,
one with <code>id="orig"</code>
(the one explicitly represented) and one with <code>id="copy"</code>,
represented by the <code>share</code> element.
In the original, explicitly-represented term,
the variable <var>x</var> is bound by the
<em>outer</em> <code>bind</code> element.
However, in the copy, the variable <var>x</var> is
bound by the <em>inner</em> <code>bind</code> element.
One says that the inner <code>bind</code>
has captured the variable <var>x</var>.
</p>
<p>Using references that capture variables in this way can easily lead to representation
errors, and is not recommended. For instance, using
α-conversion to rename the inner occurrence of <var>x</var>
into, say, <var>y</var> leads to the semantically equivalent expression
<img src="image/lamshare3.gif" alt="\lambda{x}.f(\lambda{y}.g(y),g(x))" align="middle">.
However, in this form, it is no longer possible to share the expression
<img src="image/lamshare2.gif" alt="g(x)" align="middle">.
Replacing <var>x</var> with <var>y</var> in the inner
<code>bvar</code> without replacing the <code>share</code> element results in a change
in semantics.
</p>
</div>
<div class="div4">
<h4><a name="contm.rendering.share" id="contm.rendering.share"></a>4.2.7.4 Rendering Expressions with Structure Sharing
</h4>
<p>There are several acceptable renderings for the <code>share</code> element. These include rendering the element
as a hypertext link to the referenced element and using the rendering of the element referenced by the
<code>href</code> attribute.
</p>
</div>
</div>
<div class="div3">
<h3><a name="contm.semantics" id="contm.semantics"></a>4.2.8 Attribution via <code>semantics</code></h3>
<p>Content elements can be annotated with additional information via the
<code>semantics</code> element. MathML uses the
<code>semantics</code> element to wrap the annotated element and the
<code>annotation-xml</code> and <code>annotation</code> elements used for representing the
annotations themselves. The use of the <code>semantics</code>, <code>annotation</code> and
<code>annotation-xml</code> is described in detail <a href="chapter5-d.html">Chapter 5 Mixing Markup Languages for Mathematical Expressions</a>.
</p>
<p>The <code>semantics</code> element is be considered part of both
presentation MathML and Content MathML. MathML considers a <code>semantics</code> element
(strict) Content MathML, if and only if its first child is (strict) Content MathML.
</p>
</div>
<div class="div3">
<h3><a name="contm.cerror" id="contm.cerror"></a>4.2.9 Error Markup <code><cerror></code></h3>
<table class="syntax">
<thead>
<tr>
<th></th>
<th>Schema Fragment (Strict)</th>
<th>Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.cerror">Error</a></td>
<td><a href="chapter4-d.html#contm.cerror">Error</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a></td>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>
<a href="appendixa-d.html#parsing_csymbol">csymbol</a>, <a href="appendixa-d.html#parsing_ContExp">ContExp</a>*
</td>
<td>
<a href="appendixa-d.html#parsing_csymbol">csymbol</a>, <a href="appendixa-d.html#parsing_ContExp">ContExp</a>*
</td>
</tr>
</tbody>
</table>
<p>A content error expression is made up of a <code>csymbol</code>
followed by a sequence of zero or more MathML expressions. The
initial expression must be a <code>csymbol</code> indicating the kind of
error. Subsequent children, if present, indicate the context in
which the error occurred.
</p>
<p>The <code>cerror</code> element has no direct mathematical meaning.
Errors occur as the result of some action performed on an expression
tree and are thus of real interest only when some sort of
communication is taking place. Errors may occur inside other objects
and also inside other errors.
</p>
<p>As an example, to encode a division by zero error, one might
employ a hypothetical <code>aritherror</code> Content Dictionary
containing a <code>DivisionByZero</code> symbol, as in the following
expression:
</p><pre class="mathml">
<cerror>
<csymbol cd="aritherror">DivisionByZero</csymbol>
<apply><csymbol cd="arith1">divide</csymbol><ci>x</ci><cn>0</cn></apply>
</cerror></pre><p>
Note that error markup generally should enclose only the smallest
erroneous sub-expression. Thus a <code>cerror</code> will often be a sub-expression of
a bigger one, e.g.
</p><pre class="mathml">
<apply><csymbol cd="relation1">eq</csymbol>
<cerror>
<csymbol cd="aritherror">DivisionByZero</csymbol>
<apply><csymbol cd="arith1">divide</csymbol><ci>x</ci><cn>0</cn></apply>
</cerror>
<cn>0</cn>
</apply></pre><p>The default presentation of a <code>cerror</code> element is an
<code>merror</code> expression whose first child is a presentation of the
error symbol, and whose subsequent children are the default
presentations of the remaining children of the <code>cerror</code>. In
particular, if one of the remaining children of the <code>cerror</code> is
a presentation MathML expression, it is used literally in the
corresponding <code>merror</code>.
</p>
<div class="mathml-example" id="contm.cerror.ex"><pre class="mathml">
<cerror>
<csymbol cd="aritherror">DivisionByZero</csymbol>
<apply><csymbol cd="arith1">divide</csymbol><ci>x</ci><cn>0</cn></apply>
</cerror></pre><p>Sample Presentation</p><pre class="mathml">
<merror>
<mtext>DivisionByZero:&#160;</mtext>
<mfrac><mi>x</mi><mn>0</mn></mfrac>
</merror></pre><blockquote>
<p><img src="image/cerror-ex.gif" alt="\hbox{DivisionByZero: } \frac{x}{0}"></p>
</blockquote>
</div>
<p>Note that when the context where an error occurs is so nonsensical
that its default presentation would not be useful, an application may
provide an alternative representation of the error context. For
example:
</p><pre class="mathml">
<cerror>
<csymbol cd="error">Illegal bound variable</csymbol>
<cs> &lt;bvar&gt;&lt;plus/&gt;&lt;/bvar&gt; </cs>
</cerror></pre></div>
<div class="div3">
<h3><a name="contm.cbytes" id="contm.cbytes"></a>4.2.10 Encoded Bytes <code><cbytes></code></h3>
<table class="syntax">
<thead>
<tr>
<th></th>
<th>Schema Fragment (Strict)</th>
<th>Schema Fragment (Full)</th>
</tr>
</thead>
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.cbytes">Cbytes</a></td>
<td><a href="chapter4-d.html#contm.cbytes">Cbytes</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a></td>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_base64">base64</a></td>
<td><a href="appendixa-d.html#parsing_base64">base64</a></td>
</tr>
</tbody>
</table>
<p>The content of <code>cbytes</code> represents a stream of bytes as a
sequence of characters in Base64 encoding, that is it matches the
base64Binary data type defined in <a href="appendixh-d.html#XMLSchemaDatatypes">[XMLSchemaDatatypes]</a>. All white space is ignored.
</p>
<p>The <code>cbytes</code> element is mainly used for OpenMath
compatibility, but may be used, as in OpenMath, to encapsulate output
from a system that may be hard to encode in MathML, such as binary
data relating to the internal state of a system, or image data.
</p>
<p>The rendering of <code>cbytes</code> is not expected to represent the
content and the proposed rendering is that of an empty
<code>mrow</code>. Typically <code>cbytes</code> is used in an
<code>annotation-xml</code> or is itself annotated with Presentation
MathML, so this default rendering should rarely be used.
</p>
</div>
</div>
<div class="div2">
<h2><a name="contm.structure.extended" id="contm.structure.extended"></a>4.3 Content MathML for Specific Structures
</h2>
<p>The elements of Strict Content MathML described in
<a href="chapter4-d.html#contm.core">the previous section</a> are sufficient to
encode logical assertions and expression structure, and they do so
in a way that closely models the standard constructions of
mathematical logic that underlie the foundations of mathematics. As a
consequence, Strict markup can be used to represent all of
mathematics, and is ideal for providing consistent mathematical
semantics for all Content MathML expressions.
</p>
<p>At the same time, many notational idioms of mathematics are not
straightforward to represent directly with Strict Content markup.
For example, standard notations for sums, integrals, sets, piecewise
functions and many other common constructions require non-obvious
technical devices, such as the introduction of lambda functions, to
rigorously encode them using Strict markup. Consequently, in order
to make Content MathML easier to use, a range of additional elements
have been provided for encoding such idiomatic constructs more
directly. This section discusses the general approach for encoding
such idiomatic constructs, and their Strict Content equivalents.
Specific constructions are discussed in detail in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>.
</p>
<p>Most idiomatic constructions which Content markup addresses fall
into about a dozen classes. Some of these classes, such as <a href="chapter4-d.html#contm.container"><em>container elements</em></a>, have
their own syntax. Similarly, a small number of non-Strict
constructions involve a single element with an exceptional syntax,
for example <code>partialdiff</code>. These exceptional elements are
discussed on a case-by-case basis in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. However, the majority of constructs consist of
classes of operator elements which all share a particular usage of
<a href="chapter4-d.html#contm.qualifiers"><em>qualifiers</em></a>.
These classes of operators are described in <a href="chapter4-d.html#contm.opclasses">Section 4.3.4 Operator Classes</a>.
</p>
<p>In all cases, non-Strict expressions may be rewritten using only
Strict markup. In most cases, the transformation is completely
algorithmic, and may be automated. Rewrite rules for classes of
non-Strict constructions are introduced and discussed later in this
section, and rewrite rules for exceptional constructs involving a
single operator are given in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. The
complete algorithm for rewriting arbitrary Content MathML as Strict
Content markup is summarized at the end of the Chapter in <a href="chapter4-d.html#contm.p2s">Section 4.6 The Strict Content MathML Transformation</a>.
</p>
<div class="div3">
<h3><a name="contm.container" id="contm.container"></a>4.3.1 Container Markup
</h3>
<p>Many mathematical structures are constructed from subparts or
parameters. The motivating example is a set. Informally, one
thinks of a set as a certain kind of mathematical object that
contains a collection of elements. Thus, it is intuitively natural
for the markup for a set to contain, in the XML sense, the markup
for its constituent elements. The markup may define the set
elements explicitly by enumerating them, or implicitly by rule,
using qualifier elements. However, in either case, the markup for
the elements is contained in the markup for the set, and
consequently this style of representation is termed
<em>container markup</em> in MathML. By contrast, Strict
markup represents an instance of a set as the result of applying a
function or <em>constructor symbol</em> to arguments. In this
style of markup, the markup for the set construction is a sibling
of the markup for the set elements in an enclosing <code>apply</code>
element.
</p>
<p>While the two approaches are formally equivalent, container
markup is generally more intuitive for non-expert authors to use, while
Strict markup is preferable is contexts where semantic rigor is
paramount. In addition, MathML 2 relied on container markup, and
thus container markup is necessary in cases where backward
compatibility is required.
</p>
<p>MathML provides container markup for the following mathematical
constructs: sets, lists, intervals, vectors, matrices (two
elements), piecewise functions (three elements) and lambda
functions. There are corresponding constructor symbols in Strict
markup for each of these, with the exception of lambda functions,
which correspond to binding symbols in Strict markup. Note that in
MathML 2, the term "container markup" was also taken to include
token elements, and the deprecated <code>declare</code>, <code>fn</code>
and <code>reln</code> elements, but MathML 3 limits usage of the term
to the above constructs.
</p>
<p>The rewrite rules for obtaining equivalent Strict Content
markup from container markup depend on the <a href="chapter4-d.html#contm.opclasses">operator class</a> of the particular
operator involved. For details about a specific container
element, obtain its operator class (and any applicable special
case information) by consulting the syntax table and discussion
for that element in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. Then apply the
rewrite rules for that specific operator class as described in
<a href="chapter4-d.html#contm.opclasses">Section 4.3.4 Operator Classes</a>.
</p>
<div class="div4">
<h4><a name="contm.container.constructor" id="contm.container.constructor"></a>4.3.1.1 Container Markup for Constructor Symbols
</h4>
<p>The arguments to container elements corresponding to
constructors may either be explicitly given as a sequence of child
elements, or they may be specified by a rule using qualifiers. The
only exceptions are the <code>piecewise</code>, <code>piece</code>, and
<code>otherwise</code> elements used for representing functions with
<a href="chapter4-d.html#contm.piecewise">piecewise</a> definitions. The
arguments of these elements must always be specified
explicitly.
</p>
<div class="strict-mathml-example" id="contm.strict-set">
<p>Here is an example of container markup with explicitly specified arguments:
</p><pre class="mathml"><set><ci>a</ci><ci>b</ci><ci>c</ci></set></pre><p>
This is equivalent to the following Strict Content MathML expression:
</p><pre class="strict-mathml"><apply><csymbol cd="set1">set</csymbol><ci>a</ci><ci>b</ci><ci>c</ci></apply></pre></div>
<div class="strict-mathml-example" id="contm.strict-set-bvar">
<p>Another example of container markup, where the list of arguments is
given indirectly as an expression with a bound variable. The container markup
for the set of even integers is:
</p><pre class="mathml">
<set>
<bvar><ci>x</ci></bvar>
<domainofapplication><integers/></domainofapplication>
<apply><times/><cn>2</cn><ci>x</ci></apply>
</set></pre><p>
This may be written as follows in Strict Content MathML:
</p><pre class="strict-mathml">
<apply><csymbol cd="set1">map</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<apply><csymbol cd="arith1">times</csymbol>
<cn>2</cn>
<ci>x</ci>
</apply>
</bind>
<csymbol cd="setname1">Z</csymbol>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.lambda.container" id="contm.lambda.container"></a>4.3.1.2 Container Markup for Binding Constructors
</h4>
<p>The <code>lambda</code> element is a container element
corresponding to the <a href="http://www.openmath.org/cd/fns1.xhtml#lambda">lambda</a> symbol
in the <a href="http://www.openmath.org/cd/fns1.xhtml">fns1</a> Content Dictionary. However, unlike the
container elements of the preceding section, which purely
construct mathematical objects from arguments, the <code>lambda</code>
element performs variable binding as well. Therefore, the child
elements of <code>lambda</code> have distinguished roles. In
particular, a <code>lambda</code> element must have at least one
<code>bvar</code> child, optionally followed by <a href="chapter4-d.html#contm.qualifiers">qualifier elements</a>, followed by a
Content MathML element. This basic difference between the
<code>lambda</code> container and the other constructor container
elements is also reflected in the OpenMath symbols to which they
correspond. The constructor symbols have an OpenMath role of
"application", while the lambda symbol has a role of "bind".
</p>
<div class="strict-mathml-example" id="contm.strict-lambda">
<p>This example shows the use of <code>lambda</code> container element and the equivalent use of <code>bind</code> in Strict Content MathML
</p><pre class="mathml"><lambda><bvar><ci>x</ci></bvar><ci>x</ci></lambda></pre><pre class="strict-mathml">
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar><ci>x</ci>
</bind></pre></div>
</div>
</div>
<div class="div3">
<h3><a name="contm.bind.apply" id="contm.bind.apply"></a>4.3.2 Bindings with <code><apply></code></h3>
<p>MathML allows the use of the <code>apply</code> element to perform
variable binding in non-Strict constructions instead of
the <code>bind</code> element. This usage conserves backwards
compatibility with MathML 2. It also simplifies the encoding of
several constructs involving bound variables with qualifiers as
described <a href="chapter4-d.html#contm.qualifiers">below</a>.
</p>
<p>Use of the <code>apply</code> element to bind variables is allowed
in two situations. First, when the operator to be applied is
itself a binding operator, the <code>apply</code> element merely
substitutes for the <code>bind</code> element. The logical quantifiers
<code><forall/></code>, <code><exists/></code> and the
container element <code>lambda</code> are the primary examples of this
type.
</p>
<p>The second situation arises when the operator being applied
allows the use of bound variables with qualifiers. The most
common examples are sums and integrals. In most of these cases,
the variable binding is to some extent implicit in the notation,
and the equivalent Strict representation requires the introduction
of auxiliary constructs such as lambda expressions for formal
correctness.
</p>
<p>Because expressions using bound variables with qualifiers are
idiomatic in nature, and do not always involve true variable
binding, one cannot expect systematic renaming (alpha-conversion)
of variables "bound" with <code>apply</code> to preserve meaning in
all cases. An example for this is the <code>diff</code> element where
the <code>bvar</code> term is technically not bound at all.
</p>
<div class="strict-mathml-example" id="contm.strict-apply-bvar">
<p>The following example illustrates the use of <code>apply</code>
with a binding operator. In these cases, the corresponding Strict
equivalent merely replaces the <code>apply</code> element with a
<code>bind</code> element:
</p><pre class="mathml">
<apply><forall/>
<bvar><ci>x</ci></bvar>
<apply><geq/><ci>x</ci><ci>x</ci></apply>
</apply></pre><p>
The equivalent Strict expression is:
</p><pre class="strict-mathml">
<bind><csymbol cd="logic1">forall</csymbol>
<bvar><ci>x</ci></bvar>
<apply><csymbol cd="relation1">geq</csymbol><ci>x</ci><ci>x</ci></apply>
</bind></pre></div>
<div class="strict-mathml-example" id="contm.strict-apply-bvar-2">
<p>In this example, the sum operator is not itself a binding
operator, but bound variables with qualifiers are implicit in the
standard notation, which is reflected in the non-Strict markup.
In the equivalent Strict representation, it is necessary to
convert the summand into a lambda expression, and recast the
qualifiers as an argument expression:
</p><pre class="mathml">
<apply><sum/>
<bvar><ci>i</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><cn>100</cn></uplimit>
<apply><power/><ci>x</ci><ci>i</ci></apply>
</apply></pre><p>
The equivalent Strict expression is:
</p><pre class="strict-mathml">
<apply><csymbol cd="arith1">sum</csymbol>
<apply><csymbol cd="interval1">integer_interval</csymbol>
<cn>0</cn>
<cn>100</cn>
</apply>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>i</ci></bvar>
<apply><csymbol cd="arith1">power</csymbol>
<ci>x</ci>
<ci>i</ci>
</apply>
</bind>
</apply></pre></div>
</div>
<div class="div3">
<h3><a name="contm.qualifiers" id="contm.qualifiers"></a>4.3.3 Qualifiers
</h3>
<p>Many common mathematical constructs involve an operator
together with some additional data. The additional data is either
implicit in conventional notation, such as a bound variable, or
thought of as part of the operator, as is the case with the limits
of a definite integral. MathML 3 uses <em>qualifier</em>
elements to represent the additional data in such cases.
</p>
<p>Qualifier elements are always used in conjunction with operator or container
elements. Their meaning is idiomatic, and depends on the context in which they are
used. When used with an operator, qualifiers always follow the operator and precede
any arguments that are present. In all cases, if more than one qualifier is present,
they appear in the order <code>bvar</code>, <code>lowlimit</code>, <code>uplimit</code>,
<code>interval</code>, <code>condition</code>, <code>domainofapplication</code>, <code>degree</code>,
<code>momentabout</code>, <code>logbase</code>.
</p>
<p>The precise function of qualifier elements depends on the
operator or container that they modify. The majority of use cases
fall into one of several categories, discussed below, and usage
notes for specific operators and qualifiers are given in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>.
</p>
<div class="div4">
<h4><a name="contm.domainofapplication.qualifier" id="contm.domainofapplication.qualifier"></a>4.3.3.1 Uses of
<code><domainofapplication></code>,
<code><interval></code>,
<code><condition></code>,
<code><lowlimit></code> and
<code><uplimit></code></h4>
<p>The primary use of <code>domainofapplication</code>, <code>interval</code>,
<code>uplimit</code>, <code>lowlimit</code> and <code>condition</code> is to
restrict the values of a bound variable. The most general qualifier
is <code>domainofapplication</code>. It is used to specify a set (perhaps
with additional structure, such as an ordering or metric) over which
an operation is to take place. The <code>interval</code> qualifier, and
the pair <code>lowlimit</code> and <code>uplimit</code> also restrict a bound
variable to a set in the special case where the set is an
interval. The <code>condition</code> qualifier, like
<code>domainofapplication</code>, is general, and can be used to restrict
bound variables to arbitrary sets. However, unlike the other
qualifiers, it restricts the bound variable by specifying a
Boolean-valued function of the bound variable. Thus,
<code>condition</code> qualifiers always contain instances of the bound
variable, and thus require a preceding <code>bvar</code>, while the other
qualifiers do not. The other qualifiers may even be used when no
variables are being bound, e.g. to indicate the restriction of a
function to a subdomain.
</p>
<p>In most cases, any of the qualifiers capable of representing the
domain of interest can be used interchangeably. The most general
qualifier is <code>domainofapplication</code>, and therefore has a
privileged role. It is the preferred form, unless there are
particular idiomatic reasons to use one of the other qualifiers,
e.g. limits for an integral. In MathML 3, the other forms are treated
as shorthand notations for <code>domainofapplication</code> because they
may all be rewritten as equivalent <code>domainofapplication</code>
constructions. The rewrite rules to do this are given below. The other
qualifier elements are provided because they correspond to common
notations and map more easily to familiar presentations. Therefore,
in the situations where they naturally arise, they may be more
convenient and direct than <code>domainofapplication</code>.
</p>
<p>To illustrate these ideas, consider the following examples showing alternative
representations of a definite integral. Let <var>C</var> denote the interval from 0 to 1,
and <var>f</var>(<var>x</var>) = <var>x</var><sup>2</sup>. Then
<code>domainofapplication</code> could be used express the integral of a
function <var>f</var> over
<var>C</var> in this way:
</p><pre class="mathml">
<apply><int/>
<domainofapplication>
<ci type="set">C</ci>
</domainofapplication>
<ci type="function">f</ci>
</apply></pre><p>Note that no explicit bound variable is identified in this
encoding, and the integrand is a function. Alternatively, the
<code>interval</code> qualifier could be used with an explicit bound variable:
</p><pre class="mathml">
<apply><int/>
<bvar><ci>x</ci></bvar>
<interval><cn>0</cn><cn>1</cn></interval>
<apply><power/><ci>x</ci><cn>2</cn></apply>
</apply></pre><p>The pair <code>lowlimit</code> and <code>uplimit</code> can also be used.
This is perhaps the most "standard" representation of this integral:
</p><pre class="mathml">
<apply><int/>
<bvar><ci>x</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><cn>1</cn></uplimit>
<apply><power/><ci>x</ci><cn>2</cn></apply>
</apply></pre><p>Finally, here is the same integral, represented using
a <code>condition</code> on the bound variable:
</p><pre class="mathml">
<apply><int/>
<bvar><ci>x</ci></bvar>
<condition>
<apply><and/>
<apply><leq/><cn>0</cn><ci>x</ci></apply>
<apply><leq/><ci>x</ci><cn>1</cn></apply>
</apply>
</condition>
<apply><power/><ci>x</ci><cn>2</cn></apply>
</apply></pre><p>
Note the use of the explicit bound variable within the
<code>condition</code> term. Note also that when a bound
variable is used, the integrand is an expression in the bound
variable, not a function.
</p>
<p>The general technique of using a <code>condition</code> element
together with <code>domainofapplication</code> is quite powerful. For
example, to extend the previous example to a multivariate domain, one
may use an extra bound variable and a domain of application
corresponding to a cartesian product:
</p><pre class="mathml">
<apply><int/>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<domainofapplication>
<set>
<bvar><ci>t</ci></bvar>
<bvar><ci>u</ci></bvar>
<condition>
<apply><and/>
<apply><leq/><cn>0</cn><ci>t</ci></apply>
<apply><leq/><ci>t</ci><cn>1</cn></apply>
<apply><leq/><cn>0</cn><ci>u</ci></apply>
<apply><leq/><ci>u</ci><cn>1</cn></apply>
</apply>
</condition>
<list><ci>t</ci><ci>u</ci></list>
</set>
</domainofapplication>
<apply><times/>
<apply><power/><ci>x</ci><cn>2</cn></apply>
<apply><power/><ci>y</ci><cn>3</cn></apply>
</apply>
</apply></pre><p>Note that the order of the inner and outer bound variables is significant.</p>
<p><em>Mappings to Strict Content MathML</em></p>
<p>When rewriting expressions to Strict Content MathML, qualifier
elements are removed via a series of rules described in this section.
The general algorithm for rewriting a MathML expression involving
qualifiers proceeds in two steps. First, constructs using the
<code>interval</code>, <code>condition</code>, <code>uplimit</code> and
<code>lowlimit</code> qualifiers are converted to constructs using only
<code>domainofapplication</code>. Second, <code>domainofapplication</code>
expressions are then rewritten as Strict Content markup.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.limits-strict" id="contm.limits-strict"></a>Rewrite: interval qualifier
</h5><pre class="mathml">
<apply> <span class="egmeta">H</span>
<bvar> <span class="egmeta">x</span> </bvar>
<lowlimit> <span class="egmeta">a</span> </lowlimit>
<uplimit> <span class="egmeta">b</span> </uplimit>
<span class="egmeta">C</span>
</apply></pre><pre class="strict-mathml">
<apply> <span class="egmeta">H</span>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication>
<apply><csymbol cd="interval1"><span class="egmeta">interval</span></csymbol>
<span class="egmeta">a</span>
<span class="egmeta">b</span>
</apply>
</domainofapplication>
<span class="egmeta">C</span>
</apply></pre><p>The symbol used in this translation depends on the head of the
application, denoted by <code> <span class="egmeta">H</span> </code>
here. By default <a href="http://www.openmath.org/cd/interval1.xhtml#interval">interval</a> should be
used, unless the semantics of the head term can be determined and
indicate a more specific interval symbols. In particular, several
predefined Content MathML element should be used with more specific
interval symbols. If the head is <code>int</code> then <a href="http://www.openmath.org/cd/interval1.xhtml#oriented_interval">oriented_interval</a> is used. When the head term
is <code>sum</code> or <code>product</code>, <a href="http://www.openmath.org/cd/interval1.xhtml#integer_interval">integer_interval</a> should be used.
</p>
<p>The above technique for replacing <code>lowlimit</code> and <code>uplimit</code> qualifiers
with a <code>domainofapplication</code> element is also used for replacing the
<code>interval</code> qualifier.
</p>
</div>
<p>The <code>condition</code> qualifier restricts a bound variable by specifying a
Boolean-valued expression on a larger domain, specifying whether a given value is in the
restricted domain. The <code>condition</code> element contains a single child that represents
the truth condition. Compound conditions are formed by applying Boolean operators such as
<code>and</code> in the condition.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.condition-strict" id="contm.condition-strict"></a>Rewrite: condition
</h5>
<p>To rewrite an expression using the <code>condition</code>
qualifier as one using <code>domainofapplication</code>,
</p><pre class="mathml-fragment">
<bvar> <span class="egmeta">x1</span> </bvar>
<bvar> <span class="egmeta">xn</span> </bvar>
<condition> <span class="egmeta">P</span> </condition></pre><p>
is rewritten to
</p><pre class="mathml-fragment">
<bvar> <span class="egmeta">x1</span> </bvar>
<bvar> <span class="egmeta">xn</span> </bvar>
<domainofapplication>
<apply><csymbol cd="set1">suchthat</csymbol>
<span class="egmeta">R</span>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x1</span> </bvar>
<bvar> <span class="egmeta">xn</span> </bvar>
<span class="egmeta">P</span>
</bind>
</apply>
</domainofapplication></pre><p>
If the <code>apply</code> has a <code>domainofapplication</code> (perhaps originally expressed as
<code>interval</code> or an <code>uplimit</code>/<code>lowlimit</code> pair) then that is used for
<code> <span class="egmeta">R</span> </code>. Otherwise <code> <span class="egmeta">R</span> </code> is a set determined by the <code>type</code> attribute
of the bound variable as specified in <a href="chapter4-d.html#contm.ci.extended">Section 4.2.2.2 Non-Strict uses of <code><ci></code></a>, if that is
present. If the type is unspecified, the translation introduces an unspecified domain via
content identifier <code><ci>R</ci></code>.
</p>
</div>
<p>By applying the rules above, expression using the
<code>interval</code>, <code>condition</code>, <code>uplimit</code> and
<code>lowlimit</code> can be rewritten using only
<code>domainofapplication</code>. Once a <code>domainofapplication</code> has
been obtained, the final mapping to Strict markup is accomplished
using the following rules:
</p>
<div class="strict-mathml-example">
<h5><a name="contm.strict-doa" id="contm.strict-doa"></a>Rewrite: restriction
</h5>
<p>An application of a function that is qualified by the
<code>domainofapplication</code> qualifier (expressed by an <code>apply</code> element without
bound variables) is converted to an application of a function term constructed with the
<a href="http://www.openmath.org/cd/fns1.xhtml#restriction">restriction</a> symbol.
</p><pre class="mathml">
<apply> <span class="egmeta">F</span>
<domainofapplication>
<span class="egmeta">C</span>
</domainofapplication>
<span class="egmeta">a1</span>
<span class="egmeta">an</span>
</apply></pre><p>may be written as:</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="fns1">restriction</csymbol>
<span class="egmeta">F</span>
<span class="egmeta">C</span>
</apply>
<span class="egmeta">a1</span>
<span class="egmeta">an</span>
</apply></pre></div>
<p>In general, an application involving bound variables and (possibly) <code>domainofapplication</code> is rewritten using the following rule, which makes the domain the first positional argument of the application, and uses
the lambda symbol to encode the variable bindings. Certain classes of operator have alternative rules, as described below.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.dombind-strict" id="contm.dombind-strict"></a>Rewrite: apply bvar domainofapplication
</h5>
<p>A content MathML expression with bound variables and
<code>domainofapplication</code>
</p><pre class="mathml-fragment">
<apply> <span class="egmeta">H</span>
<bvar> <span class="egmeta">v1</span> </bvar>
...
<bvar> <span class="egmeta">vn</span> </bvar>
<domainofapplication> <span class="egmeta">D</span> </domainofapplication>
<span class="egmeta">A1</span>
...
<span class="egmeta">Am</span>
</apply></pre><p>
is rewritten to
</p><pre class="mathml-fragment">
<apply> <span class="egmeta">H</span>
<span class="egmeta">D</span>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">v1</span> </bvar>
...
<bvar> <span class="egmeta">vn</span> </bvar>
<span class="egmeta">A1</span>
</bind>
...
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">v1</span> </bvar>
...
<bvar> <span class="egmeta">vn</span> </bvar>
<span class="egmeta">Am</span>
</bind>
</apply></pre><p>
If there is no <code>domainofapplication</code> qualifier the <code> <span class="egmeta">D</span> </code> child is
omitted.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.degree" id="contm.degree"></a>4.3.3.2 Uses of <code><degree></code></h4>
<p>The <code>degree</code> element is a qualifier used to specify the
"degree" or "order" of an operation. MathML uses the
<code>degree</code> element in this way in three contexts: to specify the degree of a
root, a moment, and in various derivatives. Rather than introduce special elements for
each of these families, MathML provides a single general construct, the
<code>degree</code> element in all three cases.
</p>
<p>Note that the <code>degree</code> qualifier is not used to restrict a bound variable in
the same sense of the qualifiers discussed above. Indeed, with roots and moments, no
bound variable is involved at all, either explicitly or implicitly. In the case of
differentiation, the <code>degree</code> element is used in conjunction with a
<code>bvar</code>, but even in these cases, the variable may not be genuinely bound.
</p>
<p>For the usage of <code>degree</code> with the <a href="chapter4-d.html#contm.root"><code>root</code></a> and <a href="chapter4-d.html#contm.moment"><code>moment</code></a> operators, see the discussion of those
operators below. The usage of <code>degree</code> in differentiation is more complex. In
general, the <code>degree</code> element indicates the order of the derivative with
respect to that variable. The degree element is allowed as the second child of a
<code>bvar</code> element identifying a variable with respect to which the derivative is
being taken. Here is an example of a second derivative using the <code>degree</code>
qualifier:
</p><pre class="mathml">
<apply><diff/>
<bvar>
<ci>x</ci>
<degree><cn>2</cn></degree>
</bvar>
<apply><power/><ci>x</ci><cn>4</cn></apply>
</apply></pre><p>For details see <a href="chapter4-d.html#contm.diff">Section 4.4.4.2 Differentiation <code><diff/></code></a> and <a href="chapter4-d.html#contm.partialdiff">Section 4.4.4.3 Partial Differentiation <code><partialdiff/></code></a>.
</p>
</div>
<div class="div4">
<h4><a name="contm.otherqualifiers" id="contm.otherqualifiers"></a>4.3.3.3 Uses of <code><momentabout></code> and <code><logbase></code></h4>
<p>The qualifiers <code>momentabout</code> and <code>logbase</code> are
specialized elements specifically for use with the <a href="chapter4-d.html#contm.moment"><code>moment</code></a>
and <a href="chapter4-d.html#contm.log"><code>log</code></a> operators
respectively. See the descriptions of those operators below for their usage.
</p>
</div>
</div>
<div class="div3">
<h3><a name="contm.opclasses" id="contm.opclasses"></a>4.3.4 Operator Classes
</h3>
<p>The Content MathML elements described in detail in the next section
may be broadly separated into <em>classes</em>. The class of each
element is shown in the syntax table that introduces the element in
<a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. The class gives an indication of the
general intended mathematical usage of the element, and also
determines its usage as determined by the schema. The class also
determines the applicable rewrite rules for mapping to Strict Content
MathML. This section presents the rewrite rules for each of the
operator classes.
</p>
<p>The rules in this section cover the use cases applicable to
specific operator classes. Special-case rewrite rules for individual
elements are discussed in the sections below. However, the most
common usage pattern is generic, and is used by operators from almost all
operator classes. It consists of applying an operator to an explicit list
of arguments using an <code>apply</code> element. In these cases,
rewriting to Strict Content MathML is simply a matter of replacing the
empty element with an appropriate <code>csymbol</code>, as listed in the
syntax tables in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. This is summarized in
the following rule.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.strict-opel" id="contm.strict-opel"></a>Rewrite: element
</h5>
<p> For example,</p><pre class="mathml"><span class="egmeta"><plus/></span></pre><p>is equivalent to the Strict form
</p><pre class="strict-mathml"><csymbol cd="<span class="egmeta">arith1</span>"><span class="egmeta">plus</span></csymbol></pre></div>
<p>In MathML 2, the <code>definitionURL</code> attribute could be
used to redefine or modify the meaning of an operator element. When the <code>definitionURL</code>
attribute is present, the value for the <code>cd</code> attribute on the <code>csymbol</code> should be
determined by the <code>definitionURL</code> value if possible. The correspondence between <code>cd</code> and <code>definitionURL</code> values is described <a href="chapter4-d.html#contm.csymbol.extended">Section 4.2.3.2 Non-Strict uses of <code><csymbol></code></a>.
</p>
<div class="div4">
<h4><a name="contm.nary" id="contm.nary"></a>4.3.4.1 N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)
</h4>
<p>Many MathML operators may be used with an arbitrary number of
arguments. The corresponding OpenMath symbols for elements in these classes
also take an arbitrary number of arguments.
In all such cases, either the arguments my be given
explicitly as children of the <code>apply</code> or <code>bind</code> element, or
the list may be specified implicitly via the use of qualifier
elements.
</p>
<div class="div5">
<h5><a name="contm.nary.schema" id="contm.nary.schema"></a>4.3.4.1.1 Schema Patterns
</h5>
<p>The elements representing these n-ary operators are
specified in the following schema patterns in <a href="appendixa-d.html">Appendix A Parsing MathML</a>:
<a href="appendixa-d.html#parsing_nary-arith.class">nary-arith.class</a>, <a href="appendixa-d.html#parsing_nary-functional.class">nary-functional.class</a>, <a href="appendixa-d.html#parsing_nary-logical.class">nary-logical.class</a>,
<a href="appendixa-d.html#parsing_nary-linalg.class">nary-linalg.class</a>, <a href="appendixa-d.html#parsing_nary-set.class">nary-set.class</a>, <a href="appendixa-d.html#parsing_nary-constructor.class">nary-constructor.class</a>.
</p>
</div>
<div class="div5">
<h5><a name="contm.nary.rewrite" id="contm.nary.rewrite"></a>4.3.4.1.2 Rewriting to Strict Content MathML
</h5>
<p>If the argument list is given explicitly, the <a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a> rule applies.
</p>
<p>Any use of qualifier elements is expressed in Strict Content
MathML, via explicitly applying the function to a list of arguments
using the <a href="http://www.openmath.org/cd/fns2.xhtml#apply_to_list">apply_to_list</a> symbol as shown
in the following rule. The rule only considers the
<code>domainofapplication</code> qualifier as other qualifiers may be
rewritten to <code>domainofapplication</code> as described earlier.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.lifted" id="contm.p2s.lifted"></a>Rewrite: n-ary domainofapplication
</h5>
<p>An expression of the following form,
where <code><span class="egmeta"><union/></span></code> represents any
element of the relevant class and
<code> <span class="egmeta">expression-in-x</span> </code>
is an arbitrary expression involving the bound variable(s)
</p><pre class="mathml">
<apply><span class="egmeta"><union/></span>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication> <span class="egmeta">D</span> </domainofapplication>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
is rewritten to
</p><pre class="strict-mathml">
<apply><csymbol cd="fns2">apply_to_list</csymbol>
<csymbol cd="<span class="egmeta">set1</span>"><span class="egmeta">union</span></csymbol>
<apply><csymbol cd="list1">map</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
<span class="egmeta">D</span>
</apply>
</apply></pre></div>
<p>The above rule applies to all symbols in the listed classes.
In the case of <b>nary-set.class</b> the choice of Content
Dictionary to use depends on the <code>type</code> attribute on the
symbol, defaulting to <a href="http://www.openmath.org/cd/set1.xhtml">set1</a>, but <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a>
should be used if <code>type</code>="multiset".
</p>
<p>Note that the members of the <b>nary-constructor.class</b>, such
as <code>vector</code>, use <em>constructor</em> syntax where the arguments and
qualifiers are given as children of the element rather than as
children of a containing <code>apply</code>. In this case, the above rules apply
with the analogous syntactic modifications.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.nary.setlist" id="contm.nary.setlist"></a>4.3.4.2 N-ary Constructors for set and list (class nary-setlist-constructor)
</h4>
<p>The use of <code>set</code> and <code>list</code> follows the same format
as other n-ary constructors, however when rewriting to Strict
Content MathML a variant of the above rule is used. This is because the <a href="http://www.openmath.org/cd/set1.xhtml#map">map</a>
symbol implicitly constructs the required set or list, and <a href="http://www.openmath.org/cd/fns2.xhtml#apply_to_list">apply_to_list</a> is
not needed in this case.
</p>
<div class="div5">
<h5><a name="contm.narysetlist.schema" id="contm.narysetlist.schema"></a>4.3.4.2.1 Schema Patterns
</h5>
<p>The elements representing these n-ary operators are
specified in the schema pattern <a href="appendixa-d.html#parsing_nary-setlist-constructor.class">nary-setlist-constructor.class</a>.
</p>
</div>
<div class="div5">
<h5><a name="contm.narysetlist.rewrite" id="contm.narysetlist.rewrite"></a>4.3.4.2.2 Rewriting to Strict Content MathML
</h5>
<p>If the argument list is given explicitly, the <a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a> rule applies.
</p>
<p>When qualifiers are used to specify the list of arguments, the following rule is used.</p>
<div class="strict-mathml-example">
<h5><a name="contm.rewrite.setliste" id="contm.rewrite.setliste"></a>Rewrite: n-ary setlist domainofapplication
</h5>
<p>An expression of the following form,
where <code><span class="egmeta"><set/></span></code> is either of the elements <code>set</code> or <code>list</code> and
<code> <span class="egmeta">expression-in-x</span> </code>
is an arbitrary expression involving the bound variable(s)
</p><pre class="mathml">
<span class="egmeta"><set></span>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication> <span class="egmeta">D</span> </domainofapplication>
<span class="egmeta">expression-in-x</span>
<span class="egmeta"></set></span></pre><p>
is rewritten to
</p><pre class="strict-mathml">
<apply><csymbol cd="<span class="egmeta">set1</span>">map</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
<span class="egmeta">D</span>
</apply></pre><p>Note that
when <code> <span class="egmeta">D</span> </code> is already a set
or list of the appropriate type for the container element, and the lambda function created
from <code> <span class="egmeta">expression-in-x</span> </code> is
the identity, the entire container element should be rewritten
directly as <code> <span class="egmeta">D</span> </code>.
</p>
</div>
<p>In the case of <code>set</code>, the choice of Content
Dictionary and symbol depends on the value of its <code>type</code> attribute. When the
<code>type</code> attribute is "set", the <a href="http://www.openmath.org/cd/set1.xhtml#set">set</a> symbol is used. When the
<code>type</code> attribute is "multiset", the <a href="http://www.openmath.org/cd/multiset1.xhtml#multiset">multiset</a> symbol is used. For any other values of type
the <a href="http://www.openmath.org/cd/set1.xhtml#set">set</a> symbol should be used, annotated with the type
by rewriting the <code>type</code> attribute using the rule
<a href="chapter4-d.html#contm.strict-attributes">Rewrite: attributes</a>.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.nary.reln" id="contm.nary.reln"></a>4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)
</h4>
<p>MathML allows transitive relations to be used with multiple
arguments, to give a natural expression to "chains" of
relations such as <var>a</var> < <var>b</var> < <var>c</var> <
<var>d</var>. However unlike the case of the arithmetic operators, the
underlying symbols used in the Strict Content MathML are classed as
binary, so it is not possible to use
<a href="http://www.openmath.org/cd/fns2.xhtml#apply_to_list">apply_to_list</a> as in the previous
section, but instead a similar function
<a href="http://www.openmath.org/cd/fns2.xhtml#predicate_on_list">predicate_on_list</a> is used, the
semantics of which is essentially to take the conjunction of applying
the predicate to elements of the domain two at a time.
</p>
<div class="div5">
<h5><a name="contm.nary.reln.schema" id="contm.nary.reln.schema"></a>4.3.4.3.1 Schema Patterns
</h5>
<p>The elements representing these n-ary operators are
specified in the following schema patterns in <a href="appendixa-d.html">Appendix A Parsing MathML</a>:
<a href="appendixa-d.html#parsing_nary-reln.class">nary-reln.class</a>, <a href="appendixa-d.html#parsing_nary-set-reln.class">nary-set-reln.class</a>.
</p>
</div>
<div class="div5">
<h5><a name="contm.nary.reln.rewrite" id="contm.nary.reln.rewrite"></a>4.3.4.3.2 Rewriting to Strict Content MathML
</h5>
<div class="strict-mathml-example">
<h5><a name="contm.rewrite.reln" id="contm.rewrite.reln"></a>Rewrite: n-ary relations
</h5>
<p>An expression of the form
</p><pre class="mathml">
<apply><span class="egmeta"><lt/></span>
<span class="egmeta">a</span> <span class="egmeta">b</span> <span class="egmeta">c</span> <span class="egmeta">d</span>
</apply></pre><p>
rewrites to Strict Content MathML
</p><pre class="mathml">
<apply><csymbol cd="fns2">predicate_on_list</csymbol>
<csymbol cd="<span class="egmeta">reln1</span>"><span class="egmeta">lt</span></csymbol>
<apply><csymbol cd="list1">list</csymbol>
<span class="egmeta">a</span> <span class="egmeta">b</span> <span class="egmeta">c</span> <span class="egmeta">d</span>
</apply>
</apply>
</pre></div>
<div class="strict-mathml-example">
<h5><a name="contm.rewrite.reln.bvar" id="contm.rewrite.reln.bvar"></a>Rewrite: n-ary relations bvar
</h5>
<p>An expression of the form
</p><pre class="mathml">
<apply><span class="egmeta"><lt/></span>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication> <span class="egmeta">R</span> </domainofapplication>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
where
<code> <span class="egmeta">expression-in-x</span> </code>
is an arbitrary expression involving the bound variable, rewrites to the Strict Content MathML
</p><pre class="mathml">
<apply><csymbol cd="fns2">predicate_on_list</csymbol>
<csymbol cd="<span class="egmeta">reln1</span>"><span class="egmeta">lt</span></csymbol>
<apply><csymbol cd="list1">map</csymbol>
<span class="egmeta">R</span>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
</apply>
</apply></pre></div>
<p>The above rules apply to all symbols in classes <b>nary-reln.class</b>
and <b>nary-set-reln.class</b>. In the latter case the choice of Content
Dictionary to use depends on the <code>type</code> attribute on the
symbol, defaulting to <a href="http://www.openmath.org/cd/set1.xhtml">set1</a>, but <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a>
should be used if <code>type</code>="multiset".
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.nary.unary" id="contm.nary.unary"></a>4.3.4.4 N-ary/Unary Operators (classes nary-minmax, nary-stats)
</h4>
<p>The MathML elements, <code>max</code>, <code>min</code> and some statistical
elements such as <code>mean</code> may be used as a n-ary function as in
the above classes, however a special interpretation is given in the
case that a single argument is supplied. If a single argument is
supplied the function is applied to the elements represented by the
argument.
</p>
<p>The underlying symbol used in Strict Content MathML for these
elements is <em>Unary</em> and so if the MathML is used with
0 or more than 1 arguments, the function is applied to the set
constructed from the explicitly supplied arguments according to the
following rule.
</p>
<div class="div5">
<h5><a name="contm.nary.unary.schema" id="contm.nary.unary.schema"></a>4.3.4.4.1 Schema Patterns
</h5>
<p>The elements representing these n-ary operators are
specified in the following schema patterns in <a href="appendixa-d.html">Appendix A Parsing MathML</a>:
<a href="appendixa-d.html#parsing_nary-minmax.class">nary-minmax.class</a>, <a href="appendixa-d.html#parsing_nary-stats.class">nary-stats.class</a>.
</p>
</div>
<div class="div5">
<h5><a name="contm.nary.unary.rewrite" id="contm.nary.unary.rewrite"></a>4.3.4.4.2 Rewriting to Strict Content MathML
</h5>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.max" id="contm.p2s.max"></a>Rewrite: n-ary unary set
</h5>
<p>When an element,
<code><span class="egmeta"><max/></span></code>, of class nary-stats or nary-minmax
is applied to an explicit
list of 0 or 2 or more arguments,
<code> <span class="egmeta">a1</span> <span class="egmeta">a2</span> <span class="egmeta">an</span> </code>
</p><pre class="mathml">
<apply><span class="egmeta"><max/></span> <span class="egmeta">a1</span> <span class="egmeta">a2</span> <span class="egmeta">an</span> </apply></pre><p>It is is translated to the unary application of the symbol
<code><csymbol cd="<span class="egmeta">minmax1</span>" name="<span class="egmeta">max</span>"/></code>
as specified in the syntax table for the element to the set of
arguments, constructed using the
<code><csymbol cd="set1" name="set"/></code>
symbol.
</p><pre class="strict-mathml">
<apply><csymbol cd="<span class="egmeta">minmax1</span>"><span class="egmeta">max</span></csymbol>
<apply><csymbol cd="set1">set</csymbol>
<span class="egmeta">a1</span> <span class="egmeta">a2</span> <span class="egmeta">an</span>
</apply>
</apply></pre></div>
<p>Like all MathML n-ary operators, The list of arguments may be
specified implicitly using qualifier elements. This is expressed in
Strict Content MathML using the following rule, which is similar to
the rule <a href="chapter4-d.html#contm.p2s.lifted">Rewrite: n-ary domainofapplication</a> but differs in that the
symbol can be directly applied to the constructed set of arguments and
it is not necessary to use <a href="http://www.openmath.org/cd/fns2.xhtml#apply_to_list">apply_to_list</a>.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.unary.nary.doma" id="contm.unary.nary.doma"></a>Rewrite: n-ary unary domainofapplication
</h5>
<p>An expression of the following form,
where <code><span class="egmeta"><max/></span></code> represents any
element of the relevant class and
<code> <span class="egmeta">expression-in-x</span> </code>
is an arbitrary expression involving the bound variable(s)
</p><pre class="mathml">
<apply><span class="egmeta"><max/></span>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication> <span class="egmeta">D</span> </domainofapplication>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
is rewritten to
</p><pre class="strict-mathml">
<apply><csymbol cd="<span class="egmeta">minmax1</span>"><span class="egmeta">max</span></csymbol>
<apply><csymbol cd="set1">map</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
<span class="egmeta">D</span>
</apply>
</apply></pre><p>Note that
when <code> <span class="egmeta">D</span> </code> is already a set
and the lambda function created from <code> <span class="egmeta">expression-in-x</span> </code> is
the identity, the <code>domainofapplication</code> term should should be
rewritten directly
as <code> <span class="egmeta">D</span> </code>.
</p>
</div>
<p>If the element is applied to a single argument the
<a href="http://www.openmath.org/cd/set1.xhtml#set">set</a> symbol is not used and the symbol is
applied directly to the argument.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.nary.unary.single" id="contm.nary.unary.single"></a>Rewrite: n-ary unary single
</h5>
<p>When an element,
<code><span class="egmeta"><max/></span></code>, of class nary-stats or nary-minmax
is applied to a single argument,
</p><pre class="mathml">
<apply><span class="egmeta"><max/></span> <span class="egmeta">a</span> </apply></pre><p>It is is translated to the unary application of the symbol
in the syntax table for the element.
</p><pre class="strict-mathml">
<apply><csymbol cd="<span class="egmeta">minmax1</span>"><span class="egmeta">max</span></csymbol> <span class="egmeta">a</span> </apply></pre></div>
<p>Note: Earlier versions of MathML were not explicit about the correct
interpretation of elements in this class, and left it undefined as to
whether an expression such as max(X) was a trivial application of max
to a singleton, or whether it should be interpreted as meaning the
maximum of values of the set X. Applications finding that the rule
<a href="chapter4-d.html#contm.nary.unary.single">Rewrite: n-ary unary single</a> can not be applied as the
supplied argument is a scalar may wish to use the rule
<a href="chapter4-d.html#contm.p2s.max">Rewrite: n-ary unary set</a> as an error recovery.
As a further complication, in the case of the statistical functions
the Content Dictionary to use in this case depends on the desired
interpretation of the argument as a set of explicit data or a random
variable representing a distribution.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.binary" id="contm.binary"></a>4.3.4.5 Binary Operators (classes binary-arith, binary-logical, binary-reln, binary-linalg, binary-set)
</h4>
<p>Binary operators take two arguments and simply map to OpenMath
symbols via <a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>
without the need of any special rewrite rules. The binary
constructor <code>interval</code> is similar but uses constructor syntax
in which the arguments are children of the element, and the symbol
used depends on the type element as described in <a href="chapter4-d.html#contm.interval">Section 4.4.1.1 Interval <code><interval></code></a>
</p>
<div class="div5">
<h5><a name="contm.binary.schema" id="contm.binary.schema"></a>4.3.4.5.1 Schema Patterns
</h5>
<p>The elements representing these binary operators are
specified in the following schema patterns in <a href="appendixa-d.html">Appendix A Parsing MathML</a>:
<a href="appendixa-d.html#parsing_binary-arith.class">binary-arith.class</a>, <a href="appendixa-d.html#parsing_binary-logical.class">binary-logical.class</a>, <a href="appendixa-d.html#parsing_binary-reln.class">binary-reln.class</a>, <a href="appendixa-d.html#parsing_binary-linalg.class">binary-linalg.class</a>, <a href="appendixa-d.html#parsing_binary-set.class">binary-set.class</a>.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.unary" id="contm.unary"></a>4.3.4.6 Unary Operators (classes unary-arith, unary-linalg, unary-functional, unary-set, unary-elementary, unary-veccalc)
</h4>
<p>Unary operators take a single argument and map to OpenMath symbols
via <a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a> without the need of any special rewrite rules.
</p>
<div class="div5">
<h5><a name="contm.unary.schema" id="contm.unary.schema"></a>4.3.4.6.1 Schema Patterns
</h5>
<p>The elements representing these unary operators are
specified in the following schema patterns in <a href="appendixa-d.html">Appendix A Parsing MathML</a>:
<a href="appendixa-d.html#parsing_unary-arith.class">unary-arith.class</a>, <a href="appendixa-d.html#parsing_unary-functional.class">unary-functional.class</a>, <a href="appendixa-d.html#parsing_unary-set.class">unary-set.class</a>, <a href="appendixa-d.html#parsing_unary-elementary.class">unary-elementary.class</a>, <a href="appendixa-d.html#parsing_unary-veccalc.class">unary-veccalc.class</a>.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.constant" id="contm.constant"></a>4.3.4.7 Constants (classes constant-arith, constant-set)
</h4>
<p>Constant symbols relate to mathematical constants such as e and true and
also to names of sets such as the Real Numbers, and Integers.
In Strict Content MathML, they rewrite simply to the corresponding
symbol listed in the syntax tables for these elements in <a href="chapter4-d.html#contm.constantsandsymbols">Section 4.4.10 Constant and Symbol Elements</a>.
</p>
<div class="div5">
<h5><a name="contm.constant.schema" id="contm.constant.schema"></a>4.3.4.7.1 Schema Patterns
</h5>
<p>The elements representing these constants are
specified in the schema patterns
<a href="appendixa-d.html#parsing_constant-arith.class">constant-arith.class</a> and <a href="appendixa-d.html#parsing_constant-set.class">constant-set.class</a>.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.quantifier" id="contm.quantifier"></a>4.3.4.8 Quantifiers (class quantifier)
</h4>
<p>The Quantifier class is used for the forall and exists quantifiers
of predicate calculus.
</p>
<div class="div5">
<h5><a name="contm.quantifier.schema" id="contm.quantifier.schema"></a>4.3.4.8.1 Schema Patterns
</h5>
<p>The elements representing quantifiers are
specified in the schema pattern <a href="appendixa-d.html#parsing_quantifier.class">quantifier.class</a>.
</p>
</div>
<div class="div5">
<h5><a name="contm.quantifier.rewrite" id="contm.quantifier.rewrite"></a>4.3.4.8.2 Rewriting to Strict Content MathML
</h5>
<p>If used with <code>bind</code> and no qualifiers,
then the interpretation in Strict Content MathML is simple. In general
if used with <code>apply</code> or qualifiers, the interpretation in
Strict Content MathML is via the following rule.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.rewrite.quantifier" id="contm.rewrite.quantifier"></a>Rewrite: quantifier
</h5>
<p> An expression of following form where
<code><span class="egmeta"><exists/></span></code> denotes an element of
class <b>quantifier</b> and
<code> <span class="egmeta">expression-in-x</span> </code>
is an arbitrary expression involving the bound variable(s)
</p><pre class="mathml">
<apply><span class="egmeta"><exists/></span>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication> <span class="egmeta">D</span> </domainofapplication>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
is rewritten to an expression
</p><pre class="strict-mathml">
<bind><csymbol cd="<span class="egmeta">quant1</span>"><span class="egmeta">exists</span></csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<apply><csymbol cd="<span class="egmeta">logic1</span>"><span class="egmeta">and</span></csymbol>
<apply><csymbol cd="set1">in</csymbol> <span class="egmeta">x</span> <span class="egmeta">D</span> </apply>
<span class="egmeta">expression-in-x</span>
</apply>
</bind>
</pre><p>
where the symbols
<code><csymbol cd="<span class="egmeta">quant1</span>"><span class="egmeta">exists</span></csymbol></code>
and
<code><csymbol cd="<span class="egmeta">logic1</span>"><span class="egmeta">and</span></csymbol></code>
are as specified in the syntax table of the element.
(The additional symbol being
<a href="http://www.openmath.org/cd/logic1.xhtml#and">and</a> in the case of <code>exists</code> and
<a href="http://www.openmath.org/cd/logic1.xhtml#implies">implies</a> in the case of <code>forall</code>.) When no
<code>domainofapplication</code> is present, no logical conjunction is necessary, and the translation
is direct.
</p>
</div>
</div>
</div>
<div class="div4">
<h4><a name="contm.otherclass" id="contm.otherclass"></a>4.3.4.9 Other Operators (classes lambda, interval, int, diff partialdiff, sum, product, limit)
</h4>
<p>Special purpose classes, described in the sections for the
appropriate elements
</p>
<div class="div5">
<h5><a name="contm.otherclass.schema" id="contm.otherclass.schema"></a>4.3.4.9.1 Schema Patterns
</h5>
<p>The elements are specified in the following schema patterns in <a href="appendixa-d.html">Appendix A Parsing MathML</a>:
<a href="appendixa-d.html#parsing_lambda.class">lambda.class</a>, <a href="appendixa-d.html#parsing_interval.class">interval.class</a>, <a href="appendixa-d.html#parsing_int.class">int.class</a>, <a href="appendixa-d.html#parsing_partialdiff.class">partialdiff.class</a>, <a href="appendixa-d.html#parsing_sum.class">sum.class</a>, <a href="appendixa-d.html#parsing_product.class">product.class</a>, <a href="appendixa-d.html#parsing_limit.class">limit.class</a>.
</p>
</div>
</div>
</div>
<div class="div3">
<h3><a name="id.4.3.5" id="id.4.3.5"></a>4.3.5 Non-strict Attributes
</h3>
<p>A number of content MathML elements such as <code>cn</code> and
<code>interval</code> allow attributes to specialize the semantics of the
objects they represent. For these cases, special rewrite rules are
given on a case-by-case basis in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. However,
content MathML elements also accept <a href="chapter2-d.html#fund.globatt">attributes shared all MathML elements</a>, and
depending on the context, may also contain attributes from other XML
namespaces. Such attributes must be rewritten in alternative form in
Strict Content Markup.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.strict-attributes" id="contm.strict-attributes"></a>Rewrite: attributes
</h5>
<p> For instance,
</p><pre class="mathml">
<ci class="<span class="egmeta">foo</span>" xmlns:other="<span class="egmeta">http://example.com</span>" other:att="<span class="egmeta">bla</span>"><span class="egmeta">x</span></ci></pre><p>
is rewritten to
</p><pre class="strict-mathml">
<semantics>
<ci><span class="egmeta">x</span></ci>
<annotation cd="mathmlattr"
name="class" encoding="text/plain"><span class="egmeta">foo</span></annotation>
<annotation-xml cd="mathmlattr" name="foreign" encoding="MathML-Content">
<apply><csymbol cd="mathmlattr">foreign_attribute</csymbol>
<cs><span class="egmeta">http://example.com</span></cs>
<cs><span class="egmeta">other</span></cs>
<cs><span class="egmeta">att</span></cs>
<cs><span class="egmeta">bla</span></cs>
</apply>
</annotation-xml>
</semantics></pre><p>
For MathML attributes not allowed in Strict Content MathML the content
dictionary <a href="http://www.openmath.org/cd/mathmlattr.xhtml">mathmlattr</a> is referenced, which provides
symbols for all attributes allowed on content MathML
elements.
</p>
</div>
</div>
</div>
<div class="div2">
<h2><a name="contm.opel" id="contm.opel"></a>4.4 Content MathML for Specific Operators and Constants
</h2>
<p>This section presents elements representing a core set of
mathematical operators, functions and constants. Most are empty
elements, covering the subject matter of standard mathematics
curricula up to the level of calculus. The remaining elements are
<a href="chapter4-d.html#contm.container">container</a> elements for
sets, intervals, vectors and so on. For brevity, all elements
defined in this section are sometimes called <em>operator
elements</em>.
</p>
<p>Each subsection below discusses a specific operator element,
beginning with a syntax table, giving the elements <a href="chapter4-d.html#contm.opclasses">operator class</a>. Special case rules
for rewriting as Strict Markup are introduced as needed.
However, in most cases, the generic rewrite rules for the
appropriate operator class is sufficient. In particular, unless
otherwise indicated, elements are to be rewritten using the
default <a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>
rule. Note, however, that all elements in this section must be rewritten in
some fashion, since they are not allowed in Strict Content markup.
</p>
<p>In MathML 2, the <code>definitionURL</code> attribute could be
used to redefine or modify the meaning of an operator
element. This use of the <code>definitionURL</code> attribute is <a href="chapter2-d.html#interf.deprec">deprecated</a> in MathML 3. Instead a
<code>csymbol</code> element should be used. In general, the value of
<code>cd</code> attribute on the <code>csymbol</code> will correspond to
the <code>definitionURL</code> value.
</p>
<div class="div3">
<h3><a name="contm.basicfun" id="contm.basicfun"></a>4.4.1 Functions and Inverses
</h3>
<div class="div4">
<h4><a name="contm.interval" id="contm.interval"></a>4.4.1.1 Interval <code><interval></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">interval</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a>,<a href="appendixa-d.html#parsing_closure">closure</a>?
</td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a>,<a href="appendixa-d.html#parsing_ContExp">ContExp</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td>
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_cc">interval_cc</a>,
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_oc">interval_oc</a>,
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_co">interval_co</a>,
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_oo">interval_oo</a>
</td>
</tr>
</tbody>
</table>
<p>The <code>interval</code> element is a container element used to represent simple mathematical intervals of the
real number line. It takes an optional attribute <code>closure</code>, with a default value
of "closed".
</p>
<div class="mathml-example" id="interval1.interval.ex1">
<p>Content MathML</p><pre class="mathml">
<interval closure="open"><ci>x</ci><cn>1</cn></interval></pre><pre class="mathml">
<interval closure="closed"><cn>0</cn><cn>1</cn></interval></pre><pre class="mathml">
<interval closure="open-closed"><cn>0</cn><cn>1</cn></interval></pre><pre class="mathml">
<interval closure="closed-open"><cn>0</cn><cn>1</cn></interval></pre><p>Sample Presentation</p><pre class="mathml">
<mfenced><mi>x</mi><mn>1</mn></mfenced></pre><blockquote>
<p><img src="image/interval1-interval_oo-ex1.gif" alt="{\left(x,{1}\right)}"></p>
</blockquote><pre class="mathml">
<mfenced open="[" close="]"><mn>0</mn><mn>1</mn></mfenced></pre><blockquote>
<p><img src="image/interval1-interval_cc-ex1.gif" alt="{\left[{0},{1}\right]}"></p>
</blockquote><pre class="mathml">
<mfenced open="(" close="]"><mn>0</mn><mn>1</mn></mfenced></pre><blockquote>
<p><img src="image/interval1-interval_oc-ex1.gif" alt="{\left({0},{1}\right]}"></p>
</blockquote><pre class="mathml">
<mfenced open="[" close=")"><mn>0</mn><mn>1</mn></mfenced></pre><blockquote>
<p><img src="image/interval1-interval_co-ex1.gif" alt="{\left[{0},{1}\right)}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Content MathML</em></p>
<p>In Strict markup, the <code>interval</code> element corresponds to one
of four symbols from the <a href="http://www.openmath.org/cd/interval1.xhtml">interval1</a> content
dictionary. If <code>closure</code> has the value "open" then
<code>interval</code> corresponds to the
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_oo">interval_oo</a>.
With the value "closed"
<code>interval</code> corresponds to the symbol
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_cc">interval_cc</a>,
with value "open-closed" to
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_oc">interval_oc</a>, and with
"closed-open" to
<a href="http://www.openmath.org/cd/interval1.xhtml#interval_co">interval_co</a>.
</p>
</div>
<div class="div4">
<h4><a name="contm.inverse" id="contm.inverse"></a>4.4.1.2 Inverse <code><inverse></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/fns1.xhtml#inverse">inverse</a></td>
</tr>
</tbody>
</table>
<p>The <code>inverse</code> element is applied to a function in order to
construct a generic expression for the functional inverse of that
function. The <code>inverse</code> element 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>
<div class="mathml-example" id="fns1.inverse.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><inverse/>
<ci> f </ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<msup><mi>f</mi><mrow><mo>(</mo><mn>-1</mn><mo>)</mo></mrow></msup></pre><blockquote>
<p><img src="image/fns1-inverse-ex1.gif" alt="{\msup{f}{{\left.\middle({\mn{-1}}\middle)\right.}}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="fns1.inverse.ex2">
<p>Content MathML</p><pre class="mathml">
<apply>
<apply><inverse/><ci type="matrix">A</ci></apply>
<ci>a</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msup><mi>A</mi><mrow><mo>(</mo><mn>-1</mn><mo>)</mo></mrow></msup>
<mo>&#x2061;</mo>
<mfenced><mi>a</mi></mfenced>
</mrow></pre><blockquote>
<p><img src="image/fns1-inverse-ex2.gif" alt="{\msup{A}{{\left.\middle({\mn{-1}}\middle)\right.}}\unicode{8289}{\left(a\right)}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.lambda" id="contm.lambda"></a>4.4.1.3 Lambda <code><lambda></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">lambda</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>, <a href="appendixa-d.html#parsing_DomainQ">DomainQ</a>, <a href="appendixa-d.html#parsing_ContExp">ContExp</a></td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/fns1.xhtml#lambda">lambda</a></td>
</tr>
</tbody>
</table>
<p>The <code>lambda</code> element is used to construct a user-defined
function from an expression, bound variables, and qualifiers. In a
lambda construct with <var>n</var> (possibly 0) bound variables, the
first <var>n</var> children are <code>bvar</code> elements that identify
the variables that are used as placeholders in the last child for
actual parameter values. The bound variables can be restricted by an
optional <code>domainofapplication</code> qualifier or one of its
<a href="chapter4-d.html#contm.domainofapplication.qualifier">shorthand
notations</a>. The meaning of the <code>lambda</code> construct is an
<var>n</var>-ary function that returns the expression in the last
child where the bound variables are replaced with the respective
arguments.
</p>
<p>The <code>domainofapplication</code> child restricts the possible
values of the arguments of the constructed function. For instance, the
following <code>lambda</code> construct represents a function on
the integers.
</p><pre class="mathml">
<lambda>
<bvar><ci> x </ci></bvar>
<domainofapplication><integers/></domainofapplication>
<apply><sin/><ci> x </ci></apply>
</lambda></pre><p>
If a <code>lambda</code> construct does not contain bound variables, then
the <code>lambda</code> construct is superfluous and may be removed,
unless it also contains a <code>domainofapplication</code> construct.
In that case, if the last child of the <code>lambda</code> construct is
itself a function, then the <code>domainofapplication</code> restricts
its existing functional arguments, as in this example, which is
a variant representation for the function above.
</p><pre class="mathml">
<lambda>
<domainofapplication><integers/></domainofapplication>
<sin/>
</lambda></pre><p>
Otherwise, if the last child of the <code>lambda</code> construct is not a
function, say a number, then the <code>lambda</code> construct will not be
a function, but the same number, and any <code>domainofapplication</code>
is ignored.
</p>
<div class="mathml-example" id="fns1.lambda.ex2">
<p>Content MathML</p><pre class="mathml">
<lambda>
<bvar><ci>x</ci></bvar>
<apply><sin/>
<apply><plus/><ci>x</ci><cn>1</cn></apply>
</apply>
</lambda></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>&#x3bb;</mi>
<mi>x</mi>
<mo>.</mo>
<mfenced>
<mrow>
<mi>sin</mi>
<mo>&#x2061;</mo>
<mrow><mo>(</mo><mi>x</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/fns1-lambda-ex2.gif" alt="{\unicode{955}x.{\left({\mathop{{\minormal{sin}}}{\left.\middle(x+{1}\middle)\right.}}\right)}}"></p>
</blockquote><pre class="mathml">
<mrow>
<mi>x</mi>
<mo>&#x21a6;</mo>
<mrow>
<mi>sin</mi>
<mo>&#x2061;</mo>
<mrow><mo>(</mo><mi>x</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/fns1-lambda-ex2-2.gif" alt="{x\unicode{8614}{\mathop{{\minormal{sin}}}{\left.\middle(x+{1}\middle)\right.}}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<div class="strict-mathml-example">
<h5><a name="contm.rewrite.lambda" id="contm.rewrite.lambda"></a>Rewrite: lambda
</h5>
<p>If the <code>lambda</code> element does not contain qualifiers, the
lambda expression is directly translated into a <code>bind</code>
expression.
</p><pre class="mathml">
<lambda>
<bvar> <span class="egmeta">x1</span> </bvar><bvar> <span class="egmeta">xn</span> </bvar>
<span class="egmeta">expression-in-x1-xn</span>
</lambda></pre><p>rewrites to the Strict Content MathML</p><pre class="mathml">
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x1</span> </bvar><bvar> <span class="egmeta">xn</span> </bvar>
<span class="egmeta">expression-in-x1-xn</span>
</bind></pre></div>
<div class="strict-mathml-example">
<h5><a name="contm.rewrite.lambda.domofa" id="contm.rewrite.lambda.domofa"></a>Rewrite: lambda domainofapplication
</h5>
<p>If the <code>lambda</code> element does contain qualifiers, the
qualifier may be rewritten to <code>domainofapplication</code>
and then the lambda expression is translated to a
function term constructed with <a href="http://www.openmath.org/cd/fns1.xhtml#lambda">lambda</a>
and restricted to the specified domain using
<a href="http://www.openmath.org/cd/fns1.xhtml#restriction">restriction</a>.
</p><pre class="mathml">
<lambda>
<bvar> <span class="egmeta">x1</span> </bvar><bvar> <span class="egmeta">xn</span> </bvar>
<domainofapplication> <span class="egmeta">D</span> </domainofapplication>
<span class="egmeta">expression-in-x1-xn</span>
</lambda></pre><p>rewrites to the Strict Content MathML</p><pre class="mathml">
<apply><csymbol cd="fns1">restriction</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x1</span> </bvar><bvar> <span class="egmeta">xn</span> </bvar>
<span class="egmeta">expression-in-x1-xn</span>
</bind>
<span class="egmeta">D</span>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.compose" id="contm.compose"></a>4.4.1.4 Function composition <code><compose/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/fns1.xhtml#left_compose">left_compose</a></td>
</tr>
</tbody>
</table>
<p>The <code>compose</code> element represents the function
composition operator. Note that MathML makes no assumption about the domain
and codomain of the constituent functions in a composition; the domain of the
resulting composition may be empty.
</p>
<p>The <code>compose</code> element is a commutative n-ary operator. Consequently, it may be
lifted to the induced operator defined on a collection of arguments indexed by a (possibly
infinite) set by using qualifier elements as described in <a href="chapter4-d.html#contm.nary">Section 4.3.4.1 N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)</a>.
</p>
<div class="mathml-example" id="fns1.compose.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><compose/><ci>f</ci><ci>g</ci><ci>h</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>f</mi><mo>&#x2218;</mo><mi>g</mi><mo>&#x2218;</mo><mi>h</mi></mrow></pre><blockquote>
<p><img src="image/fns1-compose-ex1.gif" alt="{f\unicode{8728}g\unicode{8728}h}"></p>
</blockquote>
</div>
<div class="mathml-example" id="fns1.compose.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply>
<apply><compose/><ci>f</ci><ci>g</ci></apply>
<ci>x</ci>
</apply>
<apply><ci>f</ci><apply><ci>g</ci><ci>x</ci></apply></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow>
<mrow><mo>(</mo><mi>f</mi><mo>&#x2218;</mo><mi>g</mi><mo>)</mo></mrow>
<mo>&#x2061;</mo>
<mfenced><mi>x</mi></mfenced>
</mrow>
<mo>=</mo>
<mrow>
<mi>f</mi>
<mo>&#x2061;</mo>
<mfenced>
<mrow>
<mi>g</mi>
<mo>&#x2061;</mo>
<mfenced><mi>x</mi></mfenced>
</mrow>
</mfenced>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/fns1-compose-ex2.gif" alt="{{{\left.\middle(f\unicode{8728}g\middle)\right.}\unicode{8289}{\left(x\right)}}={\mathop{f}{\left({\mathop{g}{\left(x\right)}}\right)}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.ident" id="contm.ident"></a>4.4.1.5 Identity function <code><ident/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/fns1.xhtml#identity">identity</a></td>
</tr>
</tbody>
</table>
<p>The <code>ident</code> element represents the
identity function. Note that MathML makes no assumption about the
domain and codomain of the represented identity function, which
depends on the context in which it is used.
</p>
<div class="mathml-example" id="fns1.ident.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><compose/>
<ci type="function">f</ci>
<apply><inverse/>
<ci type="function">f</ci>
</apply>
</apply>
<ident/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow>
<mi>f</mi>
<mo>&#x2218;</mo>
<msup><mi>f</mi><mrow><mo>(</mo><mn>-1</mn><mo>)</mo></mrow></msup>
</mrow>
<mo>=</mo>
<mi>id</mi>
</mrow></pre><blockquote>
<p><img src="image/fns1-ident-ex1.gif" alt="{{f\unicode{8728}\msup{f}{{\left.\middle({\mn{-1}}\middle)\right.}}}={\minormal{id}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.domain" id="contm.domain"></a>4.4.1.6 Domain <code><domain/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/fns1.xhtml#domain">domain</a></td>
</tr>
</tbody>
</table>
<p>The <code>domain</code> element represents the domain of the
function to which it is applied. The domain is the set of values
over which the function is defined.
</p>
<div class="mathml-example" id="fns1.domain.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><domain/><ci>f</ci></apply>
<reals/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>domain</mi><mo>&#x2061;</mo><mfenced><mi>f</mi></mfenced></mrow>
<mo>=</mo>
<mi mathvariant="double-struck">R</mi>
</mrow></pre><blockquote>
<p><img src="image/fns1-domain-ex1.gif" alt="{{\mathop{{\minormal{domain}}}{\left(f\right)}}={\midoublestruck{R}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.codomain" id="contm.codomain"></a>4.4.1.7 codomain <code><codomain/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/fns1.xhtml#range">range</a></td>
</tr>
</tbody>
</table>
<p>The <code>codomain</code> represents the codomain, or range, of the function
to which is is applied. Note that the codomain is not necessarily
equal to the image of the function, it is merely required to contain
the image.
</p>
<div class="mathml-example" id="fns1.range.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><codomain/><ci>f</ci></apply>
<rationals/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>codomain</mi><mo>&#x2061;</mo><mfenced><mi>f</mi></mfenced></mrow>
<mo>=</mo>
<mi mathvariant="double-struck">Q</mi>
</mrow></pre><blockquote>
<p><img src="image/fns1-range-ex1.gif" alt="{{\mathop{{\minormal{codomain}}}{\left(f\right)}}={\midoublestruck{Q}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.image" id="contm.image"></a>4.4.1.8 Image <code><image/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/fns1.xhtml#image">image</a></td>
</tr>
</tbody>
</table>
<p>The <code>image</code> element represent the image of
the function to which it is applied. The image of a function is the
set of values taken by the function. Every point in the image is
generated by the function applied to some point of the domain.
</p>
<div class="mathml-example" id="fns1.image.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><image/><sin/></apply>
<interval><cn>-1</cn><cn> 1</cn></interval>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>image</mi><mo>&#x2061;</mo><mfenced><mi>sin</mi></mfenced></mrow>
<mo>=</mo>
<mfenced open="[" close="]"><mn>-1</mn><mn>1</mn></mfenced>
</mrow></pre><blockquote>
<p><img src="image/fns1-image-ex1.gif" alt="{{\mathop{{\minormal{image}}}{\left({\minormal{sin}}\right)}}={\left[{\mn{-1}},{1}\right]}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.piecewise" id="contm.piecewise"></a>4.4.1.9 Piecewise declaration (<code><piecewise></code>, <code><piece></code>, <code><otherwise></code>)
</h4>
<table>
<tbody>
<tr>
<td>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.container.constructor">Constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_piece">piece</a>*
<a href="appendixa-d.html#parsing_otherwise">otherwise</a>?
</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/piece1.xhtml#piecewise">piecewise</a></td>
</tr>
</tbody>
</table>
<em>Syntax Table for <code>piecewise</code></em>
</td>
<td>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.container.constructor">Constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a> <a href="appendixa-d.html#parsing_ContExp">ContExp</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/piece1.xhtml#piece">piece</a></td>
</tr>
</tbody>
</table>
<em>Syntax Table for <code>piece</code></em>
</td>
<td>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.container.constructor">Constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/piece1.xhtml#otherwise">otherwise</a></td>
</tr>
</tbody>
</table>
<em>Syntax Table for <code>otherwise</code></em>
</td>
</tr>
</tbody>
</table>
<p>The <code>piecewise</code>, <code>piece</code>, and <code>otherwise</code> elements are used to
represent "piecewise" function definitions of the form "
<var>H</var>(<var>x</var>) = 0 if <var>x</var> less than 0, <var>H</var>(<var>x</var>) = 1
otherwise".
</p>
<p>The declaration is constructed using the <code>piecewise</code> element. This contains
zero or more <code>piece</code> elements, and optionally one <code>otherwise</code> element. Each
<code>piece</code> element contains exactly two children. The first child defines the value
taken by the <code>piecewise</code> expression when the condition specified in the associated
second child of the <code>piece</code> is true. The degenerate case of no <code>piece</code>
elements and no <code>otherwise</code> element is treated as undefined for all values of the
domain.
</p>
<p>The <code>otherwise</code> element allows the specification of a value to be taken by the
<code>piecewise</code> function when none of the conditions (second child elements of the
<code>piece</code> elements) is true, i.e. a default value.
</p>
<p>It should be noted that no "order of execution" is implied by the
ordering of the <code>piece</code> child elements within <code>piecewise</code>. It is the
responsibility of the author to ensure that the subsets of the function domain defined by
the second children of the <code>piece</code> elements are disjoint, or that, where they
overlap, the values of the corresponding first children of the <code>piece</code> elements
coincide. If this is not the case, the meaning of the expression is
undefined.
</p>
<p>Here is an example:</p>
<div class="mathml-example" id="piece1.piecewise.ex1">
<p>Content MathML</p><pre class="mathml">
<piecewise>
<piece>
<apply><minus/><ci>x</ci></apply>
<apply><lt/><ci>x</ci><cn>0</cn></apply>
</piece>
<piece>
<cn>0</cn>
<apply><eq/><ci>x</ci><cn>0</cn></apply>
</piece>
<piece>
<ci>x</ci>
<apply><gt/><ci>x</ci><cn>0</cn></apply>
</piece>
</piecewise></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>{</mo>
<mtable>
<mtr>
<mtd><mrow><mo>&#x2212;</mo><mi>x</mi></mrow></mtd>
<mtd columnalign="left"><mtext>&#xa0; if &#xa0;</mtext></mtd>
<mtd><mrow><mi>x</mi><mo>&lt;</mo><mn>0</mn></mrow></mtd>
</mtr>
<mtr>
<mtd><mn>0</mn></mtd>
<mtd columnalign="left"><mtext>&#xa0; if &#xa0;</mtext></mtd>
<mtd><mrow><mi>x</mi><mo>=</mo><mn>0</mn></mrow></mtd>
</mtr>
<mtr>
<mtd><mi>x</mi></mtd>
<mtd columnalign="left"><mtext>&#xa0; if &#xa0;</mtext></mtd>
<mtd><mrow><mi>x</mi><mo>&gt;</mo><mn>0</mn></mrow></mtd>
</mtr>
</mtable>
</mrow></pre><blockquote>
<p><img src="image/piece1-piecewise-ex1.gif" alt="{\left.\middle\{{\begin{matrix}{\unicode{8722}x}\endcell{\mathrm{\unicode{160}~if~\unicode{160}}}\endcell{x\lt{0}}\\{0}\endcell{\mathrm{\unicode{160}~if~\unicode{160}}}\endcell{x={0}}\\x\endcell{\mathrm{\unicode{160}~if~\unicode{160}}}\endcell{x\gt{0}}\end{matrix}}\right.}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>In Strict Content MathML, the container elements
<code>piecewise</code>, <code>piece</code> and <code>otherwise</code> are mapped
to applications of the constructor symbols of the same names in the
<a href="http://www.openmath.org/cd/piece1.xhtml">piece1</a> CD. Apart from the fact that these three
elements (respectively symbols) are used together, the mapping to
Strict markup is straightforward:
</p>
<div class="strict-mathml-example" id="contm.piecewise-example">
<p>Content MathML</p><pre class="mathml">
<piecewise>
<piece>
<apply><cn>0</cn></apply>
<apply><lt/><ci>x</ci><cn>0</cn></apply>
</piece>
<piece>
<cn>1</cn>
<apply><gt/><ci>x</ci><cn>1</cn></apply>
</piece>
<otherwise>
<ci>x</ci>
</otherwise>
</piecewise></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="piece1">piecewise</csymbol>
<apply><csymbol cd="piece1">piece</csymbol>
<cn>0</cn>
<apply><csymbol cd="relation1">lt</csymbol><ci>x</ci><cn>0</cn></apply>
</apply>
<apply><csymbol cd="piece1">piece</csymbol>
<cn>1</cn>
<apply><csymbol cd="relation1">gt</csymbol><ci>x</ci><cn>1</cn></apply>
</apply>
<apply><csymbol cd="piece1">otherwise</csymbol>
<ci>x</ci>
</apply>
</apply></pre></div>
</div>
</div>
<div class="div3">
<h3><a name="id.4.4.2" id="id.4.4.2"></a>4.4.2 Arithmetic, Algebra and Logic
</h3>
<div class="div4">
<h4><a name="contm.quotient" id="contm.quotient"></a>4.4.2.1 Quotient <code><quotient/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/integer1.xhtml#quotient">quotient</a></td>
</tr>
</tbody>
</table>
<p>The <code>quotient</code> element represents the integer division
operator. When the operator is applied to integer arguments
<var>a</var> and <var>b</var>, the result is the "quotient of
<var>a</var> divided by <var>b</var>". That is, the quotient
of integers <var>a</var> and <var>b</var>, is the integer
<var>q</var> such that <var>a</var> = <var>b</var> * <var>q</var> +
<var>r</var>, with |<var>r</var>| less than |<var>b</var>| and
<var>a</var> * <var>r</var> positive. In common usage, <var>q</var>
is called the quotient and <var>r</var> is the remainder.
</p>
<div class="mathml-example" id="integer1.quotient.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><quotient/><ci>a</ci><ci>b</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>&#x230a;</mo><mi>a</mi><mo>/</mo><mi>b</mi><mo>&#x230b;</mo></mrow></pre><blockquote>
<p><img src="image/integer1-quotient-ex1.gif" alt="{\unicode{8970}a/b\unicode{8971}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.factorial" id="contm.factorial"></a>4.4.2.2 Factorial <code><factorial/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/integer1.xhtml#factorial">factorial</a></td>
</tr>
</tbody>
</table>
<p>This element represents the unary factorial operator on non-negative integers.</p>
<p>The factorial of an integer <var>n</var> is given by <var>n</var>! = <var>n</var>*(<var>n</var>-1)* ... * 1
</p>
<div class="mathml-example" id="integer1.factorial.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><factorial/><ci>n</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>n</mi><mo>!</mo></mrow></pre><blockquote>
<p><img src="image/integer1-factorial-ex1.gif" alt="{n!}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.divide" id="contm.divide"></a>4.4.2.3 Division <code><divide/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#divide">divide</a></td>
</tr>
</tbody>
</table>
<p>The <code>divide</code> element represents the division operator in a
number field.
</p>
<div class="mathml-example" id="arith1.divide.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><divide/>
<ci>a</ci>
<ci>b</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>/</mo><mi>b</mi></mrow></pre><blockquote>
<p><img src="image/arith1-divide-ex1.gif" alt="{a/b}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.max" id="contm.max"></a>4.4.2.4 Maximum <code><max/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-minmax</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/minmax1.xhtml#max">max</a></td>
</tr>
</tbody>
</table>
<p>The <code>max</code> element denotes the maximum function, which
returns the largest of the arguments to which it is applied. Its
arguments may be explicitly specified in the enclosing
<code>apply</code> element, or specified using qualifier elements
as described in <a href="chapter4-d.html#contm.nary.unary">Section 4.3.4.4 N-ary/Unary Operators (classes nary-minmax, nary-stats)</a>. Note that when applied to
infinite sets of arguments, no maximal argument may exist.
</p>
<div class="mathml-example" id="minmax1.max.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><max/><cn>2</cn><cn>3</cn><cn>5</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>max</mi>
<mrow>
<mo>{</mo><mn>2</mn><mo>,</mo><mn>3</mn><mo>,</mo><mn>5</mn><mo>}</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/minmax1-max-ex1.gif" alt="{{\minormal{max}}{\left.\middle\{{2},{3},{5}\middle\}\right.}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="minmax1.big.max.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><max/>
<bvar><ci>y</ci></bvar>
<condition>
<apply><in/>
<ci>y</ci>
<interval><cn>0</cn><cn>1</cn></interval>
</apply>
</condition>
<apply><power/><ci>y</ci><cn>3</cn></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>max</mi>
<mrow>
<mo>{</mo><mi>y</mi><mo>|</mo>
<mrow>
<msup><mi>y</mi><mn>3</mn></msup>
<mo>&#x2208;</mo>
<mfenced open="[" close="]"><mn>0</mn><mn>1</mn></mfenced>
</mrow>
<mo>}</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/minmax1-big_max-ex1.gif" alt="{{\minormal{max}}{\left.\middle\{y^3\middle|{y\unicode{8712}{\left[{0},{1}\right]}}\middle\}\right.}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.min" id="contm.min"></a>4.4.2.5 Minimum <code><min/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-minmax</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/minmax1.xhtml#min">min</a></td>
</tr>
</tbody>
</table>
<p>The <code>min</code> element denotes the minimum function, which returns the smallest of
the arguments to which it is applied. Its arguments may be explicitly specified in the
enclosing <code>apply</code> element, or specified using qualifier
elements as described in <a href="chapter4-d.html#contm.nary.unary">Section 4.3.4.4 N-ary/Unary Operators (classes nary-minmax, nary-stats)</a>. Note that when applied to infinite sets of arguments, no
minimal argument may exist.
</p>
<div class="mathml-example" id="minmax1.min.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><min/><ci>a</ci><ci>b</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>min</mi>
<mrow><mo>{</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>}</mo></mrow>
</mrow></pre><blockquote>
<p><img src="image/minmax1-min-ex1.gif" alt="{{\minormal{min}}{\left.\middle\{a,b\middle\}\right.}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="minmax1.big.min.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><min/>
<bvar><ci>x</ci></bvar>
<condition>
<apply><notin/><ci>x</ci><ci type="set">B</ci></apply>
</condition>
<apply><power/><ci>x</ci><cn>2</cn></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>min</mi>
<mrow><mo>{</mo><msup><mi>x</mi><mn>2</mn></msup><mo>|</mo>
<mrow><mi>x</mi><mo>&#x2209;</mo><mi>B</mi></mrow>
<mo>}</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/minmax1-big_min-ex2.gif" alt="{{\minormal{min}}{\left.\middle\{x^2\middle|{x\unicode{8713}B}\middle\}\right.}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.minus" id="contm.minus"></a>4.4.2.6 Subtraction <code><minus/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a>, <a href="chapter4-d.html#contm.binary">binary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#unary_minus">unary_minus</a>, <a href="http://www.openmath.org/cd/arith1.xhtml#minus">minus</a></td>
</tr>
</tbody>
</table>
<p>The <code>minus</code> element can be used as a <em>unary arithmetic operator</em>
(e.g. to represent - <var>x</var>), or as a <em>binary arithmetic operator</em>
(e.g. to represent <var>x</var>- <var>y</var>).
</p>
<p>If it is used with one argument, <code>minus</code> corresponds to the <a href="http://www.openmath.org/cd/arith1.xhtml#unary_minus">unary_minus</a> symbol.
</p>
<div class="mathml-example" id="arith1.unary.minus.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><minus/><cn>3</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>&#x2212;</mo><mn>3</mn></mrow></pre><blockquote>
<p><img src="image/arith1-unary_minus-ex1.gif" alt="{\unicode{8722}{3}}"></p>
</blockquote>
</div>
<p>If it is used with two arguments, <code>minus</code> corresponds to the
<a href="http://www.openmath.org/cd/arith1.xhtml#minus">minus</a> symbol
</p>
<div class="mathml-example" id="arith1.minus.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><minus/><ci>x</ci><ci>y</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>x</mi><mo>&#x2212;</mo><mi>y</mi></mrow></pre><blockquote>
<p><img src="image/arith1-minus-ex1.gif" alt="{x\unicode{8722}y}"></p>
</blockquote>
</div>
<p>In both cases, the translation to Strict Content markup is direct,
as described in <a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>. It is merely a
matter of choosing the symbol that reflects the actual usage.
</p>
</div>
<div class="div4">
<h4><a name="contm.plus" id="contm.plus"></a>4.4.2.7 Addition <code><plus/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#plus">plus</a></td>
</tr>
</tbody>
</table>
<p>The <code>plus</code> element represents the addition operator. Its
arguments are normally specified explicitly in the enclosing
<code>apply</code> element. As an n-ary commutative operator, it can
be used with qualifiers to specify arguments, however,
this is discouraged, and the <code>sum</code> operator should be
used to represent such expressions instead.
</p>
<div class="mathml-example" id="arith1.plus.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><plus/><ci>x</ci><ci>y</ci><ci>z</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>x</mi><mo>+</mo><mi>y</mi><mo>+</mo><mi>z</mi></mrow></pre><blockquote>
<p><img src="image/arith1-plus-ex1.gif" alt="{x+y+z}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.power" id="contm.power"></a>4.4.2.8 Exponentiation <code><power/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#power">power</a></td>
</tr>
</tbody>
</table>
<p>The <code>power</code> element represents the exponentiation
operator. The first argument is raised to the power of the second
argument.
</p>
<div class="mathml-example" id="arith1.power.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><power/><ci>x</ci><cn>3</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<msup><mi>x</mi><mn>3</mn></msup></pre><blockquote>
<p><img src="image/arith1-power-ex1.gif" alt="\msup{x}{{3}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.rem" id="contm.rem"></a>4.4.2.9 Remainder <code><rem/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/integer1.xhtml#remainder">remainder</a></td>
</tr>
</tbody>
</table>
<p>The <code>rem</code> element represents the modulus operator, which
returns the remainder that results from dividing the first argument by
the second. That is, when applied to integer arguments <var>a</var>
and <var>b</var>, it returns the unique integer <var>r</var> such that
<var>a</var> = <var>b</var> * <var>q</var> + <var>r</var>, with
|<var>r</var>| less than |<var>b</var>| and <var>a</var> *
<var>r</var> positive.
</p>
<div class="mathml-example" id="arith1.remainder.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><rem/><ci> a </ci><ci> b </ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>mod</mo><mi>b</mi></mrow></pre><blockquote>
<p><img src="image/arith1-remainder-ex1.gif" alt="{a\mathbin{\mathrm{mod}}b}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.times" id="contm.times"></a>4.4.2.10 Multiplication <code><times/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#times">times</a></td>
</tr>
</tbody>
</table>
<p>The <code>times</code> element represents the n-ary multiplication operator. Its
arguments are normally specified explicitly in the enclosing
<code>apply</code> element. As an n-ary commutative operator, it can
be used with qualifiers to specify arguments by rule, however,
this is discouraged, and the <code>product</code> operator should be
used to represent such expressions instead.
</p>
<div class="mathml-example" id="arith1.times.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><times/><ci>a</ci><ci>b</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>&#x2062;</mo><mi>b</mi></mrow></pre><blockquote>
<p><img src="image/arith1-times-ex1.gif" alt="{a\unicode{8290}b}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.root" id="contm.root"></a>4.4.2.11 Root <code><root/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a>, <a href="chapter4-d.html#contm.binary">binary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_degree">degree</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#root">root</a></td>
</tr>
</tbody>
</table>
<p>The <code>root</code> element is used to extract roots. The kind of root to be taken is
specified by a "degree" element, which should be given as the second child of
the <code>apply</code> element enclosing the <code>root</code> element. Thus, square roots
correspond to the case where <code>degree</code> contains the value 2, cube roots
correspond to 3, and so on. If no <code>degree</code> is present, a default value of 2 is
used.
</p>
<div class="mathml-example" id="arith1.root.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><root/>
<degree><ci type="integer">n</ci></degree>
<ci>a</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml"><mroot><mi>a</mi><mi>n</mi></mroot></pre><blockquote>
<p><img src="image/arith1-root-ex1.gif" alt="\sqrt[{n}]{a}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Content Markup</em></p>
<p>In Strict Content markup, the <a href="http://www.openmath.org/cd/arith1.xhtml#root">root</a>
symbol is always used with two arguments, with the second indicating
the degree of the root being extracted.
</p>
<div class="strict-mathml-example" id="arith1.root.ex2">
<p>Content MathML</p><pre class="mathml"><apply><root/><ci>x</ci></apply></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="arith1">root</csymbol>
<ci>x</ci>
<cn type="integer">2</cn>
</apply></pre></div>
<div class="strict-mathml-example" id="arith1.root.ex3">
<p>Content MathML</p><pre class="mathml">
<apply><root/>
<degree><ci type="integer">n</ci></degree>
<ci>a</ci>
</apply></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="arith1">root</csymbol>
<ci>a</ci>
<cn type="integer">n</cn>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.gcd" id="contm.gcd"></a>4.4.2.12 Greatest common divisor <code><gcd/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#gcd">gcd</a></td>
</tr>
</tbody>
</table>
<p>The <code>gcd</code> element represents the n-ary operator which returns
the greatest common divisor of its arguments. Its
arguments may be explicitly specified in the enclosing
<code>apply</code> element, or specified by rule as described in
<a href="chapter4-d.html#contm.nary">Section 4.3.4.1 N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)</a>.
</p>
<div class="mathml-example" id="arith1.gcd.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><gcd/><ci>a</ci><ci>b</ci><ci>c</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>gcd</mi>
<mo>&#x2061;</mo>
<mfenced><mi>a</mi><mi>b</mi><mi>c</mi></mfenced>
</mrow></pre><blockquote>
<p><img src="image/arith1-gcd-ex1.gif" alt="{\mathop{{\minormal{gcd}}}{\left(a,b,c\right)}}"></p>
</blockquote>
</div>
<p>This default rendering is English-language locale specific: other locales may have
different default renderings.
</p>
<p>When the <code>gcd</code> element is applied to an explicit list of arguments, the
translation to Strict Content markup is direct, using the <a href="http://www.openmath.org/cd/arith1.xhtml#gcd">gcd</a> symbol, as described in <a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>. However, when
qualifiers are used, the equivalent Strict markup is computed via
<a href="chapter4-d.html#contm.p2s.lifted">Rewrite: n-ary domainofapplication</a>.
</p>
</div>
<div class="div4">
<h4><a name="contm.and" id="contm.and"></a>4.4.2.13 And <code><and/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-logical</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#and">and</a></td>
</tr>
</tbody>
</table>
<p>The <code>and</code> element represents the logical "and" function which is
an n-ary function taking Boolean arguments and returning a Boolean value. It is true if
all arguments are true, and false otherwise. Its arguments may be explicitly specified
in the enclosing <code>apply</code> element, or specified by rule as described in <a href="chapter4-d.html#contm.nary">Section 4.3.4.1 N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)</a>.
</p>
<div class="mathml-example" id="logic1.and.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><and/><ci>a</ci><ci>b</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>&#x2227;</mo><mi>b</mi></mrow></pre><blockquote>
<p><img src="image/logic1-and-ex1.gif" alt="{a\unicode{8743}b}"></p>
</blockquote>
</div>
<div class="strict-mathml-example" id="contm.and.bvar.ex">
<p>Content MathML</p><pre class="mathml">
<apply><and/>
<bvar><ci>i</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><ci>n</ci></uplimit>
<apply><gt/><apply><selector/><ci>a</ci><ci>i</ci></apply><cn>0</cn></apply>
</apply></pre><p>Strict Content MathML</p><pre class="strict-mathml">
<apply><csymbol cd="fns2">apply_to_list</csymbol>
<csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="list1">map</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>i</ci></bvar>
<apply><csymbol cd="relation1">gt</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol>
<ci>i</ci>
<ci>a</ci>
</apply>
<cn>0</cn>
</apply>
</bind>
<apply><csymbol cd="interval1">integer_interval</csymbol>
<cn type="integer">0</cn>
<ci>n</ci>
</apply>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munderover>
<mo>&#x22C0;</mo>
<mrow><mi>i</mi><mo>=</mo><mn>0</mn></mrow>
<mi>n</mi>
</munderover>
<mrow>
<mo>(</mo>
<msub><mi>a</mi><mi>i</mi></msub>
<mo>&gt;</mo>
<mn>0</mn>
<mo>)</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/contm_and_bvar_ex.gif" alt="{\munderover\bigwedge{i=0}{n}{\left(a\sb{i} \gt 0 \right)}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.or" id="contm.or"></a>4.4.2.14 Or <code><or/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-logical</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#or">or</a></td>
</tr>
</tbody>
</table>
<p>The <code>or</code> element represents the logical "or" function. It is
true if any of the arguments are true, and false otherwise.
</p>
<div class="mathml-example" id="logic1.or.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><or/><ci>a</ci><ci>b</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>&#x2228;</mo><mi>b</mi></mrow></pre><blockquote>
<p><img src="image/logic1-or-ex1.gif" alt="{a\unicode{8744}b}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.xor" id="contm.xor"></a>4.4.2.15 Exclusive Or <code><xor/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-logical</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#xor">xor</a></td>
</tr>
</tbody>
</table>
<p>The <code>xor</code> element represents the logical "xor"
function. It is true if there are an odd number of true arguments or
false otherwise.
</p>
<div class="mathml-example" id="logic1.xor.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><xor/><ci>a</ci><ci>b</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>xor</mo><mi>b</mi></mrow></pre><blockquote>
<p><img src="image/logic1-xor-ex1.gif" alt="{a\mathbin{\mathrm{xor}}b}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.not" id="contm.not"></a>4.4.2.16 Not <code><not/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-logical</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#not">not</a></td>
</tr>
</tbody>
</table>
<p>The <code>note</code> element represents the logical not function
which takes one Boolean argument, and returns the opposite Boolean
value.
</p>
<div class="mathml-example" id="logic1.not.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><not/><ci>a</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>&#xac;</mo><mi>a</mi></mrow></pre><blockquote>
<p><img src="image/logic1-not-ex1.gif" alt="{\unicode{172}a}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.implies" id="contm.implies"></a>4.4.2.17 Implies <code><implies/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-logical</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#implies">implies</a></td>
</tr>
</tbody>
</table>
<p>The <code>implies</code> element represents the logical implication
function which takes two Boolean expressions as arguments. It
evaluates to false if the first argument is true and the second
argument is false, otherwise it evaluates to true.
</p>
<div class="mathml-example" id="logic1.implies.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><implies/><ci>A</ci><ci>B</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x21d2;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/logic1-implies-ex1.gif" alt="{A\unicode{8658}B}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.forall" id="contm.forall"></a>4.4.2.18 Universal quantifier <code><forall/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.quantifier">quantifier</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/quant1.xhtml#forall">forall</a>,
<a href="http://www.openmath.org/cd/logic1.xhtml#implies">implies</a></td>
</tr>
</tbody>
</table>
<p>The <code>forall</code> element represents the universal ("for all")
quantifier which takes one or more bound variables, and an
argument which specifies the assertion being quantified.
In addition, <code>condition</code> or other qualifiers may be used as
described in <a href="chapter4-d.html#contm.quantifier">Section 4.3.4.8 Quantifiers (class quantifier)</a> to limit the domain
of the bound variables.
</p>
<div class="mathml-example" id="quant1.forall.ex1">
<p>Content MathML</p><pre class="mathml">
<bind><forall/>
<bvar><ci>x</ci></bvar>
<apply><eq/>
<apply><minus/><ci>x</ci><ci>x</ci></apply>
<cn>0</cn>
</apply>
</bind></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x2200;</mo>
<mi>x</mi>
<mo>.</mo>
<mfenced>
<mrow>
<mrow><mi>x</mi><mo>&#x2212;</mo><mi>x</mi></mrow>
<mo>=</mo>
<mn>0</mn>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/quant1-forall-ex1.gif" alt="{\unicode{8704}x.{\left({{x\unicode{8722}x}={0}}\right)}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<div class="strict-mathml-example" id="quant1.forall.ex2">
<p>When the <code>forall</code> element is used with a <code>condition</code> qualifier the
strict equivalent is constructed with the help of logical implication by the rule
<a href="chapter4-d.html#contm.rewrite.quantifier">Rewrite: quantifier</a>. Thus
</p><pre class="mathml">
<bind><forall/>
<bvar><ci>p</ci></bvar>
<bvar><ci>q</ci></bvar>
<condition>
<apply><and/>
<apply><in/><ci>p</ci><rationals/></apply>
<apply><in/><ci>q</ci><rationals/></apply>
<apply><lt/><ci>p</ci><ci>q</ci></apply>
</apply>
</condition>
<apply><lt/>
<ci>p</ci>
<apply><power/><ci>q</ci><cn>2</cn></apply>
</apply>
</bind></pre><p>
translates to
</p><pre class="strict-mathml">
<bind><csymbol cd="quant1">forall</csymbol>
<bvar><ci>p</ci></bvar>
<bvar><ci>q</ci></bvar>
<apply><csymbol cd="logic1">implies</csymbol>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="set1">in</csymbol>
<ci>p</ci>
<csymbol cd="setname1">Q</csymbol>
</apply>
<apply><csymbol cd="set1">in</csymbol>
<ci>q</ci>
<csymbol cd="setname1">Q</csymbol>
</apply>
<apply><csymbol cd="relation1">lt</csymbol><ci>p</ci><ci>q</ci></apply>
</apply>
<apply><csymbol cd="relation1">lt</csymbol>
<ci>p</ci>
<apply><csymbol cd="arith1">power</csymbol>
<ci>q</ci>
<cn>2</cn>
</apply>
</apply>
</apply>
</bind></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x2200;</mo>
<mrow>
<mrow><mi>p</mi><mo>&#x2208;</mo><mi mathvariant="double-struck">Q</mi></mrow>
<mo>&#x2227;</mo>
<mrow><mi>q</mi><mo>&#x2208;</mo><mi mathvariant="double-struck">Q</mi></mrow>
<mo>&#x2227;</mo>
<mrow><mo>(</mo><mi>p</mi><mo>&lt;</mo><mi>q</mi><mo>)</mo></mrow>
</mrow>
<mo>.</mo>
<mfenced>
<mrow><mi>p</mi><mo>&lt;</mo><msup><mi>q</mi><mn>2</mn></msup></mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/quant1-forall-ex2.gif" alt="{\unicode{8704}{{p\unicode{8712}{\midoublestruck{Q}}}\unicode{8743}{q\unicode{8712}{\midoublestruck{Q}}}\unicode{8743}{\left.\middle(p\lt q\middle)\right.}}.{\left({p\lt\msup{q}{{2}}}\right)}}"></p>
</blockquote><pre class="mathml">
<mrow>
<mo>&#x2200;</mo>
<mrow><mi>p</mi><mo>,</mo><mi>q</mi></mrow>
<mo>.</mo>
<mfenced>
<mrow>
<mrow>
<mo>(</mo>
<mrow><mi>p</mi><mo>&#x2208;</mo><mi mathvariant="double-struck">Q</mi></mrow>
<mo>&#x2227;</mo>
<mrow><mi>q</mi><mo>&#x2208;</mo><mi mathvariant="double-struck">Q</mi></mrow>
<mo>&#x2227;</mo>
<mrow><mo>(</mo><mi>p</mi><mo>&lt;</mo><mi>q</mi><mo>)</mo></mrow>
<mo>)</mo>
</mrow>
<mo>&#x21d2;</mo>
<mrow>
<mo>(</mo>
<mi>p</mi>
<mo>&lt;</mo>
<msup><mi>q</mi><mn>2</mn></msup>
<mo>)</mo>
</mrow>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/quant1-forall-ex2-2.gif" alt="{ \unicode{8704} {p,q} . {\left({ {\left. \middle( {p\unicode{8712}{\midoublestruck{Q}}} \unicode{8743} {q\unicode{8712}{\midoublestruck{Q}}} \unicode{8743} {\left.\middle(p\lt q\middle)\right.} \middle) \right.} \unicode{8658} {\left. \middle( p \lt \msup{q}{{2}} \middle) \right.} }\right)} }"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.exists" id="contm.exists"></a>4.4.2.19 Existential quantifier <code><exists/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.quantifier">quantifier</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/quant1.xhtml#exists">exists</a>,
<a href="http://www.openmath.org/cd/logic1.xhtml#and">and</a></td>
</tr>
</tbody>
</table>
<p>The <code>exists</code> element represents the existential ("there exists")
quantifier which takes one or more bound variables, and an
argument which specifies the assertion being quantified. In
addition, <code>condition</code> or other qualifiers may be used as
described in <a href="chapter4-d.html#contm.quantifier">Section 4.3.4.8 Quantifiers (class quantifier)</a> to limit the domain
of the bound variables.
</p>
<div class="mathml-example" id="quant1.exists.ex1">
<p>Content MathML</p><pre class="mathml">
<bind><exists/>
<bvar><ci>x</ci></bvar>
<apply><eq/>
<apply><ci>f</ci><ci>x</ci></apply>
<cn>0</cn>
</apply>
</bind></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x2203;</mo>
<mi>x</mi>
<mo>.</mo>
<mfenced>
<mrow>
<mrow><mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi></mfenced></mrow>
<mo>=</mo>
<mn>0</mn>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/quant1-exists-ex1.gif" alt="{\unicode{8707}x.{\left({{\mathop{f}{\left(x\right)}}={0}}\right)}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="quant1.exists.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><exists/>
<bvar><ci>x</ci></bvar>
<domainofapplication>
<integers/>
</domainofapplication>
<apply><eq/>
<apply><ci>f</ci><ci>x</ci></apply>
<cn>0</cn>
</apply>
</apply></pre><p>Strict MathML equivalent:</p><pre class="strict-mathml">
<bind><csymbol cd="quant1">exists</csymbol>
<bvar><ci>x</ci></bvar>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="set1">in</csymbol>
<ci>x</ci>
<csymbol cd="setname1">Z</csymbol>
</apply>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><ci>f</ci><ci>x</ci></apply>
<cn>0</cn>
</apply>
</apply>
</bind></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x2203;</mo>
<mi>x</mi>
<mo>.</mo>
<mfenced separators="">
<mrow><mi>x</mi><mo>&#x2208;</mo><mi mathvariant="double-struck">Z</mi></mrow>
<mo>&#x2227;</mo>
<mrow>
<mrow><mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi></mfenced></mrow>
<mo>=</mo>
<mn>0</mn>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/quant1-exists-ex2.gif" alt="{\unicode{8707}x.{\left({x\unicode{8712}{\midoublestruck{Z}}}\unicode{8743}{{\mathop{f}{\left(x\right)}}={0}}\right)}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.abs" id="contm.abs"></a>4.4.2.20 Absolute Value <code><abs/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#abs">abs</a></td>
</tr>
</tbody>
</table>
<p>The <code>abs</code> element represents the absolute value
function. The argument should be numerically valued. When the
argument is a complex number, the absolute value is often referred
to as the modulus.
</p>
<div class="mathml-example" id="arith1.abs.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><abs/><ci>x</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>|</mo><mi>x</mi><mo>|</mo></mrow></pre><blockquote>
<p><img src="image/arith1-abs-ex1.gif" alt="{\left.\middle|x\middle|\right.}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.conjugate" id="contm.conjugate"></a>4.4.2.21 Complex conjugate <code><conjugate/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/complex1.xhtml#conjugate">conjugate</a></td>
</tr>
</tbody>
</table>
<p>
The <code>conjugate</code> element represents the function defined
over the complex numbers with returns the complex conjugate of
its argument.
</p>
<div class="mathml-example" id="complex1.conjugate.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><conjugate/>
<apply><plus/>
<ci>x</ci>
<apply><times/><cn>&#x2148;</cn><ci>y</ci></apply>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mover>
<mrow>
<mi>x</mi>
<mo>+</mo>
<mrow><mn>&#x2148;</mn><mo>&#x2062;</mo><mi>y</mi></mrow>
</mrow>
<mo>&#xaf;</mo>
</mover></pre><blockquote>
<p><img src="image/complex1-conjugate-ex1.gif" alt="{\overline{{x+{{\mn{\unicode{8520}}}\unicode{8290}y}}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.arg" id="contm.arg"></a>4.4.2.22 Argument <code><arg/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/complex1.xhtml#argument">argument</a></td>
</tr>
</tbody>
</table>
<p>
The <code>arg</code> element represents the unary function which
returns the angular argument of a complex number, namely the
angle which a straight line drawn from the number to zero makes
with the real line (measured anti-clockwise).
</p>
<div class="mathml-example" id="complex1.argument.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><arg/>
<apply><plus/>
<ci> x </ci>
<apply><times/><imaginaryi/><ci>y</ci></apply>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>arg</mi>
<mo>&#x2061;</mo>
<mfenced>
<mrow>
<mi>x</mi>
<mo>+</mo>
<mrow><mi>i</mi><mo>&#x2062;</mo><mi>y</mi></mrow>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/complex1-argument-ex1.gif" alt="{\mathop{{\minormal{arg}}}{\left({x+{i\unicode{8290}y}}\right)}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.real" id="contm.real"></a>4.4.2.23 Real part <code><real/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/complex1.xhtml#real">real</a></td>
</tr>
</tbody>
</table>
<p>
The <code>real</code> element represents the unary operator used to
construct an expression representing the "real" part of a
complex number, that is, the <var>x</var> component in <var>x</var> + i<var>y</var>.
</p>
<div class="mathml-example" id="complex1.real.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><real/>
<apply><plus/>
<ci>x</ci>
<apply><times/><imaginaryi/><ci>y</ci></apply>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x211b;</mo>
<mo>&#x2061;</mo>
<mfenced>
<mrow>
<mi>x</mi>
<mo>+</mo>
<mrow><mi>i</mi><mo>&#x2062;</mo><mi>y</mi></mrow>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/complex1-real-ex1.gif" alt="{\unicode{8475}\unicode{8289}{\left({x+{i\unicode{8290}y}}\right)}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.imaginary" id="contm.imaginary"></a>4.4.2.24 Imaginary part <code><imaginary/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/complex1.xhtml#imaginary">imaginary</a></td>
</tr>
</tbody>
</table>
<p>
The <code>imaginary</code> element represents the unary operator used to
construct an expression representing the "imaginary" part of a
complex number, that is, the <var>y</var> component in <var>x</var> + i<var>y</var>.
</p>
<div class="mathml-example" id="complex1.imaginary.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><imaginary/>
<apply><plus/>
<ci>x</ci>
<apply><times/><imaginaryi/><ci>y</ci></apply>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x2111;</mo>
<mo>&#x2061;</mo>
<mfenced>
<mrow>
<mi>x</mi>
<mo>+</mo>
<mrow><mi>i</mi><mo>&#x2062;</mo><mi>y</mi></mrow>
</mrow>
</mfenced>
</mrow></pre><blockquote>
<p><img src="image/complex1-imaginary-ex1.gif" alt="{\unicode{8465}\unicode{8289}{\left({x+{i\unicode{8290}y}}\right)}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.lcm" id="contm.lcm"></a>4.4.2.25 Lowest common multiple <code><lcm/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#lcm">lcm</a></td>
</tr>
</tbody>
</table>
<p>The <code>lcm</code> element represents the n-ary operator used to
construct an expression which represents the least common multiple
of its arguments. If no argument is provided, the lcm is 1. If one
argument is provided, the lcm is that argument. The least common
multiple of <var>x</var> and 1 is <var>x</var>.
</p>
<div class="mathml-example" id="arith1.lcm.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><lcm/><ci>a</ci><ci>b</ci><ci>c</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>lcm</mi>
<mo>&#x2061;</mo>
<mfenced><mi>a</mi><mi>b</mi><mi>c</mi></mfenced>
</mrow></pre><blockquote>
<p><img src="image/arith1-lcm-ex1.gif" alt="{\mathop{{\minormal{lcm}}}{\left(a,b,c\right)}}"></p>
</blockquote>
</div>
<p>This default rendering is English-language locale specific: other locales may have
different default renderings.
</p>
</div>
<div class="div4">
<h4><a name="contm.floor" id="contm.floor"></a>4.4.2.26 Floor <code><floor/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/rounding1.xhtml#floor">floor</a></td>
</tr>
</tbody>
</table>
<p>The <code>floor</code> element represents the operation that rounds
down (towards negative infinity) to the nearest integer. This
function takes one real number as an argument and returns an
integer.
</p>
<div class="mathml-example" id="rounding1.floor.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><floor/><ci>a</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>&#x230a;</mo><mi>a</mi><mo>&#x230b;</mo></mrow></pre><blockquote>
<p><img src="image/rounding1-floor-ex1.gif" alt="{\unicode{8970}a\unicode{8971}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.ceiling" id="contm.ceiling"></a>4.4.2.27 Ceiling <code><ceiling/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/rounding1.xhtml#ceiling">ceiling</a></td>
</tr>
</tbody>
</table>
<p>The <code>ceiling</code> element represents the operation that rounds
up (towards positive infinity) to the nearest integer. This function
takes one real number as an argument and returns an integer.
</p>
<div class="mathml-example" id="rounding1.ceiling.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><ceiling/><ci>a</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>&#x2308;</mo><mi>a</mi><mo>&#x2309;</mo></mrow></pre><blockquote>
<p><img src="image/rounding1-ceiling-ex1.gif" alt="{\unicode{8968}a\unicode{8969}}"></p>
</blockquote>
</div>
</div>
</div>
<div class="div3">
<h3><a name="id.4.4.3" id="id.4.4.3"></a>4.4.3 Relations
</h3>
<div class="div4">
<h4><a name="contm.eq" id="contm.eq"></a>4.4.3.1 Equals <code><eq/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/relation1.xhtml#eq">eq</a></td>
</tr>
</tbody>
</table>
<p>The <code>eq</code> elements represents the equality relation. While equality is a binary relation,
<code>el</code> may be used with more than two arguments, denoting a chain
of equalities, as described in <a href="chapter4-d.html#contm.nary.reln">Section 4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)</a>.
</p>
<div class="mathml-example" id="relation1.eq.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<cn type="rational">2<sep/>4</cn>
<cn type="rational">1<sep/>2</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mn>2</mn><mo>/</mo><mn>4</mn></mrow>
<mo>=</mo>
<mrow><mn>1</mn><mo>/</mo><mn>2</mn></mrow>
</mrow></pre><blockquote>
<p><img src="image/relation1-eq-ex1.gif" alt="{{{2}/{4}}={{1}/{2}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.neq" id="contm.neq"></a>4.4.3.2 Not Equals <code><neq/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/relation1.xhtml#neq">neq</a></td>
</tr>
</tbody>
</table>
<p>The <code>neq</code> element represents the binary inequality
relation, i.e. the relation "not equal to" which returns true unless
the two arguments are equal.
</p>
<div class="mathml-example" id="relation1.neq.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><neq/><cn>3</cn><cn>4</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>3</mn><mo>&#x2260;</mo><mn>4</mn></mrow></pre><blockquote>
<p><img src="image/relation1-neq-ex1.gif" alt="{{3}\unicode{8800}{4}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.gt" id="contm.gt"></a>4.4.3.3 Greater than <code><gt/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/relation1.xhtml#gt">gt</a></td>
</tr>
</tbody>
</table>
<p>The <code>gt</code> element represents the "greater than" function
which returns true if the first argument is greater than the second, and
returns false otherwise. While this is a binary relation,
<code>gt</code> may be used with more than two arguments, denoting a chain
of inequalities, as described in <a href="chapter4-d.html#contm.nary.reln">Section 4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)</a>.
</p>
<div class="mathml-example" id="relation1.gt.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><gt/><cn>3</cn><cn>2</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>3</mn><mo>&gt;</mo><mn>2</mn></mrow></pre><blockquote>
<p><img src="image/relation1-gt-ex1.gif" alt="{{3}\gt{2}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.lt" id="contm.lt"></a>4.4.3.4 Less Than <code><lt/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/relation1.xhtml#lt">lt</a></td>
</tr>
</tbody>
</table>
<p>The <code>lt</code> element represents the "less than" function
which returns true if the first argument is less than the second, and
returns false otherwise. While this is a binary relation,
<code>lt</code> may be used with more than two arguments, denoting a chain
of inequalities, as described in <a href="chapter4-d.html#contm.nary.reln">Section 4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)</a>.
</p>
<div class="mathml-example" id="relation1.lt.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><lt/><cn>2</cn><cn>3</cn><cn>4</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>2</mn><mo>&lt;</mo><mn>3</mn><mo>&lt;</mo><mn>4</mn></mrow></pre><blockquote>
<p><img src="image/relation1-lt-ex1.gif" alt="{{2}\lt{3}\lt{4}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.geq" id="contm.geq"></a>4.4.3.5 Greater Than or Equal <code><geq/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/relation1.xhtml#geq">geq</a></td>
</tr>
</tbody>
</table>
<p>The <code>geq</code> element represents the "greater than or equal to" function
which returns true if the first argument is greater than or equal to
the second, and returns false otherwise. While this is a binary relation,
<code>geq</code> may be used with more than two arguments, denoting a chain
of inequalities, as described in <a href="chapter4-d.html#contm.nary.reln">Section 4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)</a>.
</p>
<div class="strict-mathml-example" id="relation1.geq.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><geq/><cn>4</cn><cn>3</cn><cn>3</cn></apply></pre><p>Strict Content MathML</p><pre class="strict-mathml">
<apply><csymbol cd="fns2">predicate_on_list</csymbol>
<csymbol cd="reln1">geq</csymbol>
<apply><csymbol cd="list1">list</csymbol>
<cn>4</cn><cn>3</cn><cn>3</cn>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>4</mn><mo>&#x2265;</mo><mn>3</mn><mo>&#x2265;</mo><mn>3</mn></mrow></pre><blockquote>
<p><img src="image/relation1-geq-ex1.gif" alt="{{4}\unicode{8805}{3}\unicode{8805}{3}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.leq" id="contm.leq"></a>4.4.3.6 Less Than or Equal <code><leq/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/relation1.xhtml#leq">leq</a></td>
</tr>
</tbody>
</table>
<p>The <code>leq</code> element represents the "less than or equal to" function
which returns true if the first argument is less than or equal to
the second, and returns false otherwise. While this is a binary relation,
<code>leq</code> may be used with more than two arguments, denoting a chain
of inequalities, as described in <a href="chapter4-d.html#contm.nary.reln">Section 4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)</a>.
</p>
<div class="mathml-example" id="relation1.leq.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><leq/><cn>3</cn><cn>3</cn><cn>4</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>3</mn><mo>&#x2264;</mo><mn>3</mn><mo>&#x2264;</mo><mn>4</mn></mrow></pre><blockquote>
<p><img src="image/relation1-leq-ex1.gif" alt="{{3}\unicode{8804}{3}\unicode{8804}{4}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.equivalent" id="contm.equivalent"></a>4.4.3.7 Equivalent <code><equivalent/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-logical</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#equivalent">equivalent</a></td>
</tr>
</tbody>
</table>
<p>The <code>equivalent</code> element represents the relation that
asserts two Boolean expressions are logically equivalent,
that is have the same Boolean value for any inputs.
</p>
<div class="mathml-example" id="logic1.equivalent1.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><equivalent/>
<ci>a</ci>
<apply><not/><apply><not/><ci>a</ci></apply></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>a</mi>
<mo>&#x2261;</mo>
<mrow><mo>&#xac;</mo><mrow><mo>&#xac;</mo><mi>a</mi></mrow></mrow>
</mrow></pre><blockquote>
<p><img src="image/logic1-equivalent1-ex1.gif" alt="{a\unicode{8801}{\unicode{172}{\unicode{172}a}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.approx" id="contm.approx"></a>4.4.3.8 Approximately <code><approx/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/relation1.xhtml#approx">approx</a></td>
</tr>
</tbody>
</table>
<p>The <code>approx</code> element represent the relation that asserts
the approximate equality of its arguments.
</p>
<div class="mathml-example" id="relation1.approx.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><approx/>
<pi/>
<cn type="rational">22<sep/>7</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>&#x3c0;</mi>
<mo>&#x2243;</mo>
<mrow><mn>22</mn><mo>/</mo><mn>7</mn></mrow>
</mrow></pre><blockquote>
<p><img src="image/relation1-approx-ex1.gif" alt="{\unicode{960}\unicode{8771}{{22}/{7}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.factorof" id="contm.factorof"></a>4.4.3.9 Factor Of <code><factorof/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/integer1.xhtml#factorof">factorof</a></td>
</tr>
</tbody>
</table>
<p>The <code>factorof</code> element is used to indicate the
mathematical relationship that the first argument "is a factor of"
the second. This relationship is true if and only
if <var>b</var> mod <var>a</var> = 0.
</p>
<div class="mathml-example" id="integer1.factorof.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><factorof/><ci>a</ci><ci>b</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>|</mo><mi>b</mi></mrow></pre><blockquote>
<p><img src="image/integer1-factorof-ex1.gif" alt="{\left.a\middle|b\right.}"></p>
</blockquote>
</div>
</div>
</div>
<div class="div3">
<h3><a name="id.4.4.4" id="id.4.4.4"></a>4.4.4 Calculus and Vector Calculus
</h3>
<div class="div4">
<h4><a name="contm.int" id="contm.int"></a>4.4.4.1 Integral <code><int/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">int</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/calculus1.xhtml#int">int</a> <a href="http://www.openmath.org/cd/calculus1.xhtml#defint">defint</a></td>
</tr>
</tbody>
</table>
<p>The <code>int</code> element is the operator element for a definite or indefinite integral
over a function or a definite over an expression with a bound variable.
</p>
<div class="mathml-example" id="calculus1.int.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><int/><sin/></apply>
<cos/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mrow><mi>&#x222b;</mi><mi>sin</mi></mrow><mo>=</mo><mi>cos</mi></mrow></pre><blockquote>
<p><img src="image/calculus1-int-ex1.gif" alt="{{\unicode{8747}{\minormal{sin}}}={\minormal{cos}}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="calculus1.defint.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><int/>
<interval><ci>a</ci><ci>b</ci></interval>
<cos/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msubsup><mi>&#x222b;</mi><mi>a</mi><mi>b</mi></msubsup><mi>cos</mi>
</mrow></pre><blockquote>
<p><img src="image/calculus1-defint-ex1.gif" alt="{\mosubsup\int{a}{b}{\minormal{cos}}}"></p>
</blockquote>
</div>
<p>The <code>int</code> element can also be used with bound variables serving as the
integration variables.
</p>
<div class="mathml-example" id="calculus1.defint.ex2">
<p>Content MathML</p>
<p> Here, definite integrals are indicated by providing qualifier elements specifying a
domain of integration (here a <code>lowlimit</code>/<code>uplimit</code> pair). This is perhaps
the most "standard" representation of this integral:
</p><pre class="mathml">
<apply><int/>
<bvar><ci>x</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><cn>1</cn></uplimit>
<apply><power/><ci>x</ci><cn>2</cn></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msubsup><mi>&#x222b;</mi><mn>0</mn><mn>1</mn></msubsup>
<msup><mi>x</mi><mn>2</mn></msup>
<mi>d</mi>
<mi>x</mi>
</mrow></pre><blockquote>
<p><img src="image/calculus1-defint-ex2.gif" alt="\mosubsup\int{0}{1} {\msup{x}{2}} d x"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>As an indefinite integral applied to a function, the <code>int</code> element corresponds to
the <a href="http://www.openmath.org/cd/calculus1.xhtml#int">int</a> symbol from the <a href="http://www.openmath.org/cd/calculus1.xhtml">calculus1</a> content
dictionary. As a definite integral applied to a function, the <code>int</code> element
corresponds to the <a href="http://www.openmath.org/cd/calculus1.xhtml#defint">defint</a> symbol
from the <a href="http://www.openmath.org/cd/calculus1.xhtml">calculus1</a> content dictionary.
</p>
<p>When no bound variables are present, the translation
of an indefinite integral to Strict Content Markup is straight
forward. When bound variables are present, the following rule
should be used.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.int" id="contm.p2s.int"></a>Rewrite: int
</h5>
<p>Translate an indefinite integral, where
<code> <span class="egmeta">expression-in-x</span> </code> is an
arbitrary expression involving the bound variable(s)
<code> <span class="egmeta">x</span> </code>
</p><pre class="mathml">
<apply><int/>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
to the expression
</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="calculus1">int</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
</apply>
<span class="egmeta">x</span>
</apply></pre><p>
Note that as <var>x</var> is not bound in the original indefinite integral,
the integrated function is applied to the variable <var>x</var> making it
an explicit free variable in Strict Content Markup expression, even though
it is bound in the subterm used as an argument to <a href="http://www.openmath.org/cd/calculus1.xhtml#int">int</a>.
</p>
</div>
<div class="strict-mathml-example" id="contm.strict-int">
<p>For instance, the expression
</p><pre class="mathml">
<apply><int/>
<bvar><ci>x</ci></bvar>
<apply><cos/><ci>x</ci></apply>
</apply></pre><p>
has the Strict Content MathML equivalent
</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="calculus1">int</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<apply><cos/><ci>x</ci></apply>
</bind>
</apply>
<ci>x</ci>
</apply>
</pre></div>
<p>For a definite integral without bound variables, the
translation is also straightforward.
</p>
<div class="strict-mathml-example" id="contm.strict-domainofapplication-nobvar">
<p> For instance, the integral of a differential form <var>f</var> over an arbitrary domain
<var>C</var> represented as
</p><pre class="mathml">
<apply><int/>
<domainofapplication><ci>C</ci></domainofapplication>
<ci>f</ci>
</apply></pre><p>
is equivalent to the Strict Content MathML:
</p><pre class="strict-mathml">
<apply><csymbol cd="calculus1">defint</csymbol><ci>C</ci><ci>f</ci></apply></pre><p>Note, however, the additional remarks on the translations of other
kinds of qualifiers that may be used to specify a domain of integration in the rules for
definite integrals following.
</p>
</div>
<p>When bound variables are present, the situation is more complicated in general, and the
following rules are used.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.defint" id="contm.p2s.defint"></a>Rewrite: defint
</h5>
<p>Translate a definite integral, where
<code> <span class="egmeta">expression-in-x</span> </code> is an
arbitrary expression involving the bound variable(s)
<code> <span class="egmeta">x</span> </code>
</p><pre class="mathml">
<apply><int/>
<bvar> <span class="egmeta">x</span> </bvar>
<domainofapplication> <span class="egmeta">D</span> </domainofapplication>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
to the expression
</p><pre class="strict-mathml">
<apply><csymbol cd="calculus1">defint</csymbol>
<span class="egmeta">D</span>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
</apply></pre></div>
<p>But the definite integral with an <code>lowlimit</code>/<code>uplimit</code> pair carries the
strong intuition that the range of integration is oriented, and thus swapping lower and
upper limits will change the sign of the result. To accommodate this, use the following special
translation rule:
</p>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.int.LUlimit" id="contm.p2s.int.LUlimit"></a>Rewrite: defint limits
</h5><pre class="mathml">
<apply><int/>
<bvar> <span class="egmeta">x</span> </bvar>
<lowlimit> <span class="egmeta">a</span> </lowlimit>
<uplimit> <span class="egmeta">b</span> </uplimit>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
where
<code> <span class="egmeta">expression-in-x</span> </code>
is an expression in the variable <var>x</var>
is translated to to the expression:
</p><pre class="strict-mathml">
<apply><csymbol cd="calculus1">defint</csymbol>
<apply><csymbol cd="interval1">oriented_interval</csymbol>
<span class="egmeta">a</span> <span class="egmeta">b</span>
</apply>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
</apply></pre><p>The <a href="http://www.openmath.org/cd/interval1.xhtml#oriented_interval">oriented_interval</a>
symbol is also used when translating the <code>interval</code>
qualifier, when it is used to specify the domain of integration.
Integration is assumed to proceed from the left endpoint to the
right endpoint.
</p>
<p>The case for multiple integrands is treated analogously.</p>
</div>
<div class="strict-mathml-example" id="contm.strict-condition">
<p>Note that use of the <code>condition</code>
qualifier also
requires special treatment. In particular, it extends to multivariate domains by
using extra bound variables and a domain corresponding to a cartesian product as in:
</p><pre class="mathml">
<bind><int/>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<condition>
<apply><and/>
<apply><leq/><cn>0</cn><ci>x</ci></apply>
<apply><leq/><ci>x</ci><cn>1</cn></apply>
<apply><leq/><cn>0</cn><ci>y</ci></apply>
<apply><leq/><ci>y</ci><cn>1</cn></apply>
</apply>
</condition>
<apply><times/>
<apply><power/><ci>x</ci><cn>2</cn></apply>
<apply><power/><ci>y</ci><cn>3</cn></apply>
</apply>
</bind></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="calculus1">defint</csymbol>
<apply><csymbol cd="set1">suchthat</csymbol>
<apply><csymbol cd="set1">cartesianproduct</csymbol>
<csymbol cd="setname1">R</csymbol>
<csymbol cd="setname1">R</csymbol>
</apply>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="arith1">leq</csymbol><cn>0</cn><ci>x</ci></apply>
<apply><csymbol cd="arith1">leq</csymbol><ci>x</ci><cn>1</cn></apply>
<apply><csymbol cd="arith1">leq</csymbol><cn>0</cn><ci>y</ci></apply>
<apply><csymbol cd="arith1">leq</csymbol><ci>y</ci><cn>1</cn></apply>
</apply>
<bind><csymbol cd="fns11">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn>2</cn></apply>
<apply><csymbol cd="arith1">power</csymbol><ci>y</ci><cn>3</cn></apply>
</apply>
</bind>
</apply>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.diff" id="contm.diff"></a>4.4.4.2 Differentiation <code><diff/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">Differential-Operator</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/calculus1.xhtml#diff">diff</a></td>
</tr>
</tbody>
</table>
<p>The <code>diff</code> element is the differentiation operator element for functions or
expressions of a single variable. It may be applied directly to an actual function
thereby denoting a function which is the derivative of the original function, or it can be
applied to an expression involving a single variable.
</p>
<div class="mathml-example" id="calculus1.diff.ex2">
<p>Content MathML</p><pre class="mathml"><apply><diff/><ci>f</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<msup><mi>f</mi><mo>&#x2032;</mo></msup></pre><blockquote>
<p><img src="image/calculus1-diff-ex2.gif" alt="\msup{f}{\unicode{8242}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="calculus1.diff.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><diff/>
<bvar><ci>x</ci></bvar>
<apply><sin/><ci>x</ci></apply>
</apply>
<apply><cos/><ci>x</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mfrac>
<mrow><mi>d</mi><mrow><mi>sin</mi><mo>&#x2061;</mo><mi>x</mi></mrow></mrow>
<mrow><mi>d</mi><mi>x</mi></mrow>
</mfrac>
<mo>=</mo>
<mrow><mi>cos</mi><mo>&#x2061;</mo><mi>x</mi></mrow>
</mrow></pre><blockquote>
<p><img src="image/calculus1-diff-ex1.gif" alt="{ {\frac{{d{\mathop{{\minormal{sin}}}x}}}{{dx}}} = {\mathop{{\minormal{cos}}}x} }"></p>
</blockquote>
</div>
<p>The <code>bvar</code> element may also contain a <code>degree</code> element, which specifies
the order of the derivative to be taken.
</p>
<div class="mathml-example" id="calculus1.diff.ex3">
<p>Content MathML</p><pre class="mathml">
<apply><diff/>
<bvar><ci>x</ci><degree><cn>2</cn></degree></bvar>
<apply><power/><ci>x</ci><cn>4</cn></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mfrac>
<mrow>
<msup><mi>d</mi><mn>2</mn></msup>
<msup><mi>x</mi><mn>4</mn></msup>
</mrow>
<mrow><mi>d</mi><msup><mi>x</mi><mn>2</mn></msup></mrow>
</mfrac></pre></div>
<p><em>Mapping to Strict Markup</em></p>
<p>For the translation to strict Markup it is crucial to realize that in the expression
case, the variable is actually not bound by the differentiation operator.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.diff" id="contm.p2s.diff"></a>Rewrite: diff
</h5>
<p>Translate an expression
</p><pre class="mathml">
<apply><diff/>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>
where
<code> <span class="egmeta">expression-in-x</span> </code> is an
expression in the variable <var>x</var>
to the expression
</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="calculus1">diff</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">E</span>
</bind>
</apply>
<span class="egmeta">x</span>
</apply></pre><p>
Note that the differentiated function is applied to the variable
<var>x</var> making its status as a free variable explicit in strict
markup. Thus the strict equivalent of
</p><pre class="mathml">
<apply><diff/>
<bvar><ci>x</ci></bvar>
<apply><sin/><ci>x</ci></apply>
</apply></pre><p>
is
</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="calculus1">diff</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<apply><csymbol cd="transc1">sin</csymbol><ci>x</ci></apply>
</bind>
</apply>
<ci>x</ci>
</apply></pre></div>
<p>If the <code>bvar</code> element contains a <code>degree</code> element, use the
<code>nthdiff</code> symbol.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.nthdiff" id="contm.p2s.nthdiff"></a>Rewrite: nthdiff
</h5><pre class="mathml">
<apply><diff/>
<bvar> <span class="egmeta">x</span> <degree> <span class="egmeta">n</span> </degree></bvar>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>where
<code> <span class="egmeta">expression-in-x</span> </code> is an
is an expression in the variable <var>x</var>
is translated to to the expression:
</p><pre class="mathml">
<apply>
<apply><csymbol cd="calculus1">nthdiff</csymbol>
<span class="egmeta">n</span>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
</apply>
<span class="egmeta">x</span>
</apply></pre></div>
<div class="strict-mathml-example" id="contm.nthdiff.ex">
<p>For example</p><pre class="mathml">
<apply><diff/>
<bvar><degree><cn>2</cn></degree><ci>x</ci></bvar>
<apply><sin/><ci>x</ci></apply>
</apply></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="calculus1">nthdiff</csymbol>
<cn>2</cn>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<apply><csymbol cd="transc1">sin</csymbol><ci>x</ci></apply>
</bind>
</apply>
<ci>x</ci>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.partialdiff" id="contm.partialdiff"></a>4.4.4.3 Partial Differentiation <code><partialdiff/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">partialdiff</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/calculus1.xhtml#partialdiff">partialdiff</a> <a href="http://www.openmath.org/cd/calculus1.xhtml#partialdiffdegree">partialdiffdegree</a></td>
</tr>
</tbody>
</table>
<p>The <code>partialdiff</code> element is the partial differentiation operator element for
functions or expressions in several variables.
</p>
<p>For the case of partial differentiation of a function, the
containing <code>partialdiff</code> takes two arguments: firstly a list of
indices indicating by position which function arguments are involved in
constructing the partial derivatives, and secondly the actual function
to be partially differentiated. The indices may be repeated.
</p>
<div class="mathml-example" id="calculus1.partialdiff.ex3">
<p>Content MathML</p><pre class="mathml">
<apply><partialdiff/>
<list><cn>1</cn><cn>1</cn><cn>3</cn></list>
<ci type="function">f</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msub>
<mi>D</mi>
<mrow><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mn>3</mn></mrow>
</msub>
<mi>f</mi>
</mrow></pre><blockquote>
<p><img src="image/calculus1-partialdiff-ex3.gif" alt="{\msub{D}{{{1},{1},{3}}}f}"></p>
</blockquote>
</div>
<div class="mathml-example" id="calculus1.partialdiff.ex3b">
<p>Content MathML</p><pre class="mathml">
<apply><partialdiff/>
<list><cn>1</cn><cn>1</cn><cn>3</cn></list>
<lambda>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<bvar><ci>z</ci></bvar>
<apply><ci>f</ci><ci>x</ci><ci>y</ci><ci>z</ci></apply>
</lambda>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mfrac>
<mrow>
<msup><mo>&#x2202;</mo><mn>3</mn></msup>
<mrow>
<mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced>
</mrow>
</mrow>
<mrow>
<mrow><mo>&#x2202;</mo><msup><mi>x</mi><mn>2</mn></msup></mrow>
<mrow><mo>&#x2202;</mo><mi>z</mi></mrow>
</mrow>
</mfrac></pre><blockquote>
<p><img src="image/calculus1-partialdiff-ex3b.gif" alt="{\frac{{ {\msup{\unicode{8706}}{3}} {f{\left(x,y,z\right)}} }}{{ {\unicode{8706}{\msup{x}{2}}} {\unicode{8706}z} }}}"></p>
</blockquote>
</div>
<p>In the case of algebraic expressions, the bound variables are given by <code>bvar</code>
elements, which are children of the containing <code>apply</code> element. The <code>bvar</code>
elements may also contain <code>degree</code> element, which specify the order of the partial
derivative to be taken in that variable.
</p>
<div class="mathml-example" id="calculus1.partialdiff.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><partialdiff/>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<apply><ci type="function">f</ci><ci>x</ci><ci>y</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mfrac>
<mrow>
<msup><mo>&#x2202;</mo><mn>2</mn></msup>
<mrow>
<mi>f</mi>
<mo>&#x2061;</mo>
<mfenced><mi>x</mi><mi>y</mi></mfenced>
</mrow>
</mrow>
<mrow>
<mrow><mo>&#x2202;</mo><mi>x</mi></mrow>
<mrow><mo>&#x2202;</mo><mi>y</mi></mrow>
</mrow>
</mfrac></pre><blockquote>
<p><img src="image/calculus1-partialdiff-ex2.gif" alt="{\frac{{\msup{\unicode{8706}}{{2}}{\mathop{f}{\left(x,y\right)}}}}{{{\unicode{8706}x}{\unicode{8706}y}}}}"></p>
</blockquote>
</div>
<p>Where a total degree of differentiation must be specified, this is
indicated by use of a <code>degree</code> element at the top level,
i.e. without any associated <code>bvar</code>, as a child of the
containing <code>apply</code> element.
</p>
<div class="mathml-example" id="calculus1.partialdiff.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><partialdiff/>
<bvar><ci>x</ci><degree><ci>m</ci></degree></bvar>
<bvar><ci>y</ci><degree><ci>n</ci></degree></bvar>
<degree><ci>k</ci></degree>
<apply><ci type="function">f</ci>
<ci>x</ci>
<ci>y</ci>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mfrac>
<mrow>
<msup><mo>&#x2202;</mo><mi>k</mi></msup>
<mrow>
<mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi><mi>y</mi></mfenced>
</mrow>
</mrow>
<mrow>
<mrow><mo>&#x2202;</mo><msup><mi>x</mi><mi>m</mi></msup></mrow>
<mrow><mo>&#x2202;</mo><msup><mi>y</mi><mi>n</mi></msup></mrow>
</mrow>
</mfrac></pre><blockquote>
<p><img src="image/calculus1-partialdiff-ex1.gif" alt="{\frac{{\msup{\unicode{8706}}{k}{\mathop{f}{\left(x,y\right)}}}}{{{\unicode{8706}\msup{x}{m}}{\unicode{8706}\msup{y}{n}}}}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>When applied to a function, the <code>partialdiff</code> element
corresponds to the <a href="http://www.openmath.org/cd/calculus1.xhtml#partialdiff">partialdiff</a>
symbol from the <a href="http://www.openmath.org/cd/calculus1.xhtml">calculus1</a> content dictionary. No special
rules are necessary as the two arguments of <code>partialdiff</code>
translate directly to the two arguments of
<a href="http://www.openmath.org/cd/calculus1.xhtml#partialdiff">partialdiff</a>.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.p2s.partialdiff" id="contm.p2s.partialdiff"></a>Rewrite: partialdiffdegree
</h5>
<p>If <code>partialdiff</code> is used with an expression and
<code>bvar</code> qualifiers it is rewritten to
Strict Content MathML using the
<a href="http://www.openmath.org/cd/calculus1.xhtml#partialdiffdegree">partialdiffdegree</a> symbol.
</p><pre class="mathml">
<apply><partialdiff/>
<bvar> <span class="egmeta">x1</span> <degree> <span class="egmeta">n1</span> </degree></bvar>
<bvar> <span class="egmeta">xk</span> <degree> <span class="egmeta">nk</span> </degree></bvar>
<degree> <span class="egmeta">total-n1-nk</span> </degree>
<span class="egmeta">expression-in-x1-xk</span>
</apply></pre><p>
<code> <span class="egmeta">expression-in-x1-xk</span> </code> is an
arbitrary expression involving the bound variables.
</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="calculus1">partialdiffdegree</csymbol>
<apply><csymbol cd="list1">list</csymbol>
<span class="egmeta">n1</span> <span class="egmeta">nk</span>
</apply>
<span class="egmeta">total-n1-nk</span>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x1</span> </bvar>
<bvar> <span class="egmeta">xk</span> </bvar>
<span class="egmeta">A</span>
</bind>
</apply>
<span class="egmeta">x1</span>
<span class="egmeta">xk</span>
</apply></pre><p>If any of the bound variables do not use a <code>degree</code> qualifier,
<code><cn>1</cn></code> should be used in place of the degree.
If the original expression did not use the total degree qualifier then
the second argument to <a href="http://www.openmath.org/cd/calculus1.xhtml#partialdiffdegree">partialdiffdegree</a>
should be the sum of the degrees, for example
</p><pre class="strict-mathml">
<apply><csymbol cd="arith1">plus</csymbol>
<span class="egmeta">n1</span> <span class="egmeta">nk</span>
</apply></pre></div>
<div class="strict-mathml-example" id="contm.p2s.partialdiff.ex1">
<p>With this rule, the expression
</p><pre class="mathml">
<apply><partialdiff/>
<bvar><ci>x</ci><degree><ci>n</ci></degree></bvar>
<bvar><ci>y</ci><degree><ci>m</ci></degree></bvar>
<apply><sin/>
<apply><times/><ci>x</ci><ci>y</ci></apply>
</apply>
</apply></pre><p>
is translated into
</p><pre class="strict-mathml">
<apply>
<apply><csymbol cd="calculus1">partialdiffdegree</csymbol>
<apply><csymbol cd="list1">list</csymbol>
<ci>n</ci><ci>m</ci>
</apply>
<apply><csymbol cd="arith1">plus</csymbol>
<ci>n</ci><ci>m</ci>
</apply>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<apply><csymbol cd="transc1">sin</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<ci>x</ci><ci>y</ci>
</apply>
</apply>
</bind>
<ci>x</ci>
<ci>y</ci>
</apply>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.divergence" id="contm.divergence"></a>4.4.4.4 Divergence <code><divergence/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-veccalc</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/veccalc1.xhtml#divergence">divergence</a></td>
</tr>
</tbody>
</table>
<p>The <code>divergence</code> element is the vector calculus divergence
operator, often called div. It represents the divergence function
which takes one argument which should be a vector of scalar-valued
functions, intended to represent a vector-valued function, and returns
the scalar-valued function giving the divergence of the argument.
</p>
<div class="mathml-example" id="veccalc1.divergence.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><divergence/><ci>a</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>div</mi><mo>&#x2061;</mo><mfenced><mi>a</mi></mfenced></mrow></pre><blockquote>
<p><img src="image/veccalc1-divergence-ex1.gif" alt="{\mathop{{\minormal{div}}}{\left(a\right)}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="veccalc1.divergence.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><divergence/>
<ci type="vector">E</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>div</mi><mo>&#x2061;</mo><mfenced><mi>E</mi></mfenced></mrow></pre><blockquote>
<p><img src="image/veccalc1-divergence-ex2.gif" alt="{\mathop{{\minormal{div}}}{\left(E\right)}}"></p>
</blockquote><pre class="mathml">
<mrow><mo>&#x2207;</mo><mo>&#x22c5;</mo><mi>E</mi></mrow></pre><blockquote>
<p><img src="image/veccalc1-divergence-ex2-2.gif" alt="{\unicode{8711}\unicode{8901}E}"></p>
</blockquote>
</div>
<p>The functions defining the coordinates may be defined implicitly as expressions defined
in terms of the coordinate names, in which case the coordinate names must be provided as
bound variables.
</p>
<div class="mathml-example" id="veccalc1.divergence.ex3">
<p>Content MathML</p><pre class="mathml">
<apply><divergence/>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<bvar><ci>z</ci></bvar>
<vector>
<apply><plus/><ci>x</ci><ci>y</ci></apply>
<apply><plus/><ci>x</ci><ci>z</ci></apply>
<apply><plus/><ci>z</ci><ci>y</ci></apply>
</vector>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>div</mi>
<mo>&#x2061;</mo>
<mo>(</mo>
<mtable>
<mtr><mtd>
<mi>x</mi>
<mo>&#x21a6;</mo>
<mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow>
</mtd></mtr>
<mtr><mtd>
<mi>y</mi>
<mo>&#x21a6;</mo>
<mrow><mi>x</mi><mo>+</mo><mi>z</mi></mrow>
</mtd></mtr>
<mtr><mtd>
<mi>z</mi>
<mo>&#x21a6;</mo>
<mrow><mi>z</mi><mo>+</mo><mi>y</mi></mrow>
</mtd></mtr>
</mtable>
<mo>)</mo>
</mrow></pre><blockquote>
<p><img src="image/veccalc1-divergence-ex3.gif" alt="{\left.\mathop{{\minormal{div}}}\middle({\begin{matrix}x\unicode{8614}{x+y}\\y\unicode{8614}{x+z}\\z\unicode{8614}{z+y}\end{matrix}}\middle)\right.}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.grad" id="contm.grad"></a>4.4.4.5 Gradient <code><grad/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-veccalc</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/veccalc1.xhtml#grad">grad</a></td>
</tr>
</tbody>
</table>
<p>The <code>grad</code> element is the vector calculus gradient operator, often called
grad. It is used to represent the grad function, which takes one
argument which should be a scalar-valued function and returns a
vector of functions.
</p>
<div class="mathml-example" id="veccalc1.gradient.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><grad/><ci type="function">f</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>grad</mi><mo>&#x2061;</mo><mfenced><mi>f</mi></mfenced></mrow></pre><blockquote>
<p><img src="image/veccalc1-gradient-ex1.gif" alt="{\mathop{{\minormal{grad}}}{\left(f\right)}}"></p>
</blockquote><pre class="mathml">
<mrow><mo>&#x2207;</mo><mo>&#x2061;</mo><mfenced><mi>f</mi></mfenced></mrow></pre><blockquote>
<p><img src="image/veccalc1-gradient-ex1-2.gif" alt="{\unicode{8711}\unicode{8289}{\left(f\right)}}"></p>
</blockquote>
</div>
<p>The functions defining the coordinates may be defined implicitly as expressions
defined in terms of the coordinate names, in which case the coordinate names must be
provided as bound variables.
</p>
<div class="mathml-example" id="veccalc1.gradient.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><grad/>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<bvar><ci>z</ci></bvar>
<apply><times/><ci>x</ci><ci>y</ci><ci>z</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>grad</mi>
<mo>&#x2061;</mo>
<mrow>
<mo>(</mo>
<mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced>
<mo>&#x21a6;</mo>
<mrow>
<mi>x</mi><mo>&#x2062;</mo><mi>y</mi><mo>&#x2062;</mo><mi>z</mi>
</mrow>
<mo>)</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/veccalc1-gradient-ex2.gif" alt="{\mathop{{\minormal{grad}}}{\left.\middle({\left(x,y,z\right)}\unicode{8614}{x\unicode{8290}y\unicode{8290}z}\middle)\right.}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.curl" id="contm.curl"></a>4.4.4.6 Curl <code><curl/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-veccalc</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/veccalc1.xhtml#curl">curl</a></td>
</tr>
</tbody>
</table>
<p>The <code>curl</code> element is used to represent the curl function
of vector calculus. It takes one argument which should be a vector
of scalar-valued functions, intended to represent a vector-valued
function, and returns a vector of functions.
</p>
<div class="mathml-example" id="veccalc1.curl.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><curl/><ci>a</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>curl</mi><mo>&#x2061;</mo><mfenced><mi>a</mi></mfenced></mrow></pre><blockquote>
<p><img src="image/veccalc1-curl-ex1.gif" alt="{\mathop{{\minormal{curl}}}{\left(a\right)}}"></p>
</blockquote><pre class="mathml">
<mrow><mo>&#x2207;</mo><mo>&#xd7;</mo><mi>a</mi></mrow></pre><blockquote>
<p><img src="image/veccalc1-curl-ex1-2.gif" alt="{\unicode{8711}\unicode{215}a}"></p>
</blockquote>
</div>
<p>The functions defining the coordinates may be defined implicitly as expressions
defined in terms of the coordinate names, in which case the coordinate names must be
provided as bound variables.
</p>
</div>
<div class="div4">
<h4><a name="contm.laplacian" id="contm.laplacian"></a>4.4.4.7 Laplacian <code><laplacian/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-veccalc</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/veccalc1.xhtml#Laplacian">Laplacian</a></td>
</tr>
</tbody>
</table>
<p>The <code>laplacian</code> element represents the Laplacian operator of
vector calculus. The Laplacian takes a single argument which is a
vector of scalar-valued functions representing a vector-valued
function, and returns a vector of functions.
</p>
<div class="mathml-example" id="veccalc1.laplacian.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><laplacian/><ci type="vector">E</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msup><mo>&#x2207;</mo><mn>2</mn></msup>
<mo>&#x2061;</mo>
<mfenced><mi>E</mi></mfenced>
</mrow></pre><blockquote>
<p><img src="image/veccalc1-laplacian-ex1.gif" alt="{\msup{\unicode{8711}}{{2}}\unicode{8289}{\left(E\right)}}"></p>
</blockquote>
</div>
<p>The functions defining the coordinates may be defined implicitly as expressions
defined in terms of the coordinate names, in which case the coordinate names must be
provided as bound variables.
</p>
<div class="mathml-example" id="veccalc1.laplacian.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><laplacian/>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<bvar><ci>z</ci></bvar>
<apply><ci>f</ci><ci>x</ci><ci>y</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msup><mo>&#x2207;</mo><mn>2</mn></msup>
<mo>&#x2061;</mo>
<mrow>
<mo>(</mo>
<mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced>
<mo>&#x21a6;</mo>
<mrow><mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>
<mo>)</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/veccalc1-laplacian-ex2.gif" alt="{\msup{\unicode{8711}}{{2}}\unicode{8289}{\left.\middle({\left(x,y,z\right)}\unicode{8614}{\mathop{f}{\left(x,y\right)}}\middle)\right.}}"></p>
</blockquote>
</div>
</div>
</div>
<div class="div3">
<h3><a name="contm.sets" id="contm.sets"></a>4.4.5 Theory of Sets
</h3>
<div class="div4">
<h4><a name="contm.set" id="contm.set"></a>4.4.5.1 Set <code><set></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-setlist-constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a>, <a href="appendixa-d.html#parsing_type">type</a>?
</td>
</tr>
<tr>
<th><code>type</code> Attribute Values
</th>
<td>"set" | "multiset" | text </td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a>*
</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#set">set</a>, <a href="http://www.openmath.org/cd/multiset1.xhtml#multiset">multiset</a></td>
</tr>
</tbody>
</table>
<p>The <code>set</code> represents a function which constructs
mathematical sets from its arguments. It is an n-ary function. The
members of the set to be constructed may be given explicitly as
child elements of the constructor, or specified by rule as described
in <a href="chapter4-d.html#contm.container.constructor">Section 4.3.1.1 Container Markup for Constructor Symbols</a>. There is no implied ordering to
the elements of a set.
</p>
<div class="mathml-example" id="set1.set.ex1">
<p>Content MathML</p><pre class="mathml">
<set>
<ci>a</ci><ci>b</ci><ci>c</ci>
</set></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>{</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>,</mo><mi>c</mi><mo>}</mo>
</mrow></pre><blockquote>
<p><img src="image/set1-set-ex1.gif" alt="{\left.\middle\{a,b,c\middle\}\right.}"></p>
</blockquote>
</div>
<p>In general, a set can be constructed by providing a function and a domain of
application. The elements of the set correspond to the values obtained by evaluating
the function at the points of the domain.
</p>
<div class="mathml-example" id="set1.suchthat.ex1">
<p>Content MathML</p><pre class="mathml">
<set>
<bvar><ci>x</ci></bvar>
<condition>
<apply><lt/><ci>x</ci><cn>5</cn></apply>
</condition>
<ci>x</ci>
</set></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>{</mo>
<mi>x</mi>
<mo>|</mo>
<mrow><mi>x</mi><mo>&lt;</mo><mn>5</mn></mrow>
<mo>}</mo>
</mrow></pre><blockquote>
<p><img src="image/set1-suchthat-ex1.gif" alt="{\left.\middle\{x\middle|{x\lt{5}}\middle\}\right.}"></p>
</blockquote>
</div>
<div class="mathml-example" id="set1.suchthat.ex2">
<p>Content MathML</p><pre class="mathml">
<set>
<bvar><ci type="set">S</ci></bvar>
<condition>
<apply><in/><ci>S</ci><ci type="list">T</ci></apply>
</condition>
<ci>S</ci>
</set></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>{</mo>
<mi>S</mi>
<mo>|</mo>
<mrow><mi>S</mi><mo>&#x2208;</mo><mi>T</mi></mrow>
<mo>}</mo>
</mrow></pre><blockquote>
<p><img src="image/set1-suchthat-ex2.gif" alt="{\left.\middle\{S\middle|{S\unicode{8712}T}\middle\}\right.}"></p>
</blockquote>
</div>
<div class="mathml-example" id="set1.suchthat.ex3">
<p>Content MathML</p><pre class="mathml">
<set>
<bvar><ci> x </ci></bvar>
<condition>
<apply><and/>
<apply><lt/><ci>x</ci><cn>5</cn></apply>
<apply><in/><ci>x</ci><naturalnumbers/></apply>
</apply>
</condition>
<ci>x</ci>
</set></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>{</mo>
<mi>x</mi>
<mo>|</mo>
<mrow>
<mrow><mo>(</mo><mi>x</mi><mo>&lt;</mo><mn>5</mn><mo>)</mo></mrow>
<mo>&#x2227;</mo>
<mrow>
<mi>x</mi><mo>&#x2208;</mo><mi mathvariant="double-struck">N</mi>
</mrow>
</mrow>
<mo>}</mo>
</mrow></pre><blockquote>
<p><img src="image/set1-suchthat-ex3.gif" alt="{\left.\middle\{x\middle|{{\left.\middle(x\lt{5}\middle)\right.}\unicode{8743}{x\unicode{8712}{\midoublestruck{N}}}}\middle\}\right.}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.list" id="contm.list"></a>4.4.5.2 List <code><list></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-setlist-constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a>, <a href="appendixa-d.html#parsing_order">order</a></td>
</tr>
<tr>
<th><code>order</code> Attribute Values
</th>
<td>"numeric" | "lexicographic"</td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a>*
</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/interval1.xhtml#interval_cc">interval_cc</a>, <a href="http://www.openmath.org/cd/list1.xhtml#list">list</a></td>
</tr>
</tbody>
</table>
<p>The <code>list</code> elements represents the n-ary function which
constructs a list from its arguments. Lists differ from sets in that
there is an explicit order to the elements.
</p>
<p>The list entries and order may be given explicitly.</p>
<div class="mathml-example" id="list1.list.ex1">
<p>Content MathML</p><pre class="mathml">
<list>
<ci>a</ci><ci>b</ci><ci>c</ci>
</list></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>,</mo><mi>c</mi><mo>)</mo>
</mrow></pre><blockquote>
<p><img src="image/list1-list-ex1.gif" alt="{\left.\middle(a,b,c\middle)\right.}"></p>
</blockquote>
</div>
<p>In general a list can be constructed by providing a function and
a domain of application. The elements of the list correspond to the
values obtained by evaluating the function at the points of the
domain. When this method is used, the ordering of the list elements
may not be clear, so the kind of ordering may be specified by the
<code>order</code> attribute. Two orders are supported: lexicographic
and numeric.
</p>
<div class="mathml-example" id="list1.suchthat.ex1">
<p>Content MathML</p><pre class="mathml">
<list order="numeric">
<bvar><ci>x</ci></bvar>
<condition>
<apply><lt/><ci>x</ci><cn>5</cn></apply>
</condition>
</list></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>|</mo>
<mrow><mi>x</mi><mo>&lt;</mo><mn>5</mn></mrow>
<mo>)</mo>
</mrow></pre><blockquote>
<p><img src="image/list1-suchthat-ex1.gif" alt="{\left.\middle(x\middle|{x\lt{5}}\middle)\right.}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.union" id="contm.union"></a>4.4.5.3 Union <code><union/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#union">union</a></td>
</tr>
</tbody>
</table>
<p>The <code>union</code> element is used to denote the n-ary union of sets. It takes sets as arguments,
and denotes the set that contains all the elements that occur in any
of them.
</p>
<p>Arguments may be explicitly specified.</p>
<div class="mathml-example" id="set1.union.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><union/><ci>A</ci><ci>B</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x222a;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-union-ex1.gif" alt="{A\unicode{8746}B}"></p>
</blockquote>
</div>
<p>Arguments may also be specified using qualifier elements as described in
<a href="chapter4-d.html#contm.nary">Section 4.3.4.1 N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)</a>. operator element can be used as a binding
operator to construct the union over a collection of sets.
</p>
<div class="mathml-example" id="set1.big.union.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><union/>
<bvar><ci type="set">S</ci></bvar>
<domainofapplication>
<ci type="list">L</ci>
</domainofapplication>
<ci type="set"> S</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><munder><mo>&#x22c3;</mo><mi>L</mi></munder><mi>S</mi></mrow></pre><blockquote>
<p><img src="image/set1-big_union-ex1.gif" alt="{\munder{\unicode{8899}}{L}S}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.intersect" id="contm.intersect"></a>4.4.5.4 Intersect <code><intersect/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#intersect">intersect</a></td>
</tr>
</tbody>
</table>
<p>The <code>intersect</code> element is used to denote the n-ary
intersection of sets. It takes sets as arguments, and denotes the
set that contains all the elements that occur in all of them. Its arguments may be explicitly specified in the
enclosing <code>apply</code> element, or specified using qualifier
elements as described in <a href="chapter4-d.html#contm.nary">Section 4.3.4.1 N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)</a>.
</p>
<div class="mathml-example" id="set1.intersect.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><intersect/>
<ci type="set"> A </ci>
<ci type="set"> B </ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x2229;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-intersect-ex1.gif" alt="{A\unicode{8745}B}"></p>
</blockquote>
</div>
<div class="mathml-example" id="set1.big.intersect.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><intersect/>
<bvar><ci type="set">S</ci></bvar>
<domainofapplication><ci type="list">L</ci></domainofapplication>
<ci type="set"> S </ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><munder><mo>&#x22c2;</mo><mi>L</mi></munder><mi>S</mi></mrow></pre><blockquote>
<p><img src="image/set1-big_intersect-ex1.gif" alt="{\munder{\unicode{8898}}{L}S}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.in" id="contm.in"></a>4.4.5.5 Set inclusion <code><in/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#in">in</a></td>
</tr>
</tbody>
</table>
<p>The <code>in</code> element represents the set inclusion relation.
It has two arguments, an element and a set. It is used to denote
that the element is in the given set.
</p>
<div class="mathml-example" id="set1.in.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><in/><ci>a</ci><ci type="set">A</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>&#x2208;</mo><mi>A</mi></mrow></pre><blockquote>
<p><img src="image/set1-in-ex1.gif" alt="{a\unicode{8712}A}"></p>
</blockquote>
</div>
<p>When translating to Strict Content Markup, if the <code>type</code>
has value "multiset", then the <a href="http://www.openmath.org/cd/multiset1.xhtml#in">in</a> symbol from <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a> should
be used instead.
</p>
</div>
<div class="div4">
<h4><a name="contm.notin" id="contm.notin"></a>4.4.5.6 Set exclusion <code><notin/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#notin">notin</a></td>
</tr>
</tbody>
</table>
<p>The <code>notin</code> represents the negated set inclusion
relation. It has two arguments, an element and a set. It is
used to denote that the element is not in the given set.
</p>
<div class="mathml-example" id="set1.notin.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><notin/><ci>a</ci><ci type="set">A</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>a</mi><mo>&#x2209;</mo><mi>A</mi></mrow></pre><blockquote>
<p><img src="image/set1-notin-ex1.gif" alt="{a\unicode{8713}A}"></p>
</blockquote>
</div>
<p>When translating to Strict Content Markup, if the <code>type</code> has value "multiset", then
the <a href="http://www.openmath.org/cd/multiset1.xhtml#in">in</a> symbol from <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a> should be used instead.
</p>
</div>
<div class="div4">
<h4><a name="contm.subset" id="contm.subset"></a>4.4.5.7 Subset <code><subset/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary.reln">nary-set-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#subset">subset</a></td>
</tr>
</tbody>
</table>
<p>The <code>subset</code> element represents the subset relation. It is used to denote that the
first argument is a subset of the second. As described in <a href="chapter4-d.html#contm.nary.reln">Section 4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)</a>, it may also be used as an n-ary operator to express
that each argument is a subset of its predecessor.
</p>
<div class="mathml-example" id="set1.subset.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><subset/>
<ci type="set">A</ci>
<ci type="set">B</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x2286;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-subset-ex1.gif" alt="{A\unicode{8838}B}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.prsubset" id="contm.prsubset"></a>4.4.5.8 Proper Subset <code><prsubset/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary.reln">nary-set-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#prsubset">prsubset</a></td>
</tr>
</tbody>
</table>
<p>The <code>prsubset</code> element represents the proper subset
relation, i.e. that the first argument is a proper subset of the
second. As described in <a href="chapter4-d.html#contm.nary.reln">Section 4.3.4.3 N-ary Relations (classes nary-reln, nary-set-reln)</a>, it may
also be used as an n-ary operator to express that each argument is a
proper subset of its predecessor.
</p>
<div class="mathml-example" id="set1.prsubset.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><prsubset/>
<ci type="set">A</ci>
<ci type="set">B</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x2282;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-prsubset-ex1.gif" alt="{A\unicode{8834}B}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.notsubset" id="contm.notsubset"></a>4.4.5.9 Not Subset <code><notsubset/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#notsubset">notsubset</a></td>
</tr>
</tbody>
</table>
<p>The <code>notsubset</code> element represents the negated subset
relation. It is used to denote that the first argument is not a subset of the
second.
</p>
<div class="mathml-example" id="set1.notsubset.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><notsubset/>
<ci type="set">A</ci>
<ci type="set">B</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x2288;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-notsubset-ex1.gif" alt="{A\unicode{8840}B}"></p>
</blockquote>
</div>
<p>When translating to Strict Content Markup, if the <code>type</code> has value "multiset", then
the <a href="http://www.openmath.org/cd/multiset1.xhtml#in">in</a> symbol from <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a> should be used instead.
</p>
</div>
<div class="div4">
<h4><a name="contm.notprsubset" id="contm.notprsubset"></a>4.4.5.10 Not Proper Subset <code><notprsubset/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#notprsubset">notprsubset</a></td>
</tr>
</tbody>
</table>
<p>The <code>notprsubset</code> element represents the negated proper
subset relation. It is used to denote that the first argument is not
a proper subset of the second.
</p>
<div class="mathml-example" id="set1.notprsubset.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><notprsubset/>
<ci type="set">A</ci>
<ci type="set">B</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x2284;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-notprsubset-ex1.gif" alt="{A\unicode{8836}B}"></p>
</blockquote>
</div>
<p>When translating to Strict Content Markup, if the <code>type</code> has value "multiset", then
the <a href="http://www.openmath.org/cd/multiset1.xhtml#in">in</a> symbol from <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a> should be used instead.
</p>
</div>
<div class="div4">
<h4><a name="contm.setdiff" id="contm.setdiff"></a>4.4.5.11 Set Difference <code><setdiff/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#setdiff">setdiff</a>, <a href="http://www.openmath.org/cd/multiset1.xhtml#setdiff">setdiff</a></td>
</tr>
</tbody>
</table>
<p>The <code>setdiff</code> element represents set difference
operator. It takes two sets as arguments, and denotes the set that
contains all the elements that occur in the first set, but not in
the second.
</p>
<div class="mathml-example" id="set1.setdiff.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><setdiff/>
<ci type="set">A</ci>
<ci type="set">B</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x2216;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-setdiff-ex1.gif" alt="{A\unicode{8726}B}"></p>
</blockquote>
</div>
<p>When translating to Strict Content Markup, if the <code>type</code> has value "multiset", then
the <a href="http://www.openmath.org/cd/multiset1.xhtml#in">in</a> symbol from <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a> should be used instead.
</p>
</div>
<div class="div4">
<h4><a name="contm.card" id="contm.card"></a>4.4.5.12 Cardinality <code><card/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#size">size</a>, <a href="http://www.openmath.org/cd/multiset1.xhtml#size">size</a></td>
</tr>
</tbody>
</table>
<p>The <code>card</code> element represents the cardinality function,
which takes a set argument and returns its cardinality, i.e. the
number of elements in the set. The cardinality of a set is a
non-negative integer, or an infinite cardinal number.
</p>
<div class="mathml-example" id="set1.size.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><card/><ci>A</ci></apply>
<cn>5</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mo>|</mo><mi>A</mi><mo>|</mo></mrow>
<mo>=</mo>
<mn>5</mn>
</mrow></pre><blockquote>
<p><img src="image/set1-size-ex1.gif" alt="{{\left.\middle|A\middle|\right.}={5}}"></p>
</blockquote>
</div>
<p>When translating to Strict Content Markup, if the <code>type</code>
has value "multiset", then the <a href="http://www.openmath.org/cd/multiset1.xhtml#size">size</a> symbol from <a href="http://www.openmath.org/cd/multiset1.xhtml">multiset1</a> should be used
instead.
</p>
</div>
<div class="div4">
<h4><a name="contm.cartesianproduct" id="contm.cartesianproduct"></a>4.4.5.13 Cartesian product <code><cartesianproduct/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#cartesian_product">cartesian_product</a></td>
</tr>
</tbody>
</table>
<p>The <code>cartesianproduct</code> element is used to represents the
Cartesian product operator. It takes sets as arguments, which may be
explicitly specified in the enclosing <code>apply</code> element, or
specified using qualifier elements as described in <a href="chapter4-d.html#contm.nary">Section 4.3.4.1 N-ary Operators (classes nary-arith, nary-functional, nary-logical,
nary-linalg, nary-set, nary-constructor)</a>.
</p>
<div class="mathml-example" id="set1.cartesianproduct.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><cartesianproduct/><ci>A</ci><ci>B</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#xd7;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/set1-cartesianproduct-ex1.gif" alt="{A\unicode{215}B}"></p>
</blockquote>
</div>
</div>
</div>
<div class="div3">
<h3><a name="id.4.4.6" id="id.4.4.6"></a>4.4.6 Sequences and Series
</h3>
<div class="div4">
<h4><a name="contm.sum" id="contm.sum"></a>4.4.6.1 Sum <code><sum/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">sum</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#sum">sum</a></td>
</tr>
</tbody>
</table>
<p>The <code>sum</code> element represents the n-ary addition operator.
The terms of the sum are normally specified by rule through the use of
qualifiers. While it can be used with an explicit list of
arguments, this is strongly discouraged, and the <code>plus</code>
operator should be used instead in such situations.
</p>
<p>The <code>sum</code> operator may be used either with or without
explicit bound variables. When a bound variable is used, the
<code>sum</code> element is followed by one or more <code>bvar</code>
elements giving the index variables, followed by qualifiers giving
the domain for the index variables. The final child in the enclosing
<code>apply</code> is then an expression in the bound variables, and the
terms of the sum are obtained by evaluating this expression at each
point of the domain of the index variables. Depending on the
structure of the domain, the domain of summation is often given
by using <code>uplimit</code> and <code>lowlimit</code> to specify upper and
lower limits for the sum.
</p>
<p>When no bound variables are explicitly given, the final child of
the enclosing <code>apply</code> element must be a function, and the
terms of the sum are obtained by evaluating the function at
each point of the domain specified by qualifiers.
</p>
<div class="mathml-example" id="arith1.sum.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><sum/>
<bvar><ci>x</ci></bvar>
<lowlimit><ci>a</ci></lowlimit>
<uplimit><ci>b</ci></uplimit>
<apply><ci>f</ci><ci>x</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munderover>
<mo>&#x2211;</mo>
<mrow><mi>x</mi><mo>=</mo><mi>a</mi></mrow>
<mi>b</mi>
</munderover>
<mrow><mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi></mfenced></mrow>
</mrow></pre><blockquote>
<p><img src="image/arith1-sum-ex1.gif" alt="{\munderover{\unicode{8721}}{{x=a}}{b}{\mathop{f}{\left(x\right)}}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="arith1.sum.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><sum/>
<bvar><ci>x</ci></bvar>
<condition>
<apply><in/><ci>x</ci><ci type="set">B</ci></apply>
</condition>
<apply><ci type="function">f</ci><ci>x</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munder>
<mo>&#x2211;</mo>
<mrow><mi>x</mi><mo>&#x2208;</mo><mi>B</mi></mrow>
</munder>
<mrow><mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi></mfenced></mrow>
</mrow></pre><blockquote>
<p><img src="image/arith1-sum-ex2.gif" alt="{\munder{\unicode{8721}}{{x\unicode{8712}B}}{\mathop{f}{\left(x\right)}}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="arith1.sum.ex3">
<p>Content MathML</p><pre class="mathml">
<apply><sum/>
<domainofapplication>
<ci type="set">B</ci>
</domainofapplication>
<ci type="function">f</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><munder><mo>&#x2211;</mo><mi>B</mi></munder><mi>f</mi></mrow></pre><blockquote>
<p><img src="image/arith1-sum-ex3.gif" alt="{\munder{\unicode{8721}}{B}f}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Content MathML</em></p>
<p>When no explicit bound variables are used, no special rules are
required to rewrite sums as Strict Content beyond the generic rules
for rewriting expressions using qualifiers. However, when bound
variables are used, it is necessary to introduce a <code>lambda</code>
construction to rewrite the expression in the bound variables as a
function.
</p>
<div class="strict-mathml-example" id="contm.strict-sum">
<p>Content MathML</p><pre class="mathml">
<apply><sum/>
<bvar><ci>i</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><cn>100</cn></uplimit>
<apply><power/><ci>x</ci><ci>i</ci></apply>
</apply></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="arith1">sum</csymbol>
<apply><csymbol cd="interval1">integer_interval</csymbol>
<cn>0</cn>
<cn>100</cn>
</apply>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>i</ci></bvar>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><ci>i</ci></apply>
</bind>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.product" id="contm.product"></a>4.4.6.2 Product <code><product/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">product</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/arith1.xhtml#product">product</a></td>
</tr>
</tbody>
</table>
<p>The <code>product</code> element represents the n-ary multiplication operator.
The terms of the product are normally specified by rule through the use of
qualifiers. While it can be used with an explicit list of
arguments, this is strongly discouraged, and the <code>times</code>
operator should be used instead in such situations.
</p>
<p>The <code>product</code> operator may be used either with or without
explicit bound variables. When a bound variable is used, the
<code>product</code> element is followed by one or more <code>bvar</code>
elements giving the index variables, followed by qualifiers giving
the domain for the index variables. The final child in the enclosing
<code>apply</code> is then an expression in the bound variables, and the
terms of the product are obtained by evaluating this expression at
each point of the domain. Depending on the structure of the domain,
it is commonly given using <code>uplimit</code> and <code>lowlimit</code>
qualifiers.
</p>
<p>When no bound variables are explicitly given, the final child of
the enclosing <code>apply</code> element must be a function, and the
terms of the product are obtained by evaluating the function
at each point of the domain specified by qualifiers.
</p>
<div class="mathml-example" id="arith1.product.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><product/>
<bvar><ci>x</ci></bvar>
<lowlimit><ci>a</ci></lowlimit>
<uplimit><ci>b</ci></uplimit>
<apply><ci type="function">f</ci>
<ci>x</ci>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munderover>
<mo>&#x220f;</mo>
<mrow><mi>x</mi><mo>=</mo><mi>a</mi></mrow>
<mi>b</mi>
</munderover>
<mrow><mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi></mfenced></mrow>
</mrow></pre><blockquote>
<p><img src="image/arith1-product-ex1.gif" alt="{\munderover{\unicode{8719}}{{x=a}}{b}{\mathop{f}{\left(x\right)}}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="arith1.product.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><product/>
<bvar><ci>x</ci></bvar>
<condition>
<apply><in/>
<ci>x</ci>
<ci type="set">B</ci>
</apply>
</condition>
<apply><ci>f</ci><ci>x</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munder>
<mo>&#x220f;</mo>
<mrow><mi>x</mi><mo>&#x2208;</mo><mi>B</mi></mrow>
</munder>
<mrow><mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi></mfenced></mrow>
</mrow></pre><blockquote>
<p><img src="image/arith1-product-ex2.gif" alt="{\munder{\unicode{8719}}{{x\unicode{8712}B}}{\mathop{f}{\left(x\right)}}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Content MathML</em></p>
<p>When no explicit bound variables are used, no special rules are
required to rewrite products as Strict Content beyond the generic rules
for rewriting expressions using qualifiers. However, when bound
variables are used, it is necessary to introduce a <code>lambda</code>
construction to rewrite the expression in the bound variables as a
function.
</p>
<div class="strict-mathml-example" id="contm.strict-product">
<p>Content MathML</p><pre class="mathml">
<apply><product/>
<bvar><ci>i</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><cn>100</cn></uplimit>
<apply><power/><ci>x</ci><ci>i</ci></apply>
</apply></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="arith1">product</csymbol>
<apply><csymbol cd="interval1">integer_interval</csymbol>
<cn>0</cn>
<cn>100</cn>
</apply>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar><ci>i</ci></bvar>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><ci>i</ci></apply>
</bind>
</apply></pre></div>
</div>
<div class="div4">
<h4><a name="contm.limit" id="contm.limit"></a>4.4.6.3 Limits <code><limit/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.otherclass">limit</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td>
<a href="appendixa-d.html#parsing_lowlimit">lowlimit</a>,
<a href="appendixa-d.html#parsing_condition">condition</a>
</td>
</tr>
<tr>
<th>OM Symbols</th>
<td>
<a href="http://www.openmath.org/cd/limit1.xhtml#limit">limit</a>,
<a href="http://www.openmath.org/cd/limit1.xhtml#both_sides">both_sides</a>,
<a href="http://www.openmath.org/cd/limit1.xhtml#above">above</a>,
<a href="http://www.openmath.org/cd/limit1.xhtml#below">below</a>,
<a href="http://www.openmath.org/cd/limit1.xhtml#null">null</a>
</td>
</tr>
</tbody>
</table>
<p>The <code>limit</code> element represents the operation of taking a limit of a
sequence. The limit point is expressed by specifying a <code>lowlimit</code> and a
<code>bvar</code>, or by specifying a <code>condition</code> on one or more bound variables.
</p>
<div class="mathml-example" id="limit1.limit.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><limit/>
<bvar><ci>x</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<apply><sin/><ci>x</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munder>
<mi>lim</mi>
<mrow><mi>x</mi><mo>&#x2192;</mo><mn>0</mn></mrow>
</munder>
<mrow><mi>sin</mi><mo>&#x2061;</mo><mi>x</mi></mrow>
</mrow></pre><blockquote>
<p><img src="image/limit1-limit-ex1.gif" alt="{\munder{{\minormal{lim}}}{{x\unicode{8594}{0}}}{\mathop{{\minormal{sin}}}x}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="limit1.limit.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><limit/>
<bvar><ci>x</ci></bvar>
<condition>
<apply><tendsto/><ci>x</ci><cn>0</cn></apply>
</condition>
<apply><sin/><ci>x</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munder>
<mi>lim</mi>
<mrow><mi>x</mi><mo>&#x2192;</mo><mn>0</mn></mrow>
</munder>
<mrow><mi>sin</mi><mo>&#x2061;</mo><mi>x</mi></mrow>
</mrow></pre><blockquote>
<p><img src="image/limit1-limit-ex2.gif" alt="{\munder{{\minormal{lim}}}{{x\unicode{8594}{0}}}{\mathop{{\minormal{sin}}}x}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="limit1.limit.ex3">
<p>Content MathML</p><pre class="mathml">
<apply><limit/>
<bvar><ci>x</ci></bvar>
<condition>
<apply><tendsto type="above"/><ci>x</ci><ci>a</ci></apply>
</condition>
<apply><sin/><ci>x</ci></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<munder>
<mi>lim</mi>
<mrow><mi>x</mi><mo>&#x2192;</mo><msup><mi>a</mi><mo>+</mo></msup></mrow>
</munder>
<mrow><mi>sin</mi><mo>&#x2061;</mo><mi>x</mi></mrow>
</mrow></pre><blockquote>
<p><img src="image/limit1-limit-ex3.gif" alt="{\munder{{\minormal{lim}}}{{x\unicode{8594}\msup{a}{+}}}{\mathop{{\minormal{sin}}}x}}"></p>
</blockquote>
</div>
<p>The direction from which a limiting value is approached is given as an argument
<a href="http://www.openmath.org/cd/limit1.xhtml#limit">limit</a> in Strict Content MathML, which supplies the
direction specifier symbols <a href="http://www.openmath.org/cd/limit1.xhtml#both_sides">both_sides</a>, <a href="http://www.openmath.org/cd/limit1.xhtml#above">above</a>, and <a href="http://www.openmath.org/cd/limit1.xhtml#below">below</a> for this
purpose. The first correspond to the values "all", "above",
and "below" of the <code>type</code> attribute of the <code>tendsto</code>
element below. The <a href="http://www.openmath.org/cd/limit1.xhtml#null">null</a> symbol corresponds to the case
where no <code>type</code> attribute is present. We translate
</p>
<div class="strict-mathml-example">
<h5><a name="contm.strict-limit" id="contm.strict-limit"></a>Rewrite: limits condition
</h5><pre class="mathml">
<apply><limit/>
<bvar> <span class="egmeta">x</span> </bvar>
<condition>
<apply><tendsto/> <span class="egmeta">x</span> <span class="egmeta"><cn></span>0<span class="egmeta"></cn></span></apply>
</condition>
<span class="egmeta">expression-in-x</span>
</apply></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="limit1">limit</csymbol>
<span class="egmeta"><cn></span>0<span class="egmeta"></cn></span>
<csymbol cd="limit1"><span class="egmeta">null</span></csymbol>
<bind><csymbol cd="fns1">lambda</csymbol>
<bvar> <span class="egmeta">x</span> </bvar>
<span class="egmeta">expression-in-x</span>
</bind>
</apply></pre><p>where
<code> <span class="egmeta">expression-in-x</span> </code> is an
arbitrary expression involving the bound variable(s), and the choice of
symbol, <a href="http://www.openmath.org/cd/limit1.xhtml#null">null</a> depends on the
<code>type</code> attribute of the <code>tendsto</code> element as
described above.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.tendsto" id="contm.tendsto"></a>4.4.6.4 Tends To <code><tendsto/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-reln</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a>, <a href="appendixa-d.html#parsing_type">type</a>?
</td>
</tr>
<tr>
<th><code>type</code> Attribute Values
</th>
<td> string</td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/limit1.xhtml#limit">limit</a></td>
</tr>
</tbody>
</table>
<p>The <code>tendsto</code> element is used to express the relation that
a quantity is tending to a specified value. While this is used
primarily as part of the statement of a mathematical limit, it
exists as a construct on its own to allow one to capture
mathematical statements such as "As x tends to y," and to provide a
building block to construct more general kinds of limits.
</p>
<p>The <code>tendsto</code> element takes the attributes <code>type</code> to set the
direction from which the limiting value is approached.
</p>
<div class="mathml-example" id="limit1.tendsto.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><tendsto type="above"/>
<apply><power/><ci>x</ci><cn>2</cn></apply>
<apply><power/><ci>a</ci><cn>2</cn></apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msup><mi>x</mi><mn>2</mn></msup>
<mo>&#x2192;</mo>
<msup><msup><mi>a</mi><mn>2</mn></msup><mo>+</mo></msup>
</mrow></pre><blockquote>
<p><img src="image/limit1-tendsto-ex1.gif" alt="\msup{x}{2}\unicode{8594}\msup{\msup{a}{2}}{+}"></p>
</blockquote>
</div>
<div class="mathml-example" id="limit1.tendsto.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><tendsto/>
<vector><ci>x</ci><ci>y</ci></vector>
<vector>
<apply><ci type="function">f</ci><ci>x</ci><ci>y</ci></apply>
<apply><ci type="function">g</ci><ci>x</ci><ci>y</ci></apply>
</vector>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mfenced><mtable>
<mtr><mtd><mi>x</mi></mtd></mtr>
<mtr><mtd><mi>y</mi></mtd></mtr>
</mtable></mfenced>
<mo>&#x2192;</mo>
<mfenced><mtable>
<mtr><mtd>
<mi>f</mi><mo>&#x2061;</mo><mfenced><mi>x</mi><mi>y</mi></mfenced>
</mtd></mtr>
<mtr><mtd>
<mi>g</mi><mo>&#x2061;</mo><mfenced><mi>x</mi><mi>y</mi></mfenced>
</mtd></mtr>
</mtable></mfenced></pre><blockquote>
<p><img src="image/limit1-tendsto-ex2.gif" alt="{{\left.\middle({\begin{matrix}x\\y\end{matrix}}\middle)\right.}\unicode{8594}{\left.\middle({\begin{matrix}{\mathop{f}{\left(x,y\right)}}\\{\mathop{g}{\left(x,y\right)}}\end{matrix}}\middle)\right.}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Content MathML</em></p>
<p>The usage of <code>tendsto</code> to qualify a limit is formally
defined by writing the expression in Strict Content MathML via the
rule <a href="chapter4-d.html#contm.strict-limit">Rewrite: limits condition</a>. The meanings of other more
idiomatic uses of <code>tendsto</code> are not formally defined by this
specification. When rewriting these cases to Strict Content MathML,
<code>tendsto</code> should be rewritten to an annotated identifier as
shown below.
</p>
<div class="strict-mathml-example">
<h5><a name="contm.strict.tendsto" id="contm.strict.tendsto"></a>Rewrite: tendsto
</h5><pre class="mathml">
<tendsto/>
</pre><p>Strict Content MathML equivalent:</p><pre class="mathml">
<semantics>
<ci>tendsto</ci>
<annotation-xml encoding="MathML-Content">
<tendsto/>
</annotation-xml>
</semantics></pre></div>
</div>
</div>
<div class="div3">
<h3><a name="contm.elemclass" id="contm.elemclass"></a>4.4.7 Elementary classical functions
</h3>
<div class="div4">
<h4><a name="contm.trig" id="contm.trig"></a>4.4.7.1 Common trigonometric functions
</h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-elementary</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/transc1.xhtml#sin">sin</a></td>
</tr>
</tbody>
</table>
<table border="1">
<tbody>
<tr>
<td id="contm.sin"><code>sin</code></td>
<td id="contm.cos"><code>cos</code></td>
<td id="contm.tan"><code>tan</code></td>
<td id="contm.sec"><code>sec</code></td>
<td id="contm.csc"><code>csc</code></td>
<td id="contm.cot"><code>cot</code></td>
</tr>
<tr>
<td id="contm.sinh"><code>sinh</code></td>
<td id="contm.cosh"><code>cosh</code></td>
<td id="contm.tanh"><code>tanh</code></td>
<td id="contm.sech"><code>sech</code></td>
<td id="contm.csch"><code>csch</code></td>
<td id="contm.coth"><code>coth</code></td>
</tr>
<tr>
<td id="contm.arcsin"><code>arcsin</code></td>
<td id="contm.arccos"><code>arccos</code></td>
<td id="contm.arctan"><code>arctan</code></td>
<td id="contm.arccosh"><code>arccosh</code></td>
<td id="contm.arccot"><code>arccot</code></td>
<td id="contm.arccoth"><code>arccoth</code></td>
</tr>
<tr>
<td id="contm.arccsc"><code>arccsc</code></td>
<td id="contm.arccsch"><code>arccsch</code></td>
<td id="contm.arcsec"><code>arcsec</code></td>
<td id="contm.arcsech"><code>arcsech</code></td>
<td id="contm.arcsinh"><code>arcsinh</code></td>
<td id="contm.arctanh"><code>arctanh</code></td>
</tr>
</tbody>
</table>
<p>These operator elements denote the standard trigonometric and
hyperbolic functions and their inverses. Since their standard
interpretations are widely known, they are discussed as a group. In
the case of inverse functions there are differing definitions in use.
For maximum interoperability applications evaluating such expressions
should follow the definitions in <a href="appendixh-d.html#Abramowitz1997">[Abramowitz1997]</a>.
</p>
<div class="mathml-example" id="transc1.sin.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><sin/><ci>x</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>sin</mi><mo>&#x2061;</mo><mi>x</mi></mrow></pre><blockquote>
<p><img src="image/transc1-sin-ex1.gif" alt="{\mathop{{\minormal{sin}}}x}"></p>
</blockquote>
</div>
<div class="mathml-example" id="transc1.sin.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><sin/>
<apply><plus/>
<apply><cos/><ci>x</ci></apply>
<apply><power/><ci>x</ci><cn>3</cn></apply>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>sin</mi>
<mo>&#x2061;</mo>
<mrow>
<mo>(</mo>
<mrow><mi>cos</mi><mo>&#x2061;</mo><mi>x</mi></mrow>
<mo>+</mo>
<msup><mi>x</mi><mn>3</mn></msup>
<mo>)</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/transc1-sin-ex2.gif" alt="{\mathop{{\minormal{sin}}}{\left.\middle({\mathop{{\minormal{cos}}}x}+\msup{x}{{3}}\middle)\right.}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.exp" id="contm.exp"></a>4.4.7.2 Exponential <code><exp/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/transc1.xhtml#exp">exp</a></td>
</tr>
</tbody>
</table>
<p>The <code>exp</code> element represents the exponentiation function
associated with the inverse of the ln function. It takes one
argument.
</p>
<div class="mathml-example" id="transc1.exp.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><exp/><ci>x</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<msup><mi>e</mi><mi>x</mi></msup></pre><blockquote>
<p><img src="image/transc1-exp-ex1.gif" alt="\msup{e}{x}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.ln" id="contm.ln"></a>4.4.7.3 Natural Logarithm <code><ln/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/transc1.xhtml#ln">ln</a></td>
</tr>
</tbody>
</table>
<p>The <code>ln</code> element represents the natural logarithm function.
</p>
<div class="mathml-example" id="transc1.ln.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><ln/><ci>a</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>ln</mi><mo>&#x2061;</mo><mi>a</mi></mrow></pre><blockquote>
<p><img src="image/transc1-ln-ex1.gif" alt="{\mathop{{\minormal{ln}}}a}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.log" id="contm.log"></a>4.4.7.4 Logarithm <code><log/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_logbase">logbase</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/transc1.xhtml#log">log</a></td>
</tr>
</tbody>
</table>
<p>The <code>log</code> elements represents the logarithm function
relative to a given base. When present, the <code>logbase</code>
qualifier specifies the base. Otherwise, the base is assumed to be 10.
<code>apply</code>.
</p>
<div class="mathml-example" id="transc1.log.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><log/>
<logbase><cn>3</cn></logbase>
<ci>x</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><msub><mi>log</mi><mn>3</mn></msub><mo>&#x2061;</mo><mi>x</mi></mrow></pre><blockquote>
<p><img src="image/transc1-log-ex1.gif" alt="{\msub{{\minormal{log}}}{{3}}\unicode{8289}x}"></p>
</blockquote>
</div>
<div class="mathml-example" id="transc1.log.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><log/><ci>x</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>log</mi><mo>&#x2061;</mo><mi>x</mi></mrow></pre><blockquote>
<p><img src="image/transc1-log-ex2.gif" alt="{\mathop{{\minormal{log}}}x}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Content MathML</em></p>
<p>When mapping <code>log</code> to Strict Content, one uses the
<a href="http://www.openmath.org/cd/transc1.xhtml#log">log</a> symbol denoting the function
that returns the log of its second argument with respect to the base
specified by the first argument. When <code>logbase</code> is present, it
determines the base. Otherwise, the default base of 10 must be
explicitly provided in Strict markup. See the following example.
</p>
<div class="strict-mathml-example" id="contm.strict.log"><pre class="mathml"><apply><plus/>
<apply>
<log/>
<logbase><cn>2</cn></logbase>
<ci>x</ci>
</apply>
<apply>
<log/>
<ci>y</ci>
</apply>
</apply>
</pre><p>Strict Content MathML equivalent:</p><pre class="mathml"><apply>
<csymbol cd="arith1">plus</csymbol>
<apply>
<csymbol cd="transc1">log</csymbol>
<cn>2</cn>
<ci>x</ci>
</apply>
<apply>
<csymbol cd="transc1">log</csymbol>
<cn>10</cn>
<ci>y</ci>
</apply>
</apply></pre></div>
</div>
</div>
<div class="div3">
<h3><a name="id.4.4.8" id="id.4.4.8"></a>4.4.8 Statistics
</h3>
<div class="div4">
<h4><a name="contm.mean" id="contm.mean"></a>4.4.8.1 Mean <code><mean/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary.unary">nary-stats</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/s_dist1.xhtml#mean">mean</a>, <a href="http://www.openmath.org/cd/s_data1.xhtml#mean">mean</a></td>
</tr>
</tbody>
</table>
<p>The <code>mean</code> element represents the function returning arithmetic mean or average of a
data set or random variable.
</p>
<div class="mathml-example" id="s.data1.mean.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><mean/>
<cn>3</cn><cn>4</cn><cn>3</cn><cn>7</cn><cn>4</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x2329;</mo>
<mn>3</mn><mo>,</mo><mn>4</mn><mo>,</mo><mn>3</mn>
<mo>,</mo><mn>7</mn><mo>,</mo><mn>4</mn>
<mo>&#x232a;</mo>
</mrow></pre><blockquote>
<p><img src="image/s_data1-mean-ex1.gif" alt="{\unicode{9001}{3},{4},{3},{7},{4}\unicode{9002}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="s.dist1.mean.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><mean/><ci>X</ci></apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>&#x2329;</mo><mi>X</mi><mo>&#x232a;</mo></mrow></pre><blockquote>
<p><img src="image/s_dist1-mean-ex1.gif" alt="{\unicode{9001}X\unicode{9002}}"></p>
</blockquote><pre class="mathml">
<mover><mi>X</mi><mo>&#xaf;</mo></mover></pre><blockquote>
<p><img src="image/s_dist1-mean-ex1-2.gif" alt="{\overline{X}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>When the <code>mean</code> element is applied to an explicit list of arguments, the
translation to Strict Content markup is direct, using the <a href="http://www.openmath.org/cd/s_data1.xhtml#mean">mean</a> symbol from the <a href="http://www.openmath.org/cd/s_data1.xhtml">s_data1</a> content dictionary, as described in
<a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>. When it is applied to a distribution, then the
<a href="http://www.openmath.org/cd/s_dist1.xhtml#mean">mean</a> symbol from the <a href="http://www.openmath.org/cd/s_dist1.xhtml">s_dist1</a> content
dictionary should be used. In the case with qualifiers use <a href="chapter4-d.html#contm.p2s.lifted">Rewrite: n-ary domainofapplication</a>
with the same caveat.
</p>
</div>
<div class="div4">
<h4><a name="contm.sdev" id="contm.sdev"></a>4.4.8.2 Standard Deviation <code><sdev/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary.unary">nary-stats</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/s_dist1.xhtml#sdev">sdev</a>, <a href="http://www.openmath.org/cd/s_data1.xhtml#sdev">sdev</a></td>
</tr>
</tbody>
</table>
<p>The <code>sdev</code> element is used to denote the standard deviation
function for a data set or random variable. Standard deviation is a
statistical measure of dispersion given by the square root of the
variance.
</p>
<div class="mathml-example" id="s.data1.sdev.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><sdev/>
<cn>3</cn><cn>4</cn><cn>2</cn><cn>2</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>&#x3c3;</mo>
<mo>&#x2061;</mo>
<mfenced><mn>3</mn><mn>4</mn><mn>2</mn><mn>2</mn></mfenced>
</mrow></pre><blockquote>
<p><img src="image/s_data1-sdev-ex1.gif" alt="{\unicode{963}\unicode{8289}{\left({3},{4},{2},{2}\right)}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="s.dist1.sdev.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><sdev/>
<ci type="discrete_random_variable">X</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mo>&#x3c3;</mo><mo>&#x2061;</mo><mfenced><mi>X</mi></mfenced></mrow></pre><blockquote>
<p><img src="image/s_dist1-sdev-ex1.gif" alt="{\unicode{963}\unicode{8289}{\left(X\right)}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>When the <code>sdev</code> element is applied to an explicit list of arguments, the
translation to Strict Content markup is direct, using the <a href="http://www.openmath.org/cd/s_data1.xhtml#sdev">sdev</a>
symbol from the <a href="http://www.openmath.org/cd/s_data1.xhtml">s_data1</a> content dictionary, as described in
<a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>. When it is applied to a distribution, then the
<a href="http://www.openmath.org/cd/s_dist1.xhtml#sdev">sdev</a> symbol from the <a href="http://www.openmath.org/cd/s_dist1.xhtml">s_dist1</a> content
dictionary should be used. In the case with qualifiers use
<a href="chapter4-d.html#contm.p2s.lifted">Rewrite: n-ary domainofapplication</a> with the same caveat.
</p>
</div>
<div class="div4">
<h4><a name="contm.variance" id="contm.variance"></a>4.4.8.3 Variance <code><variance/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary.unary">nary-stats</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/s_dist1.xhtml#variance">variance</a>, <a href="http://www.openmath.org/cd/s_data1.xhtml#variance">variance</a></td>
</tr>
</tbody>
</table>
<p>The <code>variance</code> element represents the variance of a data set
or random variable. Variance is a statistical measure of dispersion,
averaging the squares of the deviations of possible values from their
mean.
</p>
<div class="mathml-example" id="s.data1.variance.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><variance/>
<cn>3</cn><cn>4</cn><cn>2</cn><cn>2</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msup>
<mo>&#x3c3;</mo>
<mn>2</mn>
</msup>
<mo>&#x2061;</mo>
<mfenced><mn>3</mn><mn>4</mn><mn>2</mn><mn>2</mn></mfenced>
</mrow></pre><blockquote>
<p><img src="image/s_data1-variance-ex1.gif" alt="\msup{\unicode{963}}{2}\unicode{8289}\left(3,4,2,2\right)"></p>
</blockquote>
</div>
<div class="mathml-example" id="s.dist1.variance.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><variance/>
<ci type="discrete_random_variable"> X</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msup><mo>&#x3c3;</mo><mn>2</mn></msup>
<mo>&#x2061;</mo>
<mfenced><mi>X</mi></mfenced>
</mrow>
</pre><blockquote>
<p><img src="image/s_dist1-variance-ex1.gif" alt="\msup{\unicode{963}}{2}\unicode{8289}\left(X\right)"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>When the <code>variance</code> element is applied to an explicit list of arguments, the
translation to Strict Content markup is direct, using the <a href="http://www.openmath.org/cd/s_data1.xhtml#variance">variance</a>
symbol from the <a href="http://www.openmath.org/cd/s_data1.xhtml">s_data1</a> content dictionary, as described in
<a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>. When it is applied to a distribution, then the
<a href="http://www.openmath.org/cd/s_dist1.xhtml#variance">variance</a> symbol from the <a href="http://www.openmath.org/cd/s_dist1.xhtml">s_dist1</a> content
dictionary should be used. In the case with qualifiers use <a href="chapter4-d.html#contm.p2s.lifted">Rewrite: n-ary domainofapplication</a>
with the same caveat.
</p>
</div>
<div class="div4">
<h4><a name="contm.median" id="contm.median"></a>4.4.8.4 Median <code><median/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary.unary">nary-stats</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/s_data1.xhtml#median">median</a></td>
</tr>
</tbody>
</table>
<p>The <code>median</code> element represents an operator returning the
median of its arguments. The median is a number separating the lower
half of the sample values from the upper half.
</p>
<div class="mathml-example" id="s.data1.median.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><median/>
<cn>3</cn><cn>4</cn><cn>2</cn><cn>2</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>median</mi>
<mo>&#x2061;</mo>
<mfenced><mn>3</mn><mn>4</mn><mn>2</mn><mn>2</mn></mfenced>
</mrow></pre><blockquote>
<p><img src="image/s_data1-median-ex1.gif" alt="{\mathop{{\minormal{median}}}{\left({3},{4},{2},{2}\right)}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>When the <code>median</code> element is applied to an explicit list of arguments, the
translation to Strict Content markup is direct, using the <a href="http://www.openmath.org/cd/s_data1.xhtml#median">median</a>
symbol from the <a href="http://www.openmath.org/cd/s_data1.xhtml">s_data1</a> content dictionary, as described in
<a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>.
</p>
</div>
<div class="div4">
<h4><a name="contm.mode" id="contm.mode"></a>4.4.8.5 Mode <code><mode/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary.unary">nary-stats</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/s_data1.xhtml#mode">mode</a></td>
</tr>
</tbody>
</table>
<p>The <code>mode</code> element is used to denote the mode of its arguments. The mode is
the value which occurs with the greatest frequency.
</p>
<div class="mathml-example" id="s.data1.mode.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><mode/>
<cn>3</cn><cn>4</cn><cn>2</cn><cn>2</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>mode</mi>
<mo>&#x2061;</mo>
<mfenced><mn>3</mn><mn>4</mn><mn>2</mn><mn>2</mn></mfenced>
</mrow></pre><blockquote>
<p><img src="image/s_data1-mode-ex1.gif" alt="{\mathop{{\minormal{mode}}}{\left({3},{4},{2},{2}\right)}}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<p>When the <code>mode</code> element is applied to an explicit list of arguments, the
translation to Strict Content markup is direct, using the <a href="http://www.openmath.org/cd/s_data1.xhtml#mode">mode</a>
symbol from the <a href="http://www.openmath.org/cd/s_data1.xhtml">s_data1</a> content dictionary, as described in
<a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>.
</p>
</div>
<div class="div4">
<h4><a name="contm.moment" id="contm.moment"></a>4.4.8.6 Moment (<code><moment/></code>, <code><momentabout></code>)
</h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-functional</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_degree">degree</a>,
<a href="appendixa-d.html#parsing_momentabout">momentabout</a></td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/s_data1.xhtml#moment">moment</a>,
<a href="http://www.openmath.org/cd/s_dist1.xhtml#moment">moment</a></td>
</tr>
</tbody>
</table>
<p>The <code>moment</code> element is used to denote the <var>i</var>th moment of a set of data set or
random variable. The <code>moment</code> function accepts the <code>degree</code> and
<code>momentabout</code> qualifiers. If present, the <code>degree</code> schema denotes the order of
the moment. Otherwise, the moment is assumed to be the first order moment. When used with
<code>moment</code>, the <code>degree</code> schema is expected to contain a
single child. If present, the <code>momentabout</code> schema denotes the
point about which the moment is taken. Otherwise, the moment is
assumed to be the moment about zero.
</p>
<div class="mathml-example" id="s.data1.moment.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><moment/>
<degree><cn>3</cn></degree>
<momentabout><mean/></momentabout>
<cn>6</cn><cn>4</cn><cn>2</cn><cn>2</cn><cn>5</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<msub>
<mrow>
<mo>&#x2329;</mo>
<msup>
<mfenced><mn>6</mn><mn>4</mn><mn>2</mn><mn>2</mn><mn>5</mn></mfenced>
<mn>3</mn>
</msup>
<mo>&#x232a;</mo>
</mrow>
<mi>mean</mi>
</msub></pre><blockquote>
<p><img src="image/s_data1-moment-ex1.gif" alt="\msub{{\unicode{9001}\msup{{\left({6},{4},{2},{2},{5}\right)}}{{3}}\unicode{9002}}}{{\minormal{mean}}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="s.dist1.moment.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><moment/>
<degree><cn>3</cn></degree>
<momentabout><ci>p</ci></momentabout>
<ci>X</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<msub>
<mrow>
<mo>&#x2329;</mo><msup><mi>X</mi><mn>3</mn></msup><mo>&#x232a;</mo>
</mrow>
<mi>p</mi>
</msub></pre><blockquote>
<p><img src="image/s_dist1-moment-ex1.gif" alt="\msub{{\unicode{9001}\msup{X}{{3}}\unicode{9002}}}{p}"></p>
</blockquote>
</div>
<p><em>Mapping to Strict Markup</em></p>
<div class="strict-mathml-example" id="contm.strict-moment-degree">
<p>When rewriting to Strict Markup, the <a href="http://www.openmath.org/cd/s_dist1.xhtml#moment">moment</a> symbol from the <a href="http://www.openmath.org/cd/s_data1.xhtml">s_data1</a> content
dictionary is used when the <code>moment</code> element is applied
to an explicit list of arguments. When it is applied to a distribution, then the
<a href="http://www.openmath.org/cd/s_dist1.xhtml#moment">moment</a> symbol from the <a href="http://www.openmath.org/cd/s_dist1.xhtml">s_dist1</a> content
dictionary should be used. Both operators take
the degree as the first argument, the point as the second, followed by
the data set or random variable respectively.
</p><pre class="mathml">
<apply><moment/>
<degree><cn>3</cn></degree>
<momentabout><ci>p</ci></momentabout>
<ci>X</ci>
</apply></pre><p>Strict Content MathML equivalent</p><pre class="strict-mathml">
<apply><csymbol cd="s_dist1">moment</csymbol>
<cn>3</cn>
<ci>p</ci>
<ci>X</ci>
</apply></pre></div>
</div>
</div>
<div class="div3">
<h3><a name="id.4.4.9" id="id.4.4.9"></a>4.4.9 Linear Algebra
</h3>
<div class="div4">
<h4><a name="contm.vector" id="contm.vector"></a>4.4.9.1 Vector <code><vector></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a>*
</td>
</tr>
<tr>
<th>OM Symbol</th>
<td>
<a href="http://www.openmath.org/cd/linalg2.xhtml#vector">vector</a>
</td>
</tr>
</tbody>
</table>
<p>A vector is an ordered n-tuple of values representing an element of an
n-dimensional vector space.
</p>
<p>For purposes of interaction with matrices and matrix multiplication, vectors are
regarded as equivalent to a matrix consisting of a single column, and the transpose of
a vector as a matrix consisting of a single row.
</p>
<p>The components of a <code>vector</code> may be given explicitly as
child elements, or specified by rule as described in <a href="chapter4-d.html#contm.container.constructor">Section 4.3.1.1 Container Markup for Constructor Symbols</a>.
</p>
<div class="mathml-example" id="linalg2.vector.ex1">
<p>Content MathML</p><pre class="mathml">
<vector>
<apply><plus/><ci>x</ci><ci>y</ci></apply>
<cn>3</cn>
<cn>7</cn>
</vector></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>(</mo>
<mtable>
<mtr><mtd><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow></mtd></mtr>
<mtr><mtd><mn>3</mn></mtd></mtr>
<mtr><mtd><mn>7</mn></mtd></mtr>
</mtable>
<mo>)</mo>
</mrow></pre><blockquote>
<p><img src="image/linalg2-vector-ex1.gif" alt="{\left.\middle({\begin{matrix}{x+y}\\{3}\\{7}\end{matrix}}\middle)\right.}"></p>
</blockquote><pre class="mathml">
<mfenced>
<mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow>
<mn>3</mn>
<mn>7</mn>
</mfenced></pre><blockquote>
<p><img src="image/linalg2-vector-ex1-2.gif" alt="{\left({x+y},{3},{7}\right)}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.matrix" id="contm.matrix"></a>4.4.9.2 Matrix <code><matrix></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a>*
</td>
</tr>
<tr>
<th>OM Symbol</th>
<td>
<a href="http://www.openmath.org/cd/linalg2.xhtml#matrix">matrix</a>
</td>
</tr>
</tbody>
</table>
<p>A matrix is regarded as made up of matrix rows, each of which can be
thought of as a special type of vector.
</p>
<p>Note that the behavior of the <code>matrix</code> and <code>matrixrow</code> elements is
substantially different from the <code>mtable</code> and <code>mtr</code> presentation
elements.
</p>
<p>The <code>matrix</code> element is a <em>constructor</em>
element, so the entries may be given explicitly as child elements,
or specified by rule as described in <a href="chapter4-d.html#contm.container.constructor">Section 4.3.1.1 Container Markup for Constructor Symbols</a>. In the latter case, the
entries are specified by providing a function and a 2-dimensional
domain of application. The entries of the matrix correspond to
the values obtained by evaluating the function at the points of
the domain.
</p>
<div class="mathml-example" id="linalg6.matrix.ex1">
<p>Content MathML</p><pre class="mathml">
<matrix>
<bvar><ci type="integer">i</ci></bvar>
<bvar><ci type="integer">j</ci></bvar>
<condition>
<apply><and/>
<apply><in/>
<ci>i</ci>
<interval><ci>1</ci><ci>5</ci></interval>
</apply>
<apply><in/>
<ci>j</ci>
<interval><ci>5</ci><ci>9</ci></interval>
</apply>
</apply>
</condition>
<apply><power/><ci>i</ci><ci>j</ci></apply>
</matrix></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mo>[</mo>
<msub><mi>m</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow></msub>
<mo>|</mo>
<mrow>
<msub><mi>m</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow></msub>
<mo>=</mo>
<msup><mi>i</mi><mi>j</mi></msup>
</mrow>
<mo>;</mo>
<mrow>
<mrow>
<mi>i</mi>
<mo>&#x2208;</mo>
<mfenced open="[" close="]"><mi>1</mi><mi>5</mi></mfenced>
</mrow>
<mo>&#x2227;</mo>
<mrow>
<mi>j</mi>
<mo>&#x2208;</mo>
<mfenced open="[" close="]"><mi>5</mi><mi>9</mi></mfenced>
</mrow>
</mrow>
<mo>]</mo>
</mrow></pre><blockquote>
<p><img src="image/linalg6-matrix-ex1.gif" alt="{\left.[\msub{m}{{i,j}}\middle|{\msub{m}{{i,j}}=\msup{i}{j}};{{i\unicode{8712}{\left[1,5\right]}}\unicode{8743}{j\unicode{8712}{\left[5,9\right]}}}]\right.}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.matrixrow" id="contm.matrixrow"></a>4.4.9.3 Matrix row <code><matrixrow></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-constructor</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Qualifiers</th>
<td><a href="appendixa-d.html#parsing_BvarQ">BvarQ</a>,
<a href="appendixa-d.html#parsing_DomainQ">DomainQ</a></td>
</tr>
<tr>
<th>Content</th>
<td><a href="appendixa-d.html#parsing_ContExp">ContExp</a>*
</td>
</tr>
<tr>
<th>OM Symbol</th>
<td>
<a href="http://www.openmath.org/cd/linalg2.xhtml#matrixrow">matrixrow</a>
</td>
</tr>
</tbody>
</table>
<p>This element is an n-ary constructor used to represent rows of matrices.</p>
<p>Matrix rows are not directly rendered by themselves outside of the
context of a matrix.
</p>
</div>
<div class="div4">
<h4><a name="contm.determinant" id="contm.determinant"></a>4.4.9.4 Determinant <code><determinant/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-linalg</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/linalg1.xhtml#determinant">determinant</a></td>
</tr>
</tbody>
</table>
<p>This element is used for the unary function which returns the determinant of its argument,
which should be a square matrix.
</p>
<div class="mathml-example" id="linalg1.determinant.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><determinant/>
<ci type="matrix">A</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>det</mi><mo>&#x2061;</mo><mi>A</mi></mrow></pre><blockquote>
<p><img src="image/linalg1-determinant-ex1.gif" alt="{\mathop{{\minormal{det}}}A}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.transpose" id="contm.transpose"></a>4.4.9.5 Transpose <code><transpose/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.unary">unary-linalg</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/linalg1.xhtml#transpose">transpose</a></td>
</tr>
</tbody>
</table>
<p>This element represents a unary function that signifies the transpose of the
given matrix or vector.
</p>
<div class="mathml-example" id="linalg1.transpose.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><transpose/>
<ci type="matrix">A</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<msup><mi>A</mi><mi>T</mi></msup></pre><blockquote>
<p><img src="image/linalg1-transpose-ex1.gif" alt="\msup{A}{T}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.selector" id="contm.selector"></a>4.4.9.6 Selector <code><selector/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.nary">nary-linalg</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/linalg1.xhtml#vector_selector">vector_selector</a>,
<a href="http://www.openmath.org/cd/linalg1.xhtml#matrix_selector">matrix_selector</a></td>
</tr>
</tbody>
</table>
<p>The <code>selector</code> element is the operator for indexing into vectors, matrices
and lists. It accepts one or more arguments. The first argument identifies the vector,
matrix or list from which the selection is taking place, and the second and subsequent
arguments, if any, indicate the kind of selection taking place.
</p>
<p>When <code>selector</code> is used with a single argument, it should be interpreted as
giving the sequence of all elements in the list, vector or matrix given. The ordering
of elements in the sequence for a matrix is understood to be first by column, then by
row; so the resulting list is of matrix rows given entry by entry.
That is, for a matrix (<var>a</var><sub>i,j</sub>), where the indices denote row
and column, respectively, the ordering would be <var>a</var><sub>1,1</sub>,
<var>a</var><sub>1,2</sub>, ... <var>a</var><sub>2,1</sub>, <var>a</var><sub>2,2</sub>
... etc.
</p>
<p>When two arguments are given, and the first is a vector or list, the second argument
specifies the index of an entry in the list or vector. If the first argument is a matrix then
the second argument specifies the index of a matrix row.
</p>
<p>When three arguments are given, the last one is ignored for a list or vector, and
in the case of a matrix, the second and third arguments specify the row and column indices of
the selected element.
</p>
<div class="mathml-example" id="linalg1.vector.selector.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><selector/><ci type="vector">V</ci><cn>1</cn></apply></pre><p>Sample Presentation</p><pre class="mathml">
<msub><mi>V</mi><mn>1</mn></msub></pre><blockquote>
<p><img src="image/linalg1-vector_selector-ex1.gif" alt="\msub{V}{{1}}"></p>
</blockquote>
</div>
<div class="mathml-example" id="linalg1.matrix.selector.ex2">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><selector/>
<matrix>
<matrixrow><cn>1</cn><cn>2</cn></matrixrow>
<matrixrow><cn>3</cn><cn>4</cn></matrixrow>
</matrix>
<cn>1</cn>
</apply>
<matrix>
<matrixrow><cn>1</cn><cn>2</cn></matrixrow>
</matrix>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<msub>
<mrow>
<mo>(</mo>
<mtable>
<mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr>
<mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr>
</mtable>
<mo>)</mo>
</mrow>
<mn>1</mn>
</msub>
<mo>=</mo>
<mrow>
<mo>(</mo>
<mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr></mtable>
<mo>)</mo>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/linalg1-matrix_selector-ex2.gif" alt="\msub{\left({\begin{matrix} 1\endcell 2\\ 3\endcell 4\end{matrix}}\right)}{1}=\left(\begin{matrix} 1\endcell 2\end{matrix}\right)"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.vectorproduct" id="contm.vectorproduct"></a>4.4.9.7 Vector product <code><vectorproduct/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-linalg</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/linalg1.xhtml#vectorproduct">vectorproduct</a></td>
</tr>
</tbody>
</table>
<p>This element represents the vector product. It takes two three-dimensional vector arguments
and represents as value a three-dimensional vector.
</p>
<div class="mathml-example" id="linalg1.vectorproduct.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><vectorproduct/>
<ci type="vector"> A </ci>
<ci type="vector"> B </ci>
</apply>
<apply><times/>
<ci>a</ci>
<ci>b</ci>
<apply><sin/><ci>&#x3b8;</ci></apply>
<ci type="vector"> N </ci>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>A</mi><mo>&#xd7;</mo><mi>B</mi></mrow>
<mo>=</mo>
<mrow>
<mi>a</mi>
<mo>&#x2062;</mo>
<mi>b</mi>
<mo>&#x2062;</mo>
<mrow><mi>sin</mi><mo>&#x2061;</mo><mi>&#x3b8;</mi></mrow>
<mo>&#x2062;</mo>
<mi>N</mi>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/linalg1-vectorproduct-ex1.gif" alt="{{A\unicode{215}B}={a\unicode{8290}b\unicode{8290}{\mathop{{\minormal{sin}}}\unicode{952}}\unicode{8290}N}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.scalarproduct" id="contm.scalarproduct"></a>4.4.9.8 Scalar product <code><scalarproduct/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-linalg</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/linalg1.xhtml#scalarproduct">scalarproduct</a></td>
</tr>
</tbody>
</table>
<p>This element represents the scalar product function. It takes two vector arguments
and returns a scalar value.
</p>
<div class="mathml-example" id="linalg1.scalarproduct.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><scalarproduct/>
<ci type="vector">A</ci>
<ci type="vector">B</ci>
</apply>
<apply><times/>
<ci>a</ci>
<ci>b</ci>
<apply><cos/><ci>&#x3b8;</ci></apply>
</apply>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>A</mi><mo>.</mo><mi>B</mi></mrow>
<mo>=</mo>
<mrow>
<mi>a</mi>
<mo>&#x2062;</mo>
<mi>b</mi>
<mo>&#x2062;</mo>
<mrow><mi>cos</mi><mo>&#x2061;</mo><mi>&#x3b8;</mi></mrow>
</mrow>
</mrow></pre><blockquote>
<p><img src="image/linalg1-scalarproduct-ex1.gif" alt="{{A.B}={a\unicode{8290}b\unicode{8290}{\mathop{{\minormal{cos}}}\unicode{952}}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.outerproduct" id="contm.outerproduct"></a>4.4.9.9 Outer product <code><outerproduct/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.binary">binary-linalg</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/linalg1.xhtml#outerproduct">outerproduct</a></td>
</tr>
</tbody>
</table>
<p>This element represents the outer product function. It takes two vector arguments
and returns as value a matrix.
</p>
<div class="mathml-example" id="linalg1.outerproduct.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><outerproduct/>
<ci type="vector">A</ci>
<ci type="vector">B</ci>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>A</mi><mo>&#x2297;</mo><mi>B</mi></mrow></pre><blockquote>
<p><img src="image/linalg1-outerproduct-ex1.gif" alt="{A\unicode{8855}B}"></p>
</blockquote>
</div>
</div>
</div>
<div class="div3">
<h3><a name="contm.constantsandsymbols" id="contm.constantsandsymbols"></a>4.4.10 Constant and Symbol Elements
</h3>
<p>This section explains the use of the Constant and Symbol elements.</p>
<div class="div4">
<h4><a name="contm.integers" id="contm.integers"></a>4.4.10.1 integers <code><integers/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/setname1.xhtml#Z">Z</a></td>
</tr>
</tbody>
</table>
<p>This element represents the set of integers, positive, negative and zero.</p>
<div class="mathml-example" id="setname1.integers.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><in/>
<cn type="integer"> 42 </cn>
<integers/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>42</mn><mo>&#x2208;</mo><mi mathvariant="double-struck">Z</mi></mrow></pre><blockquote>
<p><img src="image/setname1-integers-ex1.gif" alt="{{42}\unicode{8712}{\midoublestruck{Z}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.reals" id="contm.reals"></a>4.4.10.2 reals <code><reals/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/setname1.xhtml#R">R</a></td>
</tr>
</tbody>
</table>
<p>This element represents the set of real numbers.</p>
<div class="mathml-example" id="setname1.reals.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><in/>
<cn type="real"> 44.997</cn>
<reals/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mn>44.997</mn><mo>&#x2208;</mo><mi mathvariant="double-struck">R</mi>
</mrow></pre><blockquote>
<p><img src="image/setname1-reals-ex1.gif" alt="{{44.997}\unicode{8712}{\midoublestruck{R}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.rationals" id="contm.rationals"></a>4.4.10.3 Rational Numbers <code><rationals/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/setname1.xhtml#Q">Q</a></td>
</tr>
</tbody>
</table>
<p>This element represents the set of rational numbers.</p>
<div class="mathml-example" id="setname1.rationals.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><in/>
<cn type="rational"> 22 <sep/>7</cn>
<rationals/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mn>22</mn><mo>/</mo><mn>7</mn></mrow>
<mo>&#x2208;</mo>
<mi mathvariant="double-struck">Q</mi>
</mrow></pre><blockquote>
<p><img src="image/setname1-rationals-ex1.gif" alt="{{{22}/{7}}\unicode{8712}{\midoublestruck{Q}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.naturalnumbers" id="contm.naturalnumbers"></a>4.4.10.4 Natural Numbers <code><naturalnumbers/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/setname1.xhtml#N">N</a></td>
</tr>
</tbody>
</table>
<p>This element represents the set of natural numbers (including zero).</p>
<div class="mathml-example" id="setname1.naturalnumbers.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><in/>
<cn type="integer">1729</cn>
<naturalnumbers/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mn>1729</mn><mo>&#x2208;</mo><mi mathvariant="double-struck">N</mi>
</mrow></pre><blockquote>
<p><img src="image/setname1-naturalnumbers-ex1.gif" alt="{{1729}\unicode{8712}{\midoublestruck{N}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.complexes" id="contm.complexes"></a>4.4.10.5 complexes <code><complexes/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/setname1.xhtml#C">C</a></td>
</tr>
</tbody>
</table>
<p>This element represents the set of complex numbers.</p>
<div class="mathml-example" id="setname1.complexes.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><in/>
<cn type="complex-cartesian">17<sep/>29</cn>
<complexes/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mn>17</mn><mo>+</mo><mn>29</mn><mo>&#x2062;</mo><mi>i</mi></mrow>
<mo>&#x2208;</mo>
<mi mathvariant="double-struck">C</mi>
</mrow></pre><blockquote>
<p><img src="image/setname1-complexes-ex1.gif" alt="{{{17}+{29}\unicode{8290}i}\unicode{8712}{\midoublestruck{C}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.primes" id="contm.primes"></a>4.4.10.6 primes <code><primes/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/setname1.xhtml#P">P</a></td>
</tr>
</tbody>
</table>
<p>This element represents the set of positive prime numbers.</p>
<div class="mathml-example" id="setname1.primes.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><in/>
<cn type="integer">17</cn>
<primes/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mn>17</mn><mo>&#x2208;</mo><mi mathvariant="double-struck">P</mi></mrow></pre><blockquote>
<p><img src="image/setname1-primes-ex1.gif" alt="{{17}\unicode{8712}{\midoublestruck{P}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.exponentiale" id="contm.exponentiale"></a>4.4.10.7 Exponential e <code><exponentiale/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#e">e</a></td>
</tr>
</tbody>
</table>
<p>This element represents the base of the natural logarithm, approximately 2.718.</p>
<div class="mathml-example" id="nums1.exponentiale.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><ln/><exponentiale/></apply>
<cn>1</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>ln</mi><mo>&#x2061;</mo><mi>e</mi></mrow>
<mo>=</mo>
<mn>1</mn>
</mrow></pre><blockquote>
<p><img src="image/nums1-exponentiale-ex1.gif" alt="{{\mathop{{\minormal{ln}}}e}={1}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.imaginaryi" id="contm.imaginaryi"></a>4.4.10.8 Imaginary i <code><imaginaryi/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#i">i</a></td>
</tr>
</tbody>
</table>
<p>This element represents the mathematical constant which is the square root of -1,
commonly written i
</p>
<div class="mathml-example" id="nums1.imaginaryi.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><power/><imaginaryi/><cn>2</cn></apply>
<cn>-1</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><msup><mi>i</mi><mn>2</mn></msup><mo>=</mo><mn>-1</mn></mrow></pre><blockquote>
<p><img src="image/nums1-imaginaryi-ex1.gif" alt="{\msup{i}{{2}}={\mn{-1}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.notanumber" id="contm.notanumber"></a>4.4.10.9 Not A Number <code><notanumber/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#NaN">NaN</a></td>
</tr>
</tbody>
</table>
<p>This element represents the notion of not-a-number, i.e. the result of an ill-posed
floating computation. See <a href="appendixh-d.html#IEEE754">[IEEE754]</a>.
</p>
<div class="mathml-example" id="nums1.notanumber.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><divide/><cn>0</cn><cn>0</cn></apply>
<notanumber/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mn>0</mn><mo>/</mo><mn>0</mn></mrow>
<mo>=</mo>
<mi>NaN</mi>
</mrow></pre><blockquote>
<p><img src="image/nums1-notanumber-ex1.gif" alt="{{{0}/{0}}={\minormal{NaN}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.true" id="contm.true"></a>4.4.10.10 True <code><true/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#true">true</a></td>
</tr>
</tbody>
</table>
<p>This element represents the Boolean value true, i.e. the logical constant for truth.</p>
<div class="mathml-example" id="logic1.true.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><or/>
<true/>
<ci type="boolean">P</ci>
</apply>
<true/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>true</mi><mo>&#x2228;</mo><mi>P</mi></mrow>
<mo>=</mo>
<mi>true</mi>
</mrow></pre><blockquote>
<p><img src="image/logic1-true-ex1.gif" alt="{{{\minormal{true}}\unicode{8744}P}={\minormal{true}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.false" id="contm.false"></a>4.4.10.11 False <code><false/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/logic1.xhtml#false">false</a></td>
</tr>
</tbody>
</table>
<p>This element represents the Boolean value false, i.e. the logical constant for falsehood.</p>
<div class="mathml-example" id="logic1.false.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><eq/>
<apply><and/>
<false/>
<ci type="boolean">P</ci>
</apply>
<false/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mrow><mi>false</mi><mo>&#x2227;</mo><mi>P</mi></mrow>
<mo>=</mo>
<mi>false</mi>
</mrow></pre><blockquote>
<p><img src="image/logic1-false-ex1.gif" alt="{{{\minormal{false}}\unicode{8743}P}={\minormal{false}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.emptyset" id="contm.emptyset"></a>4.4.10.12 Empty Set <code><emptyset/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-set</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/set1.xhtml#emptyset">emptyset</a>,
<a href="http://www.openmath.org/cd/multiset1.xhtml#emptyset">emptyset</a></td>
</tr>
</tbody>
</table>
<p>This element is used to represent the empty set, that is the set which contains no members.</p>
<div class="mathml-example" id="set1.emptyset.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><neq/>
<integers/>
<emptyset/>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi mathvariant="double-struck">Z</mi><mo>&#x2260;</mo><mi>&#x2205;</mi>
</mrow></pre><blockquote>
<p><img src="image/set1-emptyset-ex1.gif" alt="{{\midoublestruck{Z}}\unicode{8800}\unicode{8709}}"></p>
</blockquote>
<p><em>Mapping to Strict Markup</em></p>
<p>In some situations, it may be clear from context that <code>emptyset</code>
corresponds to the <a href="http://www.openmath.org/cd/multiset1.xhtml#emptyset">emptyset</a>
However, as there is no method other than annotation for an author to explicitly indicate this,
it is always acceptable to translate to the <a href="http://www.openmath.org/cd/set1.xhtml#emptyset">emptyset</a> symbol from the <a href="http://www.openmath.org/cd/set1.xhtml">set1</a> CD.
</p>
</div>
</div>
<div class="div4">
<h4><a name="contm.pi" id="contm.pi"></a>4.4.10.13 pi <code><pi/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#pi">pi</a></td>
</tr>
</tbody>
</table>
<p>This element represents pi, approximately 3.142, which is the
ratio of the circumference of a circle to its diameter.
</p>
<div class="mathml-example" id="nums1.pi.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><approx/>
<pi/>
<cn type="rational">22<sep/>7</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow>
<mi>&#x3c0;</mi>
<mo>&#x2243;</mo>
<mrow><mn>22</mn><mo>/</mo><mn>7</mn></mrow>
</mrow></pre><blockquote>
<p><img src="image/nums1-pi-ex1.gif" alt="{\unicode{960}\unicode{8771}{{22}/{7}}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.eulergamma" id="contm.eulergamma"></a>4.4.10.14 Euler gamma <code><eulergamma/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#gamma">gamma</a></td>
</tr>
</tbody>
</table>
<p>This element denotes the gamma constant, approximately 0.5772.</p>
<div class="mathml-example" id="nums1.eulergamma.ex1">
<p>Content MathML</p><pre class="mathml">
<apply><approx/>
<eulergamma/>
<cn>0.5772156649</cn>
</apply></pre><p>Sample Presentation</p><pre class="mathml">
<mrow><mi>&#x3b3;</mi><mo>&#x2243;</mo><mn>0.5772156649</mn></mrow></pre><blockquote>
<p><img src="image/nums1-eulergamma-ex1.gif" alt="{\unicode{947}\unicode{8771}{0.5772156649}}"></p>
</blockquote>
</div>
</div>
<div class="div4">
<h4><a name="contm.infinity" id="contm.infinity"></a>4.4.10.15 infinity <code><infinity/></code></h4>
<table class="syntax">
<tbody>
<tr>
<th>Class</th>
<td><a href="chapter4-d.html#contm.constant">constant-arith</a></td>
</tr>
<tr>
<th>Attributes</th>
<td><a href="appendixa-d.html#parsing_CommonAtt">CommonAtt</a>, <a href="appendixa-d.html#parsing_DefEncAtt">DefEncAtt</a></td>
</tr>
<tr>
<th>Content</th>
<td>Empty</td>
</tr>
<tr>
<th>OM Symbols</th>
<td><a href="http://www.openmath.org/cd/nums1.xhtml#infinity">infinity</a></td>
</tr>
</tbody>
</table>
<p>This element represents the notion of infinity.</p>
<div class="mathml-example" id="nums1.infinity.ex1">
<p>Content MathML</p><pre class="mathml"><infinity/></pre><p>Sample Presentation</p><pre class="mathml">
<mi>&#x221e;</mi></pre><blockquote>
<p><img src="image/nums1-infinity-ex1.gif" alt="\unicode{8734}"></p>
</blockquote>
</div>
</div>
</div>
</div>
<div class="div2">
<h2><a name="contm.deprecated" id="contm.deprecated"></a>4.5 Deprecated Content Elements
</h2>
<div class="div3">
<h3><a name="contm.declare" id="contm.declare"></a>4.5.1 Declare <code><declare></code></h3>
<p>MathML2 provided the <code>declare</code> element to bind properties like
types to symbols and variables and to define abbreviations for structure sharing. This
element is deprecated in MathML 3. Structure sharing can obtained via the <code>share</code>
element (see <a href="chapter4-d.html#contm.sharing">Section 4.2.7 Structure Sharing <code><share></code></a> for details).
</p>
</div>
</div>
<div class="div2">
<h2><a name="contm.p2s" id="contm.p2s"></a>4.6 The Strict Content MathML Transformation
</h2>
<p>MathML 3 assigns semantics to content markup by defining a
mapping to Strict Content MathML. Strict MathML, in turn, is in
one-to-one correspondence with OpenMath, and the subset of
OpenMath expressions obtained from content MathML expressions in
this fashion all have well-defined semantics via the standard
OpenMath Content Dictionary set. Consequently, the mapping of
arbitrary content MathML expressions to equivalent Strict Content
MathML plays a key role in underpinning the meaning of content
MathML.
</p>
<p>The mapping of arbitrary content MathML into Strict content
MathML is defined algorithmically. The algorithm is described
below as a collection of rewrite rules applying to specific
non-Strict constructions. The individual rewrite transformations
have been described in detail in context above. The goal of this
section is to outline the complete algorithm in one place.
</p>
<p>The algorithm is a sequence of nine steps. Each step is
applied repeatedly to rewrite the input until no further
application is possible. Note that in many programming languages,
such as XSLT, the natural implementation is as a recursive
algorithm, rather than the multi-pass implementation suggested by
the description below. The translation to XSL is straightforward
and produces the same eventual Strict Content MathML. However,
because the overall structure of the multi-pass algorithm is
clearer, that is the formulation given here.
</p>
<p>To transform an arbitrary content MathML expression into
Strict Content MathML, apply each of the following rules in turn
to the input expression until all instances of the target
constructs have been eliminated:
</p>
<ol type="1">
<li>
<p><em>Rewrite non-strict <code>bind</code> and elminate deprecated elements</em>:
Change the outer <code>bind</code> tags
in binding expressions to <code>apply</code> if they have qualifiers or multiple
children. This simplifies the algorithm by allowing the subsequent rules to be applied
to non-strict binding expressions without case distinction. Note
that the later
rules will change the <code>apply</code> elements introduced in this step back to
<code>bind</code> elements. Also in this step, deprecated <code>reln</code>
elements are rewritten to <code>apply</code>, and <code>fn</code> elements are replaced by
the child expressions they enclose.
</p>
</li>
<li>
<p><em>Apply special case rules for idiomatic uses of qualifiers</em>:
</p>
<ol type="a">
<li>
<p>Rewrite derivatives with rules <a href="chapter4-d.html#contm.p2s.diff">Rewrite: diff</a>, <a href="chapter4-d.html#contm.p2s.nthdiff">Rewrite: nthdiff</a>,
and <a href="chapter4-d.html#contm.p2s.partialdiff">Rewrite: partialdiffdegree</a>
to explicate the binding status of the variables involved.
</p>
</li>
<li>
<p>Rewrite integrals with the rules <a href="chapter4-d.html#contm.p2s.int">Rewrite: int</a>, <a href="chapter4-d.html#contm.p2s.defint">Rewrite: defint</a>
and <a href="chapter4-d.html#contm.p2s.int.LUlimit">Rewrite: defint limits</a> to disambiguate the status
of bound and free variables and of the orientation of the range of integration if
it is given as a <code>lowlimit</code>/<code>uplimit</code> pair.
</p>
</li>
<li>
<p>Rewrite limits as described in <a href="chapter4-d.html#contm.strict.tendsto">Rewrite: tendsto</a> and <a href="chapter4-d.html#contm.strict-limit">Rewrite: limits condition</a>.
</p>
</li>
<li>
<p>Rewrite sums and products as described in
<a href="chapter4-d.html#contm.sum">Section 4.4.6.1 Sum <code><sum/></code></a> and <a href="chapter4-d.html#contm.product">Section 4.4.6.2 Product <code><product/></code></a>.
</p>
</li>
<li>
<p>Rewrite roots as described in <a href="chapter4-d.html#contm.root">Section 4.4.2.11 Root <code><root/></code></a>.
</p>
</li>
<li>
<p>Rewrite logarithms as described in <a href="chapter4-d.html#contm.log">Section 4.4.7.4 Logarithm <code><log/></code></a>.
</p>
</li>
<li>
<p>Rewrite moments as described in <a href="chapter4-d.html#contm.moment">Section 4.4.8.6 Moment (<code><moment/></code>, <code><momentabout></code>)</a>.
</p>
</li>
</ol>
</li>
<li>
<p><em>Rewrite Qualifiers to <code>domainofapplication</code></em>:
These rules rewrite all <code>apply</code> constructions using <code>bvar</code> and
qualifiers to those using only the general <code>domainofapplication</code> qualifier.
</p>
<ol type="a">
<li>
<p><em>Intervals</em>: Rewrite qualifiers given as <code>interval</code> and
<code>lowlimit</code>/<code>uplimit</code> to intervals of integers via
<a href="chapter4-d.html#contm.limits-strict">Rewrite: interval qualifier</a>.
</p>
</li>
<li>
<p><em>Multiple <code>condition</code>s</em>: Rewrite multiple <code>condition</code>
qualifiers to a single one by taking their conjunction. The resulting compound
<code>condition</code> is then rewritten to <code>domainofapplication</code> according
to rule <a href="chapter4-d.html#contm.condition-strict">Rewrite: condition</a>.
</p>
</li>
<li>
<p><em>Multiple <code>domainofapplication</code>s</em>: Rewrite multiple
<code>domainofapplication</code> qualifiers to a single one by taking the
intersection of the specified domains.
</p>
</li>
</ol>
</li>
<li>
<p><em>Normalize Container Markup</em>:
</p>
<ol type="a">
<li>
<p>Rewrite sets and lists by the rule
<a href="chapter4-d.html#contm.rewrite.setliste">Rewrite: n-ary setlist domainofapplication</a>.
</p>
</li>
<li>
<p>Rewrite interval, vectors, matrices, and matrix rows
as described in <a href="chapter4-d.html#contm.interval">Section 4.4.1.1 Interval <code><interval></code></a>, <a href="chapter4-d.html#contm.vector">Section 4.4.9.1 Vector <code><vector></code></a>,
<a href="chapter4-d.html#contm.matrix">Section 4.4.9.2 Matrix <code><matrix></code></a> and <a href="chapter4-d.html#contm.matrixrow">Section 4.4.9.3 Matrix row <code><matrixrow></code></a>.
</p>
</li>
<li>
<p>Rewrite lambda expressions by the rules <a href="chapter4-d.html#contm.rewrite.lambda">Rewrite: lambda</a>
and <a href="chapter4-d.html#contm.rewrite.lambda.domofa">Rewrite: lambda domainofapplication</a></p>
</li>
<li>
<p>Rewrite piecewise functions as described in <a href="chapter4-d.html#contm.piecewise">Section 4.4.1.9 Piecewise declaration (<code><piecewise></code>, <code><piece></code>, <code><otherwise></code>)</a>.
</p>
</li>
</ol>
</li>
<li>
<p><em>Apply Special Case Rules for Operators using <code>domainofapplication</code> Qualifiers</em>:
This step deals with the special cases for the operators introduced in
<a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>. There are different classes of special cases to be taken into account:
</p>
<ol type="a">
<li>
<p>Rewrite <code>min</code>, <code>max</code>, <code>mean</code> and similar n-ary/unary operators
by the rules <a href="chapter4-d.html#contm.p2s.max">Rewrite: n-ary unary set</a>, <a href="chapter4-d.html#contm.unary.nary.doma">Rewrite: n-ary unary domainofapplication</a>
and <a href="chapter4-d.html#contm.nary.unary.single">Rewrite: n-ary unary single</a>.
</p>
</li>
<li>
<p>Rewrite the quantifiers <code>forall</code> and <code>exists</code> used with <code>domainofapplication</code>
to expressions using implication and conjunction by the rule <a href="chapter4-d.html#contm.rewrite.quantifier">Rewrite: quantifier</a>.
</p>
</li>
<li>
<p>Rewrite integrals used with a <code>domainofapplication</code> element (with or without a <code>bvar</code>)
according to the rules <a href="chapter4-d.html#contm.p2s.int">Rewrite: int</a> and
<a href="chapter4-d.html#contm.p2s.defint">Rewrite: defint</a>.
</p>
</li>
<li>
<p>Rewrite sums and products used with a <code>domainofapplication</code> element
(with or without a <code>bvar</code>) as described in
<a href="chapter4-d.html#contm.sum">Section 4.4.6.1 Sum <code><sum/></code></a> and <a href="chapter4-d.html#contm.product">Section 4.4.6.2 Product <code><product/></code></a>.
</p>
</li>
</ol>
</li>
<li>
<p><em>Eliminate <code>domainofapplication</code></em>: At this stage, any
<code>apply</code> has at most one <code>domainofapplication</code> child and special cases have been addressed. As
<code>domainofapplication</code> is not Strict Content MathML, it is rewritten
</p>
<ol type="a">
<li>
<p>into an application of a restricted function via the rule
<a href="chapter4-d.html#contm.strict-doa">Rewrite: restriction</a> if the <code>apply</code> does not contain
a <code>bvar</code> child.
</p>
</li>
<li>
<p>into an application of the <a href="http://www.openmath.org/cd/fns2.xhtml#predicate_on_list">predicate_on_list</a> symbol via the rules
<a href="chapter4-d.html#contm.rewrite.reln">Rewrite: n-ary relations</a> and <a href="chapter4-d.html#contm.rewrite.reln.bvar">Rewrite: n-ary relations bvar</a>
if used with a relation.
</p>
</li>
<li>
<p>into a construction with the <a href="http://www.openmath.org/cd/fns2.xhtml#apply_to_list">apply_to_list</a> symbol
via the general rule <a href="chapter4-d.html#contm.p2s.lifted">Rewrite: n-ary domainofapplication</a> for
general n-ary operators.
</p>
</li>
<li>
<p>into a construction using the <a href="http://www.openmath.org/cd/set1.xhtml#suchthat">suchthat</a> symbol
from the <a href="http://www.openmath.org/cd/set1.xhtml">set1</a> content dictionary in an <code>apply</code> with bound
variables via the <a href="chapter4-d.html#contm.dombind-strict">Rewrite: apply bvar domainofapplication</a> rule.
</p>
</li>
</ol>
</li>
<li>
<p><em>Rewrite non-strict token elements</em>:
</p>
<ol type="a">
<li>
<p>Rewrite numbers represented as <code>cn</code> elements where the <code>type</code>
attribute is one of "e-notation", "rational",
"complex-cartesian", "complex-polar",
"constant" as strict <code>cn</code> via rules
<a href="chapter4-d.html#contm-strict-cn-sep">Rewrite: cn sep</a>, <a href="chapter4-d.html#contm.cn-base">Rewrite: cn based_integer</a>
and <a href="chapter4-d.html#contm.cn.strict.const">Rewrite: cn constant</a>.
</p>
</li>
<li>
<p>Rewrite any <code>ci</code>, <code>csymbol</code> or <code>cn</code> containing
presentation MathML to <code>semantics</code> elements with rules
<a href="chapter4-d.html#contm.cn.pres">Rewrite: cn presentation mathml</a> and <a href="chapter4-d.html#contm.ci.pres">Rewrite: ci presentation mathml</a> and
the analogous rule for <code>csymbol</code>.
</p>
</li>
</ol>
</li>
<li>
<p><em>Rewrite operators</em>: Rewrite any remaining operator defined in <a href="chapter4-d.html#contm.opel">Section 4.4 Content MathML for Specific Operators and Constants</a>
to a <code>csymbol</code> referencing the symbol identified in the syntax table by the rule
<a href="chapter4-d.html#contm.strict-opel">Rewrite: element</a>. As noted in the descriptions of each
operator element, some require special case rules to determine the proper choice of symbol.
Some cases of particular note are:
</p>
<ol type="a">
<li>
<p>The order of the arguments for the
<a href="chapter4-d.html#contm.selector"><code>selector</code></a> operator must be
rewritten, and the symbol depends on the type of the arguments.
</p>
</li>
<li>
<p>The choice of symbol for the <a href="chapter4-d.html#contm.minus"><code>minus</code></a>
operator depends on the number of the arguments.
</p>
</li>
<li>
<p>The choice of symbol for some set operators depends on the values of
the <code>type</code> of the arguments.
</p>
</li>
<li>
<p>The choice of symbol for some statistical operators depends on the values of
the types of the arguments.
</p>
</li>
</ol>
</li>
<li>
<p><em>Rewrite non-strict attributes</em>:
</p>
<ol type="a">
<li>
<p><em>Rewrite the <code>type</code> attribute</em>:
At this point, all elements
that accept the <code>type</code>, other than <code>ci</code> and <code>csymbol</code>, should have been
rewritten into Strict Content Markup equivalents without <code>type</code> attributes,
where type information is reflected in the choice of operator symbol. Now rewrite remaining
<code>ci</code> and <code>csymbol</code> elements with a <code>type</code> attribute to a
strict expression with <code>semantics</code> according to rules
<a href="chapter4-d.html#contm.ci.strict.ex">Rewrite: ci type annotation</a> and <a href="chapter4-d.html#contm.csymbol.strict.ex">Rewrite: csymbol type annotation</a>.
</p>
</li>
<li>
<p><em>Rewrite <code>definitionURL</code> and <code>encoding</code> attributes</em>:
If the <code>definitionURL</code> and <code>encoding</code> attributes on a
<code>csymbol</code> element can be interpreted as a reference to a
content dictionary (see <a href="chapter4-d.html#contm.csymbol.extended">Section 4.2.3.2 Non-Strict uses of <code><csymbol></code></a> for details), then
rewrite to reference the content dictionary by the <code>cd</code> attribute instead.
</p>
</li>
<li>
<p><em>Rewrite attributes</em>: Rewrite any element with attributes that are
not allowed in strict markup to a <code>semantics</code> construction with
the element without these attributes as the first child and the attributes in
<code>annotation</code> elements by rule <a href="chapter4-d.html#contm.strict-attributes">Rewrite: attributes</a>.
</p>
</li>
</ol>
</li>
</ol>
</div>
</div>
<div class="minitoc">
Overview: <a href="Overview-d.html">Mathematical Markup Language (MathML) Version 3.0</a><br>
Previous: 3 <a href="chapter3-d.html">Presentation Markup</a><br>
Next: 5 <a href="chapter5-d.html">Mixing Markup Languages for Mathematical Expressions</a></div>
</body>
</html>
|