mathmlom.tst 67 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398
  1. load mathmlom;
  2. %in "$reduce/packages/mathml/examples.mml";
  3. % Description: This file contains a long list of examples demonstrating the abilities of
  4. % the translator. Most of these examples come straight from the MathML spec. They
  5. % were used during the development of the interface and should all be correctly
  6. % translated into OpenMath.
  7. %
  8. % Version 17 April 2000
  9. %
  10. % Author: Luis Alvarez Sobreviela
  11. %
  12. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  13. mml2om();
  14. <math>
  15. <apply><sin/>
  16. <apply><plus/>
  17. <apply><cos/>
  18. <ci> x </ci>
  19. </apply>
  20. <apply><power/>
  21. <ci> x </ci>
  22. <cn> 3 </cn>
  23. </apply>
  24. </apply>
  25. </apply>
  26. </math>
  27. mml2om();
  28. <math>
  29. <apply><sin/>
  30. <apply><plus/>
  31. <apply><cos/>
  32. <ci> x </ci>
  33. </apply>
  34. <apply><power/>
  35. <ci type="real"> x </ci>
  36. <cn> 3 </cn>
  37. </apply>
  38. </apply>
  39. </apply>
  40. </math>
  41. mml2om();
  42. <math>
  43. <set type=normal>
  44. <ci> b </ci>
  45. <cn> 2 </cn>
  46. <ci> c </ci>
  47. </set>
  48. </math>
  49. mml2om();
  50. <math>
  51. <set type="multiset">
  52. <ci> b </ci>
  53. <cn> 2 </cn>
  54. <ci> c </ci>
  55. </set>
  56. </math>
  57. mml2om();
  58. <math>
  59. <vector>
  60. <ci> b </ci>
  61. <cn> 2 </cn>
  62. <ci> c </ci>
  63. </vector>
  64. </math>
  65. mml2om();
  66. <math>
  67. <interval closure=closed>
  68. <ci> b </ci>
  69. <cn> 2 </cn>
  70. </interval>
  71. </math>
  72. mml2om();
  73. <math>
  74. <interval closure=open>
  75. <ci> b </ci>
  76. <cn> 2 </cn>
  77. </interval>
  78. </math>
  79. mml2om();
  80. <math>
  81. <interval closure=open-closed>
  82. <ci> b </ci>
  83. <cn> 2 </cn>
  84. </interval>
  85. </math>
  86. mml2om();
  87. <math>
  88. <interval closure=closed-open>
  89. <ci> b </ci>
  90. <cn> 2 </cn>
  91. </interval>
  92. </math>
  93. mml2om();
  94. <math>
  95. <cn type="complex-cartesian"> 6 <sep/> 3 </cn>
  96. </math>
  97. mml2om();
  98. <math>
  99. <cn type="complex-polar"> 6 <sep/> 3 </cn>
  100. </math>
  101. mml2om();
  102. <math>
  103. <cn type="integer" base="10"> 6 </cn>
  104. </math>
  105. mml2om();
  106. <math>
  107. <apply><sum/>
  108. <bvar>
  109. <ci> x </ci>
  110. </bvar>
  111. <lowlimit>
  112. <ci> a </ci>
  113. </lowlimit>
  114. <uplimit>
  115. <ci> b </ci>
  116. </uplimit>
  117. <apply><plus/>
  118. <ci> x </ci>
  119. <apply><sin/>
  120. <ci> y </ci>
  121. </apply>
  122. </apply>
  123. </apply>
  124. </math>
  125. mml2om();
  126. <math>
  127. <apply><int/>
  128. <bvar>
  129. <ci> x </ci>
  130. </bvar>
  131. <lowlimit>
  132. <ci> a </ci>
  133. </lowlimit>
  134. <uplimit>
  135. <ci> b </ci>
  136. </uplimit>
  137. <apply><fn><ci> f </ci></fn>
  138. <ci> x </ci>
  139. </apply>
  140. </apply>
  141. </math>
  142. mml2om();
  143. <math>
  144. <lambda>
  145. <bvar>
  146. <ci> x </ci>
  147. </bvar>
  148. <apply><sin/>
  149. <ci> x </ci>
  150. </apply>
  151. </lambda>
  152. </math>
  153. mml2om();
  154. <math>
  155. <apply><limit/>
  156. <bvar>
  157. <ci> x </ci>
  158. </bvar>
  159. <lowlimit>
  160. <cn> 0 </cn>
  161. </lowlimit>
  162. <apply><sin/>
  163. <ci> x </ci>
  164. </apply>
  165. </apply>
  166. </math>
  167. mml2om();
  168. <math>
  169. <apply><limit/>
  170. <bvar>
  171. <ci> x </ci>
  172. </bvar>
  173. <condition>
  174. <apply>
  175. <tendsto type="above"/>
  176. <ci> x </ci>
  177. <ci> a </ci>
  178. </apply>
  179. </condition>
  180. <apply><sin/>
  181. <ci> x </ci>
  182. </apply>
  183. </apply>
  184. </math>
  185. mml2om();
  186. <math>
  187. <apply><not/>
  188. <apply><exists/>
  189. <bvar>
  190. <ci> x </ci>
  191. </bvar>
  192. <bvar>
  193. <ci> y </ci>
  194. </bvar>
  195. <bvar>
  196. <ci> z </ci>
  197. </bvar>
  198. <bvar>
  199. <ci> n </ci>
  200. </bvar>
  201. <apply><and/>
  202. <apply><gt/>
  203. <ci> n </ci>
  204. <cn type="integer"> 2 </cn>
  205. </apply>
  206. <apply><eq/>
  207. <apply><plus/>
  208. <apply><power/>
  209. <ci> x </ci>
  210. <ci> n </ci>
  211. </apply>
  212. <apply><power/>
  213. <ci> y </ci>
  214. <ci> n </ci>
  215. </apply>
  216. </apply>
  217. <apply><power/>
  218. <ci> z </ci>
  219. <ci> n </ci>
  220. </apply>
  221. </apply>
  222. </apply>
  223. </apply>
  224. </apply>
  225. </math>
  226. mml2om();
  227. <math>
  228. <matrix>
  229. <matrixrow>
  230. <cn> 0 </cn> <cn> 1 </cn> <cn> 0 </cn>
  231. </matrixrow>
  232. <matrixrow>
  233. <cn> 0 </cn> <cn> 0 </cn> <cn> 1 </cn>
  234. </matrixrow>
  235. <matrixrow>
  236. <cn> 1 </cn> <cn> 0 </cn> <cn> 0 </cn>
  237. </matrixrow>
  238. </matrix>
  239. </math>
  240. mml2om();
  241. <math>
  242. <apply><int/>
  243. <bvar>
  244. <ci>x</ci>
  245. </bvar>
  246. <apply><power/>
  247. <ci>x</ci>
  248. <cn type="integer">2</cn>
  249. </apply>
  250. </apply>
  251. </math>
  252. mml2om();
  253. <math>
  254. <apply><int/>
  255. <bvar>
  256. <ci> x </ci>
  257. </bvar>
  258. <apply><sin/>
  259. <ci> x </ci>
  260. </apply>
  261. </apply>
  262. </math>
  263. mml2om();
  264. <math>
  265. <apply><sum/>
  266. <bvar>
  267. <ci> x </ci>
  268. </bvar>
  269. <lowlimit>
  270. <ci> a </ci>
  271. </lowlimit>
  272. <uplimit>
  273. <ci> b </ci>
  274. </uplimit>
  275. <apply><fn><ci> f </ci></fn>
  276. <ci> x </ci>
  277. </apply>
  278. </apply>
  279. </math>
  280. mml2om();
  281. <math>
  282. <apply><diff/>
  283. <bvar>
  284. <ci> x </ci>
  285. </bvar>
  286. <apply><fn><ci>f</ci></fn>
  287. <ci> x </ci>
  288. </apply>
  289. </apply>
  290. </math>
  291. mml2om();
  292. <math>
  293. <apply><diff/>
  294. <bvar>
  295. <ci> x </ci>
  296. <degree>
  297. <cn> 2 </cn>
  298. </degree>
  299. </bvar>
  300. <apply><fn><ci>f</ci></fn>
  301. <ci> x </ci>
  302. </apply>
  303. </apply>
  304. </math>
  305. mml2om();
  306. <math>
  307. <apply><diff/>
  308. <bvar>
  309. <ci> x </ci>
  310. <degree>
  311. <cn> 3 </cn>
  312. </degree>
  313. </bvar>
  314. <apply><fn><ci>f</ci></fn>
  315. <ci> x </ci>
  316. </apply>
  317. </apply>
  318. </math>
  319. mml2om();
  320. <math>
  321. <set type=normal>
  322. <ci> b </ci>
  323. <ci> a </ci>
  324. <ci> c </ci>
  325. </set>
  326. </math>
  327. mml2om();
  328. <math>
  329. <list>
  330. <ci> b </ci>
  331. <ci> a </ci>
  332. <ci> c </ci>
  333. </list>
  334. </math>
  335. mml2om();
  336. <math>
  337. <list order="lexicographic">
  338. <ci> b </ci>
  339. <ci> a </ci>
  340. <ci> c </ci>
  341. </list>
  342. </math>
  343. mml2om();
  344. <math>
  345. <apply><union definitionurl="www.nag.co.uk"/>
  346. <ci type="set"> A </ci>
  347. <ci type="set"> B </ci>
  348. </apply>
  349. </math>
  350. mml2om();
  351. <math>
  352. <apply><union/>
  353. <set type="normal">
  354. <ci> b </ci>
  355. <cn> 2 </cn>
  356. <ci> c </ci>
  357. </set>
  358. <set>
  359. <ci> b </ci>
  360. <ci> r </ci>
  361. <cn> 2 </cn>
  362. <cn> 4 </cn>
  363. <ci> c </ci>
  364. </set>
  365. </apply>
  366. </math>
  367. mml2om();
  368. <math>
  369. <apply><intersect definitionurl="www.mit.edu"/>
  370. <ci type="set"> A </ci>
  371. <ci type="set"> B </ci>
  372. </apply>
  373. </math>
  374. mml2om();
  375. <math>
  376. <apply><intersect/>
  377. <set>
  378. <ci> b </ci>
  379. <cn> 2 </cn>
  380. <ci> c </ci>
  381. </set>
  382. <set>
  383. <ci> b </ci>
  384. <ci> r </ci>
  385. <cn> 2 </cn>
  386. <cn> 4 </cn>
  387. <ci> c </ci>
  388. </set>
  389. </apply>
  390. </math>
  391. mml2om();
  392. <math>
  393. <reln><in definitionurl="www.www.www"/>
  394. <ci> a </ci>
  395. <ci type="set"> A </ci>
  396. </reln>
  397. </math>
  398. mml2om();
  399. <math>
  400. <reln><notin definitionurl="www.www.www"/>
  401. <ci> a </ci>
  402. <ci> A </ci>
  403. </reln>
  404. </math>
  405. mml2om();
  406. <math>
  407. <reln><prsubset definitionurl="www.www.www"/>
  408. <ci> A </ci>
  409. <ci> B </ci>
  410. </reln>
  411. </math>
  412. mml2om();
  413. <math>
  414. <reln><notsubset definitionurl="www.www.www"/>
  415. <ci> A </ci>
  416. <ci> B </ci>
  417. </reln>
  418. </math>
  419. mml2om();
  420. <math>
  421. <reln><notprsubset definitionurl="www.www.www"/>
  422. <ci> A </ci>
  423. <ci> B </ci>
  424. </reln>
  425. </math>
  426. mml2om();
  427. <math>
  428. <apply><setdiff definitionurl="www.www.www"/>
  429. <ci> A </ci>
  430. <ci> B </ci>
  431. </apply>
  432. </math>
  433. mml2om();
  434. <math>
  435. <apply><sum/>
  436. <bvar>
  437. <ci> x </ci>
  438. </bvar>
  439. <lowlimit>
  440. <ci> a </ci>
  441. </lowlimit>
  442. <uplimit>
  443. <ci> b </ci>
  444. </uplimit>
  445. <apply><fn><ci> f </ci></fn>
  446. <ci> x </ci>
  447. </apply>
  448. </apply>
  449. </math>
  450. mml2om();
  451. <math>
  452. <apply><product/>
  453. <bvar>
  454. <ci> x </ci>
  455. </bvar>
  456. <lowlimit>
  457. <ci> a </ci>
  458. </lowlimit>
  459. <uplimit>
  460. <ci> b </ci>
  461. </uplimit>
  462. <apply><fn><ci> f </ci></fn>
  463. <ci> x </ci>
  464. </apply>
  465. </apply>
  466. </math>
  467. mml2om();
  468. <math>
  469. <apply><limit/>
  470. <bvar>
  471. <ci> V </ci>
  472. </bvar>
  473. <condition>
  474. <apply>
  475. <tendsto type=above/>
  476. <ci> V </ci>
  477. <cn> 0 </cn>
  478. </apply>
  479. </condition>
  480. <apply><divide/>
  481. <apply><int/>
  482. <bvar>
  483. <ci> S</ci>
  484. </bvar>
  485. <ci> a </ci>
  486. </apply>
  487. <ci> V </ci>
  488. </apply>
  489. </apply>
  490. </math>
  491. mml2om();
  492. <math>
  493. <apply><limit/>
  494. <bvar>
  495. <ci> x </ci>
  496. </bvar>
  497. <lowlimit>
  498. <cn> 0 </cn>
  499. </lowlimit>
  500. <apply><sin/>
  501. <ci> x </ci>
  502. </apply>
  503. </apply>
  504. </math>
  505. mml2om();
  506. <math>
  507. <apply><limit/>
  508. <bvar>
  509. <ci> x </ci>
  510. </bvar>
  511. <condition>
  512. <reln>
  513. <tendsto type="above"/>
  514. <ci> x </ci>
  515. <ci> a </ci>
  516. </reln>
  517. </condition>
  518. <apply><sin/>
  519. <ci> x </ci>
  520. </apply>
  521. </apply>
  522. </math>
  523. mml2om();
  524. <math>
  525. <apply><sin/>
  526. <apply><plus/>
  527. <apply><cos/>
  528. <ci> x </ci>
  529. </apply>
  530. <apply><power/>
  531. <ci> x </ci>
  532. <cn> 3 </cn>
  533. </apply>
  534. </apply>
  535. </apply>
  536. </math>
  537. mml2om();
  538. <math>
  539. <apply><mean/>
  540. <ci> b </ci>
  541. <ci> r </ci>
  542. <cn> 2 </cn>
  543. <cn> 4 </cn>
  544. <ci> c </ci>
  545. </apply>
  546. </math>
  547. mml2om();
  548. <math>
  549. <apply><sdev/>
  550. <ci> b </ci>
  551. <ci> r </ci>
  552. <cn> 2 </cn>
  553. <cn> 4 </cn>
  554. <ci> c </ci>
  555. </apply>
  556. </math>
  557. mml2om();
  558. <math>
  559. <apply><var/>
  560. <ci> b </ci>
  561. <ci> r </ci>
  562. <cn> 2 </cn>
  563. <cn> 4 </cn>
  564. <ci> c </ci>
  565. </apply>
  566. </math>
  567. mml2om();
  568. <math>
  569. <vector>
  570. <cn> 1 </cn>
  571. <cn> 2 </cn>
  572. <cn> 3 </cn>
  573. <ci> x </ci>
  574. </vector>
  575. </math>
  576. mml2om();
  577. <math>
  578. <matrix>
  579. <matrixrow>
  580. <cn> 0 </cn> <cn> 1 </cn> <cn> 0 </cn>
  581. </matrixrow>
  582. <matrixrow>
  583. <cn> 0 </cn> <cn> 0 </cn> <cn> 1 </cn>
  584. </matrixrow>
  585. <matrixrow>
  586. <cn> 1 </cn> <cn> 0 </cn> <cn> 0 </cn>
  587. </matrixrow>
  588. </matrix>
  589. </math>
  590. mml2om();
  591. <math>
  592. <apply><determinant/>
  593. <matrix>
  594. <matrixrow>
  595. <cn> 3 </cn> <cn> 1 </cn> <cn> 5 </cn>
  596. </matrixrow>
  597. <matrixrow>
  598. <cn> 7 </cn> <cn> 0 </cn> <cn> 2 </cn>
  599. </matrixrow>
  600. <matrixrow>
  601. <cn> 1 </cn> <cn> 7 </cn> <cn> 8 </cn>
  602. </matrixrow>
  603. </matrix>
  604. </apply>
  605. </math>
  606. mml2om();
  607. <math>
  608. <apply><transpose/>
  609. <matrix>
  610. <matrixrow>
  611. <cn> 3 </cn> <cn> 1 </cn> <cn> 5 </cn>
  612. </matrixrow>
  613. <matrixrow>
  614. <cn> 7 </cn> <cn> 0 </cn> <cn> 2 </cn>
  615. </matrixrow>
  616. <matrixrow>
  617. <cn> 1 </cn> <cn> 7 </cn> <cn> 8 </cn>
  618. </matrixrow>
  619. </matrix>
  620. </apply>
  621. </math>
  622. mml2om();
  623. <math>
  624. <apply><selector/>
  625. <matrix>
  626. <matrixrow>
  627. <cn> 1 </cn> <cn> 2 </cn>
  628. </matrixrow>
  629. <matrixrow>
  630. <cn> 3 </cn> <cn> 4 </cn>
  631. </matrixrow>
  632. </matrix>
  633. <cn> 1 </cn>
  634. </apply>
  635. </math>
  636. mml2om();
  637. <math>
  638. <apply><select/>
  639. <matrix>
  640. <matrixrow>
  641. <cn> 1 </cn> <cn> 2 </cn>
  642. </matrixrow>
  643. <matrixrow>
  644. <cn> 3 </cn> <cn> 4 </cn>
  645. </matrixrow>
  646. </matrix>
  647. <cn> 2 </cn>
  648. <cn> 2 </cn>
  649. </apply>
  650. </math>
  651. mml2om();
  652. <math>
  653. <apply><determinant/>
  654. <matrix>
  655. <matrixrow>
  656. <ci>a</ci>
  657. <cn type="integer">1</cn>
  658. </matrixrow>
  659. <matrixrow>
  660. <cn type="integer">2</cn>
  661. <ci>s</ci>
  662. </matrixrow>
  663. </matrix>
  664. </apply>
  665. </math>
  666. mml2om();
  667. <math>
  668. <apply><determinant/>
  669. <apply><transpose/>
  670. <matrix>
  671. <matrixrow>
  672. <cn type="integer">1</cn>
  673. <cn type="integer">2</cn>
  674. <cn type="integer">3</cn>
  675. <cn type="integer">4</cn>
  676. </matrixrow>
  677. <matrixrow>
  678. <cn type="integer">1</cn>
  679. <cn type="integer">2</cn>
  680. <cn type="integer">1</cn>
  681. <cn type="integer">2</cn>
  682. </matrixrow>
  683. <matrixrow>
  684. <cn type="integer">2</cn>
  685. <cn type="integer">3</cn>
  686. <cn type="integer">2</cn>
  687. <cn type="integer">1</cn>
  688. </matrixrow>
  689. <matrixrow>
  690. <cn type="integer">2</cn>
  691. <cn type="integer">1</cn>
  692. <cn type="integer">1</cn>
  693. <cn type="integer">1</cn>
  694. </matrixrow>
  695. </matrix>
  696. </apply>
  697. </apply>
  698. </math>
  699. mml2om();
  700. <math>
  701. <apply><plus/>
  702. <apply><times/>
  703. <cn type="integer">2</cn>
  704. <apply><cos/>
  705. <ci>x</ci>
  706. </apply>
  707. <ci>x</ci>
  708. </apply>
  709. <apply><minus/>
  710. <apply><times/>
  711. <apply><sin/>
  712. <ci>x</ci>
  713. </apply>
  714. <apply><power/>
  715. <ci>x</ci>
  716. <cn type="integer">2</cn>
  717. </apply>
  718. </apply>
  719. </apply>
  720. </apply>
  721. </math>
  722. mml2om();
  723. <math>
  724. <list>
  725. <reln><eq/>
  726. <ci>x</ci>
  727. <apply><plus/>
  728. <cn type="constant">&ImaginaryI;</cn>
  729. <apply><minus/>
  730. <cn type="integer">1</cn>
  731. </apply>
  732. </apply>
  733. </reln>
  734. <reln><eq/>
  735. <ci>x</ci>
  736. <apply><plus/>
  737. <apply><minus/>
  738. <cn type="constant">&ImaginaryI;</cn>
  739. </apply>
  740. <apply><minus/>
  741. <cn type="integer">1</cn>
  742. </apply>
  743. </apply>
  744. </reln>
  745. </list>
  746. </math>
  747. mml2om();
  748. <math>
  749. <apply><plus/>
  750. <apply><minus/>
  751. <apply><times/>
  752. <apply><cos/>
  753. <apply><times/>
  754. <ci>x</ci>
  755. <ci>y</ci>
  756. </apply>
  757. </apply>
  758. <ci>x</ci>
  759. <ci>y</ci>
  760. </apply>
  761. </apply>
  762. <apply><times/>
  763. <apply><power/>
  764. <cn type="integer">2</cn>
  765. <apply><times/>
  766. <ci>x</ci>
  767. <ci>y</ci>
  768. </apply>
  769. </apply>
  770. <apply><power/>
  771. <apply><log/>
  772. <cn type="integer">2</cn>
  773. </apply>
  774. <cn type="integer">2</cn>
  775. </apply>
  776. <ci>x</ci>
  777. <ci>y</ci>
  778. </apply>
  779. <apply><times/>
  780. <apply><power/>
  781. <cn type="integer">2</cn>
  782. <apply><times/>
  783. <ci>x</ci>
  784. <ci>y</ci>
  785. </apply>
  786. </apply>
  787. <apply><log/>
  788. <cn type="integer">2</cn>
  789. </apply>
  790. </apply>
  791. <apply><minus/>
  792. <apply><sin/>
  793. <apply><times/>
  794. <ci>x</ci>
  795. <ci>y</ci>
  796. </apply>
  797. </apply>
  798. </apply>
  799. <cn type="integer">1</cn>
  800. </apply>
  801. </math>
  802. mml2om();
  803. <math>
  804. <reln><eq/>
  805. <cn>2</cn>
  806. <cn>2</cn>
  807. <cn>2</cn>
  808. </reln>
  809. </math>
  810. mml2om();
  811. <math>
  812. <reln><eq/>
  813. <cn>2</cn>
  814. <ci>A</ci>
  815. <ci>u</ci>
  816. </reln>
  817. </math>
  818. mml2om();
  819. <math>
  820. <reln><neq/>
  821. <cn>2</cn>
  822. <cn>2</cn>
  823. </reln>
  824. </math>
  825. mml2om();
  826. <math>
  827. <reln><neq/>
  828. <cn>2</cn>
  829. <ci>A</ci>
  830. </reln>
  831. </math>
  832. mml2om();
  833. <math>
  834. <reln><lt/>
  835. <cn>2</cn>
  836. <cn>2</cn>
  837. <cn>2</cn>
  838. </reln>
  839. </math>
  840. mml2om();
  841. <math>
  842. <reln><lt/>
  843. <cn>2</cn>
  844. <ci>A</ci>
  845. <ci>u</ci>
  846. </reln>
  847. </math>
  848. mml2om();
  849. <math>
  850. <reln><gt/>
  851. <cn>2</cn>
  852. <cn>2</cn>
  853. <cn>2</cn>
  854. </reln>
  855. </math>
  856. mml2om();
  857. <math>
  858. <reln><gt/>
  859. <cn>2</cn>
  860. <ci>A</ci>
  861. <ci>u</ci>
  862. </reln>
  863. </math>
  864. mml2om();
  865. <math>
  866. <reln><geq/>
  867. <cn>2</cn>
  868. <cn>2</cn>
  869. <cn>2</cn>
  870. </reln>
  871. </math>
  872. mml2om();
  873. <math>
  874. <reln><geq/>
  875. <cn>2</cn>
  876. <ci>A</ci>
  877. <ci>u</ci>
  878. </reln>
  879. </math>
  880. mml2om();
  881. <math>
  882. <reln><leq/>
  883. <cn>2</cn>
  884. <cn>2</cn>
  885. <cn>2</cn>
  886. </reln>
  887. </math>
  888. mml2om();
  889. <math>
  890. <reln><leq/>
  891. <cn>2</cn>
  892. <ci>A</ci>
  893. <ci>u</ci>
  894. </reln>
  895. </math>
  896. %The following examples work perfectly when read
  897. %in by mml2om() and prove that the tags employed
  898. %work correctly. The ir output can then be used
  899. %to see if the mathml produced works:
  900. mml2om();
  901. <math>
  902. <apply><int/>
  903. <bvar>
  904. <ci>x</ci>
  905. </bvar>
  906. <lowlimit>
  907. <cn type="integer">0</cn>
  908. </lowlimit>
  909. <uplimit>
  910. <cn type="integer">1</cn>
  911. </uplimit>
  912. <apply><power/>
  913. <ci>x</ci>
  914. <cn type="integer">2</cn>
  915. </apply>
  916. </apply>
  917. </math>
  918. mml2om();
  919. <math>
  920. <apply><int/>
  921. <bvar>
  922. <ci>x</ci>
  923. </bvar>
  924. <lowlimit>
  925. <cn type="integer">1</cn>
  926. </lowlimit>
  927. <uplimit>
  928. <cn type="constant">&infin;</cn>
  929. </uplimit>
  930. <ci>x</ci>
  931. </apply>
  932. </math>
  933. mml2om();
  934. <math>
  935. <apply><int/>
  936. <bvar>
  937. <ci> x </ci>
  938. </bvar>
  939. <interval>
  940. <ci> a </ci>
  941. <ci> b </ci>
  942. </interval>
  943. <apply><cos/>
  944. <ci> x </ci>
  945. </apply>
  946. </apply>
  947. </math>
  948. %this example is MathML1.0 and when passed
  949. %through function mml2om() it translates it to
  950. %MathML2.0
  951. mml2om();
  952. <math>
  953. <apply><diff/>
  954. <bvar>
  955. <ci> x </ci>
  956. <degree>
  957. <cn> 2 </cn>
  958. </degree>
  959. </bvar>
  960. <apply><fn><ci>f</ci></fn>
  961. <ci> x </ci>
  962. </apply>
  963. </apply>
  964. </math>
  965. mml2om();
  966. <math>
  967. <list>
  968. <apply><plus/>
  969. <ci> x </ci>
  970. <ci> y </ci>
  971. </apply>
  972. <cn> 3 </cn>
  973. <cn> 7 </cn>
  974. </list>
  975. </math>
  976. mml2om();
  977. <math>
  978. <interval closure="open-closed">
  979. <ci> a </ci>
  980. <ci> b </ci>
  981. </interval>
  982. </math>
  983. mml2om();
  984. <math>
  985. <interval>
  986. <ci> a </ci>
  987. <ci> b </ci>
  988. </interval>
  989. </math>
  990. mml2om();
  991. <math>
  992. <list>
  993. <list>
  994. <reln><eq/>
  995. <ci>x</ci>
  996. <apply>
  997. <csymbol definitionURL="..." encoding="...">
  998. <ci>root_of</ci>
  999. </csymbol>
  1000. <apply><plus/>
  1001. <apply><minus/>
  1002. <apply><power/>
  1003. <ci>y</ci>
  1004. <ci>x_</ci>
  1005. </apply>
  1006. </apply>
  1007. <apply><minus/>
  1008. <apply><times/>
  1009. <apply><int/>
  1010. <bvar>
  1011. <ci>x_</ci>
  1012. </bvar>
  1013. <apply><power/>
  1014. <ci>x_</ci>
  1015. <ci>x_</ci>
  1016. </apply>
  1017. </apply>
  1018. <ci>y</ci>
  1019. </apply>
  1020. </apply>
  1021. <ci>x_</ci>
  1022. <ci>y</ci>
  1023. </apply>
  1024. <ci>x_</ci>
  1025. <ci>tag_1</ci>
  1026. </apply>
  1027. </reln>
  1028. <reln><eq/>
  1029. <ci>a</ci>
  1030. <apply><plus/>
  1031. <ci>x</ci>
  1032. <ci>y</ci>
  1033. </apply>
  1034. </reln>
  1035. </list>
  1036. </list>
  1037. </math>
  1038. mml2om();
  1039. <math>
  1040. <list>
  1041. <list>
  1042. <reln><eq/>
  1043. <ci>x</ci>
  1044. <apply>
  1045. <csymbol definitionURL="..." encoding="...">
  1046. <ci>root_of</ci>
  1047. </csymbol>
  1048. <apply><plus/>
  1049. <apply><times/>
  1050. <apply><exp/>
  1051. <apply><plus/>
  1052. <cn type="constant">&ImaginaryI;</cn>
  1053. <ci>x_</ci>
  1054. </apply>
  1055. </apply>
  1056. <ci>y</ci>
  1057. </apply>
  1058. <apply><exp/>
  1059. <apply><plus/>
  1060. <cn type="constant">&ImaginaryI;</cn>
  1061. <ci>x_</ci>
  1062. </apply>
  1063. </apply>
  1064. <apply><power/>
  1065. <ci>x_</ci>
  1066. <apply><plus/>
  1067. <ci>y</ci>
  1068. <cn type="integer">1</cn>
  1069. </apply>
  1070. </apply>
  1071. <apply><times/>
  1072. <apply><int/>
  1073. <bvar>
  1074. <ci>x_</ci>
  1075. </bvar>
  1076. <apply><power/>
  1077. <ci>x_</ci>
  1078. <ci>x_</ci>
  1079. </apply>
  1080. </apply>
  1081. <apply><power/>
  1082. <ci>y</ci>
  1083. <cn type="integer">2</cn>
  1084. </apply>
  1085. </apply>
  1086. <apply><times/>
  1087. <apply><int/>
  1088. <bvar>
  1089. <ci>x_</ci>
  1090. </bvar>
  1091. <apply><power/>
  1092. <ci>x_</ci>
  1093. <ci>x_</ci>
  1094. </apply>
  1095. </apply>
  1096. <ci>y</ci>
  1097. </apply>
  1098. </apply>
  1099. <ci>x_</ci>
  1100. <ci>tag_2</ci>
  1101. </apply>
  1102. </reln>
  1103. <reln><eq/>
  1104. <ci>z</ci>
  1105. <ci>y</ci>
  1106. </reln>
  1107. </list>
  1108. </list>
  1109. </math>
  1110. mml2om();
  1111. <math>
  1112. <apply><curl/>
  1113. <vector>
  1114. <ci> b </ci>
  1115. <cn> 2 </cn>
  1116. <ci> c </ci>
  1117. </vector>
  1118. </apply>
  1119. </math>
  1120. mml2om();
  1121. <math>
  1122. <apply><divergence/>
  1123. <vector>
  1124. <ci> b </ci>
  1125. <cn> 2 </cn>
  1126. <ci> c </ci>
  1127. </vector>
  1128. </apply>
  1129. </math>
  1130. mml2om();
  1131. <math>
  1132. <apply><laplacian/>
  1133. <vector>
  1134. <ci> b </ci>
  1135. <cn> 2 </cn>
  1136. <ci> c </ci>
  1137. </vector>
  1138. </apply>
  1139. </math>
  1140. mml2om();
  1141. <math>
  1142. <apply><forall/>
  1143. <bvar>
  1144. <ci> a </ci>
  1145. </bvar>
  1146. <apply><eq/>
  1147. <apply><inverse/>
  1148. <apply><inverse/>
  1149. <ci> a </ci>
  1150. </apply>
  1151. </apply>
  1152. <ci> a </ci>
  1153. </apply>
  1154. </apply>
  1155. </math>
  1156. %end;
  1157. %in "$reduce/packages/mathml/examples.om";
  1158. % Description: This file contains a long list of examples demonstrating the abilities of
  1159. % the translator. Most of these examples come straight from the CDs. They
  1160. % were used during the development of the interface and should all be correctly
  1161. % translated into MathML.
  1162. %
  1163. % Version 17 April 2000
  1164. %
  1165. % Author: Luis Alvarez Sobreviela
  1166. %
  1167. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1168. om2mml();
  1169. <OMOBJ>
  1170. <OMA>
  1171. <OMS cd="arith1" name="plus"/>
  1172. <OMV name=f/>
  1173. <OMV name=d/>
  1174. <OMA>
  1175. <OMS cd="arith1" name="plus"/>
  1176. <OMI>1</OMI>
  1177. <OMF dec=1e10/>
  1178. </OMA>
  1179. </OMA>
  1180. </OMOBJ>
  1181. om2mml();
  1182. <OMOBJ>
  1183. <OMBIND>
  1184. <OMS cd=fns1 name=lambda/>
  1185. <OMBVAR>
  1186. <OMV name=x/>
  1187. </OMBVAR>
  1188. <OMA>
  1189. <OMS cd="transc1" name=sin/>
  1190. <OMV name=x/>
  1191. </OMA>
  1192. </OMBIND>
  1193. </OMOBJ>
  1194. om2mml();
  1195. <OMOBJ>
  1196. <OMBIND>
  1197. <OMS cd=fns1 name=lambda/>
  1198. <OMBVAR>
  1199. <OMV name=x/>
  1200. <OMV name=y/>
  1201. </OMBVAR>
  1202. <OMA>
  1203. <OMS cd="arith1" name=plus/>
  1204. <OMV name=x/>
  1205. <OMA>
  1206. <OMS cd="transc1" name=sin/>
  1207. <OMV name=y/>
  1208. </OMA>
  1209. </OMA>
  1210. </OMBIND>
  1211. </OMOBJ>
  1212. om2mml();
  1213. <OMOBJ>
  1214. <OMA>
  1215. <OMS cd="arith1" name=plus/>
  1216. <OMV name=x/>
  1217. <OMA>
  1218. <OMS cd="transc1" name=sin/>
  1219. <OMV name=x/>
  1220. </OMA>
  1221. </OMA>
  1222. </OMOBJ>
  1223. om2mml();
  1224. <OMOBJ>
  1225. <OMBIND>
  1226. <OMS cd="quant1" name="forall"/>
  1227. <OMBVAR>
  1228. <OMV name="x"/>
  1229. </OMBVAR>
  1230. <OMA>
  1231. <OMS cd="relation1" name="leq"/>
  1232. <OMA>
  1233. <OMS cd="arith1" name="abs"/>
  1234. <OMA>
  1235. <OMS cd="transc1" name="sin"/>
  1236. <OMV name="x"/>
  1237. </OMA>
  1238. </OMA>
  1239. <OMF dec="1.0"/>
  1240. </OMA>
  1241. </OMBIND>
  1242. </OMOBJ>
  1243. om2mml();
  1244. <OMOBJ>
  1245. <OMA>
  1246. <OMS cd="logic1" name="not"/>
  1247. <OMBIND>
  1248. <OMS cd="quant1" name="exists"/>
  1249. <OMBVAR>
  1250. <OMV name="x"/>
  1251. <OMV name="y"/>
  1252. <OMV name="z"/>
  1253. <OMV name="n"/>
  1254. </OMBVAR>
  1255. <OMA>
  1256. <OMS cd="logic1" name="and"/>
  1257. <OMA>
  1258. <OMS cd="relation1" name="gt"/>
  1259. <OMV name="n"/>
  1260. <OMI> 2 </OMI>
  1261. </OMA>
  1262. <OMA>
  1263. <OMS cd="relation1" name="eq"/>
  1264. <OMA>
  1265. <OMS cd="arith1" name="plus"/>
  1266. <OMA>
  1267. <OMS cd="arith1" name="power"/>
  1268. <OMV name="x"/>
  1269. <OMV name="n"/>
  1270. </OMA>
  1271. <OMA>
  1272. <OMS cd="arith1" name="power"/>
  1273. <OMV name="y"/>
  1274. <OMV name="n"/>
  1275. </OMA>
  1276. </OMA>
  1277. <OMA>
  1278. <OMS cd="arith1" name="power"/>
  1279. <OMV name="z"/>
  1280. <OMV name="n"/>
  1281. </OMA>
  1282. </OMA>
  1283. </OMA>
  1284. </OMBIND>
  1285. </OMA>
  1286. </OMOBJ>
  1287. % The following two examples show how the translator
  1288. % can deal with matrices represented either in columns
  1289. % or rows. The translator then converts matrices
  1290. % represented in columns into ones represented in
  1291. % rows. Mapping to MathML is then possible.
  1292. om2mml();
  1293. <OMOBJ>
  1294. <OMA>
  1295. <OMS cd="linalg2" name="matrix"/>
  1296. <OMA>
  1297. <OMS cd="linalg2" name="matrixcolumn"/>
  1298. <OMI> 1 </OMI>
  1299. <OMI> 2 </OMI>
  1300. </OMA>
  1301. <OMA>
  1302. <OMS cd="linalg2" name="matrixcolumn"/>
  1303. <OMI> 3 </OMI>
  1304. <OMI> 4 </OMI>
  1305. </OMA>
  1306. <OMA>
  1307. <OMS cd="linalg2" name="matrixcolumn"/>
  1308. <OMI> 5 </OMI>
  1309. <OMI> 6 </OMI>
  1310. </OMA>
  1311. </OMA>
  1312. </OMOBJ>
  1313. om2mml();
  1314. <OMOBJ>
  1315. <OMA>
  1316. <OMS cd="linalg2" name="matrix"/>
  1317. <OMA>
  1318. <OMS cd="linalg2" name="matrixrow"/>
  1319. <OMI> 1 </OMI>
  1320. <OMI> 0 </OMI>
  1321. </OMA>
  1322. <OMA>
  1323. <OMS cd="linalg2" name="matrixrow"/>
  1324. <OMI> 0 </OMI>
  1325. <OMI> 1 </OMI>
  1326. </OMA>
  1327. </OMA>
  1328. </OMOBJ>
  1329. om2mml();
  1330. <OMOBJ>
  1331. <OMBIND>
  1332. <OMS cd="quant1" name="forall"/>
  1333. <OMBVAR>
  1334. <OMV name="M"/>
  1335. </OMBVAR>
  1336. <OMA>
  1337. <OMS cd="logic1" name="and"/>
  1338. <OMA>
  1339. <OMS cd="relation1" name="eq"/>
  1340. <OMA>
  1341. <OMS cd="arith1" name="times"/>
  1342. <OMA>
  1343. <OMS cd="linalg3" name="identity"/>
  1344. <OMA>
  1345. <OMS cd="linalg3" name="rowcount"/>
  1346. <OMV name="M"/>
  1347. </OMA>
  1348. </OMA>
  1349. <OMV name="M"/>
  1350. </OMA>
  1351. <OMV name="M"/>
  1352. </OMA>
  1353. <OMA>
  1354. <OMS cd="relation1" name="eq"/>
  1355. <OMA>
  1356. <OMS cd="arith1" name="times"/>
  1357. <OMV name="M"/>
  1358. <OMA>
  1359. <OMS cd="linalg3" name="identity"/>
  1360. <OMA>
  1361. <OMS cd="linalg3" name="columncount"/>
  1362. <OMV name="M"/>
  1363. </OMA>
  1364. </OMA>
  1365. </OMA>
  1366. <OMV name="M"/>
  1367. </OMA>
  1368. </OMA>
  1369. </OMBIND>
  1370. </OMOBJ>
  1371. om2mml();
  1372. <OMOBJ>
  1373. <OMA>
  1374. <OMS cd="limit1" name="limit"/>
  1375. <OMF dec="0.0"/>
  1376. <OMS cd="limit1" name="above"/>
  1377. <OMBIND>
  1378. <OMS cd="fns1" name="lambda"/>
  1379. <OMBVAR>
  1380. <OMV name="x"/>
  1381. </OMBVAR>
  1382. <OMA>
  1383. <OMS cd="transc1" name="sin"/>
  1384. <OMV name="x"/>
  1385. </OMA>
  1386. </OMBIND>
  1387. </OMA>
  1388. </OMOBJ>
  1389. % This following example will show that the translator only
  1390. % identifies the limit symbol of the limit1 CD
  1391. om2mml();
  1392. <OMOBJ>
  1393. <OMA>
  1394. <OMS cd="fakeCD" name="limit"/>
  1395. <OMF dec="0.0"/>
  1396. <OMS cd="limit1" name="above"/>
  1397. <OMBIND>
  1398. <OMS cd="fns1" name="lambda"/>
  1399. <OMBVAR>
  1400. <OMV name="x"/>
  1401. </OMBVAR>
  1402. <OMA>
  1403. <OMS cd="transc1" name="sin"/>
  1404. <OMV name="x"/>
  1405. </OMA>
  1406. </OMBIND>
  1407. </OMA>
  1408. </OMOBJ>
  1409. % The following two examples show how the translator
  1410. % recognizes whether a symbol has a mathml equivalent
  1411. % depending on the CD it comes from.
  1412. % They both use symbol 'notsubset' but from different
  1413. % CDs. Only one of them can be mapped to MathML
  1414. % and the program distinguishes it by checking if
  1415. % the CD given is the correct one on its table
  1416. % om_mml!*.
  1417. om2mml();
  1418. <OMOBJ>
  1419. <OMA>
  1420. <OMS cd="multiset1" name="notsubset"/>
  1421. <OMA>
  1422. <OMS cd="multiset1" name="set"/>
  1423. <OMI> 2 </OMI>
  1424. <OMI> 3 </OMI>
  1425. <OMI> 3 </OMI>
  1426. </OMA>
  1427. <OMA>
  1428. <OMS cd="multiset1" name="set"/>
  1429. <OMI> 1 </OMI>
  1430. <OMI> 2 </OMI>
  1431. <OMI> 3 </OMI>
  1432. </OMA>
  1433. </OMA>
  1434. </OMOBJ>
  1435. om2mml();
  1436. <OMOBJ>
  1437. <OMA>
  1438. <OMS cd="set1" name="notsubset"/>
  1439. <OMA>
  1440. <OMS cd="multiset1" name="set"/>
  1441. <OMI> 2 </OMI>
  1442. <OMI> 3 </OMI>
  1443. <OMI> 3 </OMI>
  1444. </OMA>
  1445. <OMA>
  1446. <OMS cd="multiset1" name="set"/>
  1447. <OMI> 1 </OMI>
  1448. <OMI> 2 </OMI>
  1449. <OMI> 3 </OMI>
  1450. </OMA>
  1451. </OMA>
  1452. </OMOBJ>
  1453. om2mml();
  1454. <OMOBJ>
  1455. <OMBIND>
  1456. <OMS cd="quant1" name="forall"/>
  1457. <OMBVAR>
  1458. <OMV name="a"/>
  1459. <OMV name="b"/>
  1460. </OMBVAR>
  1461. <OMA>
  1462. <OMS cd="relation1" name="eq"/>
  1463. <OMA>
  1464. <OMS cd="arith1" name="plus"/>
  1465. <OMV name="a"/>
  1466. <OMV name="b"/>
  1467. </OMA>
  1468. <OMA>
  1469. <OMS cd="arith1" name="plus"/>
  1470. <OMV name="b"/>
  1471. <OMV name="a"/>
  1472. </OMA>
  1473. </OMA>
  1474. </OMBIND>
  1475. </OMOBJ>
  1476. % Example of a symbol which has a MathML equivalent
  1477. % but under another name.
  1478. om2mml();
  1479. <OMOBJ>
  1480. <OMA>
  1481. <OMS cd="arith1" name="unary_minus"/>
  1482. <OMI> 1 </OMI>
  1483. </OMA>
  1484. </OMOBJ>
  1485. om2mml();
  1486. <OMOBJ>
  1487. <OMA>
  1488. <OMS cd="relation1" name="eq"/>
  1489. <OMA>
  1490. <OMS cd="logic1" name="not"/>
  1491. <OMS cd="logic1" name="false"/>
  1492. </OMA>
  1493. <OMS cd="logic1" name="true"/>
  1494. </OMA>
  1495. </OMOBJ>
  1496. om2mml();
  1497. <OMOBJ>
  1498. <OMA>
  1499. <OMS cd="relation1" name="eq"/>
  1500. <OMA>
  1501. <OMS cd="arith1" name="times"/>
  1502. <OMA>
  1503. <OMS cd="fns1" name="identity"/>
  1504. <OMA>
  1505. <OMS cd="linalg3" name="rowcount"/>
  1506. <OMV name="M"/>
  1507. </OMA>
  1508. </OMA>
  1509. <OMV name="M"/>
  1510. </OMA>
  1511. <OMV name="M"/>
  1512. </OMA>
  1513. </OMOBJ>
  1514. om2mml();
  1515. <OMOBJ>
  1516. <OMA>
  1517. <OMS cd="linalg1" name="scalarproduct"/>
  1518. <OMA>
  1519. <OMS cd="linalg1" name="vector"/>
  1520. <OMI> 3 </OMI>
  1521. <OMI> 6 </OMI>
  1522. <OMI> 9 </OMI>
  1523. </OMA>
  1524. <OMA>
  1525. <OMS cd="linalg1" name="vector"/>
  1526. <OMI> 3 </OMI>
  1527. <OMI> 6 </OMI>
  1528. <OMI> 9 </OMI>
  1529. </OMA>
  1530. </OMA>
  1531. </OMOBJ>
  1532. om2mml();
  1533. <OMOBJ>
  1534. <OMA>
  1535. <OMS cd="linalg1" name="outerproduct"/>
  1536. <OMA>
  1537. <OMS cd="linalg1" name="vector"/>
  1538. <OMI> 3 </OMI>
  1539. <OMI> 6 </OMI>
  1540. <OMI> 9 </OMI>
  1541. </OMA>
  1542. <OMA>
  1543. <OMS cd="linalg1" name="vector"/>
  1544. <OMI> 3 </OMI>
  1545. <OMI> 6 </OMI>
  1546. <OMI> 9 </OMI>
  1547. </OMA>
  1548. </OMA>
  1549. </OMOBJ>
  1550. om2mml();
  1551. <OMOBJ>
  1552. <OMBIND>
  1553. <OMS cd="quant1" name="forall"/>
  1554. <OMBVAR>
  1555. <OMV name="a"/>
  1556. </OMBVAR>
  1557. <OMA>
  1558. <OMS cd="relation1" name="eq"/>
  1559. <OMA>
  1560. <OMS cd="arith1" name="plus"/>
  1561. <OMV name="a"/>
  1562. <OMS cd="alg1" name="zero"/>
  1563. </OMA>
  1564. <OMV name="a"/>
  1565. </OMA>
  1566. </OMBIND>
  1567. </OMOBJ>
  1568. om2mml();
  1569. <OMOBJ>
  1570. <OMBIND>
  1571. <OMS cd="quant1" name="forall"/>
  1572. <OMBVAR>
  1573. <OMV name="a"/>
  1574. </OMBVAR>
  1575. <OMA>
  1576. <OMS cd="relation1" name="eq"/>
  1577. <OMA>
  1578. <OMS cd="arith1" name="times"/>
  1579. <OMS cd="alg1" name="one"/>
  1580. <OMV name="a"/>
  1581. </OMA>
  1582. <OMV name="a"/>
  1583. </OMA>
  1584. </OMBIND>
  1585. </OMOBJ>
  1586. om2mml();
  1587. <OMOBJ>
  1588. <OMA>
  1589. <OMS cd="relation1" name="eq"/>
  1590. <OMA>
  1591. <OMS cd="bigfloat1" name="bigfloat"/>
  1592. <OMV name="m"/>
  1593. <OMV name="r"/>
  1594. <OMV name="e"/>
  1595. </OMA>
  1596. <OMA>
  1597. <OMS cd="arith1" name="times"/>
  1598. <OMV name="m"/>
  1599. <OMA>
  1600. <OMS cd="arith1" name="power"/>
  1601. <OMV name="r"/>
  1602. <OMV name="e"/>
  1603. </OMA>
  1604. </OMA>
  1605. </OMA>
  1606. </OMOBJ>
  1607. % The integral symbols defint and int are ambigious as defined
  1608. % in the CDs. They do not specify their variable of integration
  1609. % explicitly. The following shows that when the function
  1610. % to integrate is defined as a lambda expression, then the
  1611. % bound variable is easily determined. However, in other
  1612. % cases, it is not possible to determine the bound variable.
  1613. om2mml();
  1614. <OMOBJ>
  1615. <OMA>
  1616. <OMS cd="calculus1" name="int"/>
  1617. <OMBIND>
  1618. <OMS cd="fns1" name="lambda"/>
  1619. <OMBVAR>
  1620. <OMV name="x"/>
  1621. </OMBVAR>
  1622. <OMA>
  1623. <OMS cd="transc1" name="sin"/>
  1624. <OMV name="x"/>
  1625. </OMA>
  1626. </OMBIND>
  1627. </OMA>
  1628. </OMOBJ>
  1629. om2mml();
  1630. <OMOBJ>
  1631. <OMA>
  1632. <OMS cd="calculus1" name="int"/>
  1633. <OMA>
  1634. <OMS cd="arith1" name="plus"/>
  1635. <OMV name="x"/>
  1636. <OMV name="y"/>
  1637. </OMA>
  1638. </OMA>
  1639. </OMOBJ>
  1640. % Some calculus
  1641. om2mml();
  1642. <OMOBJ>
  1643. <OMA>
  1644. <OMS cd="relation1" name="eq"/>
  1645. <OMA>
  1646. <OMS cd="calculus1" name="diff"/>
  1647. <OMBIND>
  1648. <OMS cd="fns1" name="lambda"/>
  1649. <OMBVAR>
  1650. <OMV name="x"/>
  1651. </OMBVAR>
  1652. <OMA>
  1653. <OMS cd="arith1" name="plus"/>
  1654. <OMV name="x"/>
  1655. <OMF dec="1.0"/>
  1656. </OMA>
  1657. </OMBIND>
  1658. </OMA>
  1659. <OMF dec="1.0"/>
  1660. </OMA>
  1661. </OMOBJ>
  1662. om2mml();
  1663. <OMOBJ>
  1664. <OMA>
  1665. <OMS cd="relation1" name="eq"/>
  1666. <OMA>
  1667. <OMS cd="calculus1" name="partialdiff"/>
  1668. <OMA>
  1669. <OMS cd="list1" name="list"/>
  1670. <OMI> 1 </OMI>
  1671. <OMI> 3 </OMI>
  1672. </OMA>
  1673. <OMBIND>
  1674. <OMS cd="fns1" name="lambda"/>
  1675. <OMBVAR>
  1676. <OMV name="x"/>
  1677. <OMV name="y"/>
  1678. <OMV name="z"/>
  1679. </OMBVAR>
  1680. <OMA>
  1681. <OMS cd="arith2" name="times"/>
  1682. <OMV name="x"/>
  1683. <OMV name="y"/>
  1684. <OMV name="z"/>
  1685. </OMA>
  1686. </OMBIND>
  1687. </OMA>
  1688. <OMV name="y"/>
  1689. </OMA>
  1690. </OMOBJ>
  1691. om2mml();
  1692. <OMOBJ>
  1693. <OMA>
  1694. <OMS cd="relation1" name="eq"/>
  1695. <OMA>
  1696. <OMS cd="integer1" name="factorial"/>
  1697. <OMV name="n"/>
  1698. </OMA>
  1699. <OMA>
  1700. <OMS cd="arith1" name="product"/>
  1701. <OMA>
  1702. <OMS cd="interval1" name="integer_interval"/>
  1703. <OMI> 1 </OMI>
  1704. <OMV name="n"/>
  1705. </OMA>
  1706. <OMBIND>
  1707. <OMS cd="fns1" name="lambda"/>
  1708. <OMBVAR>
  1709. <OMV name="i"/>
  1710. </OMBVAR>
  1711. <OMV name="i"/>
  1712. </OMBIND>
  1713. </OMA>
  1714. </OMA>
  1715. </OMOBJ>
  1716. om2mml();
  1717. <OMOBJ>
  1718. <OMA>
  1719. <OMS cd="logic1" name="not"/>
  1720. <OMBIND>
  1721. <OMS cd="quant1" name="exists"/>
  1722. <OMBVAR>
  1723. <OMV name="c"/>
  1724. </OMBVAR>
  1725. <OMA>
  1726. <OMS cd="logic1" name="and"/>
  1727. <OMA>
  1728. <OMS cd="set1" name="in"/>
  1729. <OMA>
  1730. <OMS cd="arith1" name="divide"/>
  1731. <OMV name="a"/>
  1732. <OMV name="c"/>
  1733. </OMA>
  1734. <OMS cd="setname1" name="Z"/>
  1735. </OMA>
  1736. <OMA>
  1737. <OMS cd="set1" name="in"/>
  1738. <OMA>
  1739. <OMS cd="arith1" name="divide"/>
  1740. <OMV name="b"/>
  1741. <OMV name="c"/>
  1742. </OMA>
  1743. <OMS cd="setname1" name="Z"/>
  1744. </OMA>
  1745. <OMA>
  1746. <OMS cd="relation1" name="gt"/>
  1747. <OMV name="c"/>
  1748. <OMA>
  1749. <OMS cd="integer1" name="gcd"/>
  1750. <OMV name="a"/>
  1751. <OMV name="b"/>
  1752. </OMA>
  1753. </OMA>
  1754. </OMA>
  1755. </OMBIND>
  1756. </OMA>
  1757. </OMOBJ>
  1758. om2mml();
  1759. <OMOBJ>
  1760. <OMBIND>
  1761. <OMS cd="quant1" name="forall"/>
  1762. <OMBVAR>
  1763. <OMV name="x"/>
  1764. </OMBVAR>
  1765. <OMA>
  1766. <OMS cd="logic1" name="implies"/>
  1767. <OMS cd="logic1" name="false"/>
  1768. <OMV name="x"/>
  1769. </OMA>
  1770. </OMBIND>
  1771. </OMOBJ>
  1772. om2mml();
  1773. <OMOBJ>
  1774. <OMA>
  1775. <OMS cd="relation1" name="eq"/>
  1776. <OMA>
  1777. <OMS cd="minmax1" name="max"/>
  1778. <OMI> 1 </OMI>
  1779. <OMI> 9 </OMI>
  1780. <OMI> 5 </OMI>
  1781. </OMA>
  1782. <OMI> 9 </OMI>
  1783. </OMA>
  1784. </OMOBJ>
  1785. % The following examples belong to the multiset CD
  1786. om2mml();
  1787. <OMOBJ>
  1788. <OMA>
  1789. <OMS cd="logic1" name="implies"/>
  1790. <OMA>
  1791. <OMS cd="logic1" name="and"/>
  1792. <OMA>
  1793. <OMS cd="multiset1" name="in"/>
  1794. <OMV name="a"/>
  1795. <OMV name="A"/>
  1796. </OMA>
  1797. <OMA>
  1798. <OMS cd="multiset1" name="in"/>
  1799. <OMV name="a"/>
  1800. <OMV name="B"/>
  1801. </OMA>
  1802. </OMA>
  1803. <OMA>
  1804. <OMS cd="multiset1" name="in"/>
  1805. <OMV name="a"/>
  1806. <OMA>
  1807. <OMS cd="multiset1" name="intersect"/>
  1808. <OMV name="A"/>
  1809. <OMV name="B"/>
  1810. </OMA>
  1811. </OMA>
  1812. </OMA>
  1813. </OMOBJ>
  1814. om2mml();
  1815. <OMOBJ>
  1816. <OMA>
  1817. <OMS cd="multiset1" name="multiset"/>
  1818. <OMI> 4 </OMI>
  1819. <OMI> 1 </OMI>
  1820. <OMI> 0 </OMI>
  1821. <OMI> 1 </OMI>
  1822. <OMI> 4 </OMI>
  1823. </OMA>
  1824. </OMOBJ>
  1825. om2mml();
  1826. <OMOBJ>
  1827. <OMA>
  1828. <OMS cd="logic1" name="and"/>
  1829. <OMA>
  1830. <OMS cd="multiset1" name="subset"/>
  1831. <OMA>
  1832. <OMS cd="multiset1" name="intersect"/>
  1833. <OMV name="A"/>
  1834. <OMV name="B"/>
  1835. </OMA>
  1836. <OMV name="A"/>
  1837. </OMA>
  1838. <OMA>
  1839. <OMS cd="multiset1" name="subset"/>
  1840. <OMA>
  1841. <OMS cd="multiset1" name="intersect"/>
  1842. <OMV name="A"/>
  1843. <OMV name="B"/>
  1844. </OMA>
  1845. <OMV name="B"/>
  1846. </OMA>
  1847. </OMA>
  1848. </OMOBJ>
  1849. om2mml();
  1850. <OMOBJ>
  1851. <OMA>
  1852. <OMS cd="logic1" name="and"/>
  1853. <OMA>
  1854. <OMS cd="multiset1" name="subset"/>
  1855. <OMV name="A"/>
  1856. <OMA>
  1857. <OMS cd="multiset1" name="union"/>
  1858. <OMV name="A"/>
  1859. <OMV name="B"/>
  1860. </OMA>
  1861. </OMA>
  1862. <OMA>
  1863. <OMS cd="multiset1" name="subset"/>
  1864. <OMV name="B"/>
  1865. <OMA>
  1866. <OMS cd="multiset1" name="union"/>
  1867. <OMV name="A"/>
  1868. <OMV name="B"/>
  1869. </OMA>
  1870. </OMA>
  1871. </OMA>
  1872. </OMOBJ>
  1873. om2mml();
  1874. <OMOBJ>
  1875. <OMBIND>
  1876. <OMS cd="quant1" name="forall"/>
  1877. <OMBVAR>
  1878. <OMV name="A"/>
  1879. <OMV name="B"/>
  1880. <OMV name="C"/>
  1881. </OMBVAR>
  1882. <OMA>
  1883. <OMS cd="relation1" name="eq"/>
  1884. <OMA>
  1885. <OMS cd="multiset1" name="union"/>
  1886. <OMV name="A"/>
  1887. <OMA>
  1888. <OMS cd="multiset1" name="intersect"/>
  1889. <OMV name="B"/>
  1890. <OMV name="C"/>
  1891. </OMA>
  1892. </OMA>
  1893. <OMA>
  1894. <OMS cd="multiset1" name="intersect"/>
  1895. <OMA>
  1896. <OMS cd="multiset1" name="union"/>
  1897. <OMV name="A"/>
  1898. <OMV name="B"/>
  1899. </OMA>
  1900. <OMA>
  1901. <OMS cd="multiset1" name="union"/>
  1902. <OMV name="A"/>
  1903. <OMV name="C"/>
  1904. </OMA>
  1905. </OMA>
  1906. </OMA>
  1907. </OMBIND>
  1908. </OMOBJ>
  1909. om2mml();
  1910. <OMOBJ>
  1911. <OMA>
  1912. <OMS cd="multiset1" name="subset"/>
  1913. <OMA>
  1914. <OMS cd="multiset1" name="setdiff"/>
  1915. <OMV name="A"/>
  1916. <OMV name="B"/>
  1917. </OMA>
  1918. <OMV name="A"/>
  1919. </OMA>
  1920. </OMOBJ>
  1921. om2mml();
  1922. <OMOBJ>
  1923. <OMA>
  1924. <OMS cd="logic1" name="implies"/>
  1925. <OMA>
  1926. <OMS cd="logic1" name="and"/>
  1927. <OMA>
  1928. <OMS cd="multiset1" name="subset"/>
  1929. <OMV name="B"/>
  1930. <OMV name="A"/>
  1931. </OMA>
  1932. <OMA>
  1933. <OMS cd="multiset1" name="subset"/>
  1934. <OMV name="C"/>
  1935. <OMV name="B"/>
  1936. </OMA>
  1937. </OMA>
  1938. <OMA>
  1939. <OMS cd="multiset1" name="subset"/>
  1940. <OMV name="C"/>
  1941. <OMV name="A"/>
  1942. </OMA>
  1943. </OMA>
  1944. </OMOBJ>
  1945. om2mml();
  1946. <OMOBJ>
  1947. <OMA>
  1948. <OMS cd="multiset1" name="notin"/>
  1949. <OMI> 4 </OMI>
  1950. <OMA>
  1951. <OMS cd="multiset1" name="multiset"/>
  1952. <OMI> 1 </OMI>
  1953. <OMI> 1 </OMI>
  1954. <OMI> 2 </OMI>
  1955. <OMI> 3 </OMI>
  1956. </OMA>
  1957. </OMA>
  1958. </OMOBJ>
  1959. om2mml();
  1960. <OMOBJ>
  1961. <OMA>
  1962. <OMS cd="multiset1" name="prsubset"/>
  1963. <OMA>
  1964. <OMS cd="multiset1" name="multiset"/>
  1965. <OMI> 2 </OMI>
  1966. <OMI> 3 </OMI>
  1967. </OMA>
  1968. <OMA>
  1969. <OMS cd="multiset1" name="multiset"/>
  1970. <OMI> 2 </OMI>
  1971. <OMI> 2 </OMI>
  1972. <OMI> 3 </OMI>
  1973. </OMA>
  1974. </OMA>
  1975. </OMOBJ>
  1976. om2mml();
  1977. <OMOBJ>
  1978. <OMA>
  1979. <OMS cd="multiset1" name="notsubset"/>
  1980. <OMA>
  1981. <OMS cd="multiset1" name="multiset"/>
  1982. <OMI> 2 </OMI>
  1983. <OMI> 3 </OMI>
  1984. <OMI> 3 </OMI>
  1985. </OMA>
  1986. <OMA>
  1987. <OMS cd="multiset1" name="multiset"/>
  1988. <OMI> 1 </OMI>
  1989. <OMI> 2 </OMI>
  1990. <OMI> 3 </OMI>
  1991. </OMA>
  1992. </OMA>
  1993. </OMOBJ>
  1994. om2mml();
  1995. <OMOBJ>
  1996. <OMA>
  1997. <OMS cd="multiset1" name="notprsubset"/>
  1998. <OMA>
  1999. <OMS cd="multiset1" name="multiset"/>
  2000. <OMI> 1 </OMI>
  2001. <OMI> 2 </OMI>
  2002. <OMI> 1 </OMI>
  2003. </OMA>
  2004. <OMA>
  2005. <OMS cd="multiset1" name="multiset"/>
  2006. <OMI> 1 </OMI>
  2007. <OMI> 2 </OMI>
  2008. <OMI> 1 </OMI>
  2009. </OMA>
  2010. </OMA>
  2011. </OMOBJ>
  2012. % Examples from CD nums1
  2013. om2mml();
  2014. <OMOBJ>
  2015. <OMA>
  2016. <OMS cd="relation1" name="eq"/>
  2017. <OMI> 8 </OMI>
  2018. <OMA>
  2019. <OMS cd="nums1" name="based_integer"/>
  2020. <OMI> 8 </OMI>
  2021. <OMSTR> 10 </OMSTR>
  2022. </OMA>
  2023. </OMA>
  2024. </OMOBJ>
  2025. om2mml();
  2026. <OMOBJ>
  2027. <OMA>
  2028. <OMS cd="nums1" name="rational"/>
  2029. <OMI> 1 </OMI>
  2030. <OMI> 2 </OMI>
  2031. </OMA>
  2032. </OMOBJ>
  2033. om2mml();
  2034. <OMOBJ>
  2035. <OMBIND>
  2036. <OMS cd="quant1" name="forall"/>
  2037. <OMBVAR>
  2038. <OMV name="x"/>
  2039. <OMV name="y"/>
  2040. </OMBVAR>
  2041. <OMA>
  2042. <OMS cd="relation1" name="eq"/>
  2043. <OMA>
  2044. <OMS cd="nums1" name="complex_cartesian"/>
  2045. <OMV name="x"/>
  2046. <OMV name="y"/>
  2047. </OMA>
  2048. <OMA>
  2049. <OMS cd="arith1" name="plus"/>
  2050. <OMV name="x"/>
  2051. <OMA>
  2052. <OMS cd="arith1" name="times"/>
  2053. <OMS cd="nums1" name="i"/>
  2054. <OMV name="y"/>
  2055. </OMA>
  2056. </OMA>
  2057. </OMA>
  2058. </OMBIND>
  2059. </OMOBJ>
  2060. om2mml();
  2061. <OMOBJ>
  2062. <OMBIND>
  2063. <OMS cd="quant1" name="forall"/>
  2064. <OMBVAR>
  2065. <OMV name="x"/>
  2066. <OMV name="y"/>
  2067. <OMV name="r"/>
  2068. <OMV name="a"/>
  2069. </OMBVAR>
  2070. <OMA>
  2071. <OMS cd="logic1" name="implies"/>
  2072. <OMA>
  2073. <OMS cd="logic1" name="and"/>
  2074. <OMA>
  2075. <OMS cd="relation1" name="eq"/>
  2076. <OMA>
  2077. <OMS cd="arith1" name="times"/>
  2078. <OMV name="r"/>
  2079. <OMA>
  2080. <OMS cd="transc1" name="sin"/>
  2081. <OMV name="a"/>
  2082. </OMA>
  2083. </OMA>
  2084. <OMV name="y"/>
  2085. </OMA>
  2086. <OMA>
  2087. <OMS cd="relation1" name="eq"/>
  2088. <OMA>
  2089. <OMS cd="arith1" name="times"/>
  2090. <OMV name="r"/>
  2091. <OMA>
  2092. <OMS cd="transc1" name="cos"/>
  2093. <OMV name="a"/>
  2094. </OMA>
  2095. </OMA>
  2096. <OMV name="x"/>
  2097. </OMA>
  2098. </OMA>
  2099. <OMA>
  2100. <OMS cd="relation1" name="eq"/>
  2101. <OMA>
  2102. <OMS cd="nums1" name="complex_polar"/>
  2103. <OMV name="r"/>
  2104. <OMV name="a"/>
  2105. </OMA>
  2106. <OMA>
  2107. <OMS cd="nums1" name="complex_cartesian"/>
  2108. <OMV name="x"/>
  2109. <OMV name="y"/>
  2110. </OMA>
  2111. </OMA>
  2112. </OMA>
  2113. </OMBIND>
  2114. </OMOBJ>
  2115. om2mml();
  2116. <OMOBJ>
  2117. <OMBIND>
  2118. <OMS cd="quant1" name="forall"/>
  2119. <OMBVAR>
  2120. <OMV name="x"/>
  2121. </OMBVAR>
  2122. <OMA>
  2123. <OMS cd="logic1" name="implies"/>
  2124. <OMA>
  2125. <OMS cd="logic1" name="and"/>
  2126. <OMA>
  2127. <OMS cd="set1" name="in"/>
  2128. <OMV name="a"/>
  2129. <OMS cd="setname1" name="R"/>
  2130. </OMA>
  2131. <OMA>
  2132. <OMS cd="set1" name="in"/>
  2133. <OMV name="k"/>
  2134. <OMS cd="setname1" name="Z"/>
  2135. </OMA>
  2136. </OMA>
  2137. <OMA>
  2138. <OMS cd="relation1" name="eq"/>
  2139. <OMA>
  2140. <OMS cd="nums1" name="complex_polar"/>
  2141. <OMV name="x"/>
  2142. <OMV name="a"/>
  2143. </OMA>
  2144. <OMA>
  2145. <OMS cd="nums1" name="complex_polar"/>
  2146. <OMV name="x"/>
  2147. <OMA>
  2148. <OMS cd="arith1" name="plus"/>
  2149. <OMV name="a"/>
  2150. <OMA>
  2151. <OMS cd="arith1" name="times"/>
  2152. <OMI> 2 </OMI>
  2153. <OMS cd="nums1" name="pi"/>
  2154. <OMV name="k"/>
  2155. </OMA>
  2156. </OMA>
  2157. </OMA>
  2158. </OMA>
  2159. </OMA>
  2160. </OMBIND>
  2161. </OMOBJ>
  2162. om2mml();
  2163. <OMOBJ>
  2164. <OMA>
  2165. <OMS cd="relation1" name="eq"/>
  2166. <OMS cd="nums1" name="e"/>
  2167. <OMA>
  2168. <OMS cd="arith1" name="sum"/>
  2169. <OMA>
  2170. <OMS cd="interval1" name="integer_interval"/>
  2171. <OMS cd="alg1" name="zero"/>
  2172. <OMS cd="nums1" name="infinity"/>
  2173. </OMA>
  2174. <OMBIND>
  2175. <OMS cd="fns1" name="lambda"/>
  2176. <OMBVAR>
  2177. <OMV name="j"/>
  2178. </OMBVAR>
  2179. <OMA>
  2180. <OMS cd="arith1" name="divide"/>
  2181. <OMS cd="alg1" name="one"/>
  2182. <OMA>
  2183. <OMS cd="integer1" name="factorial"/>
  2184. <OMV name="j"/>
  2185. </OMA>
  2186. </OMA>
  2187. </OMBIND>
  2188. </OMA>
  2189. </OMA>
  2190. </OMOBJ>
  2191. om2mml();
  2192. <OMOBJ>
  2193. <OMA>
  2194. <OMS cd="relation1" name="eq"/>
  2195. <OMA>
  2196. <OMS cd="arith1" name="power"/>
  2197. <OMS cd="nums1" name="i"/>
  2198. <OMI> 2 </OMI>
  2199. </OMA>
  2200. <OMA>
  2201. <OMS cd="arith1" name="minus"/>
  2202. <OMS cd="alg1" name="one"/>
  2203. </OMA>
  2204. </OMA>
  2205. </OMOBJ>
  2206. om2mml();
  2207. <OMOBJ>
  2208. <OMBIND>
  2209. <OMS cd="quant1" name="forall"/>
  2210. <OMBVAR>
  2211. <OMV name="x"/>
  2212. <OMV name="y"/>
  2213. </OMBVAR>
  2214. <OMA>
  2215. <OMS cd="relation1" name="eq"/>
  2216. <OMV name="y"/>
  2217. <OMA>
  2218. <OMS name="imaginary" cd="nums1"/>
  2219. <OMA>
  2220. <OMS name="complex_cartesian" cd="nums1"/>
  2221. <OMV name="x"/>
  2222. <OMV name="y"/>
  2223. </OMA>
  2224. </OMA>
  2225. </OMA>
  2226. </OMBIND>
  2227. </OMOBJ>
  2228. om2mml();
  2229. <OMOBJ>
  2230. <OMBIND>
  2231. <OMS cd="quant1" name="forall"/>
  2232. <OMBVAR>
  2233. <OMV name="x"/>
  2234. <OMV name="y"/>
  2235. </OMBVAR>
  2236. <OMA>
  2237. <OMS cd="relation1" name="eq"/>
  2238. <OMV name="x"/>
  2239. <OMA>
  2240. <OMS name="real" cd="nums1"/>
  2241. <OMA>
  2242. <OMS name="complex_cartesian" cd="nums1"/>
  2243. <OMV name="x"/>
  2244. <OMV name="y"/>
  2245. </OMA>
  2246. </OMA>
  2247. </OMA>
  2248. </OMBIND>
  2249. </OMOBJ>
  2250. om2mml();
  2251. <OMOBJ>
  2252. <OMA>
  2253. <OMS cd="logic1" name="implies"/>
  2254. <OMA>
  2255. <OMS cd="set1" name="in"/>
  2256. <OMV name="a"/>
  2257. <OMS cd="setname1" name="R"/>
  2258. </OMA>
  2259. <OMA>
  2260. <OMS cd="relation1" name="lt"/>
  2261. <OMV name="x"/>
  2262. <OMS cd="nums1" name="infinity"/>
  2263. </OMA>
  2264. </OMA>
  2265. </OMOBJ>
  2266. om2mml();
  2267. <OMOBJ>
  2268. <OMA>
  2269. <OMS cd="relation1" name="neq"/>
  2270. <OMS cd="nums1" name="NaN"/>
  2271. <OMS cd="nums1" name="NaN"/>
  2272. </OMA>
  2273. </OMOBJ>
  2274. om2mml();
  2275. <OMOBJ>
  2276. <OMA>
  2277. <OMS cd="relation1" name="eq"/>
  2278. <OMS cd="nums1" name="pi"/>
  2279. <OMA>
  2280. <OMS cd="arith1" name="sum"/>
  2281. <OMA>
  2282. <OMS cd="interval1" name="integer_interval"/>
  2283. <OMS cd="alg1" name="zero"/>
  2284. <OMS cd="nums1" name="infinity"/>
  2285. </OMA>
  2286. <OMBIND>
  2287. <OMS cd="fns1" name="lambda"/>
  2288. <OMBVAR>
  2289. <OMV name="j"/>
  2290. </OMBVAR>
  2291. <OMA>
  2292. <OMS cd="arith1" name="minus"/>
  2293. <OMA>
  2294. <OMS cd="arith1" name="divide"/>
  2295. <OMS cd="alg1" name="one"/>
  2296. <OMA>
  2297. <OMS cd="arith1" name="plus"/>
  2298. <OMA>
  2299. <OMS cd="arith1" name="times"/>
  2300. <OMI> 4 </OMI>
  2301. <OMV name="j"/>
  2302. </OMA>
  2303. <OMS cd="alg1" name="one"/>
  2304. </OMA>
  2305. </OMA>
  2306. <OMA>
  2307. <OMS cd="arith1" name="divide"/>
  2308. <OMS cd="alg1" name="one"/>
  2309. <OMA>
  2310. <OMS cd="arith1" name="plus"/>
  2311. <OMA>
  2312. <OMS cd="arith1" name="times"/>
  2313. <OMI> 4 </OMI>
  2314. <OMV name="j"/>
  2315. </OMA>
  2316. <OMS cd="alg1" name="one"/>
  2317. </OMA>
  2318. </OMA>
  2319. </OMA>
  2320. </OMBIND>
  2321. </OMA>
  2322. </OMA>
  2323. </OMOBJ>
  2324. om2mml();
  2325. <OMOBJ>
  2326. <OMBIND>
  2327. <OMS cd="quant1" name="forall"/>
  2328. <OMBVAR>
  2329. <OMV name="x"/>
  2330. </OMBVAR>
  2331. <OMA>
  2332. <OMS cd="logic1" name="and"/>
  2333. <OMA>
  2334. <OMS cd="relation1" name="lt"/>
  2335. <OMA>
  2336. <OMS cd="arith1" name="minus"/>
  2337. <OMA>
  2338. <OMS cd="rounding1" name="ceiling"/>
  2339. <OMV name="x"/>
  2340. </OMA>
  2341. <OMS cd="alg1" name="one"/>
  2342. </OMA>
  2343. <OMV name="x"/>
  2344. </OMA>
  2345. <OMA>
  2346. <OMS cd="relation1" name="leq"/>
  2347. <OMV name="x"/>
  2348. <OMA>
  2349. <OMS cd="rounding1" name="ceiling"/>
  2350. <OMV name="x"/>
  2351. </OMA>
  2352. </OMA>
  2353. </OMA>
  2354. </OMBIND>
  2355. </OMOBJ>
  2356. om2mml();
  2357. <OMOBJ>
  2358. <OMA>
  2359. <OMS cd="relation1" name="eq"/>
  2360. <OMA>
  2361. <OMS cd="stats1" name="mean"/>
  2362. <OMI> 1 </OMI> <OMI> 2 </OMI> <OMI> 3 </OMI>
  2363. </OMA>
  2364. <OMI> 3 </OMI>
  2365. </OMA>
  2366. </OMOBJ>
  2367. om2mml();
  2368. <OMOBJ>
  2369. <OMA>
  2370. <OMS cd="stats1" name="sdev"/>
  2371. <OMF dec="3.1"/>
  2372. <OMF dec="2.2"/>
  2373. <OMF dec="1.8"/>
  2374. <OMF dec="1.1"/>
  2375. <OMF dec="3.3"/>
  2376. <OMF dec="2.4"/>
  2377. <OMF dec="5.5"/>
  2378. <OMF dec="2.3"/>
  2379. <OMF dec="1.7"/>
  2380. <OMF dec="1.8"/>
  2381. <OMF dec="3.4"/>
  2382. <OMF dec="4.0"/>
  2383. <OMF dec="3.3"/>
  2384. </OMA>
  2385. </OMOBJ>
  2386. om2mml();
  2387. <OMOBJ>
  2388. <OMA>
  2389. <OMS cd="logic1" name="implies"/>
  2390. <OMA>
  2391. <OMS cd="relation1" name="eq"/>
  2392. <OMA>
  2393. <OMS cd="arith1" name="power"/>
  2394. <OMV name="a"/>
  2395. <OMV name="b"/>
  2396. </OMA>
  2397. <OMV name="c"/>
  2398. </OMA>
  2399. <OMA>
  2400. <OMS cd="relation1" name="eq"/>
  2401. <OMA>
  2402. <OMS cd="transc1" name="log"/>
  2403. <OMV name="a"/>
  2404. <OMV name="c"/>
  2405. </OMA>
  2406. <OMV name="b"/>
  2407. </OMA>
  2408. </OMA>
  2409. </OMOBJ>
  2410. om2mml();
  2411. <OMOBJ>
  2412. <OMA>
  2413. <OMS name="and" cd="logic1"/>
  2414. <OMA>
  2415. <OMS name="lt" cd="relation1"/>
  2416. <OMA>
  2417. <OMS name="unary_minus" cd="arith1"/>
  2418. <OMS name="pi" cd="nums1"/>
  2419. </OMA>
  2420. <OMA>
  2421. <OMS name="imaginary" cd="nums1"/>
  2422. <OMA>
  2423. <OMS name="ln" cd="transc1"/>
  2424. <OMV name="x"/>
  2425. </OMA>
  2426. </OMA>
  2427. </OMA>
  2428. <OMA>
  2429. <OMS name="leq" cd="relation1"/>
  2430. <OMA>
  2431. <OMS name="imaginary" cd="nums1"/>
  2432. <OMA>
  2433. <OMS name="ln" cd="transc1"/>
  2434. <OMV name="x"/>
  2435. </OMA>
  2436. </OMA>
  2437. <OMS name="pi" cd="nums1"/>
  2438. </OMA>
  2439. </OMA>
  2440. </OMOBJ>
  2441. om2mml();
  2442. <OMOBJ>
  2443. <OMA>
  2444. <OMS cd="relation1" name="eq"/>
  2445. <OMA>
  2446. <OMS cd="veccalc1" name="curl"/>
  2447. <OMV name="F"/>
  2448. </OMA>
  2449. <OMA>
  2450. <OMS cd="arith1" name="plus"/>
  2451. <OMA>
  2452. <OMS cd="linalg1" name="vectorproduct"/>
  2453. <OMA>
  2454. <OMS cd="linalg1" name="vector"/>
  2455. <OMI> 1 </OMI>
  2456. <OMI> 0 </OMI>
  2457. <OMI> 0 </OMI>
  2458. </OMA>
  2459. <OMA>
  2460. <OMS cd="calculus1" name="partialdiff"/>
  2461. <OMA>
  2462. <OMS cd="list1" name="list"/>
  2463. <OMI> 1 </OMI>
  2464. </OMA>
  2465. <OMV name="F"/>
  2466. </OMA>
  2467. </OMA>
  2468. <OMA>
  2469. <OMS cd="linalg1" name="vectorproduct"/>
  2470. <OMA>
  2471. <OMS cd="linalg1" name="vector"/>
  2472. <OMI> 0 </OMI>
  2473. <OMI> 1 </OMI>
  2474. <OMI> 0 </OMI>
  2475. </OMA>
  2476. <OMA>
  2477. <OMS cd="calculus1" name="partialdiff"/>
  2478. <OMA>
  2479. <OMS cd="list1" name="list"/>
  2480. <OMI> 2 </OMI>
  2481. </OMA>
  2482. <OMV name="F"/>
  2483. </OMA>
  2484. </OMA>
  2485. <OMA>
  2486. <OMS cd="linalg1" name="vectorproduct"/>
  2487. <OMA>
  2488. <OMS cd="linalg1" name="vector"/>
  2489. <OMI> 0 </OMI>
  2490. <OMI> 0 </OMI>
  2491. <OMI> 1 </OMI>
  2492. </OMA>
  2493. <OMA>
  2494. <OMS cd="calculus1" name="partialdiff"/>
  2495. <OMA>
  2496. <OMS cd="list1" name="list"/>
  2497. <OMI> 3 </OMI>
  2498. </OMA>
  2499. <OMV name="F"/>
  2500. </OMA>
  2501. </OMA>
  2502. </OMA>
  2503. </OMA>
  2504. </OMOBJ>
  2505. om2mml();
  2506. <OMOBJ>
  2507. <OMBIND>
  2508. <OMS cd="quant1" name="forall"/>
  2509. <OMBVAR>
  2510. <OMV name="x"/>
  2511. </OMBVAR>
  2512. <OMA>
  2513. <OMS cd="logic1" name="and"/>
  2514. <OMA>
  2515. <OMS cd="relation1" name="lt"/>
  2516. <OMA>
  2517. <OMS name="unary_minus" cd="arith1"/>
  2518. <OMS cd="nums1" name="pi"/>
  2519. </OMA>
  2520. <OMA>
  2521. <OMS name="arg" cd="arith2"/>
  2522. <OMV name="x"/>
  2523. </OMA>
  2524. </OMA>
  2525. <OMA>
  2526. <OMS cd="relation1" name="leq"/>
  2527. <OMA>
  2528. <OMS name="arg" cd="arith2"/>
  2529. <OMV name="x"/>
  2530. </OMA>
  2531. <OMS cd="nums1" name="pi"/>
  2532. </OMA>
  2533. </OMA>
  2534. </OMBIND>
  2535. </OMOBJ>
  2536. om2mml();
  2537. <OMOBJ>
  2538. <OMBIND>
  2539. <OMS cd="quant1" name="forall"/>
  2540. <OMBVAR>
  2541. <OMV name="a"/>
  2542. </OMBVAR>
  2543. <OMA>
  2544. <OMS cd="relation1" name="eq"/>
  2545. <OMA>
  2546. <OMS cd="arith2" name="inverse"/>
  2547. <OMA>
  2548. <OMS cd="arith2" name="inverse"/>
  2549. <OMV name="a"/>
  2550. </OMA>
  2551. </OMA>
  2552. <OMV name="a"/>
  2553. </OMA>
  2554. </OMBIND>
  2555. </OMOBJ>
  2556. % An example of elements which do not have a MathML
  2557. % equivalent. This example comes from the fns1 CD
  2558. om2mml();
  2559. <OMOBJ>
  2560. <OMBIND>
  2561. <OMS cd="quant1" name="forall"/>
  2562. <OMBVAR>
  2563. <OMV name="n"/>
  2564. </OMBVAR>
  2565. <OMA>
  2566. <OMS cd="relation1" name="eq"/>
  2567. <OMA>
  2568. <OMS cd="fns2" name="apply_to_list"/>
  2569. <OMA>
  2570. <OMS cd="arith1" name="plus"/>
  2571. <OMA>
  2572. <OMS cd="list1" name="make_list"/>
  2573. <OMI> 1 </OMI>
  2574. <OMV name="n"/>
  2575. <OMS cd="fns1" name="identity"/>
  2576. </OMA>
  2577. </OMA>
  2578. </OMA>
  2579. <OMA>
  2580. <OMS cd="arith1" name="divide"/>
  2581. <OMA>
  2582. <OMS cd="arith1" name="times"/>
  2583. <OMV name="n"/>
  2584. <OMA>
  2585. <OMS cd="arith1" name="plus"/>
  2586. <OMV name="n"/>
  2587. <OMI> 1 </OMI>
  2588. </OMA>
  2589. </OMA>
  2590. <OMI> 2 </OMI>
  2591. </OMA>
  2592. </OMA>
  2593. </OMBIND>
  2594. </OMOBJ>
  2595. om2mml();
  2596. <OMOBJ>
  2597. <OMA>
  2598. <OMS cd="relation1" name="eq"/>
  2599. <OMA>
  2600. <OMS cd="linalg3" name="determinant"/>
  2601. <OMA>
  2602. <OMS cd="linalg3" name="identity"/>
  2603. <OMV name="n"/>
  2604. </OMA>
  2605. </OMA>
  2606. <OMS cd="alg1" name="one"/>
  2607. </OMA>
  2608. </OMOBJ>
  2609. om2mml();
  2610. <OMOBJ>
  2611. <OMA>
  2612. <OMS cd="relation1" name="eq"/>
  2613. <OMA>
  2614. <OMS cd="linalg3" name="transpose"/>
  2615. <OMA>
  2616. <OMS cd="linalg1" name="matrix"/>
  2617. <OMA>
  2618. <OMS cd="linalg1" name="matrixrow"/>
  2619. <OMI> 0 </OMI>
  2620. <OMI> 1 </OMI>
  2621. </OMA>
  2622. <OMA>
  2623. <OMS cd="linalg1" name="matrixrow"/>
  2624. <OMI> 2 </OMI>
  2625. <OMI> 3 </OMI>
  2626. </OMA>
  2627. </OMA>
  2628. </OMA>
  2629. <OMA>
  2630. <OMS cd="linalg1" name="matrix"/>
  2631. <OMA>
  2632. <OMS cd="linalg1" name="matrixrow"/>
  2633. <OMI> 0 </OMI>
  2634. <OMI> 2 </OMI>
  2635. </OMA>
  2636. <OMA>
  2637. <OMS cd="linalg1" name="matrixrow"/>
  2638. <OMI> 1 </OMI>
  2639. <OMI> 3 </OMI>
  2640. </OMA>
  2641. </OMA>
  2642. </OMA>
  2643. </OMOBJ>
  2644. om2mml();
  2645. <OMOBJ>
  2646. <OMA>
  2647. <OMS cd="logic2" name="equivalent"/>
  2648. <OMA>
  2649. <OMS cd="logic2" name="equivalent"/>
  2650. <OMV name="A"/>
  2651. <OMV name="B"/>
  2652. </OMA>
  2653. <OMA>
  2654. <OMS cd="logic1" name="and"/>
  2655. <OMA>
  2656. <OMS cd="logic1" name="implies"/>
  2657. <OMV name="A"/>
  2658. <OMV name="B"/>
  2659. </OMA>
  2660. <OMA>
  2661. <OMS cd="logic1" name="implies"/>
  2662. <OMV name="B"/>
  2663. <OMV name="A"/>
  2664. </OMA>
  2665. </OMA>
  2666. </OMA>
  2667. </OMOBJ>
  2668. om2mml();
  2669. <OMOBJ>
  2670. <OMATTR>
  2671. <OMATP>
  2672. <OMS cd="typmml" name="type"/>
  2673. <OMS cd="typmml" name="complex_polar_type"/>
  2674. </OMATP>
  2675. <OMV name="z"/>
  2676. </OMATTR>
  2677. </OMOBJ>
  2678. % Examples of assigning types to variables.
  2679. om2mml();
  2680. <OMOBJ>
  2681. <OMATTR>
  2682. <OMATP>
  2683. <OMS cd="typmml" name="type"/>
  2684. <OMS cd="typmml" name="integer_type"/>
  2685. </OMATP>
  2686. <OMV name="z"/>
  2687. </OMATTR>
  2688. </OMOBJ>
  2689. om2mml();
  2690. <OMOBJ>
  2691. <OMATTR>
  2692. <OMATP>
  2693. <OMS cd="typmml" name="type"/>
  2694. <OMS cd="typmml" name="real_type"/>
  2695. </OMATP>
  2696. <OMV name="z"/>
  2697. </OMATTR>
  2698. </OMOBJ>
  2699. om2mml();
  2700. <OMOBJ>
  2701. <OMATTR>
  2702. <OMATP>
  2703. <OMS cd="typmml" name="type"/>
  2704. <OMS cd="typmml" name="rational_type"/>
  2705. </OMATP>
  2706. <OMV name="z"/>
  2707. </OMATTR>
  2708. </OMOBJ>
  2709. % These examples show the use of attributions within OpenMath
  2710. % expressions.
  2711. om2mml();
  2712. <OMOBJ>
  2713. <OMA>
  2714. <OMATTR>
  2715. <OMATP>
  2716. <OMS cd="typmml" name="type"/>
  2717. <OMS cd="typmml" name="fn_type"/>
  2718. </OMATP>
  2719. <OMV name="f"/>
  2720. </OMATTR>
  2721. <OMI>1</OMI>
  2722. <OMI>2</OMI>
  2723. <OMI>3</OMI>
  2724. </OMA>
  2725. </OMOBJ>
  2726. om2mml();
  2727. <OMOBJ>
  2728. <OMA>
  2729. <OMS cd="arith1" name=times/>
  2730. <OMATTR>
  2731. <OMATP>
  2732. <OMS cd="typmml" name="type"/>
  2733. <OMS cd="typmml" name="matrix_type"/>
  2734. </OMATP>
  2735. <OMV name=A/>
  2736. </OMATTR>
  2737. <OMA>
  2738. <OMS cd="transc1" name=sin/>
  2739. <OMV name=x/>
  2740. </OMA>
  2741. </OMA>
  2742. </OMOBJ>
  2743. om2mml();
  2744. <OMOBJ>
  2745. <OMA>
  2746. <OMS cd="linalg3" name="vector_selector"/>
  2747. <OMI>2</OMI>
  2748. <OMA>
  2749. <OMS cd="linalg1" name="vector"/>
  2750. <OMI> 3 </OMI>
  2751. <OMI> 6 </OMI>
  2752. <OMI> 9 </OMI>
  2753. </OMA>
  2754. </OMA>
  2755. </OMOBJ>
  2756. om2mml();
  2757. <OMOBJ>
  2758. <OMA>
  2759. <OMS cd="linalg3" name="vector_selector"/>
  2760. <OMI>2</OMI>
  2761. <OMA>
  2762. <OMS cd="linalg1" name="matrixrow"/>
  2763. <OMI> 0 </OMI>
  2764. <OMI> 1 </OMI>
  2765. <OMI> 0 </OMI>
  2766. </OMA>
  2767. </OMA>
  2768. </OMOBJ>
  2769. om2mml();
  2770. <OMOBJ>
  2771. <OMBIND>
  2772. <OMS cd="quant1" name="forall"/>
  2773. <OMBVAR>
  2774. <OMV name="M"/>
  2775. </OMBVAR>
  2776. <OMA>
  2777. <OMS cd="logic1" name="and"/>
  2778. <OMA>
  2779. <OMS cd="relation1" name="eq"/>
  2780. <OMA>
  2781. <OMS cd="arith1" name="times"/>
  2782. <OMA>
  2783. <OMS cd="linalg3" name="zero"/>
  2784. <OMA>
  2785. <OMS cd="linalg3" name="rowcount"/>
  2786. <OMV name="M"/>
  2787. </OMA>
  2788. <OMA>
  2789. <OMS cd="linalg3" name="rowcount"/>
  2790. <OMV name="M"/>
  2791. </OMA>
  2792. </OMA>
  2793. <OMV name="M"/>
  2794. </OMA>
  2795. <OMA>
  2796. <OMS cd="linalg3" name="zero"/>
  2797. <OMA>
  2798. <OMS cd="linalg3" name="rowcount"/>
  2799. <OMV name="M"/>
  2800. </OMA>
  2801. <OMA>
  2802. <OMS cd="linalg3" name="columncount"/>
  2803. <OMV name="M"/>
  2804. </OMA>
  2805. </OMA>
  2806. </OMA>
  2807. <OMA>
  2808. <OMS cd="relation1" name="eq"/>
  2809. <OMA>
  2810. <OMS cd="arith1" name="times"/>
  2811. <OMV name="M"/>
  2812. <OMA>
  2813. <OMS cd="linalg3" name="zero"/>
  2814. <OMA>
  2815. <OMS cd="linalg3" name="columncount"/>
  2816. <OMV name="M"/>
  2817. </OMA>
  2818. <OMA>
  2819. <OMS cd="linalg3" name="columncount"/>
  2820. <OMV name="M"/>
  2821. </OMA>
  2822. </OMA>
  2823. </OMA>
  2824. <OMA>
  2825. <OMS cd="linalg3" name="zero"/>
  2826. <OMA>
  2827. <OMS cd="linalg3" name="rowcount"/>
  2828. <OMV name="M"/>
  2829. </OMA>
  2830. <OMA>
  2831. <OMS cd="linalg3" name="columncount"/>
  2832. <OMV name="M"/>
  2833. </OMA>
  2834. </OMA>
  2835. </OMA>
  2836. </OMA>
  2837. </OMBIND>
  2838. </OMOBJ>
  2839. om2mml();
  2840. <OMOBJ>
  2841. <OMA>
  2842. <OMS cd="linalg3" name="vector_selector"/>
  2843. <OMI> 1 </OMI>
  2844. <OMATTR>
  2845. <OMATP>
  2846. <OMS cd="typmml" name="type"/>
  2847. <OMS cd="typmml" name="vector_type"/>
  2848. </OMATP>
  2849. <OMV name=A/>
  2850. </OMATTR>
  2851. </OMA>
  2852. </OMOBJ>
  2853. om2mml();
  2854. <OMOBJ>
  2855. <OMA>
  2856. <OMS cd="linalg3" name="matrix_selector"/>
  2857. <OMI> 1 </OMI>
  2858. <OMI> 1 </OMI>
  2859. <OMATTR>
  2860. <OMATP>
  2861. <OMS cd="typmml" name="type"/>
  2862. <OMS cd="typmml" name="matrix_type"/>
  2863. </OMATP>
  2864. <OMV name=A/>
  2865. </OMATTR>
  2866. </OMA>
  2867. </OMOBJ>
  2868. % The following two examples were produced by REDUCE in MathML with the
  2869. % MathML interface, then translated to OpenMath. It is now possible to
  2870. % translate them back to MathML.
  2871. om2mml();
  2872. <OMOBJ>
  2873. <OMA>
  2874. <OMS cd="list1" name="list"/>
  2875. <OMA>
  2876. <OMS cd="list1" name="list"/>
  2877. <OMA>
  2878. <OMS cd="relation1" name="eq">
  2879. <OMV name="x"/>
  2880. <OMA>
  2881. <OMATTR>
  2882. <OMATP>
  2883. <OMS cd="typmml" name="type"/>
  2884. <OMS cd="typmml" name="fn_type"/>
  2885. </OMATP>
  2886. <OMV name="root_of"/>
  2887. </OMATTR>
  2888. <OMA>
  2889. <OMS cd="arith1" name="plus">
  2890. <OMA>
  2891. <OMS cd="arith1" name="minus">
  2892. <OMA>
  2893. <OMS cd="arith1" name="power">
  2894. <OMV name="y"/>
  2895. <OMV name="x_"/>
  2896. </OMA>
  2897. </OMA>
  2898. <OMA>
  2899. <OMS cd="arith1" name="minus">
  2900. <OMA>
  2901. <OMS cd="arith1" name="times">
  2902. <OMA>
  2903. <OMS cd="calculus1" name="int"/>
  2904. <OMBIND>
  2905. <OMS cd="fns1" name="lambda"/>
  2906. <OMBVAR>
  2907. <OMV name="x_"/>
  2908. </OMBVAR>
  2909. <OMA>
  2910. <OMS cd="arith1" name="power">
  2911. <OMV name="x_"/>
  2912. <OMV name="x_"/>
  2913. </OMA>
  2914. </OMBIND>
  2915. </OMA>
  2916. <OMV name="y"/>
  2917. </OMA>
  2918. </OMA>
  2919. <OMV name="x_"/>
  2920. <OMV name="y"/>
  2921. </OMA>
  2922. <OMV name="x_"/>
  2923. <OMV name="tag_1"/>
  2924. </OMA>
  2925. </OMA>
  2926. <OMA>
  2927. <OMS cd="relation1" name="eq">
  2928. <OMV name="a"/>
  2929. <OMA>
  2930. <OMS cd="arith1" name="plus">
  2931. <OMV name="x"/>
  2932. <OMV name="y"/>
  2933. </OMA>
  2934. </OMA>
  2935. </OMA>
  2936. </OMA>
  2937. </OMOBJ>
  2938. om2mml();
  2939. <OMOBJ>
  2940. <OMA>
  2941. <OMS cd="list1" name="list"/>
  2942. <OMA>
  2943. <OMS cd="list1" name="list"/>
  2944. <OMA>
  2945. <OMS cd="relation1" name="eq">
  2946. <OMV name="x"/>
  2947. <OMA>
  2948. <OMATTR>
  2949. <OMATP>
  2950. <OMS cd="typmml" name="type"/>
  2951. <OMS cd="typmml" name="fn_type"/>
  2952. </OMATP>
  2953. <OMV name="root_of"/>
  2954. </OMATTR>
  2955. <OMA>
  2956. <OMS cd="arith1" name="plus">
  2957. <OMA>
  2958. <OMS cd="arith1" name="times">
  2959. <OMA>
  2960. <OMS cd="transc1" name="exp">
  2961. <OMA>
  2962. <OMS cd="arith1" name="plus">
  2963. <OMS cd="nums1" name="i"/>
  2964. <OMV name="x_"/>
  2965. </OMA>
  2966. </OMA>
  2967. <OMV name="y"/>
  2968. </OMA>
  2969. <OMA>
  2970. <OMS cd="transc1" name="exp">
  2971. <OMA>
  2972. <OMS cd="arith1" name="plus">
  2973. <OMS cd="nums1" name="i"/>
  2974. <OMV name="x_"/>
  2975. </OMA>
  2976. </OMA>
  2977. <OMA>
  2978. <OMS cd="arith1" name="power">
  2979. <OMV name="x_"/>
  2980. <OMA>
  2981. <OMS cd="arith1" name="plus">
  2982. <OMV name="y"/>
  2983. <OMI> 1 </OMI>
  2984. </OMA>
  2985. </OMA>
  2986. <OMA>
  2987. <OMS cd="arith1" name="times">
  2988. <OMA>
  2989. <OMS cd="calculus1" name="int"/>
  2990. <OMBIND>
  2991. <OMS cd="fns1" name="lambda"/>
  2992. <OMBVAR>
  2993. <OMV name="x_"/>
  2994. </OMBVAR>
  2995. <OMA>
  2996. <OMS cd="arith1" name="power">
  2997. <OMV name="x_"/>
  2998. <OMV name="x_"/>
  2999. </OMA>
  3000. </OMBIND>
  3001. </OMA>
  3002. <OMA>
  3003. <OMS cd="arith1" name="power">
  3004. <OMV name="y"/>
  3005. <OMI> 2 </OMI>
  3006. </OMA>
  3007. </OMA>
  3008. <OMA>
  3009. <OMS cd="arith1" name="times">
  3010. <OMA>
  3011. <OMS cd="calculus1" name="int"/>
  3012. <OMBIND>
  3013. <OMS cd="fns1" name="lambda"/>
  3014. <OMBVAR>
  3015. <OMV name="x_"/>
  3016. </OMBVAR>
  3017. <OMA>
  3018. <OMS cd="arith1" name="power">
  3019. <OMV name="x_"/>
  3020. <OMV name="x_"/>
  3021. </OMA>
  3022. </OMBIND>
  3023. </OMA>
  3024. <OMV name="y"/>
  3025. </OMA>
  3026. </OMA>
  3027. <OMV name="x_"/>
  3028. <OMV name="tag_2"/>
  3029. </OMA>
  3030. </OMA>
  3031. <OMA>
  3032. <OMS cd="relation1" name="eq">
  3033. <OMV name="z"/>
  3034. <OMV name="y"/>
  3035. </OMA>
  3036. </OMA>
  3037. </OMA>
  3038. </OMOBJ>
  3039. om2mml();
  3040. <OMOBJ>
  3041. <OMATTR>
  3042. <OMATP>
  3043. <OMS cd="cc" name="type"/>
  3044. <OMS cd="omtypes" name="integer"/>
  3045. </OMATP>
  3046. <OMI> 0 </OMI>
  3047. </OMATTR>
  3048. </OMOBJ>
  3049. om2mml();
  3050. <OMOBJ>
  3051. <OMATTR>
  3052. <OMATP>
  3053. <OMS cd="cc" name="type"/>
  3054. <OMS cd="omtypes" name="float"/>
  3055. </OMATP>
  3056. <OMF dec=1.0/>
  3057. </OMATTR>
  3058. </OMOBJ>
  3059. om2mml();
  3060. <OMOBJ>
  3061. <OMA>
  3062. <OMS name="complex_cartesian" cd="nums1"/>
  3063. <OMV name="x"/>
  3064. <OMV name="y"/>
  3065. </OMA>
  3066. </OMOBJ>
  3067. om2mml();
  3068. <OMOBJ>
  3069. <OMA>
  3070. <OMS name="complex_polar" cd="nums1"/>
  3071. <OMV name="x"/>
  3072. <OMV name="y"/>
  3073. </OMA>
  3074. </OMOBJ>
  3075. om2mml();
  3076. <OMOBJ>
  3077. <OMA>
  3078. <OMS name="rational" cd="nums1"/>
  3079. <OMV name="x"/>
  3080. <OMV name="y"/>
  3081. </OMA>
  3082. </OMOBJ>
  3083. om2mml();
  3084. <OMOBJ>
  3085. <OMA>
  3086. <OMS name="complex_cartesian" cd="nums1"/>
  3087. <OMI>4</OMI>
  3088. <OMI>2</OMI>
  3089. </OMA>
  3090. </OMOBJ>
  3091. om2mml();
  3092. <OMOBJ>
  3093. <OMA>
  3094. <OMS name="complex_polar" cd="nums1"/>
  3095. <OMI>4</OMI>
  3096. <OMI>2</OMI>
  3097. </OMA>
  3098. </OMOBJ>
  3099. om2mml();
  3100. <OMOBJ>
  3101. <OMA>
  3102. <OMS name="rational" cd="nums1"/>
  3103. <OMI>4</OMI>
  3104. <OMI>2</OMI>
  3105. </OMA>
  3106. </OMOBJ>
  3107. % end;
  3108. end;