examples.om 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112
  1. % Description: This file contains a long list of examples demonstrating the abilities of
  2. % the translator. Most of these examples come straight from the CDs. They
  3. % were used during the development of the interface and should all be correctly
  4. % translated into MathML.
  5. %
  6. % Version 17 April 2000
  7. %
  8. % Author: Luis Alvarez Sobreviela
  9. %
  10. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  11. om2mml();
  12. <OMOBJ>
  13. <OMA>
  14. <OMS cd="arith1" name="plus"/>
  15. <OMV name=f/>
  16. <OMV name=d/>
  17. <OMA>
  18. <OMS cd="arith1" name="plus"/>
  19. <OMI>1</OMI>
  20. <OMF dec=1e10/>
  21. </OMA>
  22. </OMA>
  23. </OMOBJ>
  24. om2mml();
  25. <OMOBJ>
  26. <OMBIND>
  27. <OMS cd=fns1 name=lambda/>
  28. <OMBVAR>
  29. <OMV name=x/>
  30. </OMBVAR>
  31. <OMA>
  32. <OMS cd="transc1" name=sin/>
  33. <OMV name=x/>
  34. </OMA>
  35. </OMBIND>
  36. </OMOBJ>
  37. om2mml();
  38. <OMOBJ>
  39. <OMBIND>
  40. <OMS cd=fns1 name=lambda/>
  41. <OMBVAR>
  42. <OMV name=x/>
  43. <OMV name=y/>
  44. </OMBVAR>
  45. <OMA>
  46. <OMS cd="arith1" name=plus/>
  47. <OMV name=x/>
  48. <OMA>
  49. <OMS cd="transc1" name=sin/>
  50. <OMV name=y/>
  51. </OMA>
  52. </OMA>
  53. </OMBIND>
  54. </OMOBJ>
  55. om2mml();
  56. <OMOBJ>
  57. <OMA>
  58. <OMS cd="arith1" name=plus/>
  59. <OMV name=x/>
  60. <OMA>
  61. <OMS cd="transc1" name=sin/>
  62. <OMV name=x/>
  63. </OMA>
  64. </OMA>
  65. </OMOBJ>
  66. om2mml();
  67. <OMOBJ>
  68. <OMBIND>
  69. <OMS cd="quant1" name="forall"/>
  70. <OMBVAR>
  71. <OMV name="x"/>
  72. </OMBVAR>
  73. <OMA>
  74. <OMS cd="relation1" name="leq"/>
  75. <OMA>
  76. <OMS cd="arith1" name="abs"/>
  77. <OMA>
  78. <OMS cd="transc1" name="sin"/>
  79. <OMV name="x"/>
  80. </OMA>
  81. </OMA>
  82. <OMF dec="1.0"/>
  83. </OMA>
  84. </OMBIND>
  85. </OMOBJ>
  86. om2mml();
  87. <OMOBJ>
  88. <OMA>
  89. <OMS cd="logic1" name="not"/>
  90. <OMBIND>
  91. <OMS cd="quant1" name="exists"/>
  92. <OMBVAR>
  93. <OMV name="x"/>
  94. <OMV name="y"/>
  95. <OMV name="z"/>
  96. <OMV name="n"/>
  97. </OMBVAR>
  98. <OMA>
  99. <OMS cd="logic1" name="and"/>
  100. <OMA>
  101. <OMS cd="relation1" name="gt"/>
  102. <OMV name="n"/>
  103. <OMI> 2 </OMI>
  104. </OMA>
  105. <OMA>
  106. <OMS cd="relation1" name="eq"/>
  107. <OMA>
  108. <OMS cd="arith1" name="plus"/>
  109. <OMA>
  110. <OMS cd="arith1" name="power"/>
  111. <OMV name="x"/>
  112. <OMV name="n"/>
  113. </OMA>
  114. <OMA>
  115. <OMS cd="arith1" name="power"/>
  116. <OMV name="y"/>
  117. <OMV name="n"/>
  118. </OMA>
  119. </OMA>
  120. <OMA>
  121. <OMS cd="arith1" name="power"/>
  122. <OMV name="z"/>
  123. <OMV name="n"/>
  124. </OMA>
  125. </OMA>
  126. </OMA>
  127. </OMBIND>
  128. </OMA>
  129. </OMOBJ>
  130. % The following two examples show how the translator
  131. % can deal with matrices represented either in columns
  132. % or rows. The translator then converts matrices
  133. % represented in columns into ones represented in
  134. % rows. Mapping to MathML is then possible.
  135. om2mml();
  136. <OMOBJ>
  137. <OMA>
  138. <OMS cd="linalg2" name="matrix"/>
  139. <OMA>
  140. <OMS cd="linalg2" name="matrixcolumn"/>
  141. <OMI> 1 </OMI>
  142. <OMI> 2 </OMI>
  143. </OMA>
  144. <OMA>
  145. <OMS cd="linalg2" name="matrixcolumn"/>
  146. <OMI> 3 </OMI>
  147. <OMI> 4 </OMI>
  148. </OMA>
  149. <OMA>
  150. <OMS cd="linalg2" name="matrixcolumn"/>
  151. <OMI> 5 </OMI>
  152. <OMI> 6 </OMI>
  153. </OMA>
  154. </OMA>
  155. </OMOBJ>
  156. om2mml();
  157. <OMOBJ>
  158. <OMA>
  159. <OMS cd="linalg2" name="matrix"/>
  160. <OMA>
  161. <OMS cd="linalg2" name="matrixrow"/>
  162. <OMI> 1 </OMI>
  163. <OMI> 0 </OMI>
  164. </OMA>
  165. <OMA>
  166. <OMS cd="linalg2" name="matrixrow"/>
  167. <OMI> 0 </OMI>
  168. <OMI> 1 </OMI>
  169. </OMA>
  170. </OMA>
  171. </OMOBJ>
  172. om2mml();
  173. <OMOBJ>
  174. <OMBIND>
  175. <OMS cd="quant1" name="forall"/>
  176. <OMBVAR>
  177. <OMV name="M"/>
  178. </OMBVAR>
  179. <OMA>
  180. <OMS cd="logic1" name="and"/>
  181. <OMA>
  182. <OMS cd="relation1" name="eq"/>
  183. <OMA>
  184. <OMS cd="arith1" name="times"/>
  185. <OMA>
  186. <OMS cd="linalg3" name="identity"/>
  187. <OMA>
  188. <OMS cd="linalg3" name="rowcount"/>
  189. <OMV name="M"/>
  190. </OMA>
  191. </OMA>
  192. <OMV name="M"/>
  193. </OMA>
  194. <OMV name="M"/>
  195. </OMA>
  196. <OMA>
  197. <OMS cd="relation1" name="eq"/>
  198. <OMA>
  199. <OMS cd="arith1" name="times"/>
  200. <OMV name="M"/>
  201. <OMA>
  202. <OMS cd="linalg3" name="identity"/>
  203. <OMA>
  204. <OMS cd="linalg3" name="columncount"/>
  205. <OMV name="M"/>
  206. </OMA>
  207. </OMA>
  208. </OMA>
  209. <OMV name="M"/>
  210. </OMA>
  211. </OMA>
  212. </OMBIND>
  213. </OMOBJ>
  214. om2mml();
  215. <OMOBJ>
  216. <OMA>
  217. <OMS cd="limit1" name="limit"/>
  218. <OMF dec="0.0"/>
  219. <OMS cd="limit1" name="above"/>
  220. <OMBIND>
  221. <OMS cd="fns1" name="lambda"/>
  222. <OMBVAR>
  223. <OMV name="x"/>
  224. </OMBVAR>
  225. <OMA>
  226. <OMS cd="transc1" name="sin"/>
  227. <OMV name="x"/>
  228. </OMA>
  229. </OMBIND>
  230. </OMA>
  231. </OMOBJ>
  232. % This following example will show that the translator only
  233. % identifies the limit symbol of the limit1 CD
  234. om2mml();
  235. <OMOBJ>
  236. <OMA>
  237. <OMS cd="fakeCD" name="limit"/>
  238. <OMF dec="0.0"/>
  239. <OMS cd="limit1" name="above"/>
  240. <OMBIND>
  241. <OMS cd="fns1" name="lambda"/>
  242. <OMBVAR>
  243. <OMV name="x"/>
  244. </OMBVAR>
  245. <OMA>
  246. <OMS cd="transc1" name="sin"/>
  247. <OMV name="x"/>
  248. </OMA>
  249. </OMBIND>
  250. </OMA>
  251. </OMOBJ>
  252. % The following two examples show how the translator
  253. % recognizes whether a symbol has a mathml equivalent
  254. % depending on the CD it comes from.
  255. % They both use symbol 'notsubset' but from different
  256. % CDs. Only one of them can be mapped to MathML
  257. % and the program distinguishes it by checking if
  258. % the CD given is the correct one on its table
  259. % om_mml!*.
  260. om2mml();
  261. <OMOBJ>
  262. <OMA>
  263. <OMS cd="multiset1" name="notsubset"/>
  264. <OMA>
  265. <OMS cd="multiset1" name="set"/>
  266. <OMI> 2 </OMI>
  267. <OMI> 3 </OMI>
  268. <OMI> 3 </OMI>
  269. </OMA>
  270. <OMA>
  271. <OMS cd="multiset1" name="set"/>
  272. <OMI> 1 </OMI>
  273. <OMI> 2 </OMI>
  274. <OMI> 3 </OMI>
  275. </OMA>
  276. </OMA>
  277. </OMOBJ>
  278. om2mml();
  279. <OMOBJ>
  280. <OMA>
  281. <OMS cd="set1" name="notsubset"/>
  282. <OMA>
  283. <OMS cd="multiset1" name="set"/>
  284. <OMI> 2 </OMI>
  285. <OMI> 3 </OMI>
  286. <OMI> 3 </OMI>
  287. </OMA>
  288. <OMA>
  289. <OMS cd="multiset1" name="set"/>
  290. <OMI> 1 </OMI>
  291. <OMI> 2 </OMI>
  292. <OMI> 3 </OMI>
  293. </OMA>
  294. </OMA>
  295. </OMOBJ>
  296. om2mml();
  297. <OMOBJ>
  298. <OMBIND>
  299. <OMS cd="quant1" name="forall"/>
  300. <OMBVAR>
  301. <OMV name="a"/>
  302. <OMV name="b"/>
  303. </OMBVAR>
  304. <OMA>
  305. <OMS cd="relation1" name="eq"/>
  306. <OMA>
  307. <OMS cd="arith1" name="plus"/>
  308. <OMV name="a"/>
  309. <OMV name="b"/>
  310. </OMA>
  311. <OMA>
  312. <OMS cd="arith1" name="plus"/>
  313. <OMV name="b"/>
  314. <OMV name="a"/>
  315. </OMA>
  316. </OMA>
  317. </OMBIND>
  318. </OMOBJ>
  319. % Example of a symbol which has a MathML equivalent
  320. % but under another name.
  321. om2mml();
  322. <OMOBJ>
  323. <OMA>
  324. <OMS cd="arith1" name="unary_minus"/>
  325. <OMI> 1 </OMI>
  326. </OMA>
  327. </OMOBJ>
  328. om2mml();
  329. <OMOBJ>
  330. <OMA>
  331. <OMS cd="relation1" name="eq"/>
  332. <OMA>
  333. <OMS cd="logic1" name="not"/>
  334. <OMS cd="logic1" name="false"/>
  335. </OMA>
  336. <OMS cd="logic1" name="true"/>
  337. </OMA>
  338. </OMOBJ>
  339. om2mml();
  340. <OMOBJ>
  341. <OMA>
  342. <OMS cd="relation1" name="eq"/>
  343. <OMA>
  344. <OMS cd="arith1" name="times"/>
  345. <OMA>
  346. <OMS cd="fns1" name="identity"/>
  347. <OMA>
  348. <OMS cd="linalg3" name="rowcount"/>
  349. <OMV name="M"/>
  350. </OMA>
  351. </OMA>
  352. <OMV name="M"/>
  353. </OMA>
  354. <OMV name="M"/>
  355. </OMA>
  356. </OMOBJ>
  357. om2mml();
  358. <OMOBJ>
  359. <OMA>
  360. <OMS cd="linalg1" name="scalarproduct"/>
  361. <OMA>
  362. <OMS cd="linalg1" name="vector"/>
  363. <OMI> 3 </OMI>
  364. <OMI> 6 </OMI>
  365. <OMI> 9 </OMI>
  366. </OMA>
  367. <OMA>
  368. <OMS cd="linalg1" name="vector"/>
  369. <OMI> 3 </OMI>
  370. <OMI> 6 </OMI>
  371. <OMI> 9 </OMI>
  372. </OMA>
  373. </OMA>
  374. </OMOBJ>
  375. om2mml();
  376. <OMOBJ>
  377. <OMA>
  378. <OMS cd="linalg1" name="outerproduct"/>
  379. <OMA>
  380. <OMS cd="linalg1" name="vector"/>
  381. <OMI> 3 </OMI>
  382. <OMI> 6 </OMI>
  383. <OMI> 9 </OMI>
  384. </OMA>
  385. <OMA>
  386. <OMS cd="linalg1" name="vector"/>
  387. <OMI> 3 </OMI>
  388. <OMI> 6 </OMI>
  389. <OMI> 9 </OMI>
  390. </OMA>
  391. </OMA>
  392. </OMOBJ>
  393. om2mml();
  394. <OMOBJ>
  395. <OMBIND>
  396. <OMS cd="quant1" name="forall"/>
  397. <OMBVAR>
  398. <OMV name="a"/>
  399. </OMBVAR>
  400. <OMA>
  401. <OMS cd="relation1" name="eq"/>
  402. <OMA>
  403. <OMS cd="arith1" name="plus"/>
  404. <OMV name="a"/>
  405. <OMS cd="alg1" name="zero"/>
  406. </OMA>
  407. <OMV name="a"/>
  408. </OMA>
  409. </OMBIND>
  410. </OMOBJ>
  411. om2mml();
  412. <OMOBJ>
  413. <OMBIND>
  414. <OMS cd="quant1" name="forall"/>
  415. <OMBVAR>
  416. <OMV name="a"/>
  417. </OMBVAR>
  418. <OMA>
  419. <OMS cd="relation1" name="eq"/>
  420. <OMA>
  421. <OMS cd="arith1" name="times"/>
  422. <OMS cd="alg1" name="one"/>
  423. <OMV name="a"/>
  424. </OMA>
  425. <OMV name="a"/>
  426. </OMA>
  427. </OMBIND>
  428. </OMOBJ>
  429. om2mml();
  430. <OMOBJ>
  431. <OMA>
  432. <OMS cd="relation1" name="eq"/>
  433. <OMA>
  434. <OMS cd="bigfloat1" name="bigfloat"/>
  435. <OMV name="m"/>
  436. <OMV name="r"/>
  437. <OMV name="e"/>
  438. </OMA>
  439. <OMA>
  440. <OMS cd="arith1" name="times"/>
  441. <OMV name="m"/>
  442. <OMA>
  443. <OMS cd="arith1" name="power"/>
  444. <OMV name="r"/>
  445. <OMV name="e"/>
  446. </OMA>
  447. </OMA>
  448. </OMA>
  449. </OMOBJ>
  450. % The integral symbols defint and int are ambigious as defined
  451. % in the CDs. They do not specify their variable of integration
  452. % explicitly. The following shows that when the function
  453. % to integrate is defined as a lambda expression, then the
  454. % bound variable is easily determined. However, in other
  455. % cases, it is not possible to determine the bound variable.
  456. om2mml();
  457. <OMOBJ>
  458. <OMA>
  459. <OMS cd="calculus1" name="int"/>
  460. <OMBIND>
  461. <OMS cd="fns1" name="lambda"/>
  462. <OMBVAR>
  463. <OMV name="x"/>
  464. </OMBVAR>
  465. <OMA>
  466. <OMS cd="transc1" name="sin"/>
  467. <OMV name="x"/>
  468. </OMA>
  469. </OMBIND>
  470. </OMA>
  471. </OMOBJ>
  472. om2mml();
  473. <OMOBJ>
  474. <OMA>
  475. <OMS cd="calculus1" name="int"/>
  476. <OMA>
  477. <OMS cd="arith1" name="plus"/>
  478. <OMV name="x"/>
  479. <OMV name="y"/>
  480. </OMA>
  481. </OMA>
  482. </OMOBJ>
  483. % Some calculus
  484. om2mml();
  485. <OMOBJ>
  486. <OMA>
  487. <OMS cd="relation1" name="eq"/>
  488. <OMA>
  489. <OMS cd="calculus1" name="diff"/>
  490. <OMBIND>
  491. <OMS cd="fns1" name="lambda"/>
  492. <OMBVAR>
  493. <OMV name="x"/>
  494. </OMBVAR>
  495. <OMA>
  496. <OMS cd="arith1" name="plus"/>
  497. <OMV name="x"/>
  498. <OMF dec="1.0"/>
  499. </OMA>
  500. </OMBIND>
  501. </OMA>
  502. <OMF dec="1.0"/>
  503. </OMA>
  504. </OMOBJ>
  505. om2mml();
  506. <OMOBJ>
  507. <OMA>
  508. <OMS cd="relation1" name="eq"/>
  509. <OMA>
  510. <OMS cd="calculus1" name="partialdiff"/>
  511. <OMA>
  512. <OMS cd="list1" name="list"/>
  513. <OMI> 1 </OMI>
  514. <OMI> 3 </OMI>
  515. </OMA>
  516. <OMBIND>
  517. <OMS cd="fns1" name="lambda"/>
  518. <OMBVAR>
  519. <OMV name="x"/>
  520. <OMV name="y"/>
  521. <OMV name="z"/>
  522. </OMBVAR>
  523. <OMA>
  524. <OMS cd="arith2" name="times"/>
  525. <OMV name="x"/>
  526. <OMV name="y"/>
  527. <OMV name="z"/>
  528. </OMA>
  529. </OMBIND>
  530. </OMA>
  531. <OMV name="y"/>
  532. </OMA>
  533. </OMOBJ>
  534. om2mml();
  535. <OMOBJ>
  536. <OMA>
  537. <OMS cd="relation1" name="eq"/>
  538. <OMA>
  539. <OMS cd="integer1" name="factorial"/>
  540. <OMV name="n"/>
  541. </OMA>
  542. <OMA>
  543. <OMS cd="arith1" name="product"/>
  544. <OMA>
  545. <OMS cd="interval1" name="integer_interval"/>
  546. <OMI> 1 </OMI>
  547. <OMV name="n"/>
  548. </OMA>
  549. <OMBIND>
  550. <OMS cd="fns1" name="lambda"/>
  551. <OMBVAR>
  552. <OMV name="i"/>
  553. </OMBVAR>
  554. <OMV name="i"/>
  555. </OMBIND>
  556. </OMA>
  557. </OMA>
  558. </OMOBJ>
  559. om2mml();
  560. <OMOBJ>
  561. <OMA>
  562. <OMS cd="logic1" name="not"/>
  563. <OMBIND>
  564. <OMS cd="quant1" name="exists"/>
  565. <OMBVAR>
  566. <OMV name="c"/>
  567. </OMBVAR>
  568. <OMA>
  569. <OMS cd="logic1" name="and"/>
  570. <OMA>
  571. <OMS cd="set1" name="in"/>
  572. <OMA>
  573. <OMS cd="arith1" name="divide"/>
  574. <OMV name="a"/>
  575. <OMV name="c"/>
  576. </OMA>
  577. <OMS cd="setname1" name="Z"/>
  578. </OMA>
  579. <OMA>
  580. <OMS cd="set1" name="in"/>
  581. <OMA>
  582. <OMS cd="arith1" name="divide"/>
  583. <OMV name="b"/>
  584. <OMV name="c"/>
  585. </OMA>
  586. <OMS cd="setname1" name="Z"/>
  587. </OMA>
  588. <OMA>
  589. <OMS cd="relation1" name="gt"/>
  590. <OMV name="c"/>
  591. <OMA>
  592. <OMS cd="integer1" name="gcd"/>
  593. <OMV name="a"/>
  594. <OMV name="b"/>
  595. </OMA>
  596. </OMA>
  597. </OMA>
  598. </OMBIND>
  599. </OMA>
  600. </OMOBJ>
  601. om2mml();
  602. <OMOBJ>
  603. <OMBIND>
  604. <OMS cd="quant1" name="forall"/>
  605. <OMBVAR>
  606. <OMV name="x"/>
  607. </OMBVAR>
  608. <OMA>
  609. <OMS cd="logic1" name="implies"/>
  610. <OMS cd="logic1" name="false"/>
  611. <OMV name="x"/>
  612. </OMA>
  613. </OMBIND>
  614. </OMOBJ>
  615. om2mml();
  616. <OMOBJ>
  617. <OMA>
  618. <OMS cd="relation1" name="eq"/>
  619. <OMA>
  620. <OMS cd="minmax1" name="max"/>
  621. <OMI> 1 </OMI>
  622. <OMI> 9 </OMI>
  623. <OMI> 5 </OMI>
  624. </OMA>
  625. <OMI> 9 </OMI>
  626. </OMA>
  627. </OMOBJ>
  628. % The following examples belong to the multiset CD
  629. om2mml();
  630. <OMOBJ>
  631. <OMA>
  632. <OMS cd="logic1" name="implies"/>
  633. <OMA>
  634. <OMS cd="logic1" name="and"/>
  635. <OMA>
  636. <OMS cd="multiset1" name="in"/>
  637. <OMV name="a"/>
  638. <OMV name="A"/>
  639. </OMA>
  640. <OMA>
  641. <OMS cd="multiset1" name="in"/>
  642. <OMV name="a"/>
  643. <OMV name="B"/>
  644. </OMA>
  645. </OMA>
  646. <OMA>
  647. <OMS cd="multiset1" name="in"/>
  648. <OMV name="a"/>
  649. <OMA>
  650. <OMS cd="multiset1" name="intersect"/>
  651. <OMV name="A"/>
  652. <OMV name="B"/>
  653. </OMA>
  654. </OMA>
  655. </OMA>
  656. </OMOBJ>
  657. om2mml();
  658. <OMOBJ>
  659. <OMA>
  660. <OMS cd="multiset1" name="multiset"/>
  661. <OMI> 4 </OMI>
  662. <OMI> 1 </OMI>
  663. <OMI> 0 </OMI>
  664. <OMI> 1 </OMI>
  665. <OMI> 4 </OMI>
  666. </OMA>
  667. </OMOBJ>
  668. om2mml();
  669. <OMOBJ>
  670. <OMA>
  671. <OMS cd="logic1" name="and"/>
  672. <OMA>
  673. <OMS cd="multiset1" name="subset"/>
  674. <OMA>
  675. <OMS cd="multiset1" name="intersect"/>
  676. <OMV name="A"/>
  677. <OMV name="B"/>
  678. </OMA>
  679. <OMV name="A"/>
  680. </OMA>
  681. <OMA>
  682. <OMS cd="multiset1" name="subset"/>
  683. <OMA>
  684. <OMS cd="multiset1" name="intersect"/>
  685. <OMV name="A"/>
  686. <OMV name="B"/>
  687. </OMA>
  688. <OMV name="B"/>
  689. </OMA>
  690. </OMA>
  691. </OMOBJ>
  692. om2mml();
  693. <OMOBJ>
  694. <OMA>
  695. <OMS cd="logic1" name="and"/>
  696. <OMA>
  697. <OMS cd="multiset1" name="subset"/>
  698. <OMV name="A"/>
  699. <OMA>
  700. <OMS cd="multiset1" name="union"/>
  701. <OMV name="A"/>
  702. <OMV name="B"/>
  703. </OMA>
  704. </OMA>
  705. <OMA>
  706. <OMS cd="multiset1" name="subset"/>
  707. <OMV name="B"/>
  708. <OMA>
  709. <OMS cd="multiset1" name="union"/>
  710. <OMV name="A"/>
  711. <OMV name="B"/>
  712. </OMA>
  713. </OMA>
  714. </OMA>
  715. </OMOBJ>
  716. om2mml();
  717. <OMOBJ>
  718. <OMBIND>
  719. <OMS cd="quant1" name="forall"/>
  720. <OMBVAR>
  721. <OMV name="A"/>
  722. <OMV name="B"/>
  723. <OMV name="C"/>
  724. </OMBVAR>
  725. <OMA>
  726. <OMS cd="relation1" name="eq"/>
  727. <OMA>
  728. <OMS cd="multiset1" name="union"/>
  729. <OMV name="A"/>
  730. <OMA>
  731. <OMS cd="multiset1" name="intersect"/>
  732. <OMV name="B"/>
  733. <OMV name="C"/>
  734. </OMA>
  735. </OMA>
  736. <OMA>
  737. <OMS cd="multiset1" name="intersect"/>
  738. <OMA>
  739. <OMS cd="multiset1" name="union"/>
  740. <OMV name="A"/>
  741. <OMV name="B"/>
  742. </OMA>
  743. <OMA>
  744. <OMS cd="multiset1" name="union"/>
  745. <OMV name="A"/>
  746. <OMV name="C"/>
  747. </OMA>
  748. </OMA>
  749. </OMA>
  750. </OMBIND>
  751. </OMOBJ>
  752. om2mml();
  753. <OMOBJ>
  754. <OMA>
  755. <OMS cd="multiset1" name="subset"/>
  756. <OMA>
  757. <OMS cd="multiset1" name="setdiff"/>
  758. <OMV name="A"/>
  759. <OMV name="B"/>
  760. </OMA>
  761. <OMV name="A"/>
  762. </OMA>
  763. </OMOBJ>
  764. om2mml();
  765. <OMOBJ>
  766. <OMA>
  767. <OMS cd="logic1" name="implies"/>
  768. <OMA>
  769. <OMS cd="logic1" name="and"/>
  770. <OMA>
  771. <OMS cd="multiset1" name="subset"/>
  772. <OMV name="B"/>
  773. <OMV name="A"/>
  774. </OMA>
  775. <OMA>
  776. <OMS cd="multiset1" name="subset"/>
  777. <OMV name="C"/>
  778. <OMV name="B"/>
  779. </OMA>
  780. </OMA>
  781. <OMA>
  782. <OMS cd="multiset1" name="subset"/>
  783. <OMV name="C"/>
  784. <OMV name="A"/>
  785. </OMA>
  786. </OMA>
  787. </OMOBJ>
  788. om2mml();
  789. <OMOBJ>
  790. <OMA>
  791. <OMS cd="multiset1" name="notin"/>
  792. <OMI> 4 </OMI>
  793. <OMA>
  794. <OMS cd="multiset1" name="multiset"/>
  795. <OMI> 1 </OMI>
  796. <OMI> 1 </OMI>
  797. <OMI> 2 </OMI>
  798. <OMI> 3 </OMI>
  799. </OMA>
  800. </OMA>
  801. </OMOBJ>
  802. om2mml();
  803. <OMOBJ>
  804. <OMA>
  805. <OMS cd="multiset1" name="prsubset"/>
  806. <OMA>
  807. <OMS cd="multiset1" name="multiset"/>
  808. <OMI> 2 </OMI>
  809. <OMI> 3 </OMI>
  810. </OMA>
  811. <OMA>
  812. <OMS cd="multiset1" name="multiset"/>
  813. <OMI> 2 </OMI>
  814. <OMI> 2 </OMI>
  815. <OMI> 3 </OMI>
  816. </OMA>
  817. </OMA>
  818. </OMOBJ>
  819. om2mml();
  820. <OMOBJ>
  821. <OMA>
  822. <OMS cd="multiset1" name="notsubset"/>
  823. <OMA>
  824. <OMS cd="multiset1" name="multiset"/>
  825. <OMI> 2 </OMI>
  826. <OMI> 3 </OMI>
  827. <OMI> 3 </OMI>
  828. </OMA>
  829. <OMA>
  830. <OMS cd="multiset1" name="multiset"/>
  831. <OMI> 1 </OMI>
  832. <OMI> 2 </OMI>
  833. <OMI> 3 </OMI>
  834. </OMA>
  835. </OMA>
  836. </OMOBJ>
  837. om2mml();
  838. <OMOBJ>
  839. <OMA>
  840. <OMS cd="multiset1" name="notprsubset"/>
  841. <OMA>
  842. <OMS cd="multiset1" name="multiset"/>
  843. <OMI> 1 </OMI>
  844. <OMI> 2 </OMI>
  845. <OMI> 1 </OMI>
  846. </OMA>
  847. <OMA>
  848. <OMS cd="multiset1" name="multiset"/>
  849. <OMI> 1 </OMI>
  850. <OMI> 2 </OMI>
  851. <OMI> 1 </OMI>
  852. </OMA>
  853. </OMA>
  854. </OMOBJ>
  855. % Examples from CD nums1
  856. om2mml();
  857. <OMOBJ>
  858. <OMA>
  859. <OMS cd="relation1" name="eq"/>
  860. <OMI> 8 </OMI>
  861. <OMA>
  862. <OMS cd="nums1" name="based_integer"/>
  863. <OMI> 8 </OMI>
  864. <OMSTR> 10 </OMSTR>
  865. </OMA>
  866. </OMA>
  867. </OMOBJ>
  868. om2mml();
  869. <OMOBJ>
  870. <OMA>
  871. <OMS cd="nums1" name="rational"/>
  872. <OMI> 1 </OMI>
  873. <OMI> 2 </OMI>
  874. </OMA>
  875. </OMOBJ>
  876. om2mml();
  877. <OMOBJ>
  878. <OMBIND>
  879. <OMS cd="quant1" name="forall"/>
  880. <OMBVAR>
  881. <OMV name="x"/>
  882. <OMV name="y"/>
  883. </OMBVAR>
  884. <OMA>
  885. <OMS cd="relation1" name="eq"/>
  886. <OMA>
  887. <OMS cd="nums1" name="complex_cartesian"/>
  888. <OMV name="x"/>
  889. <OMV name="y"/>
  890. </OMA>
  891. <OMA>
  892. <OMS cd="arith1" name="plus"/>
  893. <OMV name="x"/>
  894. <OMA>
  895. <OMS cd="arith1" name="times"/>
  896. <OMS cd="nums1" name="i"/>
  897. <OMV name="y"/>
  898. </OMA>
  899. </OMA>
  900. </OMA>
  901. </OMBIND>
  902. </OMOBJ>
  903. om2mml();
  904. <OMOBJ>
  905. <OMBIND>
  906. <OMS cd="quant1" name="forall"/>
  907. <OMBVAR>
  908. <OMV name="x"/>
  909. <OMV name="y"/>
  910. <OMV name="r"/>
  911. <OMV name="a"/>
  912. </OMBVAR>
  913. <OMA>
  914. <OMS cd="logic1" name="implies"/>
  915. <OMA>
  916. <OMS cd="logic1" name="and"/>
  917. <OMA>
  918. <OMS cd="relation1" name="eq"/>
  919. <OMA>
  920. <OMS cd="arith1" name="times"/>
  921. <OMV name="r"/>
  922. <OMA>
  923. <OMS cd="transc1" name="sin"/>
  924. <OMV name="a"/>
  925. </OMA>
  926. </OMA>
  927. <OMV name="y"/>
  928. </OMA>
  929. <OMA>
  930. <OMS cd="relation1" name="eq"/>
  931. <OMA>
  932. <OMS cd="arith1" name="times"/>
  933. <OMV name="r"/>
  934. <OMA>
  935. <OMS cd="transc1" name="cos"/>
  936. <OMV name="a"/>
  937. </OMA>
  938. </OMA>
  939. <OMV name="x"/>
  940. </OMA>
  941. </OMA>
  942. <OMA>
  943. <OMS cd="relation1" name="eq"/>
  944. <OMA>
  945. <OMS cd="nums1" name="complex_polar"/>
  946. <OMV name="r"/>
  947. <OMV name="a"/>
  948. </OMA>
  949. <OMA>
  950. <OMS cd="nums1" name="complex_cartesian"/>
  951. <OMV name="x"/>
  952. <OMV name="y"/>
  953. </OMA>
  954. </OMA>
  955. </OMA>
  956. </OMBIND>
  957. </OMOBJ>
  958. om2mml();
  959. <OMOBJ>
  960. <OMBIND>
  961. <OMS cd="quant1" name="forall"/>
  962. <OMBVAR>
  963. <OMV name="x"/>
  964. </OMBVAR>
  965. <OMA>
  966. <OMS cd="logic1" name="implies"/>
  967. <OMA>
  968. <OMS cd="logic1" name="and"/>
  969. <OMA>
  970. <OMS cd="set1" name="in"/>
  971. <OMV name="a"/>
  972. <OMS cd="setname1" name="R"/>
  973. </OMA>
  974. <OMA>
  975. <OMS cd="set1" name="in"/>
  976. <OMV name="k"/>
  977. <OMS cd="setname1" name="Z"/>
  978. </OMA>
  979. </OMA>
  980. <OMA>
  981. <OMS cd="relation1" name="eq"/>
  982. <OMA>
  983. <OMS cd="nums1" name="complex_polar"/>
  984. <OMV name="x"/>
  985. <OMV name="a"/>
  986. </OMA>
  987. <OMA>
  988. <OMS cd="nums1" name="complex_polar"/>
  989. <OMV name="x"/>
  990. <OMA>
  991. <OMS cd="arith1" name="plus"/>
  992. <OMV name="a"/>
  993. <OMA>
  994. <OMS cd="arith1" name="times"/>
  995. <OMI> 2 </OMI>
  996. <OMS cd="nums1" name="pi"/>
  997. <OMV name="k"/>
  998. </OMA>
  999. </OMA>
  1000. </OMA>
  1001. </OMA>
  1002. </OMA>
  1003. </OMBIND>
  1004. </OMOBJ>
  1005. om2mml();
  1006. <OMOBJ>
  1007. <OMA>
  1008. <OMS cd="relation1" name="eq"/>
  1009. <OMS cd="nums1" name="e"/>
  1010. <OMA>
  1011. <OMS cd="arith1" name="sum"/>
  1012. <OMA>
  1013. <OMS cd="interval1" name="integer_interval"/>
  1014. <OMS cd="alg1" name="zero"/>
  1015. <OMS cd="nums1" name="infinity"/>
  1016. </OMA>
  1017. <OMBIND>
  1018. <OMS cd="fns1" name="lambda"/>
  1019. <OMBVAR>
  1020. <OMV name="j"/>
  1021. </OMBVAR>
  1022. <OMA>
  1023. <OMS cd="arith1" name="divide"/>
  1024. <OMS cd="alg1" name="one"/>
  1025. <OMA>
  1026. <OMS cd="integer1" name="factorial"/>
  1027. <OMV name="j"/>
  1028. </OMA>
  1029. </OMA>
  1030. </OMBIND>
  1031. </OMA>
  1032. </OMA>
  1033. </OMOBJ>
  1034. om2mml();
  1035. <OMOBJ>
  1036. <OMA>
  1037. <OMS cd="relation1" name="eq"/>
  1038. <OMA>
  1039. <OMS cd="arith1" name="power"/>
  1040. <OMS cd="nums1" name="i"/>
  1041. <OMI> 2 </OMI>
  1042. </OMA>
  1043. <OMA>
  1044. <OMS cd="arith1" name="minus"/>
  1045. <OMS cd="alg1" name="one"/>
  1046. </OMA>
  1047. </OMA>
  1048. </OMOBJ>
  1049. om2mml();
  1050. <OMOBJ>
  1051. <OMBIND>
  1052. <OMS cd="quant1" name="forall"/>
  1053. <OMBVAR>
  1054. <OMV name="x"/>
  1055. <OMV name="y"/>
  1056. </OMBVAR>
  1057. <OMA>
  1058. <OMS cd="relation1" name="eq"/>
  1059. <OMV name="y"/>
  1060. <OMA>
  1061. <OMS name="imaginary" cd="nums1"/>
  1062. <OMA>
  1063. <OMS name="complex_cartesian" cd="nums1"/>
  1064. <OMV name="x"/>
  1065. <OMV name="y"/>
  1066. </OMA>
  1067. </OMA>
  1068. </OMA>
  1069. </OMBIND>
  1070. </OMOBJ>
  1071. om2mml();
  1072. <OMOBJ>
  1073. <OMBIND>
  1074. <OMS cd="quant1" name="forall"/>
  1075. <OMBVAR>
  1076. <OMV name="x"/>
  1077. <OMV name="y"/>
  1078. </OMBVAR>
  1079. <OMA>
  1080. <OMS cd="relation1" name="eq"/>
  1081. <OMV name="x"/>
  1082. <OMA>
  1083. <OMS name="real" cd="nums1"/>
  1084. <OMA>
  1085. <OMS name="complex_cartesian" cd="nums1"/>
  1086. <OMV name="x"/>
  1087. <OMV name="y"/>
  1088. </OMA>
  1089. </OMA>
  1090. </OMA>
  1091. </OMBIND>
  1092. </OMOBJ>
  1093. om2mml();
  1094. <OMOBJ>
  1095. <OMA>
  1096. <OMS cd="logic1" name="implies"/>
  1097. <OMA>
  1098. <OMS cd="set1" name="in"/>
  1099. <OMV name="a"/>
  1100. <OMS cd="setname1" name="R"/>
  1101. </OMA>
  1102. <OMA>
  1103. <OMS cd="relation1" name="lt"/>
  1104. <OMV name="x"/>
  1105. <OMS cd="nums1" name="infinity"/>
  1106. </OMA>
  1107. </OMA>
  1108. </OMOBJ>
  1109. om2mml();
  1110. <OMOBJ>
  1111. <OMA>
  1112. <OMS cd="relation1" name="neq"/>
  1113. <OMS cd="nums1" name="NaN"/>
  1114. <OMS cd="nums1" name="NaN"/>
  1115. </OMA>
  1116. </OMOBJ>
  1117. om2mml();
  1118. <OMOBJ>
  1119. <OMA>
  1120. <OMS cd="relation1" name="eq"/>
  1121. <OMS cd="nums1" name="pi"/>
  1122. <OMA>
  1123. <OMS cd="arith1" name="sum"/>
  1124. <OMA>
  1125. <OMS cd="interval1" name="integer_interval"/>
  1126. <OMS cd="alg1" name="zero"/>
  1127. <OMS cd="nums1" name="infinity"/>
  1128. </OMA>
  1129. <OMBIND>
  1130. <OMS cd="fns1" name="lambda"/>
  1131. <OMBVAR>
  1132. <OMV name="j"/>
  1133. </OMBVAR>
  1134. <OMA>
  1135. <OMS cd="arith1" name="minus"/>
  1136. <OMA>
  1137. <OMS cd="arith1" name="divide"/>
  1138. <OMS cd="alg1" name="one"/>
  1139. <OMA>
  1140. <OMS cd="arith1" name="plus"/>
  1141. <OMA>
  1142. <OMS cd="arith1" name="times"/>
  1143. <OMI> 4 </OMI>
  1144. <OMV name="j"/>
  1145. </OMA>
  1146. <OMS cd="alg1" name="one"/>
  1147. </OMA>
  1148. </OMA>
  1149. <OMA>
  1150. <OMS cd="arith1" name="divide"/>
  1151. <OMS cd="alg1" name="one"/>
  1152. <OMA>
  1153. <OMS cd="arith1" name="plus"/>
  1154. <OMA>
  1155. <OMS cd="arith1" name="times"/>
  1156. <OMI> 4 </OMI>
  1157. <OMV name="j"/>
  1158. </OMA>
  1159. <OMS cd="alg1" name="one"/>
  1160. </OMA>
  1161. </OMA>
  1162. </OMA>
  1163. </OMBIND>
  1164. </OMA>
  1165. </OMA>
  1166. </OMOBJ>
  1167. om2mml();
  1168. <OMOBJ>
  1169. <OMBIND>
  1170. <OMS cd="quant1" name="forall"/>
  1171. <OMBVAR>
  1172. <OMV name="x"/>
  1173. </OMBVAR>
  1174. <OMA>
  1175. <OMS cd="logic1" name="and"/>
  1176. <OMA>
  1177. <OMS cd="relation1" name="lt"/>
  1178. <OMA>
  1179. <OMS cd="arith1" name="minus"/>
  1180. <OMA>
  1181. <OMS cd="rounding1" name="ceiling"/>
  1182. <OMV name="x"/>
  1183. </OMA>
  1184. <OMS cd="alg1" name="one"/>
  1185. </OMA>
  1186. <OMV name="x"/>
  1187. </OMA>
  1188. <OMA>
  1189. <OMS cd="relation1" name="leq"/>
  1190. <OMV name="x"/>
  1191. <OMA>
  1192. <OMS cd="rounding1" name="ceiling"/>
  1193. <OMV name="x"/>
  1194. </OMA>
  1195. </OMA>
  1196. </OMA>
  1197. </OMBIND>
  1198. </OMOBJ>
  1199. om2mml();
  1200. <OMOBJ>
  1201. <OMA>
  1202. <OMS cd="relation1" name="eq"/>
  1203. <OMA>
  1204. <OMS cd="stats1" name="mean"/>
  1205. <OMI> 1 </OMI> <OMI> 2 </OMI> <OMI> 3 </OMI>
  1206. </OMA>
  1207. <OMI> 3 </OMI>
  1208. </OMA>
  1209. </OMOBJ>
  1210. om2mml();
  1211. <OMOBJ>
  1212. <OMA>
  1213. <OMS cd="stats1" name="sdev"/>
  1214. <OMF dec="3.1"/>
  1215. <OMF dec="2.2"/>
  1216. <OMF dec="1.8"/>
  1217. <OMF dec="1.1"/>
  1218. <OMF dec="3.3"/>
  1219. <OMF dec="2.4"/>
  1220. <OMF dec="5.5"/>
  1221. <OMF dec="2.3"/>
  1222. <OMF dec="1.7"/>
  1223. <OMF dec="1.8"/>
  1224. <OMF dec="3.4"/>
  1225. <OMF dec="4.0"/>
  1226. <OMF dec="3.3"/>
  1227. </OMA>
  1228. </OMOBJ>
  1229. om2mml();
  1230. <OMOBJ>
  1231. <OMA>
  1232. <OMS cd="logic1" name="implies"/>
  1233. <OMA>
  1234. <OMS cd="relation1" name="eq"/>
  1235. <OMA>
  1236. <OMS cd="arith1" name="power"/>
  1237. <OMV name="a"/>
  1238. <OMV name="b"/>
  1239. </OMA>
  1240. <OMV name="c"/>
  1241. </OMA>
  1242. <OMA>
  1243. <OMS cd="relation1" name="eq"/>
  1244. <OMA>
  1245. <OMS cd="transc1" name="log"/>
  1246. <OMV name="a"/>
  1247. <OMV name="c"/>
  1248. </OMA>
  1249. <OMV name="b"/>
  1250. </OMA>
  1251. </OMA>
  1252. </OMOBJ>
  1253. om2mml();
  1254. <OMOBJ>
  1255. <OMA>
  1256. <OMS name="and" cd="logic1"/>
  1257. <OMA>
  1258. <OMS name="lt" cd="relation1"/>
  1259. <OMA>
  1260. <OMS name="unary_minus" cd="arith1"/>
  1261. <OMS name="pi" cd="nums1"/>
  1262. </OMA>
  1263. <OMA>
  1264. <OMS name="imaginary" cd="nums1"/>
  1265. <OMA>
  1266. <OMS name="ln" cd="transc1"/>
  1267. <OMV name="x"/>
  1268. </OMA>
  1269. </OMA>
  1270. </OMA>
  1271. <OMA>
  1272. <OMS name="leq" cd="relation1"/>
  1273. <OMA>
  1274. <OMS name="imaginary" cd="nums1"/>
  1275. <OMA>
  1276. <OMS name="ln" cd="transc1"/>
  1277. <OMV name="x"/>
  1278. </OMA>
  1279. </OMA>
  1280. <OMS name="pi" cd="nums1"/>
  1281. </OMA>
  1282. </OMA>
  1283. </OMOBJ>
  1284. om2mml();
  1285. <OMOBJ>
  1286. <OMA>
  1287. <OMS cd="relation1" name="eq"/>
  1288. <OMA>
  1289. <OMS cd="veccalc1" name="curl"/>
  1290. <OMV name="F"/>
  1291. </OMA>
  1292. <OMA>
  1293. <OMS cd="arith1" name="plus"/>
  1294. <OMA>
  1295. <OMS cd="linalg1" name="vectorproduct"/>
  1296. <OMA>
  1297. <OMS cd="linalg1" name="vector"/>
  1298. <OMI> 1 </OMI>
  1299. <OMI> 0 </OMI>
  1300. <OMI> 0 </OMI>
  1301. </OMA>
  1302. <OMA>
  1303. <OMS cd="calculus1" name="partialdiff"/>
  1304. <OMA>
  1305. <OMS cd="list1" name="list"/>
  1306. <OMI> 1 </OMI>
  1307. </OMA>
  1308. <OMV name="F"/>
  1309. </OMA>
  1310. </OMA>
  1311. <OMA>
  1312. <OMS cd="linalg1" name="vectorproduct"/>
  1313. <OMA>
  1314. <OMS cd="linalg1" name="vector"/>
  1315. <OMI> 0 </OMI>
  1316. <OMI> 1 </OMI>
  1317. <OMI> 0 </OMI>
  1318. </OMA>
  1319. <OMA>
  1320. <OMS cd="calculus1" name="partialdiff"/>
  1321. <OMA>
  1322. <OMS cd="list1" name="list"/>
  1323. <OMI> 2 </OMI>
  1324. </OMA>
  1325. <OMV name="F"/>
  1326. </OMA>
  1327. </OMA>
  1328. <OMA>
  1329. <OMS cd="linalg1" name="vectorproduct"/>
  1330. <OMA>
  1331. <OMS cd="linalg1" name="vector"/>
  1332. <OMI> 0 </OMI>
  1333. <OMI> 0 </OMI>
  1334. <OMI> 1 </OMI>
  1335. </OMA>
  1336. <OMA>
  1337. <OMS cd="calculus1" name="partialdiff"/>
  1338. <OMA>
  1339. <OMS cd="list1" name="list"/>
  1340. <OMI> 3 </OMI>
  1341. </OMA>
  1342. <OMV name="F"/>
  1343. </OMA>
  1344. </OMA>
  1345. </OMA>
  1346. </OMA>
  1347. </OMOBJ>
  1348. om2mml();
  1349. <OMOBJ>
  1350. <OMBIND>
  1351. <OMS cd="quant1" name="forall"/>
  1352. <OMBVAR>
  1353. <OMV name="x"/>
  1354. </OMBVAR>
  1355. <OMA>
  1356. <OMS cd="logic1" name="and"/>
  1357. <OMA>
  1358. <OMS cd="relation1" name="lt"/>
  1359. <OMA>
  1360. <OMS name="unary_minus" cd="arith1"/>
  1361. <OMS cd="nums1" name="pi"/>
  1362. </OMA>
  1363. <OMA>
  1364. <OMS name="arg" cd="arith2"/>
  1365. <OMV name="x"/>
  1366. </OMA>
  1367. </OMA>
  1368. <OMA>
  1369. <OMS cd="relation1" name="leq"/>
  1370. <OMA>
  1371. <OMS name="arg" cd="arith2"/>
  1372. <OMV name="x"/>
  1373. </OMA>
  1374. <OMS cd="nums1" name="pi"/>
  1375. </OMA>
  1376. </OMA>
  1377. </OMBIND>
  1378. </OMOBJ>
  1379. om2mml();
  1380. <OMOBJ>
  1381. <OMBIND>
  1382. <OMS cd="quant1" name="forall"/>
  1383. <OMBVAR>
  1384. <OMV name="a"/>
  1385. </OMBVAR>
  1386. <OMA>
  1387. <OMS cd="relation1" name="eq"/>
  1388. <OMA>
  1389. <OMS cd="arith2" name="inverse"/>
  1390. <OMA>
  1391. <OMS cd="arith2" name="inverse"/>
  1392. <OMV name="a"/>
  1393. </OMA>
  1394. </OMA>
  1395. <OMV name="a"/>
  1396. </OMA>
  1397. </OMBIND>
  1398. </OMOBJ>
  1399. % An example of elements which do not have a MathML
  1400. % equivalent. This example comes from the fns1 CD
  1401. om2mml();
  1402. <OMOBJ>
  1403. <OMBIND>
  1404. <OMS cd="quant1" name="forall"/>
  1405. <OMBVAR>
  1406. <OMV name="n"/>
  1407. </OMBVAR>
  1408. <OMA>
  1409. <OMS cd="relation1" name="eq"/>
  1410. <OMA>
  1411. <OMS cd="fns2" name="apply_to_list"/>
  1412. <OMA>
  1413. <OMS cd="arith1" name="plus"/>
  1414. <OMA>
  1415. <OMS cd="list1" name="make_list"/>
  1416. <OMI> 1 </OMI>
  1417. <OMV name="n"/>
  1418. <OMS cd="fns1" name="identity"/>
  1419. </OMA>
  1420. </OMA>
  1421. </OMA>
  1422. <OMA>
  1423. <OMS cd="arith1" name="divide"/>
  1424. <OMA>
  1425. <OMS cd="arith1" name="times"/>
  1426. <OMV name="n"/>
  1427. <OMA>
  1428. <OMS cd="arith1" name="plus"/>
  1429. <OMV name="n"/>
  1430. <OMI> 1 </OMI>
  1431. </OMA>
  1432. </OMA>
  1433. <OMI> 2 </OMI>
  1434. </OMA>
  1435. </OMA>
  1436. </OMBIND>
  1437. </OMOBJ>
  1438. om2mml();
  1439. <OMOBJ>
  1440. <OMA>
  1441. <OMS cd="relation1" name="eq"/>
  1442. <OMA>
  1443. <OMS cd="linalg3" name="determinant"/>
  1444. <OMA>
  1445. <OMS cd="linalg3" name="identity"/>
  1446. <OMV name="n"/>
  1447. </OMA>
  1448. </OMA>
  1449. <OMS cd="alg1" name="one"/>
  1450. </OMA>
  1451. </OMOBJ>
  1452. om2mml();
  1453. <OMOBJ>
  1454. <OMA>
  1455. <OMS cd="relation1" name="eq"/>
  1456. <OMA>
  1457. <OMS cd="linalg3" name="transpose"/>
  1458. <OMA>
  1459. <OMS cd="linalg1" name="matrix"/>
  1460. <OMA>
  1461. <OMS cd="linalg1" name="matrixrow"/>
  1462. <OMI> 0 </OMI>
  1463. <OMI> 1 </OMI>
  1464. </OMA>
  1465. <OMA>
  1466. <OMS cd="linalg1" name="matrixrow"/>
  1467. <OMI> 2 </OMI>
  1468. <OMI> 3 </OMI>
  1469. </OMA>
  1470. </OMA>
  1471. </OMA>
  1472. <OMA>
  1473. <OMS cd="linalg1" name="matrix"/>
  1474. <OMA>
  1475. <OMS cd="linalg1" name="matrixrow"/>
  1476. <OMI> 0 </OMI>
  1477. <OMI> 2 </OMI>
  1478. </OMA>
  1479. <OMA>
  1480. <OMS cd="linalg1" name="matrixrow"/>
  1481. <OMI> 1 </OMI>
  1482. <OMI> 3 </OMI>
  1483. </OMA>
  1484. </OMA>
  1485. </OMA>
  1486. </OMOBJ>
  1487. om2mml();
  1488. <OMOBJ>
  1489. <OMA>
  1490. <OMS cd="logic2" name="equivalent"/>
  1491. <OMA>
  1492. <OMS cd="logic2" name="equivalent"/>
  1493. <OMV name="A"/>
  1494. <OMV name="B"/>
  1495. </OMA>
  1496. <OMA>
  1497. <OMS cd="logic1" name="and"/>
  1498. <OMA>
  1499. <OMS cd="logic1" name="implies"/>
  1500. <OMV name="A"/>
  1501. <OMV name="B"/>
  1502. </OMA>
  1503. <OMA>
  1504. <OMS cd="logic1" name="implies"/>
  1505. <OMV name="B"/>
  1506. <OMV name="A"/>
  1507. </OMA>
  1508. </OMA>
  1509. </OMA>
  1510. </OMOBJ>
  1511. om2mml();
  1512. <OMOBJ>
  1513. <OMATTR>
  1514. <OMATP>
  1515. <OMS cd="typmml" name="type"/>
  1516. <OMS cd="typmml" name="complex_polar_type"/>
  1517. </OMATP>
  1518. <OMV name="z"/>
  1519. </OMATTR>
  1520. </OMOBJ>
  1521. % Examples of assigning types to variables.
  1522. om2mml();
  1523. <OMOBJ>
  1524. <OMATTR>
  1525. <OMATP>
  1526. <OMS cd="typmml" name="type"/>
  1527. <OMS cd="typmml" name="integer_type"/>
  1528. </OMATP>
  1529. <OMV name="z"/>
  1530. </OMATTR>
  1531. </OMOBJ>
  1532. om2mml();
  1533. <OMOBJ>
  1534. <OMATTR>
  1535. <OMATP>
  1536. <OMS cd="typmml" name="type"/>
  1537. <OMS cd="typmml" name="real_type"/>
  1538. </OMATP>
  1539. <OMV name="z"/>
  1540. </OMATTR>
  1541. </OMOBJ>
  1542. om2mml();
  1543. <OMOBJ>
  1544. <OMATTR>
  1545. <OMATP>
  1546. <OMS cd="typmml" name="type"/>
  1547. <OMS cd="typmml" name="rational_type"/>
  1548. </OMATP>
  1549. <OMV name="z"/>
  1550. </OMATTR>
  1551. </OMOBJ>
  1552. % These examples show the use of attributions within OpenMath
  1553. % expressions.
  1554. om2mml();
  1555. <OMOBJ>
  1556. <OMA>
  1557. <OMATTR>
  1558. <OMATP>
  1559. <OMS cd="typmml" name="type"/>
  1560. <OMS cd="typmml" name="fn_type"/>
  1561. </OMATP>
  1562. <OMV name="f"/>
  1563. </OMATTR>
  1564. <OMI>1</OMI>
  1565. <OMI>2</OMI>
  1566. <OMI>3</OMI>
  1567. </OMA>
  1568. </OMOBJ>
  1569. om2mml();
  1570. <OMOBJ>
  1571. <OMA>
  1572. <OMS cd="arith1" name=times/>
  1573. <OMATTR>
  1574. <OMATP>
  1575. <OMS cd="typmml" name="type"/>
  1576. <OMS cd="typmml" name="matrix_type"/>
  1577. </OMATP>
  1578. <OMV name=A/>
  1579. </OMATTR>
  1580. <OMA>
  1581. <OMS cd="transc1" name=sin/>
  1582. <OMV name=x/>
  1583. </OMA>
  1584. </OMA>
  1585. </OMOBJ>
  1586. om2mml();
  1587. <OMOBJ>
  1588. <OMA>
  1589. <OMS cd="linalg3" name="vector_selector"/>
  1590. <OMI>2</OMI>
  1591. <OMA>
  1592. <OMS cd="linalg1" name="vector"/>
  1593. <OMI> 3 </OMI>
  1594. <OMI> 6 </OMI>
  1595. <OMI> 9 </OMI>
  1596. </OMA>
  1597. </OMA>
  1598. </OMOBJ>
  1599. om2mml();
  1600. <OMOBJ>
  1601. <OMA>
  1602. <OMS cd="linalg3" name="vector_selector"/>
  1603. <OMI>2</OMI>
  1604. <OMA>
  1605. <OMS cd="linalg1" name="matrixrow"/>
  1606. <OMI> 0 </OMI>
  1607. <OMI> 1 </OMI>
  1608. <OMI> 0 </OMI>
  1609. </OMA>
  1610. </OMA>
  1611. </OMOBJ>
  1612. om2mml();
  1613. <OMOBJ>
  1614. <OMBIND>
  1615. <OMS cd="quant1" name="forall"/>
  1616. <OMBVAR>
  1617. <OMV name="M"/>
  1618. </OMBVAR>
  1619. <OMA>
  1620. <OMS cd="logic1" name="and"/>
  1621. <OMA>
  1622. <OMS cd="relation1" name="eq"/>
  1623. <OMA>
  1624. <OMS cd="arith1" name="times"/>
  1625. <OMA>
  1626. <OMS cd="linalg3" name="zero"/>
  1627. <OMA>
  1628. <OMS cd="linalg3" name="rowcount"/>
  1629. <OMV name="M"/>
  1630. </OMA>
  1631. <OMA>
  1632. <OMS cd="linalg3" name="rowcount"/>
  1633. <OMV name="M"/>
  1634. </OMA>
  1635. </OMA>
  1636. <OMV name="M"/>
  1637. </OMA>
  1638. <OMA>
  1639. <OMS cd="linalg3" name="zero"/>
  1640. <OMA>
  1641. <OMS cd="linalg3" name="rowcount"/>
  1642. <OMV name="M"/>
  1643. </OMA>
  1644. <OMA>
  1645. <OMS cd="linalg3" name="columncount"/>
  1646. <OMV name="M"/>
  1647. </OMA>
  1648. </OMA>
  1649. </OMA>
  1650. <OMA>
  1651. <OMS cd="relation1" name="eq"/>
  1652. <OMA>
  1653. <OMS cd="arith1" name="times"/>
  1654. <OMV name="M"/>
  1655. <OMA>
  1656. <OMS cd="linalg3" name="zero"/>
  1657. <OMA>
  1658. <OMS cd="linalg3" name="columncount"/>
  1659. <OMV name="M"/>
  1660. </OMA>
  1661. <OMA>
  1662. <OMS cd="linalg3" name="columncount"/>
  1663. <OMV name="M"/>
  1664. </OMA>
  1665. </OMA>
  1666. </OMA>
  1667. <OMA>
  1668. <OMS cd="linalg3" name="zero"/>
  1669. <OMA>
  1670. <OMS cd="linalg3" name="rowcount"/>
  1671. <OMV name="M"/>
  1672. </OMA>
  1673. <OMA>
  1674. <OMS cd="linalg3" name="columncount"/>
  1675. <OMV name="M"/>
  1676. </OMA>
  1677. </OMA>
  1678. </OMA>
  1679. </OMA>
  1680. </OMBIND>
  1681. </OMOBJ>
  1682. om2mml();
  1683. <OMOBJ>
  1684. <OMA>
  1685. <OMS cd="linalg3" name="vector_selector"/>
  1686. <OMI> 1 </OMI>
  1687. <OMATTR>
  1688. <OMATP>
  1689. <OMS cd="typmml" name="type"/>
  1690. <OMS cd="typmml" name="vector_type"/>
  1691. </OMATP>
  1692. <OMV name=A/>
  1693. </OMATTR>
  1694. </OMA>
  1695. </OMOBJ>
  1696. om2mml();
  1697. <OMOBJ>
  1698. <OMA>
  1699. <OMS cd="linalg3" name="matrix_selector"/>
  1700. <OMI> 1 </OMI>
  1701. <OMI> 1 </OMI>
  1702. <OMATTR>
  1703. <OMATP>
  1704. <OMS cd="typmml" name="type"/>
  1705. <OMS cd="typmml" name="matrix_type"/>
  1706. </OMATP>
  1707. <OMV name=A/>
  1708. </OMATTR>
  1709. </OMA>
  1710. </OMOBJ>
  1711. % The following two examples were produced by REDUCE in MathML with the
  1712. % MathML interface, then translated to OpenMath. It is now possible to
  1713. % translate them back to MathML.
  1714. om2mml();
  1715. <OMOBJ>
  1716. <OMA>
  1717. <OMS cd="list1" name="list"/>
  1718. <OMA>
  1719. <OMS cd="list1" name="list"/>
  1720. <OMA>
  1721. <OMS cd="relation1" name="eq">
  1722. <OMV name="x"/>
  1723. <OMA>
  1724. <OMATTR>
  1725. <OMATP>
  1726. <OMS cd="typmml" name="type"/>
  1727. <OMS cd="typmml" name="fn_type"/>
  1728. </OMATP>
  1729. <OMV name="root_of"/>
  1730. </OMATTR>
  1731. <OMA>
  1732. <OMS cd="arith1" name="plus">
  1733. <OMA>
  1734. <OMS cd="arith1" name="minus">
  1735. <OMA>
  1736. <OMS cd="arith1" name="power">
  1737. <OMV name="y"/>
  1738. <OMV name="x_"/>
  1739. </OMA>
  1740. </OMA>
  1741. <OMA>
  1742. <OMS cd="arith1" name="minus">
  1743. <OMA>
  1744. <OMS cd="arith1" name="times">
  1745. <OMA>
  1746. <OMS cd="calculus1" name="int"/>
  1747. <OMBIND>
  1748. <OMS cd="fns1" name="lambda"/>
  1749. <OMBVAR>
  1750. <OMV name="x_"/>
  1751. </OMBVAR>
  1752. <OMA>
  1753. <OMS cd="arith1" name="power">
  1754. <OMV name="x_"/>
  1755. <OMV name="x_"/>
  1756. </OMA>
  1757. </OMBIND>
  1758. </OMA>
  1759. <OMV name="y"/>
  1760. </OMA>
  1761. </OMA>
  1762. <OMV name="x_"/>
  1763. <OMV name="y"/>
  1764. </OMA>
  1765. <OMV name="x_"/>
  1766. <OMV name="tag_1"/>
  1767. </OMA>
  1768. </OMA>
  1769. <OMA>
  1770. <OMS cd="relation1" name="eq">
  1771. <OMV name="a"/>
  1772. <OMA>
  1773. <OMS cd="arith1" name="plus">
  1774. <OMV name="x"/>
  1775. <OMV name="y"/>
  1776. </OMA>
  1777. </OMA>
  1778. </OMA>
  1779. </OMA>
  1780. </OMOBJ>
  1781. om2mml();
  1782. <OMOBJ>
  1783. <OMA>
  1784. <OMS cd="list1" name="list"/>
  1785. <OMA>
  1786. <OMS cd="list1" name="list"/>
  1787. <OMA>
  1788. <OMS cd="relation1" name="eq">
  1789. <OMV name="x"/>
  1790. <OMA>
  1791. <OMATTR>
  1792. <OMATP>
  1793. <OMS cd="typmml" name="type"/>
  1794. <OMS cd="typmml" name="fn_type"/>
  1795. </OMATP>
  1796. <OMV name="root_of"/>
  1797. </OMATTR>
  1798. <OMA>
  1799. <OMS cd="arith1" name="plus">
  1800. <OMA>
  1801. <OMS cd="arith1" name="times">
  1802. <OMA>
  1803. <OMS cd="transc1" name="exp">
  1804. <OMA>
  1805. <OMS cd="arith1" name="plus">
  1806. <OMS cd="nums1" name="i"/>
  1807. <OMV name="x_"/>
  1808. </OMA>
  1809. </OMA>
  1810. <OMV name="y"/>
  1811. </OMA>
  1812. <OMA>
  1813. <OMS cd="transc1" name="exp">
  1814. <OMA>
  1815. <OMS cd="arith1" name="plus">
  1816. <OMS cd="nums1" name="i"/>
  1817. <OMV name="x_"/>
  1818. </OMA>
  1819. </OMA>
  1820. <OMA>
  1821. <OMS cd="arith1" name="power">
  1822. <OMV name="x_"/>
  1823. <OMA>
  1824. <OMS cd="arith1" name="plus">
  1825. <OMV name="y"/>
  1826. <OMI> 1 </OMI>
  1827. </OMA>
  1828. </OMA>
  1829. <OMA>
  1830. <OMS cd="arith1" name="times">
  1831. <OMA>
  1832. <OMS cd="calculus1" name="int"/>
  1833. <OMBIND>
  1834. <OMS cd="fns1" name="lambda"/>
  1835. <OMBVAR>
  1836. <OMV name="x_"/>
  1837. </OMBVAR>
  1838. <OMA>
  1839. <OMS cd="arith1" name="power">
  1840. <OMV name="x_"/>
  1841. <OMV name="x_"/>
  1842. </OMA>
  1843. </OMBIND>
  1844. </OMA>
  1845. <OMA>
  1846. <OMS cd="arith1" name="power">
  1847. <OMV name="y"/>
  1848. <OMI> 2 </OMI>
  1849. </OMA>
  1850. </OMA>
  1851. <OMA>
  1852. <OMS cd="arith1" name="times">
  1853. <OMA>
  1854. <OMS cd="calculus1" name="int"/>
  1855. <OMBIND>
  1856. <OMS cd="fns1" name="lambda"/>
  1857. <OMBVAR>
  1858. <OMV name="x_"/>
  1859. </OMBVAR>
  1860. <OMA>
  1861. <OMS cd="arith1" name="power">
  1862. <OMV name="x_"/>
  1863. <OMV name="x_"/>
  1864. </OMA>
  1865. </OMBIND>
  1866. </OMA>
  1867. <OMV name="y"/>
  1868. </OMA>
  1869. </OMA>
  1870. <OMV name="x_"/>
  1871. <OMV name="tag_2"/>
  1872. </OMA>
  1873. </OMA>
  1874. <OMA>
  1875. <OMS cd="relation1" name="eq">
  1876. <OMV name="z"/>
  1877. <OMV name="y"/>
  1878. </OMA>
  1879. </OMA>
  1880. </OMA>
  1881. </OMOBJ>
  1882. om2mml();
  1883. <OMOBJ>
  1884. <OMATTR>
  1885. <OMATP>
  1886. <OMS cd="cc" name="type"/>
  1887. <OMS cd="omtypes" name="integer"/>
  1888. </OMATP>
  1889. <OMI> 0 </OMI>
  1890. </OMATTR>
  1891. </OMOBJ>
  1892. om2mml();
  1893. <OMOBJ>
  1894. <OMATTR>
  1895. <OMATP>
  1896. <OMS cd="cc" name="type"/>
  1897. <OMS cd="omtypes" name="float"/>
  1898. </OMATP>
  1899. <OMF dec=1.0/>
  1900. </OMATTR>
  1901. </OMOBJ>
  1902. om2mml();
  1903. <OMOBJ>
  1904. <OMA>
  1905. <OMS name="complex_cartesian" cd="nums1"/>
  1906. <OMV name="x"/>
  1907. <OMV name="y"/>
  1908. </OMA>
  1909. </OMOBJ>
  1910. om2mml();
  1911. <OMOBJ>
  1912. <OMA>
  1913. <OMS name="complex_polar" cd="nums1"/>
  1914. <OMV name="x"/>
  1915. <OMV name="y"/>
  1916. </OMA>
  1917. </OMOBJ>
  1918. om2mml();
  1919. <OMOBJ>
  1920. <OMA>
  1921. <OMS name="rational" cd="nums1"/>
  1922. <OMV name="x"/>
  1923. <OMV name="y"/>
  1924. </OMA>
  1925. </OMOBJ>
  1926. om2mml();
  1927. <OMOBJ>
  1928. <OMA>
  1929. <OMS name="complex_cartesian" cd="nums1"/>
  1930. <OMI>4</OMI>
  1931. <OMI>2</OMI>
  1932. </OMA>
  1933. </OMOBJ>
  1934. om2mml();
  1935. <OMOBJ>
  1936. <OMA>
  1937. <OMS name="complex_polar" cd="nums1"/>
  1938. <OMI>4</OMI>
  1939. <OMI>2</OMI>
  1940. </OMA>
  1941. </OMOBJ>
  1942. om2mml();
  1943. <OMOBJ>
  1944. <OMA>
  1945. <OMS name="rational" cd="nums1"/>
  1946. <OMI>4</OMI>
  1947. <OMI>2</OMI>
  1948. </OMA>
  1949. </OMOBJ>
  1950. end;