summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/cmathml.dtx
blob: dc101d12f38d2ac36efe7929b12e5a177d8c451b (plain)
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
% \iffalse meta-comment
% Semantic Macros for Content MathML in LaTeX
% Copyright (c) 2006 Michael Kohlhase, all rights reserved
%               this file is released under the
%               Gnu Library Public Licences (LGPL)
%
% The development version of this file can be found at
% https://svn.kwarc.info/repos/kwarc/projects/stex/sty/cmathml.dtx
% \fi
% 
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{cmathml}[2006/01/10 v0.1 CMathML Bindings]
%
%<*driver>
\documentclass{ltxdoc} 
\usepackage{url,array,float,amsfonts,a4wide}
\usepackage{cmathml,cmathmlx,presentation}
\usepackage[show]{ed}
\usepackage{hyperref}
\makeindex
\floatstyle{boxed}
\newfloat{exfig}{thp}{lop}
\floatname{exfig}{Example}
\begin{document}\DocInput{cmathml.dtx}\end{document}
%</driver>
% \fi
% 
%\CheckSum{1586}
% 
% \changes{v0.1}{10. January 2006}{Initial Version}
% \changes{v0.2}{16. January 2006}{Added big operators}
% 
% \GetFileInfo{cmathml.sty}
% 
% \MakeShortVerb{\|}
% 
% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}}
% \def\stex{{\raisebox{-.5ex}S\kern-.5ex\TeX}\index{sTeX}}
% \def\sTeX{\stex}
% \newenvironment{pcmtab}[1][5cm]{\begin{center}\begin{tabular}{|l|l|p{#1}|l|}\hline%
% macro & args & Example & Result\\\hline\hline}%
% {\end{tabular}\end{center}}
% \newenvironment{cmtab}{\begin{center}\begin{tabular}{|l|l|l|l|}\hline%
% macro & args & Example & Result\\\hline\hline}%
% {\end{tabular}\end{center}}
%
% \def\snippet#1{\hbox{\ttfamily{#1}}}
% \def\xml{{\scsys{Xml}}}
% \def\xslt{{\scsys{xslt}}}
% \def\element#1{{\ttfamily{#1}}}
% \def\mathml{{\scshape{MathML}}\index{MathML}}
% \def\latexml{\hbox{{\LaTeX}ML}\index{LaTexML}}
% \def\twin#1#2{\index{#1!#2}\index{#2!#1}}            
% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}}               
% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} 
% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}}    
%
% \title{A {\TeX/\LaTeX}-based Syntax for Content 
%   {\mathml}\thanks{Version {\fileversion} (last revised {\filedate})}}
%    \author{Michael Kohlhase\\
%            Jacobs University, Bremen\\
%            \url{http://kwarc.info/kohlhase}}
% \maketitle
%
% \begin{abstract}
%   The |cmathml| packge is part of the {\stex} collection, a
%   version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents semantically
%   without leaving the document format, essentially turning {\TeX/\LaTeX} into a document
%   format for mathematical knowledge management (MKM).
%
%   This package provides a collection of semantic macros for content {\mathml} and their
%   {\latexml} bindings. These macros form the basis of a naive translation from
%   semantically preloaded {\LaTeX} formulae into the content {\mathml} formulae via the
%   {\latexml} system.
% \end{abstract}
%
% \newpage
%
%\section{Introduction}\label{sec:intro}
%
% This document describes the collection of semantic macros for content {\mathml} and
% their {\latexml} bindings. These macros can be used to mark up mathematical formulae,
% exposing their functional/logical structure. This structure can be used by MKM systems
% for added-value services, either directly from the {\sTeX} sources, or after
% translation. Even though it is part of the {\stex} collection, it can be used
% independently. Note that this documentation of the package presupposes the discussion of
% the {\stex} collection to be self-contained.
% 
% \subsection{Encoding Content {\mathml} in {\TeX/\LaTeX}}\label{sec:encoding}
% 
% The |cmathml| packge presented here addresses part of transformation problem: representing
% mathematical formulae in the {\LaTeX} workflow, so that content {\mathml} representations
% can be derived from them. The underlying problem is that run-of-the-mill {\TeX/\LaTeX}
% only specifies the presentation (i.e. what formulae look like) and not their content
% (their functional structure). Unfortunately, there are no good methods (yet) to infer the
% latter from the former, but there are ways to get presentation from content.
%
% The solution to this problem is to dump the extra work on the author (after all she knows
% what she is talking about) and give them the chance to specify the intended structure. The
% markup infrastructure supplied by the |cmathml| package lets the author do this without
% changing the visual appearance, so that the {\LaTeX} workflow is not disrupted.
%
% To use these |cmathml| macros in a {\LaTeX} document, you will have to include the
% |cmathml| package using |\usepackage{cmathml}| somewhere in the document preamble. Then
% you can use the macros
% \begin{verbatim}
%   $\Ceq{\Cexp{\Ctimes{\Cimaginaryi,\Cpi}},\Cuminus{\Ccn{1}}}$
% \end{verbatim}
% which will result in $e^{i\pi}=-1$ when the document is formatted in {\LaTeX}. If the
% document is converted to {\xml} using the {\latexml} conversion tool, then the result
% will be content {\mathml} representation:
%
%\begin{exfig}
% \begin{verbatim}
% <math xmlns="http://www.w3.org/1998/Math/MathML">
%   <apply>
%     <eq/>
%     <apply>
%       <exp/>
%       <apply><times><imaginaryi/><pi/></times></apply>
%     </apply>
%     <apply><minus/><cn>1</cn></apply>
%   </apply>
% </math>
% \end{verbatim}\vspace*{-.6cm}
% \caption{Content {\mathml} Form of $e^{i\pi}=-1$}\label{fig:cmathml-eip}
% \end{exfig}
%
% \subsection{Changing the {\TeX/\LaTeX} Presentation}\label{sec:changing}
% 
% It is possible to change the default presentation (i.e. the result under {\LaTeX}
% formatting): The semantic macros only function as interface control sequences, which
% call an internal macro that does the actual presentation. Thus we simply have to
% redefine the internal macro to change the presentation. This is possible locally or
% globally in the following way:
% \begin{verbatim}
% \makeatletter
% \gdef\CMathML@exp#1{exp(#1)}
% \def\CMathML@pi{\varpi}
% \makeatother
% \end{verbatim}
% 
% The first line is needed to lift the {\LaTeX} redefinition protection for internal
% macros (those that contain the $\snippet{\@}$ character), and the last line restores it
% for the rest of the document. The second line has a {\em{global}} (i.e. the presentation
% will be changed from this point on to the end of the document.)  redefinition of the
% presentation of the exponential function in the {\LaTeX} output.  The third line has a
% {\em{local}} redefinition of the presentation (i.e. in the local group induced by
% {\LaTeX}'s $\snippet{begin}/\snippet{end}$ grouping or by {\TeX}'s grouping induced by
% curly braces). Note that the argument structure has to be respected by the presentation
% redefinitions. Given the redefinitions above, our equation above would come out as
% $exp(i\varpi)=-1$.
%
% \subsection{The Future: Heuristic Parsing}\label{sec:future}
%
% The current implementation of content {\mathml} transformation from {\LaTeX} to
% {\mathml} lays a heavy burden on the content author: the {\LaTeX} source must be
% semantically preloaded --- the structure of the formulae must be fully annotated. In our
% example above, we had to write {|\Ceq{A,B}|} instead of the more conventional (and more
% legible) {|A=B|}.\ednote{come up with a good mixed example}
%
% The reason for this is that this keeps the transformation to content {\mathml} very
% simple, predictable and robust at the expense of authoring convenience. The
% implementation described in this module should be considered as a first step and
% fallback solution only. Future versions of the $\latexml$ tool will feature more
% intelligent solutions for determining the implicit structure of more conventional
% mathematical notations (and {\LaTeX} representations), so that writing content {\mathml}
% via {\LaTeX} will become less tedious.
%
% However, such more advanced techniques usually rely on linguistic, structural, and
% semantic information about the mathematical objects and their preferred
% representations. They tend to be less predictable to casual users and may lead to
% semantically unexpected results.\ednote{talk about sTeX and extensibility in
%   MathML/OpenMath/OMDoc}
%
% \newpage
% \section{The User Interface}\label{sec:modules}
%
% We will now tabulate the semantic macros for the Content {\mathml} elements. We have
% divided them into modules based on the sectional structure of the {\mathml}2
% recommendation ($2^{nd}$ edition). Before we go into the specific elements one-by-one,
% we will discuss some general properties of the |cmatml| macros and their {\latexml}
% bindings.
%
% \subsection{Generalities of the Encoding}\label{sec:generalities}
%
% The semantic macros provided by the |cmatml| package differ mainly in the way they treat
% their arguments.  The simplest case are those for constants~\ref{sec:constants} that do
% not take any. Others take one, two, three, or even four arguments, which have to be
% {\TeX} tokens or have to be wrapped in curly braces. For operators that are associative
% {\twin{associative}{operator}} like addition the argument sequence is provided as a
% single {\TeX} argument (wrapped in curly braces) that contains a comma-separated
% sequence of arguments (wrapped in curly braces where necessary). 
% 
% \DescribeMacro{\Capply} The current setup of the |cmathml| infrastructure minimizes the
% need of specifying the {\mathml} {\element{apply}} element, since the macros are all in
% applied form: As we have seen in the example in the Introduction~\ref{sec:intro}, a
% macro call like {|\Cexp{A}|} corresponds to the application of the exponential function
% to some object, so the necessary {\element{apply}} elements in the {\mathml}
% representation are implicit in the {\LaTeX} formulation and are thus added by the
% transformation. Of course this only works, if the function is a content {\mathml}
% element. Often, in mathematics we will have situations, where the function is a variable
% (or ``arbitrary but fixed'') function. Then the formula $f(x)$ represented as |$f(x)$|
% in {\TeX} could (and sometimes will) be misunderstood by the Math parser as $f\cdot x$,
% i.e. a product of the number $f$ with the number $x$, where $x$ has brackets for some
% reason. In this case, we can disambiguate by using |\Capply{f}x|, which will also format
% as $f(x)$.\ednote{what about $n$-ary functions?}
%
% By the same token, we do not need to represent the qualifier elements
% {\element{condition}} and {\element{domainofapplication}}\footnote{We do not support the
%   {\element{fn}} element as it is deprecated in {\mathml}2 and the {\element{declare}}
%   and {\element{sep}} elements, since their semantic status is unclear (to the author,
%   if you feel it is needed, please gripe to me).}, for
% {\twintoo{binding}{operator}s}. They are are folded into the special forms of the
% semantic macros for the binding operators below (the ones with the {|Cond|} and {|DA|}
% endings):
%
% For operators that are {\index*{associative}}, {\index*{commutative}}, and
% {\index*{idempotent}} ({\index*{ACI}} i.e. {\index*{bracketing}},
% order\twin{argument}{order}, and {\index*{multiplicity}} of arguments does not matter)
% {\mathml} supplies the a special form of application as a binding operator (often called
% the corresponding ``{\twintoo{big}{operator}})'', which ranges over a whole set of
% arguments. For instance for the ACI operator $\cup$ for set uinon has the ``big''
% operator for unions over collections of sets e.g. used in the power set
% $\bigcup_{S\subseteq T}S$ of a set $T$. In some cases, the ``big'' operators are
% provided independently by {\mathml}, e.g. the ACI addition operator has the sum operator
% as a corresponding ``big operator'': $\sum_{x\in\Cnaturalnumbers}{x^i}$ is the sum of
% the powers of $x$ for all natural numbers. Where they are not, we will supply extra
% macros in the |cmathml| package, e.g. the |\CUnion| macro as the big operator for
% |\Cunion|.
% 
% Finally, some of the binding operators have multiple content models flagged by the
% existence of various modifier elements. In these cases, we have provided different
% semantic macros for the different cases.
%
% \subsection{The Token Elements}\label{sec:tokens}
%
% The {\mathml} token elements are very simple containers that wrap some presentation
% {\mathml} text. The {\element{csymbol}} element is the extension element in
% {\mathml}. It's content is the presentation of symbol, and it has a |definitionURL|
% attribute that allows to specify a URI that specifies the semantics of the symbol. This
% URL can be specified in an optional argument to teh |\Ccsymbol| macro, in accordance
% with usual mathematical practice, the |definitionURL| is not presented.
% \DescribeMacro{\Ccn}\DescribeMacro{\Cci}\DescribeMacro{\Ccsymbol}
% \begin{cmtab}
%   |\Ccn| & token & |\Ccn{t}| & $\Ccn{t}$\\\hline
%   |\Cci| & token & |\Cci{t}| & $\Cci{t}$\\\hline
%   |\Ccsymbol| & token, URI & |\Ccsymbol[http://w3.org]{t}|
%         & $\Ccsymbol[http://w3.org]{t}$\\\hline
% \end{cmtab}
% Like the |\Ccsymbol| macro, all other macros in the |camthml| package take an optional
% argument\footnote{This may change into a KeyVaL argument in future versionss of the
%   |cmathml| package.} for the |definitionURL| attribute in the corresponding {\mathml}
% element.
%
%\newpage
% \subsection{The Basic Content Elements}\label{sec:basic}
%
% The basic elements comprise various pieces of the {\mathml} infrastructure.  Most of the
% semantic macros in this section are relatively uneventful.
%
% \DescribeMacro{\Cinverse}\DescribeMacro{\Ccompose}\DescribeMacro{\Cident}
% \DescribeMacro{\Cdomain}\DescribeMacro{\Ccodomain}\DescribeMacro{\Cimage}
% \begin{cmtab}
%   |\Cinverse| & 1 & |\Cinverse{f}| & $\Cinverse{f}$\\\hline
%   |\Ccompose| & 1 & |\Ccompose{f,g,h}| & $\Ccompose{f,g,h}$\\\hline
%   |\Cident| & 0 & |\Cident| & $\Cident$\\\hline
%   |\Cdomain| & 1 & |\Cdomain{f}| & $\Cdomain{f}$\\\hline
%   |\Ccodomain| & 1 & |\Ccodomain{f}| & $\Ccodomain{f}$\\\hline
%   |\Cimage| & 1 & |\Cimage{f}| & $\Cimage{f}$\\\hline
% \end{cmtab}
%
% \DescribeMacro{\Clambda}\DescribeMacro{\ClambdaDA}\DescribeMacro{\Crestrict} For the
% {\element{lambda}} element, we only have the {\element{domainofapplication}} element, so
% that we have three forms a $\lambda$-construct can have. The first one is the simple one
% where the first element is a bound variable. The second one restricts the appliccability
% of the bound variable via a {\element{domainofapplication}} element, while the third one
% does not have a bound variable, so it is just a function restriction
% operator.\ednote{need ClambdaCond}
%
% \begin{cmtab}
%   |\Clambda| & 2 & |\Clambda{x,y}{A}| & $\Clambda{x,y}{A}$\\\hline
%   |\ClambdaDA| & 3 & |\ClambdaDA{x}{C}{A}| & $\ClambdaDA{x,y}{C}{A}$\\\hline
%   |\Crestrict| & 2 & |\Crestrict{f}{S}| & $\Crestrict{f}{S}$\\\hline
% \end{cmtab}
%
% \DescribeMacro{ccinterval}\DescribeMacro{cointerval}
% \DescribeMacro{ocinterval}\DescribeMacro{oointerval}
% The {\element{interval}} constructor actually represents four types of intervals in
% {\mathml}. Therefore we have four semantic macros, one for each combination of open and
% closed endings:
% \begin{cmtab}
%   |\Cccinterval| & 2 & |\Cccinterval{1}{2}| & $\Cccinterval{1}{2}$\\\hline
%   |\Ccointerval| & 2 & |\Ccointerval{1}{2}| & $\Ccointerval{1}{2}$\\\hline
%   |\Cocinterval| & 2 & |\Cocinterval{1}{2}| & $\Cocinterval{1}{2}$\\\hline
%   |\Coointerval| & 2 & |\Coointerval{1}{2}| & $\Coointerval{1}{2}$\\\hline
% \end{cmtab}
%
%\DescribeMacro{\Cpiecewise}\DescribeMacro{\Cpiece}\DescribeMacro{\Cotherwise}
% The final set of semantic macros are concerned with piecewise definition of functions.
% \begin{cmtab}
%   |\Cpiecewise| & 1 & see below & see below\\\hline
%   |\Cpiece| & 2 & |\Cpiece{A}{B}| & $\begin{array}{ll}\Cpiece{A}{B}\end{array}$\\\hline
%   |\Cotherwise| & 1 & |\Cotherwise{B}| & $\begin{array}{ll}\Cotherwise{1}\end{array}$\\\hline
% \end{cmtab}
%
% For instance, we could define the abstract value function on the reals with the following
% markup
%
% \begin{center}
% \begin{tabular}{|l|l|}\hline
%   Semantic Markup & Formatted\\\hline
%   \begin{minipage}{8cm}\footnotesize
% \begin{verbatim}
% \Ceq{\Cabs{x},
%      \Cpiecewise{\Cpiece{\Cuminus{x}}{\Clt{x,0}}
%                  \Cpiece{0}{\Ceq{x,0}}
%                   \Cotherwise{x}}}
% \end{verbatim}
% \end{minipage} &
% $\Ceq{\Cabs{x},\Cpiecewise{\Cpiece{\Cuminus{x}}{\Clt{x,0}}
%                           \Cpiece{0}{\Ceq{x,0}}
%                           \Cotherwise{x}}}$
% \\\hline
% \end{tabular}
% \end{center}
%
% \newpage
% \subsection{Elements for Arithmetic, Algebra, and Logic}\label{sec:arith}
%
% This section introduces the infrastructure for the basic arithmetic operators. The first
% set is very simple 
% 
% \DescribeMacro{\Cquotient}\DescribeMacro{\Cfactorial}\DescribeMacro{\Cdivide}
% \DescribeMacro{\Cminus}\DescribeMacro{\Cplus}\DescribeMacro{\Cpower}
% \DescribeMacro{\Crem}\DescribeMacro{\Ctimes}\DescribeMacro{\Croot}
% \begin{cmtab}
%   |\Cquotient| & 2 & |\Cquotient{1}{2}| & $\Cquotient{1}{2}$\\\hline
%   |\Cfactorial| & 1 & |\Cfactorial{7}| & $\Cfactorial{7}$\\\hline
%   |\Cdivide| & 2 & |\Cdivide{1}{2}| & $\Cdivide{1}{2}$\\\hline
%   |\Cminus| & 2 & |\Cminus{1}{2}| & $\Cminus{1}{2}$\\\hline
%   |\Cplus| & 1 & |\Cplus{1}| & $\Cplus{1}$\\\hline
%   |\Cpower| & 2 & |\Cpower{x}{2}| & $\Cpower{x}{2}$\\\hline
%   |\Crem| & 2 & |\Crem{7}{2}| & $\Crem{7}{2}$\\\hline
%   |\Ctimes| & 1 & |\Ctimes{1,2,3,4}| & $\Ctimes{1,2,3,4}$\\\hline
%   |\Croot| & 2 & |\Croot{3}{2}| & $\Croot{3}{2}$\\\hline
% \end{cmtab}
%
% The second batch below is sligtly more complicated, since they take a set of
% arguments. In the |cmathml| package, we treat them like {\index*{associative}}
% operators, i.e. they act on a single argument that contains a sequence of
% comma-separated arguments\ednote{implement this in the latexml side}
% 
% \DescribeMacro{\Cmax}\DescribeMacro{\Cmin}\DescribeMacro{\Cgcd}\DescribeMacro{\Clcm}
% \begin{cmtab}
%   |\Cmax| & 1 & |\Cmax{1,3,6}| & $\Cmax{1,3,6}$\\\hline
%   |\Cmin| & 1 & |\Cmin{1,4,5}| & $\Cmin{1,4,7}$\\\hline
%   |\Cgcd| & 1 & |\Cgcd{7,3,5}| & $\Cgcd{7,3,5}$\\\hline
%   |\Clcm| & 1 & |\Clcm{3,5,4}| & $\Clcm{3,5,4}$\\\hline
% \end{cmtab}
%
% The operators for the logical connectives are associative as well\ednote{maybe add some
%   precedences here.}. Here, conjunction, (exclusive) disjunction are $n$-ary associative
% operators, therefore their semantic macro only has one {\TeX} argument which contains a
% comma-separated list of subformulae.
% \DescribeMacro{\Cand}\DescribeMacro{\Cor}\DescribeMacro{\Cxor}\DescribeMacro{\Cnot}
% \DescribeMacro{\Cimplies}
% \begin{cmtab}
%   |\Cand| & 1 & |\Cand{A,B,C}| & $\Cand{A,B,C}$\\\hline
%   |\Cor| & 1 & |\Cor{A,B,C}| & $\Cor{A,B,C}$\\\hline
%   |\Cxor| & 1 & |\Cxor{A,B,C}| & $\Cxor{A,B,C}$\\\hline
%   |\Cnot| & 1 & |\Cnot{A}| & $\Cnot{A}$\\\hline
%   |\Cimplies| & 2 & |\Cimplies{A}{B}| & $\Cimplies{A}{B}$\\\hline
% \end{cmtab}
% 
% The following are the corresponding big operators, where appropriate. 
% \DescribeMacro{\CAndDA}\DescribeMacro{\CAndCond}
% \DescribeMacro{\COrDA}\DescribeMacro{\COrCond}
% \DescribeMacro{\CXorDA}\DescribeMacro{\CXorCond}
% \begin{cmtab}
%   |\CAndDA| & 2 & |\CAndDA\Cnaturalnumbers\phi| & $\CAndDA\Cnaturalnumbers\phi$\\\hline
%   |\CAndCond| & 3 & |\CAndCond{x}{\Cgt{x}5}{\psi(x)}| 
%                   & $\CAndCond{x}{\Cgt{x}5}{\psi(x)}$\\\hline
%   |\COrDA| & 2 & |\COrDA\Cnaturalnumbers\phi| & $\COrDa\Cnaturalnumbers\phi$\\\hline
%   |\COrCond| & 3 & |\COrCond{x}{\Cgt{x}5}{\psi(x)}| 
%                   &   $\COrCond{x}{\Cgt{x}5}{\psi(x)}$\\\hline
%   |\CXorDA| & 2 & |\CXorDA\Cnaturalnumbers\phi| & $\CXorDA\Cnaturalnumbers\phi$\\\hline
%   |\CXorCond| & 3 & |\CXorCond{x}{\Cgt{x}5}{\psi(x)}| 
%                   & $\CXorCond{x}{\Cgt{x}5}{\psi(x)}$\\\hline
% \end{cmtab}
% 
% The semantic macros for the quantifiers come in two forms: with- and without a condition
% qualifier. In a restricted quantification of the form $\forall x,C:A$, the bound variable
% $x$ ranges over all values, such that $C$ holds ($x$ will usually occur in the condition
% $C$). In an unrestricted quantification of the form $\forall x:A$, the bound variable
% ranges over all possible values for $x$.
% \DescribeMacro{\Cforall}\DescribeMacro{\CforallCond}
% \DescribeMacro{\Cexists}\DescribeMacro{\CexistsCond}
% \begin{cmtab}
%   |\Cforall| & 2 & |\Cforall{x,y}{A}| & $\Cforall{x,y}{A}$\\\hline
%   |\CforallCond| & 3 & |\CforallCond{x}{C}{A}| & $\CforallCond{x}{C}{A}$\\\hline
%   |\Cexists| & 2 & |\Cexists{x,y}{A}| & $\Cexists{x,y}{A}$\\\hline
%   |\CexistsCond| & 3 & |\CexistsCond{x}{C}{A}| & $\CexistsCond{x}{C}{A}$\\\hline
% \end{cmtab}
%
% The rest of the operators are very simple in structure.
% \DescribeMacro{\Cabs}\DescribeMacro{\Cconjugate}\DescribeMacro{\Carg}
% \DescribeMacro{\Creal}\DescribeMacro{\Cimaginary}\DescribeMacro{\Cfloor}
% \DescribeMacro{\Cceiling}
% \begin{cmtab}
%   |\Cabs| & 1 & |\Cabs{x}| & $\Cabs{x}$\\\hline
%   |\Cconjugate| & 1 & |\Cconjugate{x}| & $\Cconjugate{x}$\\\hline
%   |\Carg| & 1 & |\Carg{x}| & $\Carg{x}$\\\hline
%   |\Creal| & 1 & |\Creal{x}| & $\Creal{x}$\\\hline
%   |\Cimaginary| & 1 & |\Cimaginary{x}| & $\Cimaginary{x}$\\\hline
%   |\Cfloor| & 1 & |\Cfloor{1.3}| & $\Cfloor{1.3}$\\\hline
%   |\Cceiling| & 1 & |\Cceiling{x}| & $\Cceiling{x}$\\\hline
% \end{cmtab}
%
% \subsection{Relations}\label{sec:rels}
%
% The relation symbols in {\mathml} are mostly $n$-ary associative operators (taking a
% comma-separated list as an argument).
%
% \DescribeMacro{\Ceq}\DescribeMacro{\Cneq}\DescribeMacro{\Cgt}\DescribeMacro{\Clt}
% \DescribeMacro{\Cgeq}\DescribeMacro{\Cleq}\DescribeMacro{\Cequivalent}
% \DescribeMacro{\Capprox}\DescribeMacro{\Cfactorof}
% \begin{cmtab}
%   |\Ceq| & 1 & |\CeqA,B,C| & $\Ceq{A,B,C}$\\\hline
%   |\Cneq| & 2 & |\Cneq{1}{2}| & $\Cneq{1}{2}$\\\hline
%   |\Cgt| & 1 & |\Cgt{A,B,C}| & $\Cgt{A,B,C}$\\\hline
%   |\Clt| & 1 & |\Clt{A,B,C}| & $\Clt{A,B,C}$\\\hline
%   |\Cgeq| & 1 & |\Cgeq{A,B,C}| & $\Cgeq{A,B,C}$\\\hline
%   |\Cleq| & 1 & |\Cleq{A,B,C}| & $\Cleq{A,B,C}$\\\hline
%   |\Cequivalent| & 1 & |\Cequivalent{A,B,C}| & $\Cequivalent{A,B,C}$\\\hline
%   |\Capprox| & 2 & |\Capprox{1}{2}| & $\Capprox{1}{1.1}$\\\hline
%   |\Cfactorof| & 2 & |\Cfactorof{7}{21}| & $\Cfactorof{7}{21}$\\\hline
% \end{cmtab}
%
% \subsection{Elements for Calculus and Vector Calculus}\label{sec:calculus-vector-calculus}
%
%   The elements for calculus and vector calculus have the most varied forms. 
% 
%   The integrals come in four forms: the first one is just an indefinite integral over a
%   function, the second one specifies the bound variables, upper and lower limits. The
%   third one specifies a set instead of an interval, and finally the last specifies a
%   bound variable that ranges over a set specified by a condition.
%
% \DescribeMacro{\Cint}\DescribeMacro{\CintLimits}\DescribeMacro{\CintDA}\DescribeMacro{\CintCond}
% \begin{cmtab}
%   |\Cint| & 1 & |\Cint{f}| & $\Cint{f}$\\\hline
%   |\CintLimits| & 4 & |\CintLimits{x}{0}{\Cinfinit}{f(x)}|
%                          & $\CintLimits{x}{0}{\infty}{f(x)}$\\\hline
%   |\CintDA| & 2 & |\CintDA{\Creals}{f}|
%                        & $\CintDA{\mathbb{R}}{f}$\\\hline
%   |\CintCond| & 3 & |\CintCond{x}{\Cin{x}{D}}{f(x)}|
%                        & $\CintCond{x}{x\in D}{f(x)}$\\\hline
% \end{cmtab}
%
% \DescribeMacro{\Cdiff}\DescribeMacro{\Cddiff} The differentiation operators are used in
% the usual way: simple differentiation is represented by the |\Cdiff| macro which takes
% the function to be differentiated as an argument, differentiation with the $d$-notation
% is possible by the |\Cddiff|, which takes the bound varible\ednote{really only one?} as
% the first argument and the function expression (in the bound variable) as a second
% argument.
% 
% \DescribeMacro{\Cpartialdiff} Partial Differentiation is specified by the
% |\Cpartialdiff| macro. It takes the overall degree as the first argument (to leave it
% out, just pass the empty argument). The second argument is the list of bound variables
% (with their degrees; see below), and the last the function expression (in these bound
% variables). \DescribeMacro{\Cdegree} To specify the respective degrees of
% differentiation on the variables, we use the |\Cdegree| macro, which takes two arguments
% (but no optional argument), the first one is the degree (a natural number) and the
% second one takes the variable. Note that the overall degree has to be the sum of the
% degrees of the bound variables.
%
% \begin{pcmtab}[6cm]
%   |\Cdiff| & 1 & |\Cdiff{f}| & $\Cdiff{f}$\\\hline
%   |\Cddiff| & 2 & |\Cddiff{x}{f}| & $\Cddiff{x}{f}$\\\hline
%   |\Cpartialdiff| & 3 & |\Cpartialdiff{3}{x,y,z}{f(x,y)}| 
%                        & $\Cpartialdiff{3}{x,y,z}{f(x,y)}$\\\hline
%   |\Cpartialdiff| & 3 & |\Cpartialdiff{7}| |{\Cdegree{2}{x},\Cdegree{4}{y},z}| |{f(x,y)}| 
%                        & $\Cpartialdiff{7}{\Cdegree{2}{x},\Cdegree{4}{y},z}{f(x,y)}$\\\hline
% \end{pcmtab}
%
% \DescribeMacro{\Climit}\DescribeMacro{\ClimitCond} For content {\mathml}, there are two
% kinds of limit expressions: The simple one is specified by the |\Climit| macro, which
% takes three arguments: the bound variable, the target, and the limit expression. If we
% want to place additional conditions on the limit construction, then we use the
% |\ClimitCond| macro, which takes three arguments as well, the first one is a sequence of
% bound variables, the second one is the condition, and the third one is again the limit
% expression. 
% 
% \DescribeMacro{\Ctendsto}\DescribeMacro{\CtendstoAbove}\DescribeMacro{\CtendstoBelow} If
% we want to speak qualitatively about limit processes (e.g. in the condition of a
% |\ClimitCond| expression), then can use the {\mathml} {\element{tendsto}} element, which
% is represented by the |\Ctendsto| macro, wich takes two expressions arguments. In
% {\mathml}, the {\element{tendsto}} element can be further specialized by an attribute to
% indicate the direction from which a limit is approached. In the |cmathml| package, we
% supply two additional (specialized) macros for that: |\CtendstoAbove| and
% |\CtendstoBelow|. 
% \begin{cmtab}
%   |\Climit| & 3 & |\Climit{x}{0}{\Csin{x}}| & $\Climit{x}{0}{\Csin{x}}$\\\hline
%   |\ClimitCond| & 3 & |\ClimitCond{x}{\Ctendsto{x}{0}}{\Ccos{x}}|
%                          & $\ClimitCond{x}{\Ctendsto{x}{0}}{\Ccos{x}}$\\\hline
%   |\Ctendsto| & 2 & |\Ctendsto{f(x)}{2}| & $\Ctendsto{f(x)}{2}$\\\hline
%   |\CtendstoAbove| & 2 & |\CtendstoAbove{x}{1}| & $\CtendstoAbove{x}{1}$\\\hline
%   |\CtendstoBelow| & 2 & |\CtendstoBelow{x}{2}| & $\CtendstoBelow{x}{2}$\\\hline
% \end{cmtab}
%
% \DescribeMacro{\Cdivergence}\DescribeMacro{\Cgrad}\DescribeMacro{\Ccurl}
% \DescribeMacro{\Claplacian}
% \begin{cmtab}
%   |\Cdivergence| & 1 & |\Cdivergence{A}| & $\Cdivergence{A}$\\\hline
%   |\Cgrad| & 1 & |\Cgrad{\Phi}| & $\Cgrad{\Phi}$\\\hline
%   |\Ccurl| & 1 & |\Ccurl{\Xi}| & $\Ccurl{\Xi}$\\\hline
%   |\Claplacian| & 1 & |\Claplacian{A}| & $\Claplacian{A}$\\\hline
% \end{cmtab}
%
% \subsection{Sets and their Operations}\label{sec:sets}
%
% \DescribeMacro{\Cset}\DescribeMacro{\Clist}
% \DescribeMacro{\CsetDA}\DescribeMacro{\CsetRes}\DescribeMacro{\CsetCond}
% The |\Cset| macros is used as the simple finite set constructor, it takes one argument
% that is a comma-separated sequence of members of the set. |\CsetRes| allows to specify a
% set by restricting a set of variables, and |\CsetCond| is the general form of the set
% construction.\ednote{need to do this for lists as well? Probably} 
% \begin{cmtab}
%   |\Cset| & 1 & |\Cset{1,2,3}| & $\Cset{1,2,3}$\\\hline
%   |\CsetRes| & 2      & |\CsetRes{x}{\Cgt{x}5}| 
%                          & $\CsetRes{x}{\Cgt{x}5}$\\\hline
%   |\CsetCond| & 3      & |\CsetCond{x}{\Cgt{x}5}{\Cpower{x}3}| 
%                          & $\CsetCond{x}{\Cgt{x}5}{\Cpower{x}3}$\\\hline
%   |\CsetDA| & 3      & |\CsetDA{x}{\Cgt{x}5}{S_x}}| 
%                          & $\CsetDA{x}{\Cgt{x}5}{S_x}$\\\hline
%   |\Clist| & 1 & |\Clist{3,2,1}| & $\Clist{3,2,1}$\\\hline
%\end{cmtab}
%
%\DescribeMacro{\Cunion}\DescribeMacro{\Cintersect}\DescribeMacro{\Ccartesianproduct}
% \DescribeMacro{\Csetdiff}\DescribeMacro{\Ccard}\DescribeMacro{\Cin}\DescribeMacro{\Cnotin}
% \begin{cmtab}
%   |\Cunion| & 1 & |\Cunion{S,T,L}| & $\Cunion{S,T,L}$\\\hline
%   |\Cintersect| & 1 & |\Cintersect{S,T,L}| & $\Cintersect{S,T,L}$\\\hline
%   |\Ccartesianproduct| & 1 & |\Ccartesianproduct{A,B,C}| & $\Ccartesianproduct{A,B,C}$\\\hline
%   |\Csetdiff| & 2 & |\Csetdiff{S}{L}| & $\Csetdiff{S}{L}$\\\hline
%   |\Ccard| & 1 & |\Ccard{\Cnaturalnumbers}| & $\Ccard{\mathbb{N}}$\\\hline
%   |\Cin| & 2 & |\Cin{a}{S}| & $\Cin{a}{S}$\\\hline
%   |\Cnotin| & 2 & |\Cnotin{b}{S}| & $\Cnotin{b}{S}$\\\hline
%\end{cmtab}
%
% The following are the corresponding big operators for the first three binary ACI
% functions.  \DescribeMacro{\CUnionDA}\DescribeMacro{\CUnionCond}
% \DescribeMacro{\CIntersectDA}\DescribeMacro{\CIntersectCond}
% \DescribeMacro{\CCartesianproductDA}\DescribeMacro{\CCartesianproductCond}
% \begin{cmtab}
%   |\CUnionDA| & 2        & |\CUnionDA\Cnaturalnumbers{S_i}| 
%                          & $\CUnionDA\Cnaturalnumbers{S_i}$\\\hline
%   |\CUnionCond| & 3      & |\CUnionCond{x}{\Cgt{x}5}{S_x}}| 
%                          & $\CUnionCond{x}{\Cgt{x}5}{S_x}$\\\hline
%   |\CIntersectDA| & 2    & |\CIntersectDA\Cnaturalnumbers{S_i}|
%                          & $\CIntersectDa\Cnaturalnumbers{S_i}$\\\hline
%   |\CIntersectCond| & 3  & |\CIntersectCond{x}{\Cgt{x}5}{S_x}| 
%                          & $\CIntersectCond{x}{\Cgt{x}5}{S_x}$\\\hline
%   |\CCartesianproductDA| & 2 & |\CCartesianproductDA\Cnaturalnumbers{S_i}| 
%                          & $\CCartesianproductDA\Cnaturalnumbers{S_i}$\\\hline
%   |\CCartesianproductCond| & 3 & |\CCartesianproductCond{x}{\Cgt{x}5}{S_x}| 
%                          & $\CCartesianproductCond{x}{\Cgt{x}5}{S_x}$\\\hline
% \end{cmtab}
% 
% \DescribeMacro{\Csubset}\DescribeMacro{\Cprsubset}
% \DescribeMacro{\Cnotsubset}\DescribeMacro{\Cnotprsubset} For the set containment
% relations, we are in a somewhat peculiar situation: content {\mathml} only supplies the
% subset side of the reations and leaves out the superset relations. Of course they are
% not strictly needed, since they can be expressed in terms of the subset relation with
% reversed argument order. But for the |cmathml| package, the macros have a presentational
% side (for the {\LaTeX} workflow) and a content side (for the {\latexml} converter)
% therefore we will need macros for both relations. 
%
% \begin{cmtab}
%   |\Csubset| & 1 & |\Csubset{S,T,K}| & $\Csubset{S,T,K}$\\\hline
%   |\Cprsubset| & 1 & |\Cprsubset{S,T,K}| & $\Cprsubset{S,T,K}$\\\hline
%   |\Cnotsubset| & 2 & |\Cnotsubset{S}{K}| & $\Cnotsubset{S}{K}$\\\hline
%   |\Cnotprsubset| & 2 & |\Cnotprsubset{S}{L}| & $\Cnotprsubset{S}{L}$\\\hline
% \end{cmtab}
% \DescribeMacro{\Csupset}\DescribeMacro{\Cprsupset}
% \DescribeMacro{\Cnotsupset}\DescribeMacro{\Cnotprsupset}
% The following set of macros are presented in {\LaTeX} as their name suggests, but upon
% transformation will generate content markup with the {\mathml} elements (i.e. in terms
% of the subset relation). 
%
% \begin{cmtab}
%   |\Csupset| & 1 & |\Csupset{S,T,K}| & $\Csupset{S,T,K}$\\\hline
%   |\Cprsupset| & 1 & |\Cprsupset{S,T,K}| & $\Cprsupset{S,T,K}$\\\hline
%   |\Cnotsupset| & 2 & |\Cnotsupset{S}{K}| & $\Cnotsupset{S}{K}$\\\hline
%   |\Cnotprsupset| & 2 & |\Cnotprsupset{S}{L}| & $\Cnotprsupset{S}{L}$\\\hline
% \end{cmtab}
%
% \subsection{Sequences and Series}\label{sec:sequences}
%
% \DescribeMacro{\CsumLimits}\DescribeMacro{\CsumCond}\DescribeMacro{\CsumDA}
% \DescribeMacro{\CprodLimist}\DescribeMacro{\CprodCond}\DescribeMacro{\CprodDA}
% \begin{cmtab}
%   |\CsumLimits| & 4 & |\CsumLimits{i}{0}{50}{x^i}| & $\CsumLimits{i}{0}{50}{x^i}$\\\hline
%   |\CsumCond| & 3 & |\CsumCond{i}{\Cintegers}{i}| & $\CsumCond{i}{\mathbb{Z}}{i}$\\\hline
%   |\CsumDA| & 2 & |\CsumDA{\Cintegers}{f}| & $\CsumDA{\mathbb{Z}}{f}$\\\hline
%   |\CprodLimits| & 4 & |\CprodLimits{i}{0}{20}{x^i}| & $\CprodLimits{i}{0}{20}{x^i}$\\\hline
%   |\CprodCond| & 3 & |\CprodCond{i}{\Cintegers}{i}| & $\CprodCond{i}{\mathbb{Z}}{i}$\\\hline
%   |\CprodDA| & 2 & |\CprodDA{\Cintegers}{f}| & $\CprodDA{\mathbb{Z}}{f}$\\\hline
% \end{cmtab}
%
% \subsection{Elementary Classical Functions}\label{sec:specfun}
%
% \DescribeMacro{\Csin}\DescribeMacro{\Ccos}\DescribeMacro{\Ctan}
% \DescribeMacro{\Csec}\DescribeMacro{\Ccsc}\DescribeMacro{\Ccot}
% \begin{cmtab}
%   |\Csin| & 1 & |\Csin{x}| & $\Csin{x}$\\\hline
%   |\Ccos| & 1 & |\Ccos{x}| & $\Ccos{x}$\\\hline
%   |\Ctan| & 1 & |\Ctan{x}| & $\Ctan{x}$\\\hline
%   |\Csec| & 1 & |\Csec{x}| & $\Csec{x}$\\\hline
%   |\Ccsc| & 1 & |\Ccsc{x}| & $\Ccsc{x}$\\\hline
%   |\Ccot| & 1 & |\Ccot{x}| & $\Ccot{x}$\\\hline
% \end{cmtab}
%
% \DescribeMacro{\Csinh}\DescribeMacro{\Ccosh}\DescribeMacro{\Ctanh}
% \DescribeMacro{\Csech}\DescribeMacro{\Ccsch}\DescribeMacro{\Ccoth}
% \begin{cmtab}
%   |\Csinh| & 1 & |\Csinh{x}| & $\Csinh{x}$\\\hline
%   |\Ccosh| & 1 & |\Ccosh{x}| & $\Ccosh{x}$\\\hline
%   |\Ctanh| & 1 & |\Ctanh{x}| & $\Ctanh{x}$\\\hline
%   |\Csech| & 1 & |\Csech{x}| & $\Csech{x}$\\\hline
%   |\Ccsch| & 1 & |\Ccsch{x}| & $\Ccsch{x}$\\\hline
%   |\Ccoth| & 1 & |\Ccoth{x}| & $\Ccoth{x}$\\\hline
% \end{cmtab}
% 
% \DescribeMacro{\Carcsin}\DescribeMacro{\Carccos}\DescribeMacro{\Carctan}
% \DescribeMacro{\Carcsec}\DescribeMacro{\Carccsc}\DescribeMacro{\Carccot}
% \begin{cmtab}
%   |\Carcsin| & 1 & |\Carcsin{x}| & $\Carcsin{x}$\\\hline
%   |\Carccos| & 1 & |\Carccos{x}| & $\Carccos{x}$\\\hline
%   |\Carctan| & 1 & |\Carctan{x}| & $\Carctan{x}$\\\hline
%   |\Carccosh| & 1 & |\Carccosh{x}| & $\Carccosh{x}$\\\hline
%   |\Carccot| & 1 & |\Carccot{x}| & $\Carccot{x}$\\\hline
% \end{cmtab}
% 
% \DescribeMacro{\Carcsinh}\DescribeMacro{\Carccosh}\DescribeMacro{\Carctanh}
% \DescribeMacro{\Carcsech}\DescribeMacro{\Carccsch}\DescribeMacro{\Carccoth}
% \begin{cmtab}
%   |\Carccoth| & 1 & |\Carccoth{x}| & $\Carccoth{x}$\\\hline
%   |\Carccsc| & 1 & |\Carccsc{x}| & $\Carccsc{x}$\\\hline
%   |\Carcsinh| & 1 & |\Carcsinh{x}| & $\Carcsinh{x}$\\\hline
%   |\Carctanh| & 1 & |\Carctanh{x}| & $\Carctanh{x}$\\\hline
%   |\Cexp| & 1 & |\Cexp{x}| & $\Cexp{x}$\\\hline
%   |\Cln| & 1 & |\Cln{x}| & $\Cln{x}$\\\hline
%   |\Clog| & 2 & |\Clog{5}{x}| & $\Clog{5}{x}$\\\hline
% \end{cmtab}
%
% \subsection{Statistics}\label{sec:statistics}
%
% The only semantic macro that is non-standard in this module is the one for the
% {\element{moment}} and {\element{momentabout}} elements in {\mathml}. They are combined
% into the semantic macro {|CmomentA|}; its first argument is the degree, its
% second one the point in the distribution, the moment is taken about, and the third is
% the distribution.
%
% \DescribeMacro{\Cmean}\DescribeMacro{\Csdev}\DescribeMacro{\Cvar}\DescribeMacro{\Cmedian}
% \DescribeMacro{\Cmode}\DescribeMacro{\Cmoment}\DescribeMacro{\CmomentA}
% \begin{cmtab}
%   |\Cmean| & 1 & |\Cmean{X}| & $\Cmean{X}$\\\hline
%   |\Csdev| & 1 & |\Csdev{X}| & $\Csdev{X}$\\\hline
%   |\Cvar| & 1 & |\Cvar{X}| & $\Cvar{X}$\\\hline
%   |\Cmedian| & 1 & |\Cmedian{X}| & $\Cmedian{X}$\\\hline
%   |\Cmode| & 1 & |\Cmode{X}| & $\Cmode{X}$\\\hline
%   |\Cmoment| & 3 & |\Cmoment{3}{X}| & $\Cmoment{3}{X}$\\\hline
%   |\CmomentA| & 3 & |\CmomentA{3}{p}{X}| & $\CmomentA{3}{p}{X}$\\\hline
% \end{cmtab}
%
% \subsection{Linear Algebra}\label{sec:linalg}
%
% In these semantic macros, only the matrix constructor is unusual; instead of
% constructing a matrix from {\element{matrixrow}} elements like {\mathml} does, the macro
% follows the {\TeX/\LaTeX} tradition allows to give a matrix as an array. The first
% argument of the macro is the column specification (it will only be used for presentation
% purposes), and the second one the rows.
%
%   \DescribeMacro{\Cvector}\DescribeMacro{\Cmatrix}\DescribeMacro{\Cdeterminant}
%   \DescribeMacro{\Ctranspose}\DescribeMacro{\Cselector}
%   \DescribeMacro{\Cvectorproduct}\DescribeMacro{\Cscalarproduct}\DescribeMacro{\Couterproduct}
%  \begin{cmtab}
%    |\Cvector| & 1 & |\Cvector{1,2,3}| & $\Cvector{1,2,3}$\\\hline
%    |\Cmatrix| & 2 & |\Cmatrix{ll}{1 & 2\\ 3 & 4}| & $\Cmatrix{ll}{1 & 2\\3 & 4}$\\\hline
%    |\Cdeterminant| & 1 & |\Cdeterminant{A}| & $\Cdeterminant{A}$\\\hline
%    |\Ctranspose| & 1 & |\Ctranspose{A}| & $\Ctranspose{A}$\\\hline
%    |\Cselector| & 2 & |\Cselector{A}{2}| & $\Cselector{A}{2}$\\\hline
%    |\Cvectproduct| & 2 & |\Cvectproduct{\phi}{\psi}| & $\Cvectproduct{\phi}{\psi}$\\\hline
%    |\Cscalarproduct| & 2 & |\Cscalarproduct{\phi}{\psi}| & $\Cscalarproduct{\phi}{\psi}$\\\hline
%    |\Couterproduct| & 2 & |\Couterproduct{\phi}{\psi}| & $\Couterproduct{\phi}{\psi}$\\\hline
%  \end{cmtab}
%
% \subsection{Constant and Symbol Elements}\label{sec:constants}
%
% The semantic macros for the {\mathml} constant and symbol elements are very simple, they
% do not take any arguments, and their name is just the {\mathml} element name prefixed by
% a capital C.
% 
% \DescribeMacro{\Cintegers}\DescribeMacro{\Creals}\DescribeMacro{\Crationals}
% \DescribeMacro{\Ccomplexes}\DescribeMacro{\Cprimes}
% \begin{cmtab}
%   |\Cintegers| &  & |\Cintegers| & $\Cintegers$\\\hline
%   |\Creals| &  & |\Creals| & $\Creals$\\\hline
%   |\Crationals| &  & |\Crationals| & $\Crationals$\\\hline
%   |\Cnaturalnumbers| &  & |\Cnaturalnumbers| & $\Cnaturalnumbers$\\\hline
%   |\Ccomplexes| &  & |\Ccomplexes| & $\Ccomplexes$\\\hline
%   |\Cprimes| &  & |\Cprimes| & $\Cprimes$\\\hline
% \end{cmtab}
% 
% \DescribeMacro{\Cexponentiale}\DescribeMacro{\Cimaginaryi}
% \DescribeMacro{\Ctrue}\DescribeMacro{\Cfalse} \DescribeMacro{\Cemptyset}
% \DescribeMacro{\Cpi}\DescribeMacro{\Ceulergamma}\DescribeMacro{\Cinfinit}
% \begin{cmtab}
%   |\Cexponemtiale| &  & |\Cexponemtiale| & $\Cexponemtiale$\\\hline
%   |\Cimaginaryi| &  & |\Cimaginaryi| & $\Cimaginaryi$\\\hline
%   |\Cnotanumber| &  & |\Cnotanumber| & $\Cnotanumber$\\\hline
%   |\Ctrue| &  & |\Ctrue| & $\Ctrue$\\\hline
%   |\Cfalse| &  & |\Cfalse| & $\Cfalse$\\\hline
%   |\Cemptyset| &  & |\Cemptyset| & $\Cemptyset$\\\hline
%   |\Cpi| &  & |\Cpi| & $\Cpi$\\\hline
%   |\Ceulergamma| &  & |\Ceulergamma| & $\Ceulergamma$\\\hline
%   |\Cinfinit| &  & |\Cinfinit| & $\Cinfinit$\\\hline
% \end{cmtab}
% 
% \subsection{Extensions}\label{sec:cmathmlx}
% Content MathML does not (even though it claims to cover M-14 Math) symbols for all the
% common mathematical notions. The |cmathmlx| attempts to collect these and provide
% {\TeX/\LaTeX} and {\latexml} bindings. 
% 
%\DescribeMacro{\Ccomplement}
% \begin{cmtab}
%   |\Ccomplement| & 1 & |\Ccomplement{\Cnaturalnumbers}| & $\Ccomplement{\mathbb{N}}$\\\hline
%\end{cmtab}
%
% \StopEventually{\ednotemessage}
%
% \newpage
% \section{The Implementation}\label{sec:impl}
% 
% In this file we document both the implementation of the |cmathml| package, as well as
% the corresponding {\latexml} bindings. This keeps similar items close to each other,
% even though they eventually go into differing files and helps promote consistency. We
% specify which code fragment goes into which file by the {\xml}-like grouping commands:
% The code between |<*sty>| and |</sty>| goes into the package file |cmathml.sty|, and the
% code between |<*ltxml>| and |</ltxml>| goes into |cmathml.ltxml|, the {\latexml}
% bindings.
% 
% \subsection{Initialization and auxiliary functions}\label{sec:impl:init}
%
% We first make sure that the {\sTeX} |presentation| package is loaded.
%    \begin{macrocode}
%<*sty|styx>
\RequirePackage{presentation}
%</sty|styx>
%    \end{macrocode}
%
% Before we start im plementing the {\mathml} macros, we will need to set up the packages
% for perl in the {\latexml} bindings file.
%    \begin{macrocode}
%<*ltxml|ltxmlx>
# -*- CPERL -*-
package LaTeXML::Package::Pool;
use strict;
use LaTeXML::Package;
use LaTeXML::Document;
RequirePackage('LaTeX');
%</ltxml|ltxmlx>
%    \end{macrocode}
%
% The next step is to itroduce two auxiliary functions, they are needed to work with
% $n$-ary function elements. The first one removes arbitrary tokens from a list, and the
% specializes that to commas. In particular |remove_tokens_from_list($List, $pattern, $math)|
% returns a new |List| (or |MathList| if |$math| is true)
% with all the tokens in |$List| except the ones which follow
% the pattern |$pattern|.
%
%    \begin{macrocode}
%<*ltxml>
sub remove_tokens_from_list {
  my ($list, $pattern, $math) = @_;
  if (ref $list) {
    my @toks = $list->unlist;
    @toks = grep($_->toString !~ /$pattern/, @toks);
    ($math ? (LaTeXML::MathList->new(@toks)) : (LaTeXML::List)->new(@toks)); }
  else { undef; } }

sub remove_math_commas {
  my ($whatsit, $argno) = @_;
  my @args = $whatsit ? $whatsit->getArgs() : undef;
  $argno--;
  if ($args[$argno]) {
    $args[$argno] = remove_tokens_from_list($args[$argno], ',', 1);
    $whatsit->setArgs(@args);
  }
  return;
}
%</ltxml>
%    \end{macrocode}
%
% The structural macros are rather simple: 
%
%    \begin{macrocode}
%<*sty>
\newcommand{\Capply}[3][]{#2(#3)}
%</sty>
%<*ltxml>
DefConstructor('\Capply [] {} {}',
               "<ltx:XMApp ?#1(definitionURL='#1')()>#2 #3</ltx:XMApp>");
%</ltxml>
%    after this, the implementation will always have the same form. We will first
%    implement a block of {\LaTeX} macros via a |\newcommand| and then specify the
%    corresponding {\latexml} bindings for them.
%
% \subsection{The Token Elements}\label{impl:tokens}
% 
%    \begin{macrocode}
%<*sty>
\def\CMathML@cn#1{#1}
\newcommand{\Ccn}[2][]{\CMathML@cn{#2}}
\def\CMathML@ci#1{#1}
\newcommand{\Cci}[2][]{\CMathML@ci{#2}}
\def\CMathML@csymbol#1{#1}
\newcommand{\Ccsymbol}[2][]{\CMathML@csymbol{#2}}
%</sty>
%<*ltxml>
DefConstructor('\Ccn [] {}',"#2");
DefConstructor('\Cci [] {}',"#2");
DefConstructor('\Ccsymbol [] {}',
               "<ltx:XMTok role='CSYMBOL' meaning='#2' ?#1(definitionURL='#1')()/>");
%</ltxml>
%    \end{macrocode}
% 
% \subsection{The Basic Elements}\label{impl:basic}
% 
%    \begin{macrocode}
%<*sty>
\def\CMathML@ccinterval#1#2{[#1,#2]}
\newcommand{\Cccinterval}[3][]{\CMathML@ccinterval{#2}{#3}}
\def\CMathML@cointerval#1#2{[#1,#2)}
\newcommand{\Ccointerval}[3][]{\CMathML@cointerval{#2}{#3}}
\def\CMathML@ocinterval#1#2{(#1,#2]}
\newcommand{\Cocinterval}[3][]{\CMathML@ocinterval{#2}{#3}}
\def\CMathML@oointerval#1#2{(#1,#2)}
\newcommand{\Coointerval}[3][]{\CMathML@oointerval{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\Cccinterval [] {}{}', 
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONSTRUCTOR' meaning='ccinterval' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg></ltx:XMApp>");
DefConstructor('\Ccointerval [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONSTRUCTOR' meaning='cointerval' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg></ltx:XMApp>");
DefConstructor('\Cocinterval [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONSTRUCTOR' meaning='ocinterval' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg></ltx:XMApp>");
DefConstructor('\Coointerval [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONSTRUCTOR' meaning='oointerval' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg></ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>
\newcommand{\Cinverse}[2][]{#2^{-1}}
% what about separator
%</sty>
%<*ltxml>
DefConstructor('\Cinverse [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='inverse' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>
\def\CMathML@lambda#1#2{\lambda({#1},{#2})}
\newcommand{\Clambda}[3][]{\CMathML@lambda{#2}{#3}}
\def\CMathML@lambdaDA#1#2#3{\lambda({#1}\colon{#2},#3)}
\newcommand{\ClambdaDA}[4][]{\CMathML@lambdaDA{#2}{#3}{#4}}
\def\CMathML@restrict#1#2{\left.#1\right|_{#2}}
\newcommand{\Crestrict}[3][]{\CMathML@restrict{#2}{#3}}
%</sty>
%\ednote{need do deal with multiple variables!}
%<*ltxml>
DefConstructor('\Clambda [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BINDER' meaning='lambda' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\ClambdaDA [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BINDER' meaning='lambda' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Crestrict [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='restrict' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>
	\def\CMathML@composeOp{\circ}
	\newcommand{\CcomposeOp}{\CMathML@composeOp}
\def\CMathML@compose#1{\assoc[p=500,pi=500]{\CMathML@composeOp}{#1}}
\newcommand{\Ccompose}[2][]{\CMathML@compose{#2}}
\def\CMathML@ident#1{\mathrm{id}}
\newcommand{\Cident}[1][]{\CMathML@ident{#1}}
\def\CMathML@domain#1{\mbox{dom}(#1)}
\newcommand{\Cdomain}[2][]{\CMathML@domain{#2}}
\def\CMathML@codomain#1{\mbox{codom}(#1)}
\newcommand{\Ccodomain}[2][]{\CMathML@codomain{#2}}
\def\CMathML@image#1{{\mathbf{Im}}(#1)}
\newcommand{\Cimage}[2][]{\CMathML@image{#2}}
\def\CMathML@piecewise#1{\left\{\begin{array}{ll}#1\end{array}\right.}
\newcommand{\Cpiecewise}[2][]{\CMathML@piecewise{#2}}
\def\CMathML@piece#1#2{#1&{\mathrm{if}}\;{#2}\\}
\newcommand{\Cpiece}[3][]{\CMathML@piece{#2}{#3}}
\def\CMathML@otherwise#1{#1&else\\}
\newcommand{\Cotherwise}[2][]{\CMathML@otherwise{#2}}
%</sty>
%<*ltxml>
DefConstructor('\CcomposeOp []',
               "<ltx:XMTok meaning='compose' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ccompose [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='MULOP' meaning='compose' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\Cident []',
               "<ltx:XMTok meaning='ident' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cdomain [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='domain' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ccodomain [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='codomain' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cimage [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='image' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cpiecewise [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='piecewise' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cpiece [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='piece' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cotherwise [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='otherwise' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
%
% \subsection{Elements for Arithmetic, Algebra, and Logic}\label{impl:arith}
% 
%    \begin{macrocode}
%<*sty>
\def\CMathML@quotient#1#2{\frac{#1}{#2}}
\newcommand{\Cquotient}[3][]{\CMathML@quotient{#2}{#3}}
	\def\CMathML@factorialOp{!}
	\newcommand{\CfactorialOp}{\CMathML@factorialOp}
\def\CMathML@factorial#1{#1{\CMathML@factorialOp}}
\newcommand{\Cfactorial}[2][]{\CMathML@factorial{#2}}
	\def\CMathML@divideOp{\div}
	\newcommand{\CdivideOp}{\CMathML@divideOp}
\def\CMathML@divide#1#2{\infix[p=400]{\CMathML@divideOp}{#1}{#2}}
\newcommand{\Cdivide}[3][]{\CMathML@divide{#2}{#3}}
	\def\CMathML@maxOp{\mathrm{max}}
	\newcommand{\CmaxOp}{\CMathML@maxOp}
\def\CMathML@max#1{{\CMathML@maxOp}(#1)}
\newcommand{\Cmax}[2][]{\CMathML@max{#2}}
	\def\CMathML@minOp{\mathrm{min}}
	\newcommand{\CminOp}{\CMathML@minOp}
\def\CMathML@min#1{{\CMathML@minOp}(#1)}
\newcommand{\Cmin}[2][]{\CMathML@min{#2}}
	\def\CMathML@minusOp{-}
	\newcommand{\CminusOp}{\CMathML@minusOp}
\def\CMathML@minus#1#2{\infix[p=500]{\CMathML@minusOp}{#1}{#2}}
\newcommand{\Cminus}[3][]{\CMathML@minus{#2}{#3}}
\def\CMathML@uminus#1{\prefix[p=200]{\CMathML@minusOp}{#1}}
\newcommand{\Cuminus}[2][]{\CMathML@uminus{#2}}
	\def\CMathML@plusOp{+}
	\newcommand{\CplusOp}{\CMathML@plusOp}
\def\CMathML@plus#1{\assoc[p=500]{\CMathML@plusOp}{#1}}
\newcommand{\Cplus}[2][]{\CMathML@plus{#2}}
\def\CMathML@power#1#2{\infix[p=200]{^}{#1}{#2}}
\newcommand{\Cpower}[3][]{\CMathML@power{#2}{#3}}
	\def\CMathML@remOp{\bmod}
	\newcommand{\CremOp}{\CMathML@remOp}
\def\CMathML@rem#1#2{#1 \CMathML@remOp #2}
\newcommand{\Crem}[3][]{\CMathML@rem{#2}{#3}}
	\def\CMathML@timesOp{\cdot}
	\newcommand{\CtimesOp}{\CMathML@timesOp} 
\def\CMathML@times#1{\assoc[p=400]{\CMathML@timesOp}{#1}}
\newcommand{\Ctimes}[2][]{\CMathML@times{#2}}
	\def\CMathML@rootOp{\sqrt}
	\newcommand{\CrootOp}{\CMathML@rootOp{}}
\def\CMathML@root#1#2{\CMathML@rootOp[#1]{#2}}
\newcommand{\Croot}[3][]{\CMathML@root{#2}{#3}}
\def\CMathML@gcd#1{\gcd(#1)}
\newcommand{\Cgcd}[2][]{\CMathML@gcd{#2}}
	\def\CMathML@andOp{\wedge}
	\newcommand{\CandOp}{\CMathML@andOp}
\def\CMathML@and#1{\assoc[p=400]{\CMathML@andOp}{#1}}
\newcommand{\Cand}[2][]{\CMathML@and{#2}}
	\def\CMathML@orOp{\vee}
	\newcommand{\CorOp}{\CMathML@orOp}
\def\CMathML@or#1{\assoc[p=500]{\CMathML@orOp}{#1}}
\newcommand{\Cor}[2][]{\CMathML@or{#2}}
	\def\CMathML@xorOp{\oplus}
	\newcommand{\CxorOp}{\CMathML@xorOp}
\def\CMathML@xor#1{\assoc[p=400]{\CMathML@xorOp}{#1}}
\newcommand{\Cxor}[2][]{\CMathML@xor{#2}}
	\def\CMathML@notOp{\neg}
	\newcommand{\CnotOp}{\CMathML@notOp}
\def\CMathML@not#1{\CMathML@notOp{#1}}
\newcommand{\Cnot}[2][]{\CMathML@not{#2}}
	\def\CMathML@impliesOp{\Longrightarrow}
	\newcommand{\CimpliesOp}{\CMathML@impliesOp}
\def\CMathML@implies#1#2{#1\CMathML@impliesOp{#2}}
\newcommand{\Cimplies}[3][]{\CMathML@implies{#2}{#3}} 
%</sty>
%<*ltxml>
DefConstructor('\Cquotient [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='quotient' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CfactorialOp []',
               "<ltx:XMTok meaning='factorial' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cfactorial [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='factorial' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CdivideOp []',
               "<ltx:XMTok meaning='divide' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cdivide [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='divide' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CmaxOp []',
               "<ltx:XMTok meaning='max' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cmax [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='max' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CminOp []',
               "<ltx:XMTok meaning='min' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cmin [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='min' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CminusOp []',
               "<ltx:XMTok meaning='minus' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cminus [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='ADDOP' meaning='minus' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cuminus [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='uminus' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CplusOp []',
               "<ltx:XMTok meaning='plus' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cplus [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='ADDOP' meaning='plus' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\Cpower [] {} {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='power' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CremOp []',
               "<ltx:XMTok meaning='rem' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Crem [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='rem' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CtimesOp []',
               "<ltx:XMTok meaning='times' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ctimes [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='MULOP' meaning='times' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CrootOp []',
               "<ltx:XMTok meaning='root' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Croot [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='root' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cgcd [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='gcd' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CandOp []',
               "<ltx:XMTok meaning='and' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cand [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONNECTIVE' meaning='and' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CorOp []',
               "<ltx:XMTok meaning='or' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cor [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONNECTIVE' meaning='or' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CxorOp []',
               "<ltx:XMTok meaning='xor' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cxor [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONNECTIVE' meaning='xor' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CnotOp []',
               "<ltx:XMTok meaning='not' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cnot [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONNECTIVE' meaning='not' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CimpliesOp []',
               "<ltx:XMTok meaning='implies' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cimplies [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONNECTIVE' meaning='implies' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% \ednote{need to do something about the associative things in ltxml}
%    \begin{macrocode}
%<*sty>
\def\CMathML@AndDA#1#2{\bigwedge_{#1}{#2}} % set, scope
\newcommand{\CAndDA}[3][]{\CMathML@AndDA{#2}{#3}}
\def\CMathML@AndCond#1#2#3{\bigwedge_{#2}{#3}} % bvars,condition, scope
\newcommand{\CAndCond}[4][]{\CMathML@AndCond{#2}{#2}{#3}}
\def\CMathML@OrDA#1#2{\bigvee_{#1}{#2}} % set, scope
\newcommand{\COrDa}[3][]{\CMathML@OrDA{#2}{#3}}
\def\CMathML@OrCond#1#2#3{\bigvee_{#2}{#3}}% bvars,condition, scope
\newcommand{\COrCond}[4][]{\CMathML@OrCond{#2}{#3}{#4}}
\def\CMathML@XorDA#1#2{\bigoplus_{#1}{#2}} % set, scope
\newcommand{\CXorDA}[3][]{\CMathML@XorDA{#2}{#3}}
\def\CMathML@XorCond#1#2#3{\bigoplus_{#2}{#3}}% bvars,condition, scope
\newcommand{\CXorCond}[4][]{\CMathML@XorCond{#2}{#3}{#4}}
%
\def\CMathML@forall#1#2{\forall{#1}\colon{#2}}
\newcommand{\Cforall}[3][]{\CMathML@forall{#2}{#3}}
\def\CMathML@forallCond#1#2#3{\forall{#1},{#2}\colon{#3}}  % list), condition, scope
\newcommand{\CforallCond}[4][]{\CMathML@forallCond{#2}{#3}{#4}}
%</sty>
%<*ltxml>
DefConstructor('\CAndDa [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='and' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CAndCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='and' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\COrDa [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='or' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\COrCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='or' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CXorDa [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='xor' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CXorCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='xor' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cforall [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BINDER' meaning='forall' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CforallCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BINDER' meaning='forall' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*sty>
\def\CMathML@exists#1#2{\exists{#1}\colon{#2}}
\newcommand{\Cexists}[3][]{\CMathML@exists{#2}{#3}}
\def\CMathML@esistsCont#1#2#3{\exists{#1},{#2}\colon{#3}}
\newcommand{\CexistsCond}[4][]{\CMathML@esistsCont{#2}{#3}{#4}}
%</sty>
%<*ltxml>
DefConstructor('\Cexists [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BINDER' meaning='exists' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CexistsCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BINDER' meaning='exists' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*sty>
\def\CMathML@abs#1{\left|#1\right|}
\newcommand{\Cabs}[2][]{\CMathML@abs{#2}}
\def\CMathML@conjugate#1{\overline{#1}}
\newcommand{\Cconjugate}[2][]{\CMathML@conjugate{#2}}
\def\CMathML@arg#1{\angle #1}
\newcommand{\Carg}[2][]{\CMathML@arg{#2}}
\def\CMathML@real#1{\Re #1}
\newcommand{\Creal}[2][]{\CMathML@real{#2}}
\def\CMathML@imaginary#1{\Im #1}
\newcommand{\Cimaginary}[2][]{\CMathML@imaginary{#2}}
\def\CMathML@lcm#1{\mbox{lcm}(#1)}
\newcommand{\Clcm}[2][]{\CMathML@lcm{#2}}
\def\CMathML@floor#1{\left\lfloor{#1}\right\rfloor}
\newcommand{\Cfloor}[2][]{\CMathML@floor{#2}}
\def\CMathML@ceiling#1{\left\lceil{#1}\right\rceil}
\newcommand{\Cceiling}[2][]{\CMathML@ceiling{#2}}
%</sty>
%<*ltxml>
DefConstructor('\Cabs [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='abs' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cconjugate [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='conjugate' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carg [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='arg' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Creal [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='real' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cimaginary [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='imaginary' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Clcm [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='lcm' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cfloor [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='floor' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cceiling [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='ceiling' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
% \subsection{Relations}\label{impl:rels}
% 
%    \begin{macrocode}
%<*sty>
	\def\CMathML@eqOp{=}
	\newcommand{\CeqOp}{\CMathML@eqOp}
\def\CMathML@eq#1{\assoc[p=700]{\CMathML@eqOp}{#1}}
\newcommand{\Ceq}[2][]{\CMathML@eq{#2}}
	\def\CMathML@neqOp{\neq}
	\newcommand{\CneqOp}{\CMathML@neqOp}
\def\CMathML@neq#1#2{\infix[p=700]{\CMathML@neqOp}{#1}{#2}}
\newcommand{\Cneq}[3][]{\CMathML@neq{#2}{#3}}
	\def\CMathML@gtOp{>}
	\newcommand{\CgtOp}{\CMathML@gtOp}
\def\CMathML@gt#1{\assoc[p=700]{\CMathML@gtOp}{#1}}
\newcommand{\Cgt}[2][]{\CMathML@gt{#2}}
	\def\CMathML@ltOp{<}
	\newcommand{\CltOp}{\CMathML@ltOp}
\def\CMathML@lt#1{\assoc[p=700]{\CMathML@ltOp}{#1}}
\newcommand{\Clt}[2][]{\CMathML@lt{#2}}
	\def\CMathML@geqOp{\geq}
	\newcommand{\CgeqOp}{\CMathML@geqOp}
\def\CMathML@geq#1{\assoc[p=700]{\CMathML@geqOp}{#1}}
\newcommand{\Cgeq}[2][]{\CMathML@geq{#2}}
	\def\CMathML@leqOp{\leq}
	\newcommand{\CleqOp}{\CMathML@leqOp}
\def\CMathML@leq#1{\assoc[p=700]{\CMathML@leqOp}{#1}}
\newcommand{\Cleq}[2][]{\CMathML@leq{#2}}
	\def\CMathML@equivalentOp{\equiv}
	\newcommand{\CequivalentOp}{\CMathML@equivalentOp}
\def\CMathML@equivalent#1{\assoc[p=700]{\CMathML@equivalentOp}{#1}}
\newcommand{\Cequivalent}[2][]{\CMathML@equivalent{#2}}
	\def\CMathML@approxOp{\approx}
	\newcommand{\CapproxOp}{\CMathML@approxOp}
\def\CMathML@approx#1#2{#1\CMathML@approxOp{#2}}
\newcommand{\Capprox}[3][]{\CMathML@approx{#2}{#3}}
	\def\CMathML@factorofOp{\mid}
	\newcommand{\CfactorofOp}{\CMathML@factorofOp}
\def\CMathML@factorof#1#2{#1\CMathML@factorofOp{#2}}
\newcommand{\Cfactorof}[3][]{\CMathML@factorof{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\CeqOp []',
               "<ltx:XMTok meaning='eq' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ceq [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='eq' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CneqOp []',
               "<ltx:XMTok meaning='neq' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cneq [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='neq' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CgtOp []',
               "<ltx:XMTok meaning='gt' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cgt [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='gt' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CltOp []',
               "<ltx:XMTok meaning='lt' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Clt [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='lt' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CgeqOp []',
               "<ltx:XMTok meaning='geq' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cgeq [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='geq' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CleqOp []',
               "<ltx:XMTok meaning='leq' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cleq [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='leq' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CequivalentOp []',
               "<ltx:XMTok meaning='equivalent' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cequivalent [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='equivalent' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>");
DefConstructor('\CapproxOp []',
               "<ltx:XMTok meaning='approx' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Capprox [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='approx' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CfactorofOp []',
               "<ltx:XMTok meaning='factorof' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cfactorof [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='factorof' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>

	\def\CMathML@intOp{\int}
	\newcommand{\CintOp}{\CMathML@intOp}	
\def\CMathML@int#1{\CMathML@intOp{#1}}
\newcommand{\Cint}[2][]{\CMathML@int{#2}}
\def\CMathML@intLimits#1#2#3#4{\CMathML@intOp_{#2}^{#3}{#4}d{#1}} %bvars,llimit, ulimit,body
\newcommand{\CintLimits}[5][]{\CMathML@intLimits{#2}{#3}{#4}{#5}}
\def\CMathML@intSet#1#2{\CMathML@intOp_{#1}{#2}}% set,function
\newcommand{\CintDA}[3][]{\CMathML@intSet{#2}{#3}}
\def\CMathML@intCond#1#2#3{\CMathML@intOp_{#2}{#3}d{#1}} %bvars, condition, body
\newcommand{\CintCond}[4][]{\CMathML@intCond{#2}{#3}{#4}}

%</sty>
%<*ltxml>
DefConstructor('\CintOp []',
               "<ltx:XMTok meaning='int' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cint [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='int' role='INTOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CintLimits [] {}{}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='int' role='INTOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "<ltx:XMArg>#5</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CintDA [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='int' role='INTOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CintCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='int' role='INTOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*sty>
\def\CMathML@diff#1{#1'}
\newcommand{\Cdiff}[2][]{\CMathML@diff{#2}}
\def\CMathML@ddiff#1#2{{d{#2}(#1)\over{d{#1}}}}
\newcommand{\Cddiff}[3][]{\CMathML@ddiff{#2}{#3}}
\def\CMathML@partialdiff#1#2#3{{\partial^{#1}\over\partial{#2}}{#3}}% degree, bvars, body
\newcommand{\Cpartialdiff}[4][]{\CMathML@partialdiff{#2}{#3}{#4}}
\newcommand{\Cdegree}[2]{#1^{#2}}
%</sty>
%<*ltxml>
DefConstructor('\Cdiff [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='diff' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cddiff [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='diff' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cpartialdiff [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='diff' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "?#2(<ltx:XMArg>#2</ltx:XMArg>)()"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cdegree {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='degree'/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#1</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>
\def\CMathML@limit#1#2#3{\lim_{#1\rightarrow{#2}}{#3}}
\newcommand{\Climit}[4][]{\CMathML@limit{#2}{#3}{#4}}   % bvar, lowlimit, scope
\def\CMathML@limitCond#1#2#3{\lim_{#2}{#3}}
\newcommand{\ClimitCond}[4][]{\CMathML@limitCond{#2}{#3}{#4}}   % bvars, condition, scope
%</sty>
%<*ltxml>
DefConstructor('\Climit [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='limit' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\ClimitCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='limit' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>
	\def\CMathML@tendstoOp{\rightarrow}
	\newcommand{\CtendstoOp}{\CMathML@tendstoOp}
\def\CMathML@tendsto#1#2{#1\CMathML@tendstoOp{#2}}
\newcommand{\Ctendsto}[3][]{\CMathML@tendsto{#2}{#3}}
	\def\CMathML@tendstoAboveOp{\searrow}
	\newcommand{\CtendstoAboveOp}{\CMathML@tendstoAboveOp}
\def\CMathML@tendstoAbove#1#2{#1\searrow{#2}}
\newcommand{\CtendstoAbove}[3][]{\CMathML@tendstoAbove{#2}{#3}}
	\def\CMathML@tendstoBelowOp{\nearrow}
	\newcommand{\CtendstoBelowOp}{\CMathML@tendstoBelowOp}
\def\CMathML@tendstoBelow#1#2{#1\CMathML@tendstoBelowOp{#2}}
\newcommand{\CtendstoBelow}[3][]{\CMathML@tendstoBelow{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\CtendstoOp []',
               "<ltx:XMTok meaning='tendsto' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ctendsto [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='RELOP' meaning='tendsto' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CtendstoAboveOp []',
               "<ltx:XMTok meaning='tendsto' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CtendstoAbove [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='RELOP'meaning='tendsto' type='above' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CtendstoBelowOp []',
               "<ltx:XMTok meaning='tendsto' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CtendstoBelow [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='RELOP' meaning='tendsto' type='below' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>
\def\CMathML@divergence#1{\nabla\cdot{#1}}
\newcommand{\Cdivergence}[2][]{\CMathML@divergence{#2}}
\def\CMathML@grad#1{\nabla{#1}}
\newcommand{\Cgrad}[2][]{\CMathML@grad{#2}}
\def\CMathML@curl#1{\nabla\times{#1}}
\newcommand{\Ccurl}[2][]{\CMathML@curl{#2}}
\def\CMathML@laplacian#1{\nabla^2#1}
\newcommand{\Claplacian}[2][]{\CMathML@laplacian{#2}}
%</sty>
%<*ltxml>
DefConstructor('\Cdivergence [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='divergence' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cgrad [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='grad' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Curl [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='url' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Claplacian [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='OPFUNCTION' meaning='laplacian' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% 
% \subsection{Sets and their Operations}\label{impl:sets}
% 
%    \begin{macrocode}
%<*sty>
\def\CMathML@set#1{\left\{#1\right\}}
\newcommand{\Cset}[2][]{\CMathML@set{#2}}
\def\CMathML@setRes#1#2{\{#1|#2\}}
\newcommand{\CsetRes}[3][]{\CMathML@setRes{#2}{#3}}
\def\CMathML@setCond#1#2#3{\{#2|#3\}}
\newcommand{\CsetCond}[4][]{\CMathML@setCond{#2}{#3}{#4}}
\def\CMathML@setDA#1#2#3{\{#1\in{#2}|#3\}}
\newcommand{\CsetDA}[4][]{\CMathML@setDA{#2}{#3}{#4}}
	\def\CMathML@listOp{\mbox{list}}
	\newcommand{\ClistOp}{\CMathML@listOp}
\def\CMathML@list#1{\CMathML@listOp({#1})}
\newcommand{\Clist}[2][]{\CMathML@list{#2}}
	\def\CMathML@unionOp{\cup}
	\newcommand{\CunionOp}{\CMathML@unionOp}
\def\CMathML@union#1{\assoc[p=500]{\CMathML@unionOp}{#1}}
\newcommand{\Cunion}[2][]{\CMathML@union{#2}}
	\def\CMathML@intersectOp{\cap}
	\newcommand{\CintersectOp}{\CMathML@intersectOp}
\def\CMathML@intersect#1{\assoc[p=400]{\CMathML@intersectOp}{#1}}
\newcommand{\Cintersect}[2][]{\CMathML@intersect{#2}}
	\def\CMathML@inOp{\in}
	\newcommand{\CinOp}{\CMathML@inOp}
\def\CMathML@in#1#2{#1\CMathML@inOp{#2}}
\newcommand{\Cin}[3][]{\CMathML@in{#2}{#3}}
	\def\CMathML@notinOp{\notin}
	\newcommand{\CnotinOp}{\CMathML@notinOp}
\def\CMathML@notin#1#2{#1\CMathML@notinOp{#2}}
\newcommand{\Cnotin}[3][]{\CMathML@notin{#2}{#3}}
	\def\CMathML@setdiffOp{\setminus}
	\newcommand{\CsetdiffOp}{\CMathML@setdiffOp}
\def\CMathML@setdiff#1#2{#1\CMathML@setdiffOp{#2}}
\newcommand{\Csetdiff}[3][]{\CMathML@setdiff{#2}{#3}}
	\def\CMathML@cardOp{\#}
	\newcommand{\CcardOp}{\CMathML@cardOp}
\def\CMathML@card#1{\CMathML@cardOp #1}
\newcommand{\Ccard}[2][]{\CMathML@card{#2}}
	\def\CMathML@cartesianproductOp{\times}
	\newcommand{\CcartesianproductOp}{\CMathML@cartesianproductOp}
\def\CMathML@cartesianproduct#1{\assoc[p=400]{\CMathML@cartesianproductOp}{#1}}
\newcommand{\Ccartesianproduct}[2][]{\CMathML@cartesianproduct{#2}}
	\def\CMathML@subsetOp{\subseteq}
	\newcommand{\CsubsetOp}{\CMathML@subsetOp}
\def\CMathML@subset#1{\assoc[p=700]{\CMathML@subsetOp}{#1}}
\newcommand{\Csubset}[2][]{\CMathML@subset{#2}}
	\def\CMathML@prsubsetOp{\subset}
	\newcommand{\CprsubsetOp}{\CMathML@prsubsetOp}
\def\CMathML@prsubset#1{\assoc[p=700]{\CMathML@prsubsetOp}{#1}}
\newcommand{\Cprsubset}[2][]{\CMathML@prsubset{#2}}
	\def\CMathML@notsubsetOp{\not\subseteq}
	\newcommand{\CnotsubsetOp}{\CMathML@notsubsetOp}
\def\CMathML@notsubset#1#2{#1\CMathML@notsubsetOp{#2}}
\newcommand{\Cnotsubset}[3][]{\CMathML@notsubset{#2}{#3}}
	\def\CMathML@notprsubsetOp{\not\subset}
	\newcommand{\CnotprsubsetOp}{\CMathML@notprsubsetOp}
\def\CMathML@notprsubset#1#2{#1\CMathML@notprsubsetOp{#2}}
\newcommand{\Cnotprsubset}[3][]{\CMathML@notprsubset{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\Cset [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='set' role='CONSTRUCTOR' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CsetRes [] {}{}',
               "<ltx:XMApp role='BIGOP'>"
               . "<ltx:XMTok role='BIGOP' meaning='set' ?#1(definitionURL='#1')()/>"
               . "<ltx:XMArg role='BVAR'>#2</ltx:XMArg>"
               . "<ltx:XMArg role='CONDITION'>#3</ltx:XMArg>"
               . "<ltx:XMArg role='SCOPE'>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CsetCond [] {}{}{}',
               "<ltx:XMApp role='BIGOP'>"
               . "<ltx:XMTok role='BIGOP' meaning='set' ?#1(definitionURL='#1')()/>"
               . "<ltx:XMArg role='BVAR'>#2</ltx:XMArg>"
               . "<ltx:XMArg role='CONDITION'>#3</ltx:XMArg>"
               . "<ltx:XMArg role='SCOPE'>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CsetDA [] {}{}{}',
               "<ltx:XMApp>"
               . "<ltx:XMTok role='BIGOP' meaning='set' ?#1(definitionURL='#1')()/>"
               . "<ltx:XMArg role='BVAR'>#2</ltx:XMArg>"
               . "<ltx:XMArg role='DOMAINOFAPPLICATION'>#3</ltx:XMArg>"
               . "<ltx:XMArg role='SCOPE'>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\ClistOp []',
               "<ltx:XMTok meaning='list' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Clist [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='list' role='CONSTRUCTOR' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CunionOp []',
               "<ltx:XMTok meaning='union' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cunion [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='union' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CintersectOp []',
               "<ltx:XMTok meaning='intersect' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cintersect [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='intersect' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CinOp []',
               "<ltx:XMTok meaning='in' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cin [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='in' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CnotinOp []',
               "<ltx:XMTok meaning='notin' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cnotin [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='notin' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CsubsetOp []',
               "<ltx:XMTok meaning='subset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Csubset [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='subset' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CprsubsetOp []',
               "<ltx:XMTok meaning='prsubset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cprsubset [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='prsubset' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\CnotsubsetOp []',
               "<ltx:XMTok meaning='notsubset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cnotsubset [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='notsubset' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CnotprsubsetOp []',
               "<ltx:XMTok meaning='notprsubset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cnotprsubset [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='notprsubset' role='RELOP' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CsetdiffOp []',
               "<ltx:XMTok meaning='setdiff' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Csetdiff [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='setdiff' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CcardOp []',
               "<ltx:XMTok meaning='card' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ccard [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='card' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CcartesianproductOp []',
               "<ltx:XMTok meaning='cartesianproduct' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ccartesianproduct [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='cartesianproduct' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
	       afterDigest=>sub { remove_math_commas($_[1], 2); });
%</ltxml>
%    \end{macrocode}
% The next set of macros are needed, since they are presentational. 
%    \begin{macrocode}
%<*sty>
	\def\CMathML@supsetOp{\supseteq}
	\newcommand{\CsupsetOp}{\CMathML@supsetOp}
\def\CMathML@supset#1{\assoc[p=700]{\CMathML@supsetOp}{#1}}
\newcommand{\Csupset}[2][]{\CMathML@supset{#2}}
	\def\CMathML@prsupsetOp{\supset}
	\newcommand{\CprsupsetOp}{\CMathML@prsupsetOp}
\def\CMathML@prsupset#1{\assoc[p=700]{\CMathML@prsupsetOp}{#1}}
\newcommand{\Cprsupset}[2][]{\CMathML@prsupset{#2}}
	\def\CMathML@notsupsetOp{\not\supseteq}
	\newcommand{\CnotsupsetOp}{\CMathML@notsupsetOp}
\def\CMathML@notsupset#1#2{#1\CMathML@notsupsetOp{#2}}
\newcommand{\Cnotsupset}[3][]{\CMathML@notsupset{#2}{#3}}
	\def\CMathML@notprsupsetOp{\not\supset}
	\newcommand{\CnotprsupsetOp}{\CMathML@notprsupsetOp}
\def\CMathML@notprsupset#1#2{#1\CMathML@notprsupsetOp{#2}}
\newcommand{\Cnotprsupset}[3][]{\CMathML@notprsupset{#2}{#3}}
%</sty>
%    \end{macrocode}
%
% On the semantic side (in {\latexml}), we need to implement them in terms of the
% {\mathml} elements. Fortunately, we can just turn them around. \ednote{ooooops, this
% does not work for the associative ones.}
%
%    \begin{macrocode}
%<*ltxml>
DefConstructor('\CsupsetOp []',
               "<ltx:XMTok meaning='supset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CprsupsetOp []',
               "<ltx:XMTok meaning='prsupset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CnotsupsetOp []',
               "<ltx:XMTok meaning='notsupset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CnotprsupsetOp []',
               "<ltx:XMTok meaning='notprsupset' role='ID' ?#1(definitionURL='#1')()/>");
DefMacro('\Csupset[]{}','\Csubset[#1]{#2}');
DefMacro('\Cprsupset[]{}','\Cprsubset[#1]{#2}');
DefMacro('\Cnotsupset[]{}{}','\Cnotsubset[#1]{#3}{#2}');
DefMacro('\Cnotprsupset[]{}{}','\Cnotprsubset[#1]{#3}{#2}');
%</ltxml>
%    \end{macrocode}
% 
%    \begin{macrocode}
%<*sty>
	\def\CMathML@UnionDAOp{\bigwedge}
	\newcommand{\CUnionDAOp}{\CMathML@UnionDAOp}
\def\CMathML@UnionDA#1#2{\CMathML@UnionDAOp_{#1}{#2}} % set, scope
\newcommand{\CUnionDA}[3][]{\CMathML@UnionDA{#2}{#3}}
\def\CMathML@UnionCond#1#2#3{\CMathML@UnionDAOp_{#2}{#3}} % bvars,condition, scope
\newcommand{\CUnionCond}[4][]{\CMathML@UnionCond{#2}{#2}{#3}}
	\def\CMathML@IntersectDAOp{\bigvee}
	\newcommand{\CIntersectDAOp}{\CMathML@IntersectDAOp}
\def\CMathML@IntersectDA#1#2{\CMathML@IntersectDAOp_{#1}{#2}} % set, scope
\newcommand{\CIntersectDa}[3][]{\CMathML@IntersectDA{#2}{#3}}
\def\CMathML@IntersectCond#1#2#3{\CMathML@IntersectDAOp_{#2}{#3}}% bvars,condition, scope
\newcommand{\CIntersectCond}[4][]{\CMathML@IntersectCond{#2}{#3}{#4}}
	\def\CMathML@CartesianproductDAOp{\bigoplus}
	\newcommand{\CCartesianproductDAOp}{\CMathML@CartesianproductDAOp}
\def\CMathML@CartesianproductDA#1#2{\CMathML@CartesianproductDAOp_{#1}{#2}} % set, scope
\newcommand{\CCartesianproductDA}[3][]{\CMathML@CartesianproductDA{#2}{#3}}
\def\CMathML@CartesianproductCond#1#2#3{\CMathML@CartesianproductDAOp_{#2}{#3}}% bvars,condition, scope
\newcommand{\CCartesianproductCond}[4][]{\CMathML@CartesianproductCond{#2}{#3}{#4}}
%</sty>
%<*ltxml>
DefConstructor('\CUnionDAOp []',
               "<ltx:XMTok meaning='union' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CUnionDA [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='union' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CUnionCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='union' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CIntersectDaOp []',
               "<ltx:XMTok meaning='intersect' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CIntersectDa [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='intersect' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CIntersectCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='intersect' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CCartesianproductDaOp []',
               "<ltx:XMTok meaning='cartesianproduct' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CCartesianproductDa [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='cartesianproduct' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CCartesianproductCond [] {}{}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='BIGOP' meaning='cartesianproduct' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "<ltx:XMArg>#4</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
%
% \subsection{Sequences and Series}\label{impl:sequences}
% 
%    \begin{macrocode}
%<*sty>
	\def\CMathML@sumOp{\sum}
	\newcommand{\CsumOp}{\CMathML@sumOp}
\def\CMathML@sumLimits#1#2#3#4{\CMathML@sumOp_{#1=#2}^{#3}#4}% bvar, llimit, ulimit, body
\newcommand{\CsumLimits}[5][]{\CMathML@sumLimits{#2}{#3}{#4}{#5}}
\def\CMathML@sumCond#1#2#3{\CMathML@sumOp_{#1\in{#2}}#3}   % bvar, condition, body
\newcommand{\CsumCond}[4][]{\CMathML@sumCond{#2}{#3}{#4}}
\def\CMathML@sumDA#1#2{\CMathML@sumOp_{#1}#2}            % set, body
\newcommand{\CsumDA}[3][]{\CMathML@sumDA{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\CsumOp []',
               "<ltx:XMTok meaning='sum' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CsumLimits [] {}{}{}{}',
                "<ltx:XMApp>"
             . "<ltx:XMTok meaning='sum' role='SUMOP' ?#1(definitionURL='#1')()/>"
              . "<ltx:XMArg>#2</ltx:XMArg>"
              . "<ltx:XMArg>#3</ltx:XMArg>"
              . "<ltx:XMArg>#4</ltx:XMArg>"
              . "#5</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% \ednote{complete the other cases}\ednote{add a keyword argument to all newcommands}
%    \begin{macrocode}
%<*sty>
	\def\CMathML@prodOp{\prod}
	\newcommand{\CprodOp}{\CMathML@prodOp}
\def\CMathML@prodLimits#1#2#3#4{\CMathML@prodOp_{#1=#32^{#3}#4}}% bvar, llimit, ulimit, body
\newcommand{\CprodLimits}[5][]{\CMathML@prodLimits{#2}{#3}{#4}{#5}}
\def\CMathML@prodCond#1#2#3{\CMathML@prodOp_{#1\in{#2}}#3}   % bvar, condition, body
\newcommand{\CprodCond}[4][]{\CMathML@prodCond{#2}{#3}{#4}}
\def\CMathML@prodDA#1#2{\CMathML@prodOp_{#1}#2}            % set, body
\newcommand{\CprodDA}[3]{\CMathML@prodDA{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\CprodOp []',
               "<ltx:XMTok meaning='prod' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\CprodLimits [] {}{}{}{}',
                "<ltx:XMApp>"
             . "<ltx:XMTok meaning='prod' role='SUMOP' ?#1(definitionURL='#1')()/>"
              . "<ltx:XMArg><ci>#2</ci></ltx:XMArg>"
              . "<ltx:XMArg>#3</ltx:XMArg>"
              . "<ltx:XMArg>#4</ltx:XMArg>"
              . "#5</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% \ednote{complete the other cases}
% \subsection{Elementary Classical Functions}\label{impl:specfun}
%
%    \begin{macrocode}
%<*sty>
\def\CMathML@sin#1{\sin(#1)}
\newcommand{\Csin}[2][]{\CMathML@sin{#2}}
\def\CMathML@cos#1{\cos(#1)}
\newcommand{\Ccos}[2][]{\CMathML@cos{#2}}
\def\CMathML@tan#1{\tan(#1)}
\newcommand{\Ctan}[2][]{\CMathML@tan{#2}}
\def\CMathML@sec#1{\sec(#1)}
\newcommand{\Csec}[2][]{\CMathML@sec{#2}}
\def\CMathML@csc#1{\csc(#1)}
\newcommand{\Ccsc}[2][]{\CMathML@csc{#2}}
\def\CMathML@cot#1{\cot(#1)}
\newcommand{\Ccot}[2][]{\CMathML@cot{#2}}
\def\CMathML@sinh#1{\sinh(#1)}
\newcommand{\Csinh}[2][]{\CMathML@sinh{#2}}
\def\CMathML@cosh#1{\cosh(#1)}
\newcommand{\Ccosh}[2][]{\CMathML@cosh{#2}}
\def\CMathML@tanh#1{\tanh(#1)}
\newcommand{\Ctanh}[2][]{\CMathML@tanh{#2}}
\def\CMathML@sech#1{\mbox{sech}(#1)}
\newcommand{\Csech}[2][]{\CMathML@sech{#2}}
\def\CMathML@csch#1{\mbox{csch}(#1)}
\newcommand{\Ccsch}[2][]{\CMathML@csch{#2}}
\def\CMathML@coth#1{\mbox{coth}(#1)}
\newcommand{\Ccoth}[2][]{\CMathML@coth{#2}}
\def\CMathML@arcsin#1{\arcsin(#1)}
\newcommand{\Carcsin}[2][]{\CMathML@arcsin{#2}}
\def\CMathML@arccos#1{\arccos(#1)}
\newcommand{\Carccos}[2][]{\CMathML@arccos{#2}}
\def\CMathML@arctan#1{\arctan(#1)}
\newcommand{\Carctan}[2][]{\CMathML@arctan{#2}}
\def\CMathML@arccosh#1{\mbox{arccosh}(#1)}
\newcommand{\Carccosh}[2][]{\CMathML@arccosh{#2}}
\def\CMathML@arccot#1{\mbox{arccot}(#1)}
\newcommand{\Carccot}[2][]{\CMathML@arccot{#2}}
\def\CMathML@arccoth#1{\mbox{arccoth}(#1)}
\newcommand{\Carccoth}[2][]{\CMathML@arccoth{#2}}
\def\CMathML@arccsc#1{\mbox{arccsc}(#1)}
\newcommand{\Carccsc}[2][]{\CMathML@arccsc{#2}}
\def\CMathML@arcsinh#1{\mbox{arcsinh}(#1)}
\newcommand{\Carcsinh}[2][]{\CMathML@arcsinh{#2}}
\def\CMathML@arctanh#1{\mbox{arctanh}(#1)}
\newcommand{\Carctanh}[2][]{\CMathML@arctanh{#2}}

\def\CMathML@exp#1{\exp(#1)}
\newcommand{\Cexp}[2][]{\CMathML@exp{#2}}
\def\CMathML@ln#1{\ln(#1)}
\newcommand{\Cln}[2][]{\CMathML@ln{#2}}
\def\CMathML@log#1#2{\log_{#1}(#2)}
\newcommand{\Clog}[3][]{\CMathML@log{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\Csin [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='sin' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ccos [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='cos' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ctan [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='tan' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Csec [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='sec' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ccsc [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='csc' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ccot [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='cot' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Csinh [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='sinh' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ccosh [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='cosh' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ctanh [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='tanh' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Csech [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='sech' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ccsch [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='csch' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ccoth [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='coth' role='TRIGFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carcsin [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arcsin' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carccos [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arccos' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carctan [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arctan' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carcsec [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arcsec' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carccsc [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arccsc' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carccot [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arccot' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carcsinh [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arcsinh' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carccosh [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arccosh' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carctanh [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arctanh' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carcsech [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arcsech' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carccsch [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arccsch' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Carccoth [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='arccoth' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cexp [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='exp' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cln [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='ln' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Clog [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='log' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
%
% \subsection{Statistics}\label{impl:statistics}
%
%    \begin{macrocode}
%<*sty>
\def\CMathML@mean#1{\mbox{mean}(#1)}
\newcommand{\Cmean}[2][]{\CMathML@mean{#2}}
\def\CMathML@sdev#1{\mbox{std}(#1)}
\newcommand{\Csdev}[2][]{\CMathML@sdev{#2}}
\def\CMathML@var#1{\mbox{var}(#1)}
\newcommand{\Cvar}[2][]{\CMathML@var{#2}}
\def\CMathML@median#1{\mbox{median}(#1)}
\newcommand{\Cmedian}[2][]{\CMathML@median{#2}}
\def\CMathML@mode#1{\mbox{mode}(#1)}
\newcommand{\Cmode}[2][]{\CMathML@mode{#2}}
\def\CMathML@moment#1#2{\langle{#2}^{#1}\rangle}% degree, momentabout, scope
\newcommand{\Cmoment}[3][]{\CMathML@moment{#2}{#3}}
\def\CMathML@momentA#1#2{\langle{#2}^{#1}\rangle}% degree, momentabout, scope
\newcommand{\CmomentA}[4][]{\CMathML@momentA{#2}{#3}{#4}}
%</sty>
%<*ltxml>
DefConstructor('\Cmean [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='mean' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Csdev [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='sdev' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cvar [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='var' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cmedian [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='median' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cmode [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='mode' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cmoment [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='moment' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
% \ednote{we do not seem to need the momentabout.}\ednote{moment and momentA have funny
% elided arguments}
%
% \subsection{Linear Algebra}\label{impl:linalg}
%
%    \begin{macrocode}
%<*sty>
\def\CMathML@vector#1{(#1)}
\newcommand{\Cvector}[2][]{\CMathML@vector{#2}}
\def\CMathML@matrix#1#2{\left(\begin{array}{#1}#2\end{array}\right)}% row pattern, body
\newcommand{\Cmatrix}[3][]{\CMathML@matrix{#2}{#3}}
\def\CMathML@determinant#1{\left|#1\right|}
\newcommand{\Cdeterminant}[2][]{\CMathML@determinant{#2}}
\def\CMathML@transpose#1{#1^\top}
\newcommand{\Ctranspose}[2][]{\CMathML@transpose{#2}}
\def\CMathML@selector#1#2{#1_{#2}}
\newcommand{\Cselector}[3][]{\CMathML@selector{#2}{#3}}
	\def\CMathML@vectproductOp{\cdot}
	\newcommand{\CvectproductOp}{\CMathML@vectproductOp}
\def\CMathML@vectproduct#1#2{#1\CMathML@vectproductOp{#2}}
\newcommand{\Cvectproduct}[3][]{\CMathML@vectproduct{#2}{#3}}
\def\CMathML@scalarproduct#1#2{{#1}#2}
\newcommand{\Cscalarproduct}[3][]{\CMathML@scalarproduct{#2}{#3}}
	\def\CMathML@outerproductOp{\times}
	\newcommand{\CouterproductOp}{\CMathML@outerproductOp}
\def\CMathML@outerproduct#1#2{#1\CMathML@outerproductOp{#2}}
\newcommand{\Couterproduct}[3][]{\CMathML@outerproduct{#2}{#3}}
%</sty>
%<*ltxml>
DefConstructor('\Cvector [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONSTRUCTOR' meaning='vector' ?#1(definitionURL='#1')()/>"
             . "#2"
             . "</ltx:XMApp>",
       afterDigest=>sub { remove_math_commas($_[1], 2); });
DefConstructor('\Cmatrix [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok role='CONSTRUCTOR' meaning='matrix' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cdeterminant [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='determinant' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Ctranspose [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='transpose' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cselector [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='selector' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CvectorproductOp []',
               "<ltx:XMTok meaning='vectorproduct' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cvectorproduct [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='vectorproduct' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\Cscalarproduct [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='scalarproduct' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
DefConstructor('\CouterproductOp []',
               "<ltx:XMTok meaning='outerproduct' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Couterproduct [] {}{}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='outerproduct' role='OPFUNCTION' ?#1(definitionURL='#1')()/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "<ltx:XMArg>#3</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxml>
%    \end{macrocode}
%
% \subsection{Constant and Symbol Elements}\label{impl:constants}
%
%    \begin{macrocode}
%<*sty>
\def\CMathML@integers{{\mathbb{Z}}}
\newcommand{\Cintegers}[1][]{\CMathML@integers}
\def\CMathML@reals{{\mathbb{R}}}
\newcommand{\Creals}[1][]{\CMathML@reals}
\def\CMathML@rationals{{\mathbb{Q}}}
\newcommand{\Crationals}[1][]{\CMathML@rationals}
\def\CMathML@naturalnumbers{{\mathbb{N}}}
\newcommand{\Cnaturalnumbers}[1][]{\CMathML@naturalnumbers}
\def\CMathML@complexes{{\mathbb{C}}}
\newcommand{\Ccomplexes}[1][]{\CMathML@complexes}
\def\CMathML@primes{{\mathbb{P}}}
\newcommand{\Cprimes}[1][]{\CMathML@primes}
\def\CMathML@exponemtiale{e}
\newcommand{\Cexponemtiale}[1][]{\CMathML@exponemtiale}
\def\CMathML@imaginaryi{i}
\newcommand{\Cimaginaryi}[1][]{\CMathML@imaginaryi}
\def\CMathML@notanumber{{\mathrm{NaN}}}
\newcommand{\Cnotanumber}[1][]{\CMathML@notanumber}
\def\CMathML@true{{\mathrm{true}}}
\newcommand{\Ctrue}[1][]{\CMathML@true}
\def\CMathML@false{{\mathrm{false}}}
\newcommand{\Cfalse}[1][]{\CMathML@false}
\def\CMathML@emptyset{\emptyset}
\newcommand{\Cemptyset}[1][]{\CMathML@emptyset}
\def\CMathML@pi{\pi}
\newcommand{\Cpi}[1][]{\CMathML@pi}
\def\CMathML@eulergamma{\gamma}
\newcommand{\Ceulergamma}[1][]{\CMathML@eulergamma}
\def\CMathML@infinit{\infty}
\newcommand{\Cinfinit}[1][]{\CMathML@infinit}
%</sty>
%<*ltxml>
DefConstructor('\Cintegers []',
               "<ltx:XMTok meaning='integers' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Creals []',
               "<ltx:XMTok meaning='reals' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Crationals []',
               "<ltx:XMTok meaning='rationals' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cnaturalnumbers []',
               "<ltx:XMTok meaning='naturalnumbers' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ccomplexes []',
               "<ltx:XMTok meaning='complexes' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cprimes []',
               "<ltx:XMTok meaning='primes'  role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cexponentiale []',
               "<ltx:XMTok meaning='exponentiale' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cimaginaryi []',
               "<ltx:XMTok meaning='imaginaryi' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cnotanumber []',
               "<ltx:XMTok meaning='notanumber' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ctrue []',
               "<ltx:XMTok meaning='true' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cfalse []',
               "<ltx:XMTok meaning='false' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cemptyset []',
               "<ltx:XMTok meaning='emptyset' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cpi []',
               "<ltx:XMTok meaning='pi' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Ceulergamma []',
               "<ltx:XMTok meaning='eulergamma' role='ID' ?#1(definitionURL='#1')()/>");
DefConstructor('\Cinfinit []',
               "<ltx:XMTok meaning='infinit' role='ID' ?#1(definitionURL='#1')()/>");
%</ltxml>
%    \end{macrocode}
% 
% \subsection{Extensions}\label{sec:impl:cmathmlx}
% \begin{macro}{\Ccomplement}
%    \begin{macrocode}
%<*styx>
\def\CMathML@complement#1{#1^c}
\newcommand{\Ccomplement}[2][]{\CMathML@complement{#2}}
%</styx>
%<*ltxmlx>
DefConstructor('\Ccomplement [] {}',
               "<ltx:XMApp>"
             . "<ltx:XMTok meaning='complement' role='CSYMBOL'/>"
             . "<ltx:XMArg>#2</ltx:XMArg>"
             . "</ltx:XMApp>");
%</ltxmlx>
%    \end{macrocode}
% \end{macro}
%
% \subsection{Finale}\label{sec:impl:finale}
% 
% Finally, we need to terminate the file with a success mark for perl.
%    \begin{macrocode}
%<ltxml>1;
%    \end{macrocode}
% \Finale
\endinput

% \iffalse
%%% Local Variables: 
%%% mode: doctex
%%% TeX-master: t
%%% End: 
% \fi

% LocalWords:  STeX cmathml symdefs CMathML dom codom Im ll reln fn bvar arith
% LocalWords:  alg lcm rels Ceq llimit ulimit bvars lowlimit specfun sech csch
% LocalWords:  coth arccosh arccot arccoth arccsc arcsinh arctanh logbase std
% LocalWords:  var momentabout linalg matrixrow bruce NaN stex cnxml symdef
% LocalWords:  DefinitionURLs domainofapplication CmomentA concl