mathmlom.rlg 160 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635
  1. Sun Apr 18 17:56:49 2004 run on Linux
  2. load mathmlom;
  3. %in "$reduce/packages/mathml/examples.mml";
  4. % Description: This file contains a long list of examples demonstrating the abilities of
  5. % the translator. Most of these examples come straight from the MathML spec. They
  6. % were used during the development of the interface and should all be correctly
  7. % translated into OpenMath.
  8. %
  9. % Version 17 April 2000
  10. %
  11. % Author: Luis Alvarez Sobreviela
  12. %
  13. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  14. mml2om();
  15. <math>
  16. <apply><sin/>
  17. <apply><plus/>
  18. <apply><cos/>
  19. <ci> x </ci>
  20. </apply>
  21. <apply><power/>
  22. <ci> x </ci>
  23. <cn> 3 </cn>
  24. </apply>
  25. </apply>
  26. </apply>
  27. </math>
  28. Intermediate representation:
  29. (sin nil (plus nil (cos nil x) (power nil x 3)))
  30. <OMOBJ>
  31. <OMA>
  32. <OMS cd="transc1" name="sin">
  33. <OMA>
  34. <OMS cd="arith1" name="plus">
  35. <OMA>
  36. <OMS cd="transc1" name="cos">
  37. <OMV name="x"/>
  38. </OMA>
  39. <OMA>
  40. <OMS cd="arith1" name="power">
  41. <OMV name="x"/>
  42. <OMI> 3 </OMI>
  43. </OMA>
  44. </OMA>
  45. </OMA>
  46. </OMOBJ>
  47. mml2om();
  48. <math>
  49. <apply><sin/>
  50. <apply><plus/>
  51. <apply><cos/>
  52. <ci> x </ci>
  53. </apply>
  54. <apply><power/>
  55. <ci type="real"> x </ci>
  56. <cn> 3 </cn>
  57. </apply>
  58. </apply>
  59. </apply>
  60. </math>
  61. Intermediate representation:
  62. (sin nil (plus nil (cos nil x) (power nil (ci ((type real)) x) 3)))
  63. <OMOBJ>
  64. <OMA>
  65. <OMS cd="transc1" name="sin">
  66. <OMA>
  67. <OMS cd="arith1" name="plus">
  68. <OMA>
  69. <OMS cd="transc1" name="cos">
  70. <OMV name="x"/>
  71. </OMA>
  72. <OMA>
  73. <OMS cd="arith1" name="power">
  74. <OMATTR>
  75. <OMATP>
  76. <OMS cd="typmml" name="type">
  77. <OMS cd="typmml" name="(real real_type)real_type">
  78. </OMATP>
  79. <OMV name="x"/>
  80. </OMATTR>
  81. <OMI> 3 </OMI>
  82. </OMA>
  83. </OMA>
  84. </OMA>
  85. </OMOBJ>
  86. mml2om();
  87. <math>
  88. <set type=normal>
  89. <ci> b </ci>
  90. <cn> 2 </cn>
  91. <ci> c </ci>
  92. </set>
  93. </math>
  94. Intermediate representation:
  95. (set ((type normal)) b 2 c)
  96. <OMOBJ>
  97. <OMA>
  98. <OMS cd="set1" name="set"/>
  99. <OMV name="b"/>
  100. <OMI> 2 </OMI>
  101. <OMV name="c"/>
  102. </OMA>
  103. </OMOBJ>
  104. mml2om();
  105. <math>
  106. <set type="multiset">
  107. <ci> b </ci>
  108. <cn> 2 </cn>
  109. <ci> c </ci>
  110. </set>
  111. </math>
  112. Intermediate representation:
  113. (set ((type multiset)) b 2 c)
  114. <OMOBJ>
  115. <OMA>
  116. <OMS cd="multiset1" name="set"/>
  117. <OMV name="b"/>
  118. <OMI> 2 </OMI>
  119. <OMV name="c"/>
  120. </OMA>
  121. </OMOBJ>
  122. mml2om();
  123. <math>
  124. <vector>
  125. <ci> b </ci>
  126. <cn> 2 </cn>
  127. <ci> c </ci>
  128. </vector>
  129. </math>
  130. Intermediate representation:
  131. (vectorml nil b 2 c)
  132. <OMOBJ>
  133. <OMA>
  134. <OMS cd="linalg1" name="vector"/>
  135. <OMV name="b"/>
  136. <OMI> 2 </OMI>
  137. <OMV name="c"/>
  138. </OMA>
  139. </OMOBJ>
  140. mml2om();
  141. <math>
  142. <interval closure=closed>
  143. <ci> b </ci>
  144. <cn> 2 </cn>
  145. </interval>
  146. </math>
  147. Intermediate representation:
  148. (interval ((closure closed)) b 2)
  149. <OMOBJ>
  150. <OMA>
  151. <OMS cd="interval1" name="interval_cc"/>
  152. <OMV name="b"/>
  153. <OMI> 2 </OMI>
  154. </OMA>
  155. </OMOBJ>
  156. mml2om();
  157. <math>
  158. <interval closure=open>
  159. <ci> b </ci>
  160. <cn> 2 </cn>
  161. </interval>
  162. </math>
  163. Intermediate representation:
  164. (interval ((closure open)) b 2)
  165. <OMOBJ>
  166. <OMA>
  167. <OMS cd="interval1" name="interval_oo"/>
  168. <OMV name="b"/>
  169. <OMI> 2 </OMI>
  170. </OMA>
  171. </OMOBJ>
  172. mml2om();
  173. <math>
  174. <interval closure=open-closed>
  175. <ci> b </ci>
  176. <cn> 2 </cn>
  177. </interval>
  178. </math>
  179. Intermediate representation:
  180. (interval ((closure open!-closed)) b 2)
  181. <OMOBJ>
  182. <OMA>
  183. <OMS cd="interval1" name="interval_oc"/>
  184. <OMV name="b"/>
  185. <OMI> 2 </OMI>
  186. </OMA>
  187. </OMOBJ>
  188. mml2om();
  189. <math>
  190. <interval closure=closed-open>
  191. <ci> b </ci>
  192. <cn> 2 </cn>
  193. </interval>
  194. </math>
  195. Intermediate representation:
  196. (interval ((closure closed!-open)) b 2)
  197. <OMOBJ>
  198. <OMA>
  199. <OMS cd="interval1" name="interval_co"/>
  200. <OMV name="b"/>
  201. <OMI> 2 </OMI>
  202. </OMA>
  203. </OMOBJ>
  204. mml2om();
  205. <math>
  206. <cn type="complex-cartesian"> 6 <sep/> 3 </cn>
  207. </math>
  208. Intermediate representation:
  209. (complex_cartesian nil 6 3)
  210. <OMOBJ>
  211. <OMA>
  212. <OMS cd="nums1" name="complex_cartesian">
  213. <OMI> 6 </OMI>
  214. <OMI> 3 </OMI>
  215. </OMA>
  216. </OMOBJ>
  217. mml2om();
  218. <math>
  219. <cn type="complex-polar"> 6 <sep/> 3 </cn>
  220. </math>
  221. Intermediate representation:
  222. (complex_polar nil 6 3)
  223. <OMOBJ>
  224. <OMA>
  225. <OMS cd="nums1" name="complex_polar">
  226. <OMI> 6 </OMI>
  227. <OMI> 3 </OMI>
  228. </OMA>
  229. </OMOBJ>
  230. mml2om();
  231. <math>
  232. <cn type="integer" base="10"> 6 </cn>
  233. </math>
  234. Intermediate representation:
  235. (based_integer nil 10 (string 6))
  236. <OMOBJ>
  237. <OMA>
  238. <OMS cd="nums1" name="based_integer">
  239. <OMI> 10 </OMI>
  240. <OMSTR> 6 </OMSTR>
  241. </OMA>
  242. </OMOBJ>
  243. mml2om();
  244. <math>
  245. <apply><sum/>
  246. <bvar>
  247. <ci> x </ci>
  248. </bvar>
  249. <lowlimit>
  250. <ci> a </ci>
  251. </lowlimit>
  252. <uplimit>
  253. <ci> b </ci>
  254. </uplimit>
  255. <apply><plus/>
  256. <ci> x </ci>
  257. <apply><sin/>
  258. <ci> y </ci>
  259. </apply>
  260. </apply>
  261. </apply>
  262. </math>
  263. Intermediate representation:
  264. (sum nil (bvar x 1) (lowupperlimit a b) (plus nil x (sin nil y)))
  265. <OMOBJ>
  266. <OMA>
  267. <OMS cd="arith1" name="sum"/>
  268. <OMA>
  269. <OMS cd="interval1" name="integer_interval"/>
  270. <OMV name="a"/>
  271. <OMV name="b"/>
  272. </OMA>
  273. <OMBIND>
  274. <OMS cd="fns1" name="lambda"/>
  275. <OMBVAR>
  276. <OMV name="x"/>
  277. </OMBVAR>
  278. <OMA>
  279. <OMS cd="arith1" name="plus">
  280. <OMV name="x"/>
  281. <OMA>
  282. <OMS cd="transc1" name="sin">
  283. <OMV name="y"/>
  284. </OMA>
  285. </OMA>
  286. </OMBIND>
  287. </OMA>
  288. </OMOBJ>
  289. mml2om();
  290. <math>
  291. <apply><int/>
  292. <bvar>
  293. <ci> x </ci>
  294. </bvar>
  295. <lowlimit>
  296. <ci> a </ci>
  297. </lowlimit>
  298. <uplimit>
  299. <ci> b </ci>
  300. </uplimit>
  301. <apply><fn><ci> f </ci></fn>
  302. <ci> x </ci>
  303. </apply>
  304. </apply>
  305. </math>
  306. Intermediate representation:
  307. (int nil (bvar x 1) (lowupperlimit a b) (f nil x))
  308. <OMOBJ>
  309. <OMA>
  310. <OMS cd="calculus1" name="defint"/>
  311. <OMA>
  312. <OMS cd="interval1" name="integer_interval"/>
  313. <OMV name="a"/>
  314. <OMV name="b"/>
  315. </OMA>
  316. <OMBIND>
  317. <OMS cd="fns1" name="lambda"/>
  318. <OMBVAR>
  319. <OMV name="x"/>
  320. </OMBVAR>
  321. <OMA>
  322. <OMATTR>
  323. <OMATP>
  324. <OMS cd="typmml" name="type"/>
  325. <OMS cd="typmml" name="fn_type"/>
  326. </OMATP>
  327. <OMV name="f"/>
  328. </OMATTR>
  329. <OMV name="x"/>
  330. </OMA>
  331. </OMBIND>
  332. </OMA>
  333. </OMOBJ>
  334. mml2om();
  335. <math>
  336. <lambda>
  337. <bvar>
  338. <ci> x </ci>
  339. </bvar>
  340. <apply><sin/>
  341. <ci> x </ci>
  342. </apply>
  343. </lambda>
  344. </math>
  345. Intermediate representation:
  346. (lambda nil (bvar x 1) (sin nil x))
  347. <OMOBJ>
  348. <OMBIND>
  349. <OMS cd="fns1" name="lambda"/>
  350. <OMBVAR>
  351. <OMV name="x"/>
  352. </OMBVAR>
  353. <OMA>
  354. <OMS cd="transc1" name="sin">
  355. <OMV name="x"/>
  356. </OMA>
  357. </OMBIND>
  358. </OMOBJ>
  359. mml2om();
  360. <math>
  361. <apply><limit/>
  362. <bvar>
  363. <ci> x </ci>
  364. </bvar>
  365. <lowlimit>
  366. <cn> 0 </cn>
  367. </lowlimit>
  368. <apply><sin/>
  369. <ci> x </ci>
  370. </apply>
  371. </apply>
  372. </math>
  373. Intermediate representation:
  374. (limit nil (bvar x 1) (lowlimit 0) (sin nil x))
  375. <OMOBJ>
  376. <OMA>
  377. <OMS cd="limit1" name="limit"/>
  378. <OMI> 0 </OMI>
  379. <OMS cd="limit1" name="null"/>
  380. <OMBIND>
  381. <OMS cd="fns1" name="lambda"/>
  382. <OMBVAR>
  383. <OMV name="x"/>
  384. </OMBVAR>
  385. <OMA>
  386. <OMS cd="transc1" name="sin">
  387. <OMV name="x"/>
  388. </OMA>
  389. </OMBIND>
  390. </OMA>
  391. </OMOBJ>
  392. mml2om();
  393. <math>
  394. <apply><limit/>
  395. <bvar>
  396. <ci> x </ci>
  397. </bvar>
  398. <condition>
  399. <apply>
  400. <tendsto type="above"/>
  401. <ci> x </ci>
  402. <ci> a </ci>
  403. </apply>
  404. </condition>
  405. <apply><sin/>
  406. <ci> x </ci>
  407. </apply>
  408. </apply>
  409. </math>
  410. Intermediate representation:
  411. (limit nil (bvar x 1) (condition (tendsto ((type above)) x a)) (sin nil x))
  412. <OMOBJ>
  413. <OMA>
  414. <OMS cd="limit1" name="limit"/>
  415. <OMV name="a"/>
  416. <OMS cd="limit1" name="above"/>
  417. <OMBIND>
  418. <OMS cd="fns1" name="lambda"/>
  419. <OMBVAR>
  420. <OMV name="x"/>
  421. </OMBVAR>
  422. <OMA>
  423. <OMS cd="transc1" name="sin">
  424. <OMV name="x"/>
  425. </OMA>
  426. </OMBIND>
  427. </OMA>
  428. </OMOBJ>
  429. mml2om();
  430. <math>
  431. <apply><not/>
  432. <apply><exists/>
  433. <bvar>
  434. <ci> x </ci>
  435. </bvar>
  436. <bvar>
  437. <ci> y </ci>
  438. </bvar>
  439. <bvar>
  440. <ci> z </ci>
  441. </bvar>
  442. <bvar>
  443. <ci> n </ci>
  444. </bvar>
  445. <apply><and/>
  446. <apply><gt/>
  447. <ci> n </ci>
  448. <cn type="integer"> 2 </cn>
  449. </apply>
  450. <apply><eq/>
  451. <apply><plus/>
  452. <apply><power/>
  453. <ci> x </ci>
  454. <ci> n </ci>
  455. </apply>
  456. <apply><power/>
  457. <ci> y </ci>
  458. <ci> n </ci>
  459. </apply>
  460. </apply>
  461. <apply><power/>
  462. <ci> z </ci>
  463. <ci> n </ci>
  464. </apply>
  465. </apply>
  466. </apply>
  467. </apply>
  468. </apply>
  469. </math>
  470. Intermediate representation:
  471. (not nil (exists nil (bvar x 1) (bvar y 1) (bvar z 1) (bvar n 1) nil (and nil (
  472. gt nil n 2) (eq nil (plus nil (power nil x n) (power nil y n)) (power nil z n)))
  473. ))
  474. <OMOBJ>
  475. <OMA>
  476. <OMS cd="logic1" name="not">
  477. <OMBIND>
  478. <OMS cd="quant1" name="exists"/>
  479. <OMBVAR>
  480. <OMV name="x"/>
  481. <OMV name="y"/>
  482. <OMV name="z"/>
  483. <OMV name="n"/>
  484. </OMBVAR>
  485. <OMA>
  486. <OMS cd="logic1" name="and">
  487. <OMA>
  488. <OMS cd="relation1" name="gt">
  489. <OMV name="n"/>
  490. <OMI> 2 </OMI>
  491. </OMA>
  492. <OMA>
  493. <OMS cd="relation1" name="eq">
  494. <OMA>
  495. <OMS cd="arith1" name="plus">
  496. <OMA>
  497. <OMS cd="arith1" name="power">
  498. <OMV name="x"/>
  499. <OMV name="n"/>
  500. </OMA>
  501. <OMA>
  502. <OMS cd="arith1" name="power">
  503. <OMV name="y"/>
  504. <OMV name="n"/>
  505. </OMA>
  506. </OMA>
  507. <OMA>
  508. <OMS cd="arith1" name="power">
  509. <OMV name="z"/>
  510. <OMV name="n"/>
  511. </OMA>
  512. </OMA>
  513. </OMA>
  514. </OMBIND>
  515. </OMA>
  516. </OMOBJ>
  517. mml2om();
  518. <math>
  519. <matrix>
  520. <matrixrow>
  521. <cn> 0 </cn> <cn> 1 </cn> <cn> 0 </cn>
  522. </matrixrow>
  523. <matrixrow>
  524. <cn> 0 </cn> <cn> 0 </cn> <cn> 1 </cn>
  525. </matrixrow>
  526. <matrixrow>
  527. <cn> 1 </cn> <cn> 0 </cn> <cn> 0 </cn>
  528. </matrixrow>
  529. </matrix>
  530. </math>
  531. Intermediate representation:
  532. (matrix nil matrixrow ((0 1 0) (0 0 1) (1 0 0)))
  533. <OMOBJ>
  534. <OMA>
  535. <OMS cd="linalg1" name="matrix"/>
  536. <OMA>
  537. <OMS cd="linalg1" name="matrixrow"/>
  538. <OMI> 0 </OMI>
  539. <OMI> 1 </OMI>
  540. <OMI> 0 </OMI>
  541. </OMA>
  542. <OMA>
  543. <OMS cd="linalg1" name="matrixrow"/>
  544. <OMI> 0 </OMI>
  545. <OMI> 0 </OMI>
  546. <OMI> 1 </OMI>
  547. </OMA>
  548. <OMA>
  549. <OMS cd="linalg1" name="matrixrow"/>
  550. <OMI> 1 </OMI>
  551. <OMI> 0 </OMI>
  552. <OMI> 0 </OMI>
  553. </OMA>
  554. </OMA>
  555. </OMOBJ>
  556. mml2om();
  557. <math>
  558. <apply><int/>
  559. <bvar>
  560. <ci>x</ci>
  561. </bvar>
  562. <apply><power/>
  563. <ci>x</ci>
  564. <cn type="integer">2</cn>
  565. </apply>
  566. </apply>
  567. </math>
  568. Intermediate representation:
  569. (int nil (bvar x 1) nil (power nil x 2))
  570. <OMOBJ>
  571. <OMA>
  572. <OMS cd="calculus1" name="int"/>
  573. <OMBIND>
  574. <OMS cd="fns1" name="lambda"/>
  575. <OMBVAR>
  576. <OMV name="x"/>
  577. </OMBVAR>
  578. <OMA>
  579. <OMS cd="arith1" name="power">
  580. <OMV name="x"/>
  581. <OMI> 2 </OMI>
  582. </OMA>
  583. </OMBIND>
  584. </OMA>
  585. </OMOBJ>
  586. mml2om();
  587. <math>
  588. <apply><int/>
  589. <bvar>
  590. <ci> x </ci>
  591. </bvar>
  592. <apply><sin/>
  593. <ci> x </ci>
  594. </apply>
  595. </apply>
  596. </math>
  597. Intermediate representation:
  598. (int nil (bvar x 1) nil (sin nil x))
  599. <OMOBJ>
  600. <OMA>
  601. <OMS cd="calculus1" name="int"/>
  602. <OMBIND>
  603. <OMS cd="fns1" name="lambda"/>
  604. <OMBVAR>
  605. <OMV name="x"/>
  606. </OMBVAR>
  607. <OMA>
  608. <OMS cd="transc1" name="sin">
  609. <OMV name="x"/>
  610. </OMA>
  611. </OMBIND>
  612. </OMA>
  613. </OMOBJ>
  614. mml2om();
  615. <math>
  616. <apply><sum/>
  617. <bvar>
  618. <ci> x </ci>
  619. </bvar>
  620. <lowlimit>
  621. <ci> a </ci>
  622. </lowlimit>
  623. <uplimit>
  624. <ci> b </ci>
  625. </uplimit>
  626. <apply><fn><ci> f </ci></fn>
  627. <ci> x </ci>
  628. </apply>
  629. </apply>
  630. </math>
  631. Intermediate representation:
  632. (sum nil (bvar x 1) (lowupperlimit a b) (f nil x))
  633. <OMOBJ>
  634. <OMA>
  635. <OMS cd="arith1" name="sum"/>
  636. <OMA>
  637. <OMS cd="interval1" name="integer_interval"/>
  638. <OMV name="a"/>
  639. <OMV name="b"/>
  640. </OMA>
  641. <OMBIND>
  642. <OMS cd="fns1" name="lambda"/>
  643. <OMBVAR>
  644. <OMV name="x"/>
  645. </OMBVAR>
  646. <OMA>
  647. <OMATTR>
  648. <OMATP>
  649. <OMS cd="typmml" name="type"/>
  650. <OMS cd="typmml" name="fn_type"/>
  651. </OMATP>
  652. <OMV name="f"/>
  653. </OMATTR>
  654. <OMV name="x"/>
  655. </OMA>
  656. </OMBIND>
  657. </OMA>
  658. </OMOBJ>
  659. mml2om();
  660. <math>
  661. <apply><diff/>
  662. <bvar>
  663. <ci> x </ci>
  664. </bvar>
  665. <apply><fn><ci>f</ci></fn>
  666. <ci> x </ci>
  667. </apply>
  668. </apply>
  669. </math>
  670. Intermediate representation:
  671. (diff nil (bvar x 1) (f nil x))
  672. <OMOBJ>
  673. <OMA>
  674. <OMS cd="calculus1" name="diff"/>
  675. <OMBIND>
  676. <OMS cd="fns1" name="lambda"/>
  677. <OMBVAR>
  678. <OMV name="x"/>
  679. </OMBVAR>
  680. <OMA>
  681. <OMATTR>
  682. <OMATP>
  683. <OMS cd="typmml" name="type"/>
  684. <OMS cd="typmml" name="fn_type"/>
  685. </OMATP>
  686. <OMV name="f"/>
  687. </OMATTR>
  688. <OMV name="x"/>
  689. </OMA>
  690. </OMBIND>
  691. </OMA>
  692. </OMOBJ>
  693. mml2om();
  694. <math>
  695. <apply><diff/>
  696. <bvar>
  697. <ci> x </ci>
  698. <degree>
  699. <cn> 2 </cn>
  700. </degree>
  701. </bvar>
  702. <apply><fn><ci>f</ci></fn>
  703. <ci> x </ci>
  704. </apply>
  705. </apply>
  706. </math>
  707. Intermediate representation:
  708. (diff nil (bvar x 1) (diff nil (bvar x 1) (f nil x)))
  709. <OMOBJ>
  710. <OMA>
  711. <OMS cd="calculus1" name="diff"/>
  712. <OMBIND>
  713. <OMS cd="fns1" name="lambda"/>
  714. <OMBVAR>
  715. <OMV name="x"/>
  716. </OMBVAR>
  717. <OMA>
  718. <OMS cd="calculus1" name="diff"/>
  719. <OMBIND>
  720. <OMS cd="fns1" name="lambda"/>
  721. <OMBVAR>
  722. <OMV name="x"/>
  723. </OMBVAR>
  724. <OMA>
  725. <OMATTR>
  726. <OMATP>
  727. <OMS cd="typmml" name="type"/>
  728. <OMS cd="typmml" name="fn_type"/>
  729. </OMATP>
  730. <OMV name="f"/>
  731. </OMATTR>
  732. <OMV name="x"/>
  733. </OMA>
  734. </OMBIND>
  735. </OMA>
  736. </OMBIND>
  737. </OMA>
  738. </OMOBJ>
  739. mml2om();
  740. <math>
  741. <apply><diff/>
  742. <bvar>
  743. <ci> x </ci>
  744. <degree>
  745. <cn> 3 </cn>
  746. </degree>
  747. </bvar>
  748. <apply><fn><ci>f</ci></fn>
  749. <ci> x </ci>
  750. </apply>
  751. </apply>
  752. </math>
  753. Intermediate representation:
  754. (diff nil (bvar x 1) (diff nil (bvar x 1) (diff nil (bvar x 1) (f nil x))))
  755. <OMOBJ>
  756. <OMA>
  757. <OMS cd="calculus1" name="diff"/>
  758. <OMBIND>
  759. <OMS cd="fns1" name="lambda"/>
  760. <OMBVAR>
  761. <OMV name="x"/>
  762. </OMBVAR>
  763. <OMA>
  764. <OMS cd="calculus1" name="diff"/>
  765. <OMBIND>
  766. <OMS cd="fns1" name="lambda"/>
  767. <OMBVAR>
  768. <OMV name="x"/>
  769. </OMBVAR>
  770. <OMA>
  771. <OMS cd="calculus1" name="diff"/>
  772. <OMBIND>
  773. <OMS cd="fns1" name="lambda"/>
  774. <OMBVAR>
  775. <OMV name="x"/>
  776. </OMBVAR>
  777. <OMA>
  778. <OMATTR>
  779. <OMATP>
  780. <OMS cd="typmml" name="type"/>
  781. <OMS cd="typmml" name="fn_type"/>
  782. </OMATP>
  783. <OMV name="f"/>
  784. </OMATTR>
  785. <OMV name="x"/>
  786. </OMA>
  787. </OMBIND>
  788. </OMA>
  789. </OMBIND>
  790. </OMA>
  791. </OMBIND>
  792. </OMA>
  793. </OMOBJ>
  794. mml2om();
  795. <math>
  796. <set type=normal>
  797. <ci> b </ci>
  798. <ci> a </ci>
  799. <ci> c </ci>
  800. </set>
  801. </math>
  802. Intermediate representation:
  803. (set ((type normal)) b a c)
  804. <OMOBJ>
  805. <OMA>
  806. <OMS cd="set1" name="set"/>
  807. <OMV name="b"/>
  808. <OMV name="a"/>
  809. <OMV name="c"/>
  810. </OMA>
  811. </OMOBJ>
  812. mml2om();
  813. <math>
  814. <list>
  815. <ci> b </ci>
  816. <ci> a </ci>
  817. <ci> c </ci>
  818. </list>
  819. </math>
  820. Intermediate representation:
  821. (list nil b a c)
  822. <OMOBJ>
  823. <OMA>
  824. <OMS cd="list1" name="list"/>
  825. <OMV name="b"/>
  826. <OMV name="a"/>
  827. <OMV name="c"/>
  828. </OMA>
  829. </OMOBJ>
  830. mml2om();
  831. <math>
  832. <list order="lexicographic">
  833. <ci> b </ci>
  834. <ci> a </ci>
  835. <ci> c </ci>
  836. </list>
  837. </math>
  838. Intermediate representation:
  839. (list ((order lexicographic)) b a c)
  840. <OMOBJ>
  841. <OMA>
  842. <OMS cd="list1" name="list"/>
  843. <OMV name="b"/>
  844. <OMV name="a"/>
  845. <OMV name="c"/>
  846. </OMA>
  847. </OMOBJ>
  848. mml2om();
  849. <math>
  850. <apply><union definitionurl="www.nag.co.uk"/>
  851. <ci type="set"> A </ci>
  852. <ci type="set"> B </ci>
  853. </apply>
  854. </math>
  855. Intermediate representation:
  856. (union ((definitionurl (w w w !. n a g !. c o !. u k))) (ci ((type set)) a) (ci
  857. ((type set)) b))
  858. <OMOBJ>
  859. <OMA>
  860. <OMS cd="set1" name="union">
  861. <OMATTR>
  862. <OMATP>
  863. <OMS cd="typmml" name="type">
  864. <OMS cd="typmml" name="(set set_type)set_type">
  865. </OMATP>
  866. <OMV name="a"/>
  867. </OMATTR>
  868. <OMATTR>
  869. <OMATP>
  870. <OMS cd="typmml" name="type">
  871. <OMS cd="typmml" name="(set set_type)set_type">
  872. </OMATP>
  873. <OMV name="b"/>
  874. </OMATTR>
  875. </OMA>
  876. </OMOBJ>
  877. mml2om();
  878. <math>
  879. <apply><union/>
  880. <set type="normal">
  881. <ci> b </ci>
  882. <cn> 2 </cn>
  883. <ci> c </ci>
  884. </set>
  885. <set>
  886. <ci> b </ci>
  887. <ci> r </ci>
  888. <cn> 2 </cn>
  889. <cn> 4 </cn>
  890. <ci> c </ci>
  891. </set>
  892. </apply>
  893. </math>
  894. Intermediate representation:
  895. (union nil (set ((type normal)) b 2 c) (set nil b r 2 4 c))
  896. <OMOBJ>
  897. <OMA>
  898. <OMS cd="set1" name="union">
  899. <OMA>
  900. <OMS cd="set1" name="set"/>
  901. <OMV name="b"/>
  902. <OMI> 2 </OMI>
  903. <OMV name="c"/>
  904. </OMA>
  905. <OMA>
  906. <OMS cd="set1" name="set"/>
  907. <OMV name="b"/>
  908. <OMV name="r"/>
  909. <OMI> 2 </OMI>
  910. <OMI> 4 </OMI>
  911. <OMV name="c"/>
  912. </OMA>
  913. </OMA>
  914. </OMOBJ>
  915. mml2om();
  916. <math>
  917. <apply><intersect definitionurl="www.mit.edu"/>
  918. <ci type="set"> A </ci>
  919. <ci type="set"> B </ci>
  920. </apply>
  921. </math>
  922. Intermediate representation:
  923. (intersect ((definitionurl (w w w !. m i t !. e d u))) (ci ((type set)) a) (ci (
  924. (type set)) b))
  925. <OMOBJ>
  926. <OMA>
  927. <OMS cd="set1" name="intersect">
  928. <OMATTR>
  929. <OMATP>
  930. <OMS cd="typmml" name="type">
  931. <OMS cd="typmml" name="(set set_type)set_type">
  932. </OMATP>
  933. <OMV name="a"/>
  934. </OMATTR>
  935. <OMATTR>
  936. <OMATP>
  937. <OMS cd="typmml" name="type">
  938. <OMS cd="typmml" name="(set set_type)set_type">
  939. </OMATP>
  940. <OMV name="b"/>
  941. </OMATTR>
  942. </OMA>
  943. </OMOBJ>
  944. mml2om();
  945. <math>
  946. <apply><intersect/>
  947. <set>
  948. <ci> b </ci>
  949. <cn> 2 </cn>
  950. <ci> c </ci>
  951. </set>
  952. <set>
  953. <ci> b </ci>
  954. <ci> r </ci>
  955. <cn> 2 </cn>
  956. <cn> 4 </cn>
  957. <ci> c </ci>
  958. </set>
  959. </apply>
  960. </math>
  961. Intermediate representation:
  962. (intersect nil (set nil b 2 c) (set nil b r 2 4 c))
  963. <OMOBJ>
  964. <OMA>
  965. <OMS cd="set1" name="intersect">
  966. <OMA>
  967. <OMS cd="set1" name="set"/>
  968. <OMV name="b"/>
  969. <OMI> 2 </OMI>
  970. <OMV name="c"/>
  971. </OMA>
  972. <OMA>
  973. <OMS cd="set1" name="set"/>
  974. <OMV name="b"/>
  975. <OMV name="r"/>
  976. <OMI> 2 </OMI>
  977. <OMI> 4 </OMI>
  978. <OMV name="c"/>
  979. </OMA>
  980. </OMA>
  981. </OMOBJ>
  982. mml2om();
  983. <math>
  984. <reln><in definitionurl="www.www.www"/>
  985. <ci> a </ci>
  986. <ci type="set"> A </ci>
  987. </reln>
  988. </math>
  989. Intermediate representation:
  990. (in ((definitionurl (w w w !. w w w !. w w w))) a (ci ((type set)) a))
  991. <OMOBJ>
  992. <OMA>
  993. <OMS cd="set1" name="in">
  994. <OMV name="a"/>
  995. <OMATTR>
  996. <OMATP>
  997. <OMS cd="typmml" name="type">
  998. <OMS cd="typmml" name="(set set_type)set_type">
  999. </OMATP>
  1000. <OMV name="a"/>
  1001. </OMATTR>
  1002. </OMA>
  1003. </OMOBJ>
  1004. mml2om();
  1005. <math>
  1006. <reln><notin definitionurl="www.www.www"/>
  1007. <ci> a </ci>
  1008. <ci> A </ci>
  1009. </reln>
  1010. </math>
  1011. Intermediate representation:
  1012. (notin ((definitionurl (w w w !. w w w !. w w w))) a a)
  1013. <OMOBJ>
  1014. <OMA>
  1015. <OMS cd="set1" name="notin">
  1016. <OMV name="a"/>
  1017. <OMV name="a"/>
  1018. </OMA>
  1019. </OMOBJ>
  1020. mml2om();
  1021. <math>
  1022. <reln><prsubset definitionurl="www.www.www"/>
  1023. <ci> A </ci>
  1024. <ci> B </ci>
  1025. </reln>
  1026. </math>
  1027. Intermediate representation:
  1028. (prsubset ((definitionurl (w w w !. w w w !. w w w))) a b)
  1029. <OMOBJ>
  1030. <OMA>
  1031. <OMS cd="set1" name="prsubset">
  1032. <OMV name="a"/>
  1033. <OMV name="b"/>
  1034. </OMA>
  1035. </OMOBJ>
  1036. mml2om();
  1037. <math>
  1038. <reln><notsubset definitionurl="www.www.www"/>
  1039. <ci> A </ci>
  1040. <ci> B </ci>
  1041. </reln>
  1042. </math>
  1043. Intermediate representation:
  1044. (notsubset ((definitionurl (w w w !. w w w !. w w w))) a b)
  1045. <OMOBJ>
  1046. <OMA>
  1047. <OMS cd="set1" name="notsubset">
  1048. <OMV name="a"/>
  1049. <OMV name="b"/>
  1050. </OMA>
  1051. </OMOBJ>
  1052. mml2om();
  1053. <math>
  1054. <reln><notprsubset definitionurl="www.www.www"/>
  1055. <ci> A </ci>
  1056. <ci> B </ci>
  1057. </reln>
  1058. </math>
  1059. Intermediate representation:
  1060. (notprsubset ((definitionurl (w w w !. w w w !. w w w))) a b)
  1061. <OMOBJ>
  1062. <OMA>
  1063. <OMS cd="set1" name="notprsubset">
  1064. <OMV name="a"/>
  1065. <OMV name="b"/>
  1066. </OMA>
  1067. </OMOBJ>
  1068. mml2om();
  1069. <math>
  1070. <apply><setdiff definitionurl="www.www.www"/>
  1071. <ci> A </ci>
  1072. <ci> B </ci>
  1073. </apply>
  1074. </math>
  1075. Intermediate representation:
  1076. (setdiff ((definitionurl (w w w !. w w w !. w w w))) a b)
  1077. <OMOBJ>
  1078. <OMA>
  1079. <OMS cd="set1" name="setdiff">
  1080. <OMV name="a"/>
  1081. <OMV name="b"/>
  1082. </OMA>
  1083. </OMOBJ>
  1084. mml2om();
  1085. <math>
  1086. <apply><sum/>
  1087. <bvar>
  1088. <ci> x </ci>
  1089. </bvar>
  1090. <lowlimit>
  1091. <ci> a </ci>
  1092. </lowlimit>
  1093. <uplimit>
  1094. <ci> b </ci>
  1095. </uplimit>
  1096. <apply><fn><ci> f </ci></fn>
  1097. <ci> x </ci>
  1098. </apply>
  1099. </apply>
  1100. </math>
  1101. Intermediate representation:
  1102. (sum nil (bvar x 1) (lowupperlimit a b) (f nil x))
  1103. <OMOBJ>
  1104. <OMA>
  1105. <OMS cd="arith1" name="sum"/>
  1106. <OMA>
  1107. <OMS cd="interval1" name="integer_interval"/>
  1108. <OMV name="a"/>
  1109. <OMV name="b"/>
  1110. </OMA>
  1111. <OMBIND>
  1112. <OMS cd="fns1" name="lambda"/>
  1113. <OMBVAR>
  1114. <OMV name="x"/>
  1115. </OMBVAR>
  1116. <OMA>
  1117. <OMATTR>
  1118. <OMATP>
  1119. <OMS cd="typmml" name="type"/>
  1120. <OMS cd="typmml" name="fn_type"/>
  1121. </OMATP>
  1122. <OMV name="f"/>
  1123. </OMATTR>
  1124. <OMV name="x"/>
  1125. </OMA>
  1126. </OMBIND>
  1127. </OMA>
  1128. </OMOBJ>
  1129. mml2om();
  1130. <math>
  1131. <apply><product/>
  1132. <bvar>
  1133. <ci> x </ci>
  1134. </bvar>
  1135. <lowlimit>
  1136. <ci> a </ci>
  1137. </lowlimit>
  1138. <uplimit>
  1139. <ci> b </ci>
  1140. </uplimit>
  1141. <apply><fn><ci> f </ci></fn>
  1142. <ci> x </ci>
  1143. </apply>
  1144. </apply>
  1145. </math>
  1146. Intermediate representation:
  1147. (product nil (bvar x 1) (lowupperlimit a b) (f nil x))
  1148. <OMOBJ>
  1149. <OMA>
  1150. <OMS cd="arith1" name="product"/>
  1151. <OMA>
  1152. <OMS cd="interval1" name="integer_interval"/>
  1153. <OMV name="a"/>
  1154. <OMV name="b"/>
  1155. </OMA>
  1156. <OMBIND>
  1157. <OMS cd="fns1" name="lambda"/>
  1158. <OMBVAR>
  1159. <OMV name="x"/>
  1160. </OMBVAR>
  1161. <OMA>
  1162. <OMATTR>
  1163. <OMATP>
  1164. <OMS cd="typmml" name="type"/>
  1165. <OMS cd="typmml" name="fn_type"/>
  1166. </OMATP>
  1167. <OMV name="f"/>
  1168. </OMATTR>
  1169. <OMV name="x"/>
  1170. </OMA>
  1171. </OMBIND>
  1172. </OMA>
  1173. </OMOBJ>
  1174. mml2om();
  1175. <math>
  1176. <apply><limit/>
  1177. <bvar>
  1178. <ci> V </ci>
  1179. </bvar>
  1180. <condition>
  1181. <apply>
  1182. <tendsto type=above/>
  1183. <ci> V </ci>
  1184. <cn> 0 </cn>
  1185. </apply>
  1186. </condition>
  1187. <apply><divide/>
  1188. <apply><int/>
  1189. <bvar>
  1190. <ci> S</ci>
  1191. </bvar>
  1192. <ci> a </ci>
  1193. </apply>
  1194. <ci> V </ci>
  1195. </apply>
  1196. </apply>
  1197. </math>
  1198. Intermediate representation:
  1199. (limit nil (bvar v 1) (condition (tendsto ((type above)) v 0)) (divide nil (int
  1200. nil (bvar s 1) nil a) v))
  1201. <OMOBJ>
  1202. <OMA>
  1203. <OMS cd="limit1" name="limit"/>
  1204. <OMI> 0 </OMI>
  1205. <OMS cd="limit1" name="above"/>
  1206. <OMBIND>
  1207. <OMS cd="fns1" name="lambda"/>
  1208. <OMBVAR>
  1209. <OMV name="v"/>
  1210. </OMBVAR>
  1211. <OMA>
  1212. <OMS cd="arith1" name="divide">
  1213. <OMA>
  1214. <OMS cd="calculus1" name="int"/>
  1215. <OMBIND>
  1216. <OMS cd="fns1" name="lambda"/>
  1217. <OMBVAR>
  1218. <OMV name="s"/>
  1219. </OMBVAR>
  1220. <OMV name="a"/>
  1221. </OMBIND>
  1222. </OMA>
  1223. <OMV name="v"/>
  1224. </OMA>
  1225. </OMBIND>
  1226. </OMA>
  1227. </OMOBJ>
  1228. mml2om();
  1229. <math>
  1230. <apply><limit/>
  1231. <bvar>
  1232. <ci> x </ci>
  1233. </bvar>
  1234. <lowlimit>
  1235. <cn> 0 </cn>
  1236. </lowlimit>
  1237. <apply><sin/>
  1238. <ci> x </ci>
  1239. </apply>
  1240. </apply>
  1241. </math>
  1242. Intermediate representation:
  1243. (limit nil (bvar x 1) (lowlimit 0) (sin nil x))
  1244. <OMOBJ>
  1245. <OMA>
  1246. <OMS cd="limit1" name="limit"/>
  1247. <OMI> 0 </OMI>
  1248. <OMS cd="limit1" name="null"/>
  1249. <OMBIND>
  1250. <OMS cd="fns1" name="lambda"/>
  1251. <OMBVAR>
  1252. <OMV name="x"/>
  1253. </OMBVAR>
  1254. <OMA>
  1255. <OMS cd="transc1" name="sin">
  1256. <OMV name="x"/>
  1257. </OMA>
  1258. </OMBIND>
  1259. </OMA>
  1260. </OMOBJ>
  1261. mml2om();
  1262. <math>
  1263. <apply><limit/>
  1264. <bvar>
  1265. <ci> x </ci>
  1266. </bvar>
  1267. <condition>
  1268. <reln>
  1269. <tendsto type="above"/>
  1270. <ci> x </ci>
  1271. <ci> a </ci>
  1272. </reln>
  1273. </condition>
  1274. <apply><sin/>
  1275. <ci> x </ci>
  1276. </apply>
  1277. </apply>
  1278. </math>
  1279. Intermediate representation:
  1280. (limit nil (bvar x 1) (condition (tendsto ((type above)) x a)) (sin nil x))
  1281. <OMOBJ>
  1282. <OMA>
  1283. <OMS cd="limit1" name="limit"/>
  1284. <OMV name="a"/>
  1285. <OMS cd="limit1" name="above"/>
  1286. <OMBIND>
  1287. <OMS cd="fns1" name="lambda"/>
  1288. <OMBVAR>
  1289. <OMV name="x"/>
  1290. </OMBVAR>
  1291. <OMA>
  1292. <OMS cd="transc1" name="sin">
  1293. <OMV name="x"/>
  1294. </OMA>
  1295. </OMBIND>
  1296. </OMA>
  1297. </OMOBJ>
  1298. mml2om();
  1299. <math>
  1300. <apply><sin/>
  1301. <apply><plus/>
  1302. <apply><cos/>
  1303. <ci> x </ci>
  1304. </apply>
  1305. <apply><power/>
  1306. <ci> x </ci>
  1307. <cn> 3 </cn>
  1308. </apply>
  1309. </apply>
  1310. </apply>
  1311. </math>
  1312. Intermediate representation:
  1313. (sin nil (plus nil (cos nil x) (power nil x 3)))
  1314. <OMOBJ>
  1315. <OMA>
  1316. <OMS cd="transc1" name="sin">
  1317. <OMA>
  1318. <OMS cd="arith1" name="plus">
  1319. <OMA>
  1320. <OMS cd="transc1" name="cos">
  1321. <OMV name="x"/>
  1322. </OMA>
  1323. <OMA>
  1324. <OMS cd="arith1" name="power">
  1325. <OMV name="x"/>
  1326. <OMI> 3 </OMI>
  1327. </OMA>
  1328. </OMA>
  1329. </OMA>
  1330. </OMOBJ>
  1331. mml2om();
  1332. <math>
  1333. <apply><mean/>
  1334. <ci> b </ci>
  1335. <ci> r </ci>
  1336. <cn> 2 </cn>
  1337. <cn> 4 </cn>
  1338. <ci> c </ci>
  1339. </apply>
  1340. </math>
  1341. Intermediate representation:
  1342. (mean nil b r 2 4 c)
  1343. <OMOBJ>
  1344. <OMA>
  1345. <OMS cd="stats1" name="mean">
  1346. <OMV name="b"/>
  1347. <OMV name="r"/>
  1348. <OMI> 2 </OMI>
  1349. <OMI> 4 </OMI>
  1350. <OMV name="c"/>
  1351. </OMA>
  1352. </OMOBJ>
  1353. mml2om();
  1354. <math>
  1355. <apply><sdev/>
  1356. <ci> b </ci>
  1357. <ci> r </ci>
  1358. <cn> 2 </cn>
  1359. <cn> 4 </cn>
  1360. <ci> c </ci>
  1361. </apply>
  1362. </math>
  1363. Intermediate representation:
  1364. (sdev nil b r 2 4 c)
  1365. <OMOBJ>
  1366. <OMA>
  1367. <OMS cd="stats1" name="sdev">
  1368. <OMV name="b"/>
  1369. <OMV name="r"/>
  1370. <OMI> 2 </OMI>
  1371. <OMI> 4 </OMI>
  1372. <OMV name="c"/>
  1373. </OMA>
  1374. </OMOBJ>
  1375. mml2om();
  1376. <math>
  1377. <apply><var/>
  1378. <ci> b </ci>
  1379. <ci> r </ci>
  1380. <cn> 2 </cn>
  1381. <cn> 4 </cn>
  1382. <ci> c </ci>
  1383. </apply>
  1384. </math>
  1385. Intermediate representation:
  1386. (variance nil b r 2 4 c)
  1387. <OMOBJ>
  1388. <OMA>
  1389. <OMS cd="stats1" name="variance">
  1390. <OMV name="b"/>
  1391. <OMV name="r"/>
  1392. <OMI> 2 </OMI>
  1393. <OMI> 4 </OMI>
  1394. <OMV name="c"/>
  1395. </OMA>
  1396. </OMOBJ>
  1397. mml2om();
  1398. <math>
  1399. <vector>
  1400. <cn> 1 </cn>
  1401. <cn> 2 </cn>
  1402. <cn> 3 </cn>
  1403. <ci> x </ci>
  1404. </vector>
  1405. </math>
  1406. Intermediate representation:
  1407. (vectorml nil 1 2 3 x)
  1408. <OMOBJ>
  1409. <OMA>
  1410. <OMS cd="linalg1" name="vector"/>
  1411. <OMI> 1 </OMI>
  1412. <OMI> 2 </OMI>
  1413. <OMI> 3 </OMI>
  1414. <OMV name="x"/>
  1415. </OMA>
  1416. </OMOBJ>
  1417. mml2om();
  1418. <math>
  1419. <matrix>
  1420. <matrixrow>
  1421. <cn> 0 </cn> <cn> 1 </cn> <cn> 0 </cn>
  1422. </matrixrow>
  1423. <matrixrow>
  1424. <cn> 0 </cn> <cn> 0 </cn> <cn> 1 </cn>
  1425. </matrixrow>
  1426. <matrixrow>
  1427. <cn> 1 </cn> <cn> 0 </cn> <cn> 0 </cn>
  1428. </matrixrow>
  1429. </matrix>
  1430. </math>
  1431. Intermediate representation:
  1432. (matrix nil matrixrow ((0 1 0) (0 0 1) (1 0 0)))
  1433. <OMOBJ>
  1434. <OMA>
  1435. <OMS cd="linalg1" name="matrix"/>
  1436. <OMA>
  1437. <OMS cd="linalg1" name="matrixrow"/>
  1438. <OMI> 0 </OMI>
  1439. <OMI> 1 </OMI>
  1440. <OMI> 0 </OMI>
  1441. </OMA>
  1442. <OMA>
  1443. <OMS cd="linalg1" name="matrixrow"/>
  1444. <OMI> 0 </OMI>
  1445. <OMI> 0 </OMI>
  1446. <OMI> 1 </OMI>
  1447. </OMA>
  1448. <OMA>
  1449. <OMS cd="linalg1" name="matrixrow"/>
  1450. <OMI> 1 </OMI>
  1451. <OMI> 0 </OMI>
  1452. <OMI> 0 </OMI>
  1453. </OMA>
  1454. </OMA>
  1455. </OMOBJ>
  1456. mml2om();
  1457. <math>
  1458. <apply><determinant/>
  1459. <matrix>
  1460. <matrixrow>
  1461. <cn> 3 </cn> <cn> 1 </cn> <cn> 5 </cn>
  1462. </matrixrow>
  1463. <matrixrow>
  1464. <cn> 7 </cn> <cn> 0 </cn> <cn> 2 </cn>
  1465. </matrixrow>
  1466. <matrixrow>
  1467. <cn> 1 </cn> <cn> 7 </cn> <cn> 8 </cn>
  1468. </matrixrow>
  1469. </matrix>
  1470. </apply>
  1471. </math>
  1472. Intermediate representation:
  1473. (determinant nil (matrix nil matrixrow ((3 1 5) (7 0 2) (1 7 8))))
  1474. <OMOBJ>
  1475. <OMA>
  1476. <OMS cd="linalg3" name="determinant">
  1477. <OMA>
  1478. <OMS cd="linalg1" name="matrix"/>
  1479. <OMA>
  1480. <OMS cd="linalg1" name="matrixrow"/>
  1481. <OMI> 3 </OMI>
  1482. <OMI> 1 </OMI>
  1483. <OMI> 5 </OMI>
  1484. </OMA>
  1485. <OMA>
  1486. <OMS cd="linalg1" name="matrixrow"/>
  1487. <OMI> 7 </OMI>
  1488. <OMI> 0 </OMI>
  1489. <OMI> 2 </OMI>
  1490. </OMA>
  1491. <OMA>
  1492. <OMS cd="linalg1" name="matrixrow"/>
  1493. <OMI> 1 </OMI>
  1494. <OMI> 7 </OMI>
  1495. <OMI> 8 </OMI>
  1496. </OMA>
  1497. </OMA>
  1498. </OMA>
  1499. </OMOBJ>
  1500. mml2om();
  1501. <math>
  1502. <apply><transpose/>
  1503. <matrix>
  1504. <matrixrow>
  1505. <cn> 3 </cn> <cn> 1 </cn> <cn> 5 </cn>
  1506. </matrixrow>
  1507. <matrixrow>
  1508. <cn> 7 </cn> <cn> 0 </cn> <cn> 2 </cn>
  1509. </matrixrow>
  1510. <matrixrow>
  1511. <cn> 1 </cn> <cn> 7 </cn> <cn> 8 </cn>
  1512. </matrixrow>
  1513. </matrix>
  1514. </apply>
  1515. </math>
  1516. Intermediate representation:
  1517. (transpose nil (matrix nil matrixrow ((3 1 5) (7 0 2) (1 7 8))))
  1518. <OMOBJ>
  1519. <OMA>
  1520. <OMS cd="linalg3" name="transpose">
  1521. <OMA>
  1522. <OMS cd="linalg1" name="matrix"/>
  1523. <OMA>
  1524. <OMS cd="linalg1" name="matrixrow"/>
  1525. <OMI> 3 </OMI>
  1526. <OMI> 1 </OMI>
  1527. <OMI> 5 </OMI>
  1528. </OMA>
  1529. <OMA>
  1530. <OMS cd="linalg1" name="matrixrow"/>
  1531. <OMI> 7 </OMI>
  1532. <OMI> 0 </OMI>
  1533. <OMI> 2 </OMI>
  1534. </OMA>
  1535. <OMA>
  1536. <OMS cd="linalg1" name="matrixrow"/>
  1537. <OMI> 1 </OMI>
  1538. <OMI> 7 </OMI>
  1539. <OMI> 8 </OMI>
  1540. </OMA>
  1541. </OMA>
  1542. </OMA>
  1543. </OMOBJ>
  1544. mml2om();
  1545. <math>
  1546. <apply><selector/>
  1547. <matrix>
  1548. <matrixrow>
  1549. <cn> 1 </cn> <cn> 2 </cn>
  1550. </matrixrow>
  1551. <matrixrow>
  1552. <cn> 3 </cn> <cn> 4 </cn>
  1553. </matrixrow>
  1554. </matrix>
  1555. <cn> 1 </cn>
  1556. </apply>
  1557. </math>
  1558. Intermediate representation:
  1559. (selector nil (matrix nil matrixrow ((1 2) (3 4))) 1 nil)
  1560. <OMOBJ>
  1561. <OMA>
  1562. <OMS cd="linalg3" name="matrix_selector"/>
  1563. <OMI> 1 </OMI>
  1564. <OMA>
  1565. <OMS cd="linalg1" name="matrix"/>
  1566. <OMA>
  1567. <OMS cd="linalg1" name="matrixrow"/>
  1568. <OMI> 1 </OMI>
  1569. <OMI> 2 </OMI>
  1570. </OMA>
  1571. <OMA>
  1572. <OMS cd="linalg1" name="matrixrow"/>
  1573. <OMI> 3 </OMI>
  1574. <OMI> 4 </OMI>
  1575. </OMA>
  1576. </OMA>
  1577. </OMA>
  1578. </OMOBJ>
  1579. mml2om();
  1580. <math>
  1581. <apply><select/>
  1582. <matrix>
  1583. <matrixrow>
  1584. <cn> 1 </cn> <cn> 2 </cn>
  1585. </matrixrow>
  1586. <matrixrow>
  1587. <cn> 3 </cn> <cn> 4 </cn>
  1588. </matrixrow>
  1589. </matrix>
  1590. <cn> 2 </cn>
  1591. <cn> 2 </cn>
  1592. </apply>
  1593. </math>
  1594. Intermediate representation:
  1595. (selector nil (matrix nil matrixrow ((1 2) (3 4))) 2 2)
  1596. <OMOBJ>
  1597. <OMA>
  1598. <OMS cd="linalg3" name="matrix_selector"/>
  1599. <OMI> 2 </OMI>
  1600. <OMI> 2 </OMI>
  1601. <OMA>
  1602. <OMS cd="linalg1" name="matrix"/>
  1603. <OMA>
  1604. <OMS cd="linalg1" name="matrixrow"/>
  1605. <OMI> 1 </OMI>
  1606. <OMI> 2 </OMI>
  1607. </OMA>
  1608. <OMA>
  1609. <OMS cd="linalg1" name="matrixrow"/>
  1610. <OMI> 3 </OMI>
  1611. <OMI> 4 </OMI>
  1612. </OMA>
  1613. </OMA>
  1614. </OMA>
  1615. </OMOBJ>
  1616. mml2om();
  1617. <math>
  1618. <apply><determinant/>
  1619. <matrix>
  1620. <matrixrow>
  1621. <ci>a</ci>
  1622. <cn type="integer">1</cn>
  1623. </matrixrow>
  1624. <matrixrow>
  1625. <cn type="integer">2</cn>
  1626. <ci>s</ci>
  1627. </matrixrow>
  1628. </matrix>
  1629. </apply>
  1630. </math>
  1631. Intermediate representation:
  1632. (determinant nil (matrix nil matrixrow ((a 1) (2 s))))
  1633. <OMOBJ>
  1634. <OMA>
  1635. <OMS cd="linalg3" name="determinant">
  1636. <OMA>
  1637. <OMS cd="linalg1" name="matrix"/>
  1638. <OMA>
  1639. <OMS cd="linalg1" name="matrixrow"/>
  1640. <OMV name="a"/>
  1641. <OMI> 1 </OMI>
  1642. </OMA>
  1643. <OMA>
  1644. <OMS cd="linalg1" name="matrixrow"/>
  1645. <OMI> 2 </OMI>
  1646. <OMV name="s"/>
  1647. </OMA>
  1648. </OMA>
  1649. </OMA>
  1650. </OMOBJ>
  1651. mml2om();
  1652. <math>
  1653. <apply><determinant/>
  1654. <apply><transpose/>
  1655. <matrix>
  1656. <matrixrow>
  1657. <cn type="integer">1</cn>
  1658. <cn type="integer">2</cn>
  1659. <cn type="integer">3</cn>
  1660. <cn type="integer">4</cn>
  1661. </matrixrow>
  1662. <matrixrow>
  1663. <cn type="integer">1</cn>
  1664. <cn type="integer">2</cn>
  1665. <cn type="integer">1</cn>
  1666. <cn type="integer">2</cn>
  1667. </matrixrow>
  1668. <matrixrow>
  1669. <cn type="integer">2</cn>
  1670. <cn type="integer">3</cn>
  1671. <cn type="integer">2</cn>
  1672. <cn type="integer">1</cn>
  1673. </matrixrow>
  1674. <matrixrow>
  1675. <cn type="integer">2</cn>
  1676. <cn type="integer">1</cn>
  1677. <cn type="integer">1</cn>
  1678. <cn type="integer">1</cn>
  1679. </matrixrow>
  1680. </matrix>
  1681. </apply>
  1682. </apply>
  1683. </math>
  1684. Intermediate representation:
  1685. (determinant nil (transpose nil (matrix nil matrixrow ((1 2 3 4) (1 2 1 2) (2 3
  1686. 2 1) (2 1 1 1)))))
  1687. <OMOBJ>
  1688. <OMA>
  1689. <OMS cd="linalg3" name="determinant">
  1690. <OMA>
  1691. <OMS cd="linalg3" name="transpose">
  1692. <OMA>
  1693. <OMS cd="linalg1" name="matrix"/>
  1694. <OMA>
  1695. <OMS cd="linalg1" name="matrixrow"/>
  1696. <OMI> 1 </OMI>
  1697. <OMI> 2 </OMI>
  1698. <OMI> 3 </OMI>
  1699. <OMI> 4 </OMI>
  1700. </OMA>
  1701. <OMA>
  1702. <OMS cd="linalg1" name="matrixrow"/>
  1703. <OMI> 1 </OMI>
  1704. <OMI> 2 </OMI>
  1705. <OMI> 1 </OMI>
  1706. <OMI> 2 </OMI>
  1707. </OMA>
  1708. <OMA>
  1709. <OMS cd="linalg1" name="matrixrow"/>
  1710. <OMI> 2 </OMI>
  1711. <OMI> 3 </OMI>
  1712. <OMI> 2 </OMI>
  1713. <OMI> 1 </OMI>
  1714. </OMA>
  1715. <OMA>
  1716. <OMS cd="linalg1" name="matrixrow"/>
  1717. <OMI> 2 </OMI>
  1718. <OMI> 1 </OMI>
  1719. <OMI> 1 </OMI>
  1720. <OMI> 1 </OMI>
  1721. </OMA>
  1722. </OMA>
  1723. </OMA>
  1724. </OMA>
  1725. </OMOBJ>
  1726. mml2om();
  1727. <math>
  1728. <apply><plus/>
  1729. <apply><times/>
  1730. <cn type="integer">2</cn>
  1731. <apply><cos/>
  1732. <ci>x</ci>
  1733. </apply>
  1734. <ci>x</ci>
  1735. </apply>
  1736. <apply><minus/>
  1737. <apply><times/>
  1738. <apply><sin/>
  1739. <ci>x</ci>
  1740. </apply>
  1741. <apply><power/>
  1742. <ci>x</ci>
  1743. <cn type="integer">2</cn>
  1744. </apply>
  1745. </apply>
  1746. </apply>
  1747. </apply>
  1748. </math>
  1749. Intermediate representation:
  1750. (plus nil (times nil 2 (cos nil x) x) (minus nil (times nil (sin nil x) (power
  1751. nil x 2))))
  1752. <OMOBJ>
  1753. <OMA>
  1754. <OMS cd="arith1" name="plus">
  1755. <OMA>
  1756. <OMS cd="arith1" name="times">
  1757. <OMI> 2 </OMI>
  1758. <OMA>
  1759. <OMS cd="transc1" name="cos">
  1760. <OMV name="x"/>
  1761. </OMA>
  1762. <OMV name="x"/>
  1763. </OMA>
  1764. <OMA>
  1765. <OMS cd="arith1" name="minus">
  1766. <OMA>
  1767. <OMS cd="arith1" name="times">
  1768. <OMA>
  1769. <OMS cd="transc1" name="sin">
  1770. <OMV name="x"/>
  1771. </OMA>
  1772. <OMA>
  1773. <OMS cd="arith1" name="power">
  1774. <OMV name="x"/>
  1775. <OMI> 2 </OMI>
  1776. </OMA>
  1777. </OMA>
  1778. </OMA>
  1779. </OMA>
  1780. </OMOBJ>
  1781. mml2om();
  1782. <math>
  1783. <list>
  1784. <reln><eq/>
  1785. <ci>x</ci>
  1786. <apply><plus/>
  1787. <cn type="constant">&ImaginaryI;</cn>
  1788. <apply><minus/>
  1789. <cn type="integer">1</cn>
  1790. </apply>
  1791. </apply>
  1792. </reln>
  1793. <reln><eq/>
  1794. <ci>x</ci>
  1795. <apply><plus/>
  1796. <apply><minus/>
  1797. <cn type="constant">&ImaginaryI;</cn>
  1798. </apply>
  1799. <apply><minus/>
  1800. <cn type="integer">1</cn>
  1801. </apply>
  1802. </apply>
  1803. </reln>
  1804. </list>
  1805. </math>
  1806. Intermediate representation:
  1807. (list nil (eq nil x (plus nil !&imaginaryi!; (minus nil 1))) (eq nil x (plus nil
  1808. (minus nil !&imaginaryi!;) (minus nil 1))))
  1809. <OMOBJ>
  1810. <OMA>
  1811. <OMS cd="list1" name="list"/>
  1812. <OMA>
  1813. <OMS cd="relation1" name="eq">
  1814. <OMV name="x"/>
  1815. <OMA>
  1816. <OMS cd="arith1" name="plus">
  1817. <OMS cd="nums1" name="i"/>
  1818. <OMA>
  1819. <OMS cd="arith1" name="minus">
  1820. <OMI> 1 </OMI>
  1821. </OMA>
  1822. </OMA>
  1823. </OMA>
  1824. <OMA>
  1825. <OMS cd="relation1" name="eq">
  1826. <OMV name="x"/>
  1827. <OMA>
  1828. <OMS cd="arith1" name="plus">
  1829. <OMA>
  1830. <OMS cd="arith1" name="minus">
  1831. <OMS cd="nums1" name="i"/>
  1832. </OMA>
  1833. <OMA>
  1834. <OMS cd="arith1" name="minus">
  1835. <OMI> 1 </OMI>
  1836. </OMA>
  1837. </OMA>
  1838. </OMA>
  1839. </OMA>
  1840. </OMOBJ>
  1841. mml2om();
  1842. <math>
  1843. <apply><plus/>
  1844. <apply><minus/>
  1845. <apply><times/>
  1846. <apply><cos/>
  1847. <apply><times/>
  1848. <ci>x</ci>
  1849. <ci>y</ci>
  1850. </apply>
  1851. </apply>
  1852. <ci>x</ci>
  1853. <ci>y</ci>
  1854. </apply>
  1855. </apply>
  1856. <apply><times/>
  1857. <apply><power/>
  1858. <cn type="integer">2</cn>
  1859. <apply><times/>
  1860. <ci>x</ci>
  1861. <ci>y</ci>
  1862. </apply>
  1863. </apply>
  1864. <apply><power/>
  1865. <apply><log/>
  1866. <cn type="integer">2</cn>
  1867. </apply>
  1868. <cn type="integer">2</cn>
  1869. </apply>
  1870. <ci>x</ci>
  1871. <ci>y</ci>
  1872. </apply>
  1873. <apply><times/>
  1874. <apply><power/>
  1875. <cn type="integer">2</cn>
  1876. <apply><times/>
  1877. <ci>x</ci>
  1878. <ci>y</ci>
  1879. </apply>
  1880. </apply>
  1881. <apply><log/>
  1882. <cn type="integer">2</cn>
  1883. </apply>
  1884. </apply>
  1885. <apply><minus/>
  1886. <apply><sin/>
  1887. <apply><times/>
  1888. <ci>x</ci>
  1889. <ci>y</ci>
  1890. </apply>
  1891. </apply>
  1892. </apply>
  1893. <cn type="integer">1</cn>
  1894. </apply>
  1895. </math>
  1896. Intermediate representation:
  1897. (plus nil (minus nil (times nil (cos nil (times nil x y)) x y)) (times nil (
  1898. power nil 2 (times nil x y)) (power nil (log nil nil 2) 2) x y) (times nil (
  1899. power nil 2 (times nil x y)) (log nil nil 2)) (minus nil (sin nil (times nil x y
  1900. ))) 1)
  1901. <OMOBJ>
  1902. <OMA>
  1903. <OMS cd="arith1" name="plus">
  1904. <OMA>
  1905. <OMS cd="arith1" name="minus">
  1906. <OMA>
  1907. <OMS cd="arith1" name="times">
  1908. <OMA>
  1909. <OMS cd="transc1" name="cos">
  1910. <OMA>
  1911. <OMS cd="arith1" name="times">
  1912. <OMV name="x"/>
  1913. <OMV name="y"/>
  1914. </OMA>
  1915. </OMA>
  1916. <OMV name="x"/>
  1917. <OMV name="y"/>
  1918. </OMA>
  1919. </OMA>
  1920. <OMA>
  1921. <OMS cd="arith1" name="times">
  1922. <OMA>
  1923. <OMS cd="arith1" name="power">
  1924. <OMI> 2 </OMI>
  1925. <OMA>
  1926. <OMS cd="arith1" name="times">
  1927. <OMV name="x"/>
  1928. <OMV name="y"/>
  1929. </OMA>
  1930. </OMA>
  1931. <OMA>
  1932. <OMS cd="arith1" name="power">
  1933. <OMA>
  1934. <OMS cd="transc1" name="log">
  1935. <OMI> 2 </OMI>
  1936. </OMA>
  1937. <OMI> 2 </OMI>
  1938. </OMA>
  1939. <OMV name="x"/>
  1940. <OMV name="y"/>
  1941. </OMA>
  1942. <OMA>
  1943. <OMS cd="arith1" name="times">
  1944. <OMA>
  1945. <OMS cd="arith1" name="power">
  1946. <OMI> 2 </OMI>
  1947. <OMA>
  1948. <OMS cd="arith1" name="times">
  1949. <OMV name="x"/>
  1950. <OMV name="y"/>
  1951. </OMA>
  1952. </OMA>
  1953. <OMA>
  1954. <OMS cd="transc1" name="log">
  1955. <OMI> 2 </OMI>
  1956. </OMA>
  1957. </OMA>
  1958. <OMA>
  1959. <OMS cd="arith1" name="minus">
  1960. <OMA>
  1961. <OMS cd="transc1" name="sin">
  1962. <OMA>
  1963. <OMS cd="arith1" name="times">
  1964. <OMV name="x"/>
  1965. <OMV name="y"/>
  1966. </OMA>
  1967. </OMA>
  1968. </OMA>
  1969. <OMI> 1 </OMI>
  1970. </OMA>
  1971. </OMOBJ>
  1972. mml2om();
  1973. <math>
  1974. <reln><eq/>
  1975. <cn>2</cn>
  1976. <cn>2</cn>
  1977. <cn>2</cn>
  1978. </reln>
  1979. </math>
  1980. Intermediate representation:
  1981. (eq nil 2 2 2)
  1982. <OMOBJ>
  1983. <OMA>
  1984. <OMS cd="relation1" name="eq">
  1985. <OMI> 2 </OMI>
  1986. <OMI> 2 </OMI>
  1987. <OMI> 2 </OMI>
  1988. </OMA>
  1989. </OMOBJ>
  1990. mml2om();
  1991. <math>
  1992. <reln><eq/>
  1993. <cn>2</cn>
  1994. <ci>A</ci>
  1995. <ci>u</ci>
  1996. </reln>
  1997. </math>
  1998. Intermediate representation:
  1999. (eq nil 2 a u)
  2000. <OMOBJ>
  2001. <OMA>
  2002. <OMS cd="relation1" name="eq">
  2003. <OMI> 2 </OMI>
  2004. <OMV name="a"/>
  2005. <OMV name="u"/>
  2006. </OMA>
  2007. </OMOBJ>
  2008. mml2om();
  2009. <math>
  2010. <reln><neq/>
  2011. <cn>2</cn>
  2012. <cn>2</cn>
  2013. </reln>
  2014. </math>
  2015. Intermediate representation:
  2016. (neq nil 2 2)
  2017. <OMOBJ>
  2018. <OMA>
  2019. <OMS cd="relation1" name="neq">
  2020. <OMI> 2 </OMI>
  2021. <OMI> 2 </OMI>
  2022. </OMA>
  2023. </OMOBJ>
  2024. mml2om();
  2025. <math>
  2026. <reln><neq/>
  2027. <cn>2</cn>
  2028. <ci>A</ci>
  2029. </reln>
  2030. </math>
  2031. Intermediate representation:
  2032. (neq nil 2 a)
  2033. <OMOBJ>
  2034. <OMA>
  2035. <OMS cd="relation1" name="neq">
  2036. <OMI> 2 </OMI>
  2037. <OMV name="a"/>
  2038. </OMA>
  2039. </OMOBJ>
  2040. mml2om();
  2041. <math>
  2042. <reln><lt/>
  2043. <cn>2</cn>
  2044. <cn>2</cn>
  2045. <cn>2</cn>
  2046. </reln>
  2047. </math>
  2048. Intermediate representation:
  2049. (lt nil 2 2 2)
  2050. <OMOBJ>
  2051. <OMA>
  2052. <OMS cd="relation1" name="lt">
  2053. <OMI> 2 </OMI>
  2054. <OMI> 2 </OMI>
  2055. <OMI> 2 </OMI>
  2056. </OMA>
  2057. </OMOBJ>
  2058. mml2om();
  2059. <math>
  2060. <reln><lt/>
  2061. <cn>2</cn>
  2062. <ci>A</ci>
  2063. <ci>u</ci>
  2064. </reln>
  2065. </math>
  2066. Intermediate representation:
  2067. (lt nil 2 a u)
  2068. <OMOBJ>
  2069. <OMA>
  2070. <OMS cd="relation1" name="lt">
  2071. <OMI> 2 </OMI>
  2072. <OMV name="a"/>
  2073. <OMV name="u"/>
  2074. </OMA>
  2075. </OMOBJ>
  2076. mml2om();
  2077. <math>
  2078. <reln><gt/>
  2079. <cn>2</cn>
  2080. <cn>2</cn>
  2081. <cn>2</cn>
  2082. </reln>
  2083. </math>
  2084. Intermediate representation:
  2085. (gt nil 2 2 2)
  2086. <OMOBJ>
  2087. <OMA>
  2088. <OMS cd="relation1" name="gt">
  2089. <OMI> 2 </OMI>
  2090. <OMI> 2 </OMI>
  2091. <OMI> 2 </OMI>
  2092. </OMA>
  2093. </OMOBJ>
  2094. mml2om();
  2095. <math>
  2096. <reln><gt/>
  2097. <cn>2</cn>
  2098. <ci>A</ci>
  2099. <ci>u</ci>
  2100. </reln>
  2101. </math>
  2102. Intermediate representation:
  2103. (gt nil 2 a u)
  2104. <OMOBJ>
  2105. <OMA>
  2106. <OMS cd="relation1" name="gt">
  2107. <OMI> 2 </OMI>
  2108. <OMV name="a"/>
  2109. <OMV name="u"/>
  2110. </OMA>
  2111. </OMOBJ>
  2112. mml2om();
  2113. <math>
  2114. <reln><geq/>
  2115. <cn>2</cn>
  2116. <cn>2</cn>
  2117. <cn>2</cn>
  2118. </reln>
  2119. </math>
  2120. Intermediate representation:
  2121. (geq nil 2 2 2)
  2122. <OMOBJ>
  2123. <OMA>
  2124. <OMS cd="relation1" name="geq">
  2125. <OMI> 2 </OMI>
  2126. <OMI> 2 </OMI>
  2127. <OMI> 2 </OMI>
  2128. </OMA>
  2129. </OMOBJ>
  2130. mml2om();
  2131. <math>
  2132. <reln><geq/>
  2133. <cn>2</cn>
  2134. <ci>A</ci>
  2135. <ci>u</ci>
  2136. </reln>
  2137. </math>
  2138. Intermediate representation:
  2139. (geq nil 2 a u)
  2140. <OMOBJ>
  2141. <OMA>
  2142. <OMS cd="relation1" name="geq">
  2143. <OMI> 2 </OMI>
  2144. <OMV name="a"/>
  2145. <OMV name="u"/>
  2146. </OMA>
  2147. </OMOBJ>
  2148. mml2om();
  2149. <math>
  2150. <reln><leq/>
  2151. <cn>2</cn>
  2152. <cn>2</cn>
  2153. <cn>2</cn>
  2154. </reln>
  2155. </math>
  2156. Intermediate representation:
  2157. (leq nil 2 2 2)
  2158. <OMOBJ>
  2159. <OMA>
  2160. <OMS cd="relation1" name="leq">
  2161. <OMI> 2 </OMI>
  2162. <OMI> 2 </OMI>
  2163. <OMI> 2 </OMI>
  2164. </OMA>
  2165. </OMOBJ>
  2166. mml2om();
  2167. <math>
  2168. <reln><leq/>
  2169. <cn>2</cn>
  2170. <ci>A</ci>
  2171. <ci>u</ci>
  2172. </reln>
  2173. </math>
  2174. Intermediate representation:
  2175. (leq nil 2 a u)
  2176. <OMOBJ>
  2177. <OMA>
  2178. <OMS cd="relation1" name="leq">
  2179. <OMI> 2 </OMI>
  2180. <OMV name="a"/>
  2181. <OMV name="u"/>
  2182. </OMA>
  2183. </OMOBJ>
  2184. %The following examples work perfectly when read
  2185. %in by mml2om() and prove that the tags employed
  2186. %work correctly. The ir output can then be used
  2187. %to see if the mathml produced works:
  2188. mml2om();
  2189. <math>
  2190. <apply><int/>
  2191. <bvar>
  2192. <ci>x</ci>
  2193. </bvar>
  2194. <lowlimit>
  2195. <cn type="integer">0</cn>
  2196. </lowlimit>
  2197. <uplimit>
  2198. <cn type="integer">1</cn>
  2199. </uplimit>
  2200. <apply><power/>
  2201. <ci>x</ci>
  2202. <cn type="integer">2</cn>
  2203. </apply>
  2204. </apply>
  2205. </math>
  2206. Intermediate representation:
  2207. (int nil (bvar x 1) (lowupperlimit 0 1) (power nil x 2))
  2208. <OMOBJ>
  2209. <OMA>
  2210. <OMS cd="calculus1" name="defint"/>
  2211. <OMA>
  2212. <OMS cd="interval1" name="integer_interval"/>
  2213. <OMI> 0 </OMI>
  2214. <OMI> 1 </OMI>
  2215. </OMA>
  2216. <OMBIND>
  2217. <OMS cd="fns1" name="lambda"/>
  2218. <OMBVAR>
  2219. <OMV name="x"/>
  2220. </OMBVAR>
  2221. <OMA>
  2222. <OMS cd="arith1" name="power">
  2223. <OMV name="x"/>
  2224. <OMI> 2 </OMI>
  2225. </OMA>
  2226. </OMBIND>
  2227. </OMA>
  2228. </OMOBJ>
  2229. mml2om();
  2230. <math>
  2231. <apply><int/>
  2232. <bvar>
  2233. <ci>x</ci>
  2234. </bvar>
  2235. <lowlimit>
  2236. <cn type="integer">1</cn>
  2237. </lowlimit>
  2238. <uplimit>
  2239. <cn type="constant">&infin;</cn>
  2240. </uplimit>
  2241. <ci>x</ci>
  2242. </apply>
  2243. </math>
  2244. Intermediate representation:
  2245. (int nil (bvar x 1) (lowupperlimit 1 !&infin!;) x)
  2246. <OMOBJ>
  2247. <OMA>
  2248. <OMS cd="calculus1" name="defint"/>
  2249. <OMA>
  2250. <OMS cd="interval1" name="integer_interval"/>
  2251. <OMI> 1 </OMI>
  2252. <OMS cd="nums1" name="infinity"/>
  2253. </OMA>
  2254. <OMBIND>
  2255. <OMS cd="fns1" name="lambda"/>
  2256. <OMBVAR>
  2257. <OMV name="x"/>
  2258. </OMBVAR>
  2259. <OMV name="x"/>
  2260. </OMBIND>
  2261. </OMA>
  2262. </OMOBJ>
  2263. mml2om();
  2264. <math>
  2265. <apply><int/>
  2266. <bvar>
  2267. <ci> x </ci>
  2268. </bvar>
  2269. <interval>
  2270. <ci> a </ci>
  2271. <ci> b </ci>
  2272. </interval>
  2273. <apply><cos/>
  2274. <ci> x </ci>
  2275. </apply>
  2276. </apply>
  2277. </math>
  2278. Intermediate representation:
  2279. (int nil (bvar x 1) (interval nil a b) (cos nil x))
  2280. <OMOBJ>
  2281. <OMA>
  2282. <OMS cd="calculus1" name="defint"/>
  2283. <OMA>
  2284. <OMS cd="interval1" name="interval"/>
  2285. <OMV name="a"/>
  2286. <OMV name="b"/>
  2287. </OMA>
  2288. <OMBIND>
  2289. <OMS cd="fns1" name="lambda"/>
  2290. <OMBVAR>
  2291. <OMV name="x"/>
  2292. </OMBVAR>
  2293. <OMA>
  2294. <OMS cd="transc1" name="cos">
  2295. <OMV name="x"/>
  2296. </OMA>
  2297. </OMBIND>
  2298. </OMA>
  2299. </OMOBJ>
  2300. %this example is MathML1.0 and when passed
  2301. %through function mml2om() it translates it to
  2302. %MathML2.0
  2303. mml2om();
  2304. <math>
  2305. <apply><diff/>
  2306. <bvar>
  2307. <ci> x </ci>
  2308. <degree>
  2309. <cn> 2 </cn>
  2310. </degree>
  2311. </bvar>
  2312. <apply><fn><ci>f</ci></fn>
  2313. <ci> x </ci>
  2314. </apply>
  2315. </apply>
  2316. </math>
  2317. Intermediate representation:
  2318. (diff nil (bvar x 1) (diff nil (bvar x 1) (f nil x)))
  2319. <OMOBJ>
  2320. <OMA>
  2321. <OMS cd="calculus1" name="diff"/>
  2322. <OMBIND>
  2323. <OMS cd="fns1" name="lambda"/>
  2324. <OMBVAR>
  2325. <OMV name="x"/>
  2326. </OMBVAR>
  2327. <OMA>
  2328. <OMS cd="calculus1" name="diff"/>
  2329. <OMBIND>
  2330. <OMS cd="fns1" name="lambda"/>
  2331. <OMBVAR>
  2332. <OMV name="x"/>
  2333. </OMBVAR>
  2334. <OMA>
  2335. <OMATTR>
  2336. <OMATP>
  2337. <OMS cd="typmml" name="type"/>
  2338. <OMS cd="typmml" name="fn_type"/>
  2339. </OMATP>
  2340. <OMV name="f"/>
  2341. </OMATTR>
  2342. <OMV name="x"/>
  2343. </OMA>
  2344. </OMBIND>
  2345. </OMA>
  2346. </OMBIND>
  2347. </OMA>
  2348. </OMOBJ>
  2349. mml2om();
  2350. <math>
  2351. <list>
  2352. <apply><plus/>
  2353. <ci> x </ci>
  2354. <ci> y </ci>
  2355. </apply>
  2356. <cn> 3 </cn>
  2357. <cn> 7 </cn>
  2358. </list>
  2359. </math>
  2360. Intermediate representation:
  2361. (list nil (plus nil x y) 3 7)
  2362. <OMOBJ>
  2363. <OMA>
  2364. <OMS cd="list1" name="list"/>
  2365. <OMA>
  2366. <OMS cd="arith1" name="plus">
  2367. <OMV name="x"/>
  2368. <OMV name="y"/>
  2369. </OMA>
  2370. <OMI> 3 </OMI>
  2371. <OMI> 7 </OMI>
  2372. </OMA>
  2373. </OMOBJ>
  2374. mml2om();
  2375. <math>
  2376. <interval closure="open-closed">
  2377. <ci> a </ci>
  2378. <ci> b </ci>
  2379. </interval>
  2380. </math>
  2381. Intermediate representation:
  2382. (interval ((closure open!-closed)) a b)
  2383. <OMOBJ>
  2384. <OMA>
  2385. <OMS cd="interval1" name="interval_oc"/>
  2386. <OMV name="a"/>
  2387. <OMV name="b"/>
  2388. </OMA>
  2389. </OMOBJ>
  2390. mml2om();
  2391. <math>
  2392. <interval>
  2393. <ci> a </ci>
  2394. <ci> b </ci>
  2395. </interval>
  2396. </math>
  2397. Intermediate representation:
  2398. (interval nil a b)
  2399. <OMOBJ>
  2400. <OMA>
  2401. <OMS cd="interval1" name="interval"/>
  2402. <OMV name="a"/>
  2403. <OMV name="b"/>
  2404. </OMA>
  2405. </OMOBJ>
  2406. mml2om();
  2407. <math>
  2408. <list>
  2409. <list>
  2410. <reln><eq/>
  2411. <ci>x</ci>
  2412. <apply>
  2413. <csymbol definitionURL="..." encoding="...">
  2414. <ci>root_of</ci>
  2415. </csymbol>
  2416. <apply><plus/>
  2417. <apply><minus/>
  2418. <apply><power/>
  2419. <ci>y</ci>
  2420. <ci>x_</ci>
  2421. </apply>
  2422. </apply>
  2423. <apply><minus/>
  2424. <apply><times/>
  2425. <apply><int/>
  2426. <bvar>
  2427. <ci>x_</ci>
  2428. </bvar>
  2429. <apply><power/>
  2430. <ci>x_</ci>
  2431. <ci>x_</ci>
  2432. </apply>
  2433. </apply>
  2434. <ci>y</ci>
  2435. </apply>
  2436. </apply>
  2437. <ci>x_</ci>
  2438. <ci>y</ci>
  2439. </apply>
  2440. <ci>x_</ci>
  2441. <ci>tag_1</ci>
  2442. </apply>
  2443. </reln>
  2444. <reln><eq/>
  2445. <ci>a</ci>
  2446. <apply><plus/>
  2447. <ci>x</ci>
  2448. <ci>y</ci>
  2449. </apply>
  2450. </reln>
  2451. </list>
  2452. </list>
  2453. </math>
  2454. Intermediate representation:
  2455. (list nil (list nil (eq nil x (root_of nil (plus nil (minus nil (power nil y x_)
  2456. ) (minus nil (times nil (int nil (bvar x_ 1) nil (power nil x_ x_)) y)) x_ y) x_
  2457. tag_1)) (eq nil a (plus nil x y))))
  2458. <OMOBJ>
  2459. <OMA>
  2460. <OMS cd="list1" name="list"/>
  2461. <OMA>
  2462. <OMS cd="list1" name="list"/>
  2463. <OMA>
  2464. <OMS cd="relation1" name="eq">
  2465. <OMV name="x"/>
  2466. <OMA>
  2467. <OMATTR>
  2468. <OMATP>
  2469. <OMS cd="typmml" name="type"/>
  2470. <OMS cd="typmml" name="fn_type"/>
  2471. </OMATP>
  2472. <OMV name="root_of"/>
  2473. </OMATTR>
  2474. <OMA>
  2475. <OMS cd="arith1" name="plus">
  2476. <OMA>
  2477. <OMS cd="arith1" name="minus">
  2478. <OMA>
  2479. <OMS cd="arith1" name="power">
  2480. <OMV name="y"/>
  2481. <OMV name="x_"/>
  2482. </OMA>
  2483. </OMA>
  2484. <OMA>
  2485. <OMS cd="arith1" name="minus">
  2486. <OMA>
  2487. <OMS cd="arith1" name="times">
  2488. <OMA>
  2489. <OMS cd="calculus1" name="int"/>
  2490. <OMBIND>
  2491. <OMS cd="fns1" name="lambda"/>
  2492. <OMBVAR>
  2493. <OMV name="x_"/>
  2494. </OMBVAR>
  2495. <OMA>
  2496. <OMS cd="arith1" name="power">
  2497. <OMV name="x_"/>
  2498. <OMV name="x_"/>
  2499. </OMA>
  2500. </OMBIND>
  2501. </OMA>
  2502. <OMV name="y"/>
  2503. </OMA>
  2504. </OMA>
  2505. <OMV name="x_"/>
  2506. <OMV name="y"/>
  2507. </OMA>
  2508. <OMV name="x_"/>
  2509. <OMV name="tag_1"/>
  2510. </OMA>
  2511. </OMA>
  2512. <OMA>
  2513. <OMS cd="relation1" name="eq">
  2514. <OMV name="a"/>
  2515. <OMA>
  2516. <OMS cd="arith1" name="plus">
  2517. <OMV name="x"/>
  2518. <OMV name="y"/>
  2519. </OMA>
  2520. </OMA>
  2521. </OMA>
  2522. </OMA>
  2523. </OMOBJ>
  2524. mml2om();
  2525. <math>
  2526. <list>
  2527. <list>
  2528. <reln><eq/>
  2529. <ci>x</ci>
  2530. <apply>
  2531. <csymbol definitionURL="..." encoding="...">
  2532. <ci>root_of</ci>
  2533. </csymbol>
  2534. <apply><plus/>
  2535. <apply><times/>
  2536. <apply><exp/>
  2537. <apply><plus/>
  2538. <cn type="constant">&ImaginaryI;</cn>
  2539. <ci>x_</ci>
  2540. </apply>
  2541. </apply>
  2542. <ci>y</ci>
  2543. </apply>
  2544. <apply><exp/>
  2545. <apply><plus/>
  2546. <cn type="constant">&ImaginaryI;</cn>
  2547. <ci>x_</ci>
  2548. </apply>
  2549. </apply>
  2550. <apply><power/>
  2551. <ci>x_</ci>
  2552. <apply><plus/>
  2553. <ci>y</ci>
  2554. <cn type="integer">1</cn>
  2555. </apply>
  2556. </apply>
  2557. <apply><times/>
  2558. <apply><int/>
  2559. <bvar>
  2560. <ci>x_</ci>
  2561. </bvar>
  2562. <apply><power/>
  2563. <ci>x_</ci>
  2564. <ci>x_</ci>
  2565. </apply>
  2566. </apply>
  2567. <apply><power/>
  2568. <ci>y</ci>
  2569. <cn type="integer">2</cn>
  2570. </apply>
  2571. </apply>
  2572. <apply><times/>
  2573. <apply><int/>
  2574. <bvar>
  2575. <ci>x_</ci>
  2576. </bvar>
  2577. <apply><power/>
  2578. <ci>x_</ci>
  2579. <ci>x_</ci>
  2580. </apply>
  2581. </apply>
  2582. <ci>y</ci>
  2583. </apply>
  2584. </apply>
  2585. <ci>x_</ci>
  2586. <ci>tag_2</ci>
  2587. </apply>
  2588. </reln>
  2589. <reln><eq/>
  2590. <ci>z</ci>
  2591. <ci>y</ci>
  2592. </reln>
  2593. </list>
  2594. </list>
  2595. </math>
  2596. Intermediate representation:
  2597. (list nil (list nil (eq nil x (root_of nil (plus nil (times nil (exp nil (plus
  2598. nil !&imaginaryi!; x_)) y) (exp nil (plus nil !&imaginaryi!; x_)) (power nil x_
  2599. (plus nil y 1)) (times nil (int nil (bvar x_ 1) nil (power nil x_ x_)) (power
  2600. nil y 2)) (times nil (int nil (bvar x_ 1) nil (power nil x_ x_)) y)) x_ tag_2))
  2601. (eq nil z y)))
  2602. <OMOBJ>
  2603. <OMA>
  2604. <OMS cd="list1" name="list"/>
  2605. <OMA>
  2606. <OMS cd="list1" name="list"/>
  2607. <OMA>
  2608. <OMS cd="relation1" name="eq">
  2609. <OMV name="x"/>
  2610. <OMA>
  2611. <OMATTR>
  2612. <OMATP>
  2613. <OMS cd="typmml" name="type"/>
  2614. <OMS cd="typmml" name="fn_type"/>
  2615. </OMATP>
  2616. <OMV name="root_of"/>
  2617. </OMATTR>
  2618. <OMA>
  2619. <OMS cd="arith1" name="plus">
  2620. <OMA>
  2621. <OMS cd="arith1" name="times">
  2622. <OMA>
  2623. <OMS cd="transc1" name="exp">
  2624. <OMA>
  2625. <OMS cd="arith1" name="plus">
  2626. <OMS cd="nums1" name="i"/>
  2627. <OMV name="x_"/>
  2628. </OMA>
  2629. </OMA>
  2630. <OMV name="y"/>
  2631. </OMA>
  2632. <OMA>
  2633. <OMS cd="transc1" name="exp">
  2634. <OMA>
  2635. <OMS cd="arith1" name="plus">
  2636. <OMS cd="nums1" name="i"/>
  2637. <OMV name="x_"/>
  2638. </OMA>
  2639. </OMA>
  2640. <OMA>
  2641. <OMS cd="arith1" name="power">
  2642. <OMV name="x_"/>
  2643. <OMA>
  2644. <OMS cd="arith1" name="plus">
  2645. <OMV name="y"/>
  2646. <OMI> 1 </OMI>
  2647. </OMA>
  2648. </OMA>
  2649. <OMA>
  2650. <OMS cd="arith1" name="times">
  2651. <OMA>
  2652. <OMS cd="calculus1" name="int"/>
  2653. <OMBIND>
  2654. <OMS cd="fns1" name="lambda"/>
  2655. <OMBVAR>
  2656. <OMV name="x_"/>
  2657. </OMBVAR>
  2658. <OMA>
  2659. <OMS cd="arith1" name="power">
  2660. <OMV name="x_"/>
  2661. <OMV name="x_"/>
  2662. </OMA>
  2663. </OMBIND>
  2664. </OMA>
  2665. <OMA>
  2666. <OMS cd="arith1" name="power">
  2667. <OMV name="y"/>
  2668. <OMI> 2 </OMI>
  2669. </OMA>
  2670. </OMA>
  2671. <OMA>
  2672. <OMS cd="arith1" name="times">
  2673. <OMA>
  2674. <OMS cd="calculus1" name="int"/>
  2675. <OMBIND>
  2676. <OMS cd="fns1" name="lambda"/>
  2677. <OMBVAR>
  2678. <OMV name="x_"/>
  2679. </OMBVAR>
  2680. <OMA>
  2681. <OMS cd="arith1" name="power">
  2682. <OMV name="x_"/>
  2683. <OMV name="x_"/>
  2684. </OMA>
  2685. </OMBIND>
  2686. </OMA>
  2687. <OMV name="y"/>
  2688. </OMA>
  2689. </OMA>
  2690. <OMV name="x_"/>
  2691. <OMV name="tag_2"/>
  2692. </OMA>
  2693. </OMA>
  2694. <OMA>
  2695. <OMS cd="relation1" name="eq">
  2696. <OMV name="z"/>
  2697. <OMV name="y"/>
  2698. </OMA>
  2699. </OMA>
  2700. </OMA>
  2701. </OMOBJ>
  2702. mml2om();
  2703. <math>
  2704. <apply><curl/>
  2705. <vector>
  2706. <ci> b </ci>
  2707. <cn> 2 </cn>
  2708. <ci> c </ci>
  2709. </vector>
  2710. </apply>
  2711. </math>
  2712. Intermediate representation:
  2713. (curl nil (vectorml nil b 2 c))
  2714. <OMOBJ>
  2715. <OMA>
  2716. <OMS cd="veccalc1" name="curl">
  2717. <OMA>
  2718. <OMS cd="linalg1" name="vector"/>
  2719. <OMV name="b"/>
  2720. <OMI> 2 </OMI>
  2721. <OMV name="c"/>
  2722. </OMA>
  2723. </OMA>
  2724. </OMOBJ>
  2725. mml2om();
  2726. <math>
  2727. <apply><divergence/>
  2728. <vector>
  2729. <ci> b </ci>
  2730. <cn> 2 </cn>
  2731. <ci> c </ci>
  2732. </vector>
  2733. </apply>
  2734. </math>
  2735. Intermediate representation:
  2736. (divergence nil (vectorml nil b 2 c))
  2737. <OMOBJ>
  2738. <OMA>
  2739. <OMS cd="veccalc1" name="divergence">
  2740. <OMA>
  2741. <OMS cd="linalg1" name="vector"/>
  2742. <OMV name="b"/>
  2743. <OMI> 2 </OMI>
  2744. <OMV name="c"/>
  2745. </OMA>
  2746. </OMA>
  2747. </OMOBJ>
  2748. mml2om();
  2749. <math>
  2750. <apply><laplacian/>
  2751. <vector>
  2752. <ci> b </ci>
  2753. <cn> 2 </cn>
  2754. <ci> c </ci>
  2755. </vector>
  2756. </apply>
  2757. </math>
  2758. Intermediate representation:
  2759. (laplacian nil (vectorml nil b 2 c))
  2760. <OMOBJ>
  2761. <OMA>
  2762. <OMS cd="veccalc1" name="laplacian">
  2763. <OMA>
  2764. <OMS cd="linalg1" name="vector"/>
  2765. <OMV name="b"/>
  2766. <OMI> 2 </OMI>
  2767. <OMV name="c"/>
  2768. </OMA>
  2769. </OMA>
  2770. </OMOBJ>
  2771. mml2om();
  2772. <math>
  2773. <apply><forall/>
  2774. <bvar>
  2775. <ci> a </ci>
  2776. </bvar>
  2777. <apply><eq/>
  2778. <apply><inverse/>
  2779. <apply><inverse/>
  2780. <ci> a </ci>
  2781. </apply>
  2782. </apply>
  2783. <ci> a </ci>
  2784. </apply>
  2785. </apply>
  2786. </math>
  2787. Intermediate representation:
  2788. (forall nil (bvar a 1) nil (eq nil (inverse nil (inverse nil a)) a))
  2789. <OMOBJ>
  2790. <OMBIND>
  2791. <OMS cd="quant1" name="forall"/>
  2792. <OMBVAR>
  2793. <OMV name="a"/>
  2794. </OMBVAR>
  2795. <OMA>
  2796. <OMS cd="relation1" name="eq">
  2797. <OMA>
  2798. <OMS cd="fns1" name="inverse">
  2799. <OMA>
  2800. <OMS cd="fns1" name="inverse">
  2801. <OMV name="a"/>
  2802. </OMA>
  2803. </OMA>
  2804. <OMV name="a"/>
  2805. </OMA>
  2806. </OMBIND>
  2807. </OMOBJ>
  2808. %end;
  2809. %in "$reduce/packages/mathml/examples.om";
  2810. % Description: This file contains a long list of examples demonstrating the abilities of
  2811. % the translator. Most of these examples come straight from the CDs. They
  2812. % were used during the development of the interface and should all be correctly
  2813. % translated into MathML.
  2814. %
  2815. % Version 17 April 2000
  2816. %
  2817. % Author: Luis Alvarez Sobreviela
  2818. %
  2819. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2820. om2mml();
  2821. <OMOBJ>
  2822. <OMA>
  2823. <OMS cd="arith1" name="plus"/>
  2824. <OMV name=f/>
  2825. <OMV name=d/>
  2826. <OMA>
  2827. <OMS cd="arith1" name="plus"/>
  2828. <OMI>1</OMI>
  2829. <OMF dec=1e10/>
  2830. </OMA>
  2831. </OMA>
  2832. </OMOBJ>
  2833. Intermediate representation:
  2834. (plus nil f d (plus nil 1 10000000000.0))
  2835. <math>
  2836. <apply><plus/>
  2837. <ci> f </ci>
  2838. <ci> d </ci>
  2839. <apply><plus/>
  2840. <cn type="integer"> 1 </cn>
  2841. <cn type="real"> 10000000000.0 </cn>
  2842. </apply>
  2843. </apply>
  2844. </math>
  2845. om2mml();
  2846. <OMOBJ>
  2847. <OMBIND>
  2848. <OMS cd=fns1 name=lambda/>
  2849. <OMBVAR>
  2850. <OMV name=x/>
  2851. </OMBVAR>
  2852. <OMA>
  2853. <OMS cd="transc1" name=sin/>
  2854. <OMV name=x/>
  2855. </OMA>
  2856. </OMBIND>
  2857. </OMOBJ>
  2858. Intermediate representation:
  2859. (lambda nil (bvar x 1) (sin nil x))
  2860. <math>
  2861. <lambda>
  2862. <bvar>
  2863. <ci> x </ci>
  2864. </bvar>
  2865. <apply><sin/>
  2866. <ci> x </ci>
  2867. </apply>
  2868. </lambda>
  2869. </math>
  2870. om2mml();
  2871. <OMOBJ>
  2872. <OMBIND>
  2873. <OMS cd=fns1 name=lambda/>
  2874. <OMBVAR>
  2875. <OMV name=x/>
  2876. <OMV name=y/>
  2877. </OMBVAR>
  2878. <OMA>
  2879. <OMS cd="arith1" name=plus/>
  2880. <OMV name=x/>
  2881. <OMA>
  2882. <OMS cd="transc1" name=sin/>
  2883. <OMV name=y/>
  2884. </OMA>
  2885. </OMA>
  2886. </OMBIND>
  2887. </OMOBJ>
  2888. Intermediate representation:
  2889. (lambda nil (bvar x 1) (bvar y 1) (plus nil x (sin nil y)))
  2890. <math>
  2891. <lambda>
  2892. <bvar>
  2893. <ci> x </ci>
  2894. </bvar>
  2895. <bvar>
  2896. <ci> y </ci>
  2897. </bvar>
  2898. <apply><plus/>
  2899. <ci> x </ci>
  2900. <apply><sin/>
  2901. <ci> y </ci>
  2902. </apply>
  2903. </apply>
  2904. </lambda>
  2905. </math>
  2906. om2mml();
  2907. <OMOBJ>
  2908. <OMA>
  2909. <OMS cd="arith1" name=plus/>
  2910. <OMV name=x/>
  2911. <OMA>
  2912. <OMS cd="transc1" name=sin/>
  2913. <OMV name=x/>
  2914. </OMA>
  2915. </OMA>
  2916. </OMOBJ>
  2917. Intermediate representation:
  2918. (plus nil x (sin nil x))
  2919. <math>
  2920. <apply><plus/>
  2921. <ci> x </ci>
  2922. <apply><sin/>
  2923. <ci> x </ci>
  2924. </apply>
  2925. </apply>
  2926. </math>
  2927. om2mml();
  2928. <OMOBJ>
  2929. <OMBIND>
  2930. <OMS cd="quant1" name="forall"/>
  2931. <OMBVAR>
  2932. <OMV name="x"/>
  2933. </OMBVAR>
  2934. <OMA>
  2935. <OMS cd="relation1" name="leq"/>
  2936. <OMA>
  2937. <OMS cd="arith1" name="abs"/>
  2938. <OMA>
  2939. <OMS cd="transc1" name="sin"/>
  2940. <OMV name="x"/>
  2941. </OMA>
  2942. </OMA>
  2943. <OMF dec="1.0"/>
  2944. </OMA>
  2945. </OMBIND>
  2946. </OMOBJ>
  2947. Intermediate representation:
  2948. (forall nil (bvar x 1) (leq nil (abs nil (sin nil x)) 1.0))
  2949. <math>
  2950. <apply><forall/>
  2951. <bvar>
  2952. <ci> x </ci>
  2953. </bvar>
  2954. <apply><leq/>
  2955. <apply><abs/>
  2956. <apply><sin/>
  2957. <ci> x </ci>
  2958. </apply>
  2959. </apply>
  2960. <cn type="real"> 1.0 </cn>
  2961. </apply>
  2962. </apply>
  2963. </math>
  2964. om2mml();
  2965. <OMOBJ>
  2966. <OMA>
  2967. <OMS cd="logic1" name="not"/>
  2968. <OMBIND>
  2969. <OMS cd="quant1" name="exists"/>
  2970. <OMBVAR>
  2971. <OMV name="x"/>
  2972. <OMV name="y"/>
  2973. <OMV name="z"/>
  2974. <OMV name="n"/>
  2975. </OMBVAR>
  2976. <OMA>
  2977. <OMS cd="logic1" name="and"/>
  2978. <OMA>
  2979. <OMS cd="relation1" name="gt"/>
  2980. <OMV name="n"/>
  2981. <OMI> 2 </OMI>
  2982. </OMA>
  2983. <OMA>
  2984. <OMS cd="relation1" name="eq"/>
  2985. <OMA>
  2986. <OMS cd="arith1" name="plus"/>
  2987. <OMA>
  2988. <OMS cd="arith1" name="power"/>
  2989. <OMV name="x"/>
  2990. <OMV name="n"/>
  2991. </OMA>
  2992. <OMA>
  2993. <OMS cd="arith1" name="power"/>
  2994. <OMV name="y"/>
  2995. <OMV name="n"/>
  2996. </OMA>
  2997. </OMA>
  2998. <OMA>
  2999. <OMS cd="arith1" name="power"/>
  3000. <OMV name="z"/>
  3001. <OMV name="n"/>
  3002. </OMA>
  3003. </OMA>
  3004. </OMA>
  3005. </OMBIND>
  3006. </OMA>
  3007. </OMOBJ>
  3008. Intermediate representation:
  3009. (not nil (exists nil (bvar x 1) (bvar y 1) (bvar z 1) (bvar n 1) (and nil (gt
  3010. nil n 2) (eq nil (plus nil (power nil x n) (power nil y n)) (power nil z n)))))
  3011. <math>
  3012. <apply><not/>
  3013. <apply><exists/>
  3014. <bvar>
  3015. <ci> x </ci>
  3016. </bvar>
  3017. <bvar>
  3018. <ci> y </ci>
  3019. </bvar>
  3020. <bvar>
  3021. <ci> z </ci>
  3022. </bvar>
  3023. <bvar>
  3024. <ci> n </ci>
  3025. </bvar>
  3026. <apply><and/>
  3027. <apply><gt/>
  3028. <ci> n </ci>
  3029. <cn type="integer"> 2 </cn>
  3030. </apply>
  3031. <apply><eq/>
  3032. <apply><plus/>
  3033. <apply><power/>
  3034. <ci> x </ci>
  3035. <ci> n </ci>
  3036. </apply>
  3037. <apply><power/>
  3038. <ci> y </ci>
  3039. <ci> n </ci>
  3040. </apply>
  3041. </apply>
  3042. <apply><power/>
  3043. <ci> z </ci>
  3044. <ci> n </ci>
  3045. </apply>
  3046. </apply>
  3047. </apply>
  3048. </apply>
  3049. </apply>
  3050. </math>
  3051. % The following two examples show how the translator
  3052. % can deal with matrices represented either in columns
  3053. % or rows. The translator then converts matrices
  3054. % represented in columns into ones represented in
  3055. % rows. Mapping to MathML is then possible.
  3056. om2mml();
  3057. <OMOBJ>
  3058. <OMA>
  3059. <OMS cd="linalg2" name="matrix"/>
  3060. <OMA>
  3061. <OMS cd="linalg2" name="matrixcolumn"/>
  3062. <OMI> 1 </OMI>
  3063. <OMI> 2 </OMI>
  3064. </OMA>
  3065. <OMA>
  3066. <OMS cd="linalg2" name="matrixcolumn"/>
  3067. <OMI> 3 </OMI>
  3068. <OMI> 4 </OMI>
  3069. </OMA>
  3070. <OMA>
  3071. <OMS cd="linalg2" name="matrixcolumn"/>
  3072. <OMI> 5 </OMI>
  3073. <OMI> 6 </OMI>
  3074. </OMA>
  3075. </OMA>
  3076. </OMOBJ>
  3077. Intermediate representation:
  3078. (matrix nil matrixcolumn ((1 2) (3 4) (5 6)))
  3079. <math>
  3080. <matrix>
  3081. <matrixrow>
  3082. <cn type="integer"> 1 </cn>
  3083. <cn type="integer"> 3 </cn>
  3084. <cn type="integer"> 5 </cn>
  3085. </matrixrow>
  3086. <matrixrow>
  3087. <cn type="integer"> 2 </cn>
  3088. <cn type="integer"> 4 </cn>
  3089. <cn type="integer"> 6 </cn>
  3090. </matrixrow>
  3091. </matrix>
  3092. </math>
  3093. om2mml();
  3094. <OMOBJ>
  3095. <OMA>
  3096. <OMS cd="linalg2" name="matrix"/>
  3097. <OMA>
  3098. <OMS cd="linalg2" name="matrixrow"/>
  3099. <OMI> 1 </OMI>
  3100. <OMI> 0 </OMI>
  3101. </OMA>
  3102. <OMA>
  3103. <OMS cd="linalg2" name="matrixrow"/>
  3104. <OMI> 0 </OMI>
  3105. <OMI> 1 </OMI>
  3106. </OMA>
  3107. </OMA>
  3108. </OMOBJ>
  3109. Intermediate representation:
  3110. (matrix nil matrixrow ((1 0) (0 1)))
  3111. <math>
  3112. <matrix>
  3113. <matrixrow>
  3114. <cn type="integer"> 1 </cn>
  3115. <cn type="integer"> 0 </cn>
  3116. </matrixrow>
  3117. <matrixrow>
  3118. <cn type="integer"> 0 </cn>
  3119. <cn type="integer"> 1 </cn>
  3120. </matrixrow>
  3121. </matrix>
  3122. </math>
  3123. om2mml();
  3124. <OMOBJ>
  3125. <OMBIND>
  3126. <OMS cd="quant1" name="forall"/>
  3127. <OMBVAR>
  3128. <OMV name="M"/>
  3129. </OMBVAR>
  3130. <OMA>
  3131. <OMS cd="logic1" name="and"/>
  3132. <OMA>
  3133. <OMS cd="relation1" name="eq"/>
  3134. <OMA>
  3135. <OMS cd="arith1" name="times"/>
  3136. <OMA>
  3137. <OMS cd="linalg3" name="identity"/>
  3138. <OMA>
  3139. <OMS cd="linalg3" name="rowcount"/>
  3140. <OMV name="M"/>
  3141. </OMA>
  3142. </OMA>
  3143. <OMV name="M"/>
  3144. </OMA>
  3145. <OMV name="M"/>
  3146. </OMA>
  3147. <OMA>
  3148. <OMS cd="relation1" name="eq"/>
  3149. <OMA>
  3150. <OMS cd="arith1" name="times"/>
  3151. <OMV name="M"/>
  3152. <OMA>
  3153. <OMS cd="linalg3" name="identity"/>
  3154. <OMA>
  3155. <OMS cd="linalg3" name="columncount"/>
  3156. <OMV name="M"/>
  3157. </OMA>
  3158. </OMA>
  3159. </OMA>
  3160. <OMV name="M"/>
  3161. </OMA>
  3162. </OMA>
  3163. </OMBIND>
  3164. </OMOBJ>
  3165. Intermediate representation:
  3166. (forall nil (bvar m 1) (and nil (eq nil (times nil (semantic (identity (o m s
  3167. c d = " l i n a l g 3 " n a m e = " i d e n t i t y " /)) (semantic (rowcount
  3168. (o m s c d = " l i n a l g 3 " n a m e = " r o w c o u n t " /)) m)) m) m) (
  3169. eq nil (times nil m (semantic (identity (o m s c d = " l i n a l g 3 " n a m
  3170. e = " i d e n t i t y " /)) (semantic (columncount (o m s c d = " l i n a l g
  3171. 3 " n a m e = " c o l u m n c o u n t " /)) m))) m)))
  3172. <math>
  3173. <apply><forall/>
  3174. <bvar>
  3175. <ci> m </ci>
  3176. </bvar>
  3177. <apply><and/>
  3178. <apply><eq/>
  3179. <apply><times/>
  3180. <apply>
  3181. <fn>
  3182. <semantic>
  3183. <ci><mo>identity</mo></ci>
  3184. <annotation-xml encoding="OpenMath">
  3185. <oms cd="linalg3" name="identity"/>
  3186. </annotation-xml>
  3187. </semantic>
  3188. </fn>
  3189. <apply>
  3190. <fn>
  3191. <semantic>
  3192. <ci><mo>rowcount</mo></ci>
  3193. <annotation-xml encoding="OpenMath">
  3194. <oms cd="linalg3" name="rowcount"/>
  3195. </annotation-xml>
  3196. </semantic>
  3197. </fn>
  3198. <ci> m </ci>
  3199. </apply>
  3200. </apply>
  3201. <ci> m </ci>
  3202. </apply>
  3203. <ci> m </ci>
  3204. </apply>
  3205. <apply><eq/>
  3206. <apply><times/>
  3207. <ci> m </ci>
  3208. <apply>
  3209. <fn>
  3210. <semantic>
  3211. <ci><mo>identity</mo></ci>
  3212. <annotation-xml encoding="OpenMath">
  3213. <oms cd="linalg3" name="identity"/>
  3214. </annotation-xml>
  3215. </semantic>
  3216. </fn>
  3217. <apply>
  3218. <fn>
  3219. <semantic>
  3220. <ci><mo>columncount</mo></ci>
  3221. <annotation-xml encoding="OpenMath">
  3222. <oms cd="linalg3" name="columncount"/>
  3223. </annotation-xml>
  3224. </semantic>
  3225. </fn>
  3226. <ci> m </ci>
  3227. </apply>
  3228. </apply>
  3229. </apply>
  3230. <ci> m </ci>
  3231. </apply>
  3232. </apply>
  3233. </apply>
  3234. </math>
  3235. om2mml();
  3236. <OMOBJ>
  3237. <OMA>
  3238. <OMS cd="limit1" name="limit"/>
  3239. <OMF dec="0.0"/>
  3240. <OMS cd="limit1" name="above"/>
  3241. <OMBIND>
  3242. <OMS cd="fns1" name="lambda"/>
  3243. <OMBVAR>
  3244. <OMV name="x"/>
  3245. </OMBVAR>
  3246. <OMA>
  3247. <OMS cd="transc1" name="sin"/>
  3248. <OMV name="x"/>
  3249. </OMA>
  3250. </OMBIND>
  3251. </OMA>
  3252. </OMOBJ>
  3253. Intermediate representation:
  3254. (limit nil (bvar x 1) (condition (tendsto ((type above)) x 0.0)) (sin nil x))
  3255. <math>
  3256. <apply><limit/>
  3257. <bvar>
  3258. <ci> x </ci>
  3259. </bvar>
  3260. <condition>
  3261. <apply><tendsto type="above"/>
  3262. <ci> x </ci>
  3263. <cn type="real"> 0.0 </cn>
  3264. </apply>
  3265. </condition>
  3266. <apply><sin/>
  3267. <ci> x </ci>
  3268. </apply>
  3269. </apply>
  3270. </math>
  3271. % This following example will show that the translator only
  3272. % identifies the limit symbol of the limit1 CD
  3273. om2mml();
  3274. <OMOBJ>
  3275. <OMA>
  3276. <OMS cd="fakeCD" name="limit"/>
  3277. <OMF dec="0.0"/>
  3278. <OMS cd="limit1" name="above"/>
  3279. <OMBIND>
  3280. <OMS cd="fns1" name="lambda"/>
  3281. <OMBVAR>
  3282. <OMV name="x"/>
  3283. </OMBVAR>
  3284. <OMA>
  3285. <OMS cd="transc1" name="sin"/>
  3286. <OMV name="x"/>
  3287. </OMA>
  3288. </OMBIND>
  3289. </OMA>
  3290. </OMOBJ>
  3291. Intermediate representation:
  3292. (semantic (limit (o m s c d = " f a k e c d " n a m e = " l i m i t " /))
  3293. nil (bvar x 1) (condition (tendsto ((type above)) x 0.0)) (sin nil x))
  3294. <math>
  3295. <apply>
  3296. <fn>
  3297. <semantic>
  3298. <ci><mo>limit</mo></ci>
  3299. <annotation-xml encoding="OpenMath">
  3300. <oms cd="fakecd" name="limit"/>
  3301. </annotation-xml>
  3302. </semantic>
  3303. </fn>
  3304. <bvar>
  3305. <ci> x </ci>
  3306. </bvar>
  3307. <condition>
  3308. <apply><tendsto type="above"/>
  3309. <ci> x </ci>
  3310. <cn type="real"> 0.0 </cn>
  3311. </apply>
  3312. </condition>
  3313. <apply><sin/>
  3314. <ci> x </ci>
  3315. </apply>
  3316. </apply>
  3317. </math>
  3318. % The following two examples show how the translator
  3319. % recognizes whether a symbol has a mathml equivalent
  3320. % depending on the CD it comes from.
  3321. % They both use symbol 'notsubset' but from different
  3322. % CDs. Only one of them can be mapped to MathML
  3323. % and the program distinguishes it by checking if
  3324. % the CD given is the correct one on its table
  3325. % om_mml!*.
  3326. om2mml();
  3327. <OMOBJ>
  3328. <OMA>
  3329. <OMS cd="multiset1" name="notsubset"/>
  3330. <OMA>
  3331. <OMS cd="multiset1" name="set"/>
  3332. <OMI> 2 </OMI>
  3333. <OMI> 3 </OMI>
  3334. <OMI> 3 </OMI>
  3335. </OMA>
  3336. <OMA>
  3337. <OMS cd="multiset1" name="set"/>
  3338. <OMI> 1 </OMI>
  3339. <OMI> 2 </OMI>
  3340. <OMI> 3 </OMI>
  3341. </OMA>
  3342. </OMA>
  3343. </OMOBJ>
  3344. Intermediate representation:
  3345. (notsubset nil (set nil 2 3 3) (set nil 1 2 3))
  3346. <math>
  3347. <apply><notsubset/>
  3348. <set>
  3349. <cn type="integer"> 2 </cn>
  3350. <cn type="integer"> 3 </cn>
  3351. <cn type="integer"> 3 </cn>
  3352. </set>
  3353. <set>
  3354. <cn type="integer"> 1 </cn>
  3355. <cn type="integer"> 2 </cn>
  3356. <cn type="integer"> 3 </cn>
  3357. </set>
  3358. </apply>
  3359. </math>
  3360. om2mml();
  3361. <OMOBJ>
  3362. <OMA>
  3363. <OMS cd="set1" name="notsubset"/>
  3364. <OMA>
  3365. <OMS cd="multiset1" name="set"/>
  3366. <OMI> 2 </OMI>
  3367. <OMI> 3 </OMI>
  3368. <OMI> 3 </OMI>
  3369. </OMA>
  3370. <OMA>
  3371. <OMS cd="multiset1" name="set"/>
  3372. <OMI> 1 </OMI>
  3373. <OMI> 2 </OMI>
  3374. <OMI> 3 </OMI>
  3375. </OMA>
  3376. </OMA>
  3377. </OMOBJ>
  3378. Intermediate representation:
  3379. (notsubset nil (set nil 2 3 3) (set nil 1 2 3))
  3380. <math>
  3381. <apply><notsubset/>
  3382. <set>
  3383. <cn type="integer"> 2 </cn>
  3384. <cn type="integer"> 3 </cn>
  3385. <cn type="integer"> 3 </cn>
  3386. </set>
  3387. <set>
  3388. <cn type="integer"> 1 </cn>
  3389. <cn type="integer"> 2 </cn>
  3390. <cn type="integer"> 3 </cn>
  3391. </set>
  3392. </apply>
  3393. </math>
  3394. om2mml();
  3395. <OMOBJ>
  3396. <OMBIND>
  3397. <OMS cd="quant1" name="forall"/>
  3398. <OMBVAR>
  3399. <OMV name="a"/>
  3400. <OMV name="b"/>
  3401. </OMBVAR>
  3402. <OMA>
  3403. <OMS cd="relation1" name="eq"/>
  3404. <OMA>
  3405. <OMS cd="arith1" name="plus"/>
  3406. <OMV name="a"/>
  3407. <OMV name="b"/>
  3408. </OMA>
  3409. <OMA>
  3410. <OMS cd="arith1" name="plus"/>
  3411. <OMV name="b"/>
  3412. <OMV name="a"/>
  3413. </OMA>
  3414. </OMA>
  3415. </OMBIND>
  3416. </OMOBJ>
  3417. Intermediate representation:
  3418. (forall nil (bvar a 1) (bvar b 1) (eq nil (plus nil a b) (plus nil b a)))
  3419. <math>
  3420. <apply><forall/>
  3421. <bvar>
  3422. <ci> a </ci>
  3423. </bvar>
  3424. <bvar>
  3425. <ci> b </ci>
  3426. </bvar>
  3427. <apply><eq/>
  3428. <apply><plus/>
  3429. <ci> a </ci>
  3430. <ci> b </ci>
  3431. </apply>
  3432. <apply><plus/>
  3433. <ci> b </ci>
  3434. <ci> a </ci>
  3435. </apply>
  3436. </apply>
  3437. </apply>
  3438. </math>
  3439. % Example of a symbol which has a MathML equivalent
  3440. % but under another name.
  3441. om2mml();
  3442. <OMOBJ>
  3443. <OMA>
  3444. <OMS cd="arith1" name="unary_minus"/>
  3445. <OMI> 1 </OMI>
  3446. </OMA>
  3447. </OMOBJ>
  3448. Intermediate representation:
  3449. (minus nil 1)
  3450. <math>
  3451. <apply><minus/>
  3452. <cn type="integer"> 1 </cn>
  3453. </apply>
  3454. </math>
  3455. om2mml();
  3456. <OMOBJ>
  3457. <OMA>
  3458. <OMS cd="relation1" name="eq"/>
  3459. <OMA>
  3460. <OMS cd="logic1" name="not"/>
  3461. <OMS cd="logic1" name="false"/>
  3462. </OMA>
  3463. <OMS cd="logic1" name="true"/>
  3464. </OMA>
  3465. </OMOBJ>
  3466. Intermediate representation:
  3467. (eq nil (not nil &false;) &true;)
  3468. <math>
  3469. <apply><eq/>
  3470. <apply><not/>
  3471. <cn type="constant"> &false; </cn>
  3472. </apply>
  3473. <cn type="constant"> &true; </cn>
  3474. </apply>
  3475. </math>
  3476. om2mml();
  3477. <OMOBJ>
  3478. <OMA>
  3479. <OMS cd="relation1" name="eq"/>
  3480. <OMA>
  3481. <OMS cd="arith1" name="times"/>
  3482. <OMA>
  3483. <OMS cd="fns1" name="identity"/>
  3484. <OMA>
  3485. <OMS cd="linalg3" name="rowcount"/>
  3486. <OMV name="M"/>
  3487. </OMA>
  3488. </OMA>
  3489. <OMV name="M"/>
  3490. </OMA>
  3491. <OMV name="M"/>
  3492. </OMA>
  3493. </OMOBJ>
  3494. Intermediate representation:
  3495. (eq nil (times nil (semantic (identity (o m s c d = " f n s 1 " n a m e = "
  3496. i d e n t i t y " /)) (semantic (rowcount (o m s c d = " l i n a l g 3 " n a
  3497. m e = " r o w c o u n t " /)) m)) m) m)
  3498. <math>
  3499. <apply><eq/>
  3500. <apply><times/>
  3501. <apply>
  3502. <fn>
  3503. <semantic>
  3504. <ci><mo>identity</mo></ci>
  3505. <annotation-xml encoding="OpenMath">
  3506. <oms cd="fns1" name="identity"/>
  3507. </annotation-xml>
  3508. </semantic>
  3509. </fn>
  3510. <apply>
  3511. <fn>
  3512. <semantic>
  3513. <ci><mo>rowcount</mo></ci>
  3514. <annotation-xml encoding="OpenMath">
  3515. <oms cd="linalg3" name="rowcount"/>
  3516. </annotation-xml>
  3517. </semantic>
  3518. </fn>
  3519. <ci> m </ci>
  3520. </apply>
  3521. </apply>
  3522. <ci> m </ci>
  3523. </apply>
  3524. <ci> m </ci>
  3525. </apply>
  3526. </math>
  3527. om2mml();
  3528. <OMOBJ>
  3529. <OMA>
  3530. <OMS cd="linalg1" name="scalarproduct"/>
  3531. <OMA>
  3532. <OMS cd="linalg1" name="vector"/>
  3533. <OMI> 3 </OMI>
  3534. <OMI> 6 </OMI>
  3535. <OMI> 9 </OMI>
  3536. </OMA>
  3537. <OMA>
  3538. <OMS cd="linalg1" name="vector"/>
  3539. <OMI> 3 </OMI>
  3540. <OMI> 6 </OMI>
  3541. <OMI> 9 </OMI>
  3542. </OMA>
  3543. </OMA>
  3544. </OMOBJ>
  3545. Intermediate representation:
  3546. (scalarproduct nil (vectorml nil 3 6 9) (vectorml nil 3 6 9))
  3547. <math>
  3548. <apply><scalarproduct/>
  3549. <vector>
  3550. <cn type="integer"> 3 </cn>
  3551. <cn type="integer"> 6 </cn>
  3552. <cn type="integer"> 9 </cn>
  3553. </vector>
  3554. <vector>
  3555. <cn type="integer"> 3 </cn>
  3556. <cn type="integer"> 6 </cn>
  3557. <cn type="integer"> 9 </cn>
  3558. </vector>
  3559. </apply>
  3560. </math>
  3561. om2mml();
  3562. <OMOBJ>
  3563. <OMA>
  3564. <OMS cd="linalg1" name="outerproduct"/>
  3565. <OMA>
  3566. <OMS cd="linalg1" name="vector"/>
  3567. <OMI> 3 </OMI>
  3568. <OMI> 6 </OMI>
  3569. <OMI> 9 </OMI>
  3570. </OMA>
  3571. <OMA>
  3572. <OMS cd="linalg1" name="vector"/>
  3573. <OMI> 3 </OMI>
  3574. <OMI> 6 </OMI>
  3575. <OMI> 9 </OMI>
  3576. </OMA>
  3577. </OMA>
  3578. </OMOBJ>
  3579. Intermediate representation:
  3580. (outerproduct nil (vectorml nil 3 6 9) (vectorml nil 3 6 9))
  3581. <math>
  3582. <apply><outerproduct/>
  3583. <vector>
  3584. <cn type="integer"> 3 </cn>
  3585. <cn type="integer"> 6 </cn>
  3586. <cn type="integer"> 9 </cn>
  3587. </vector>
  3588. <vector>
  3589. <cn type="integer"> 3 </cn>
  3590. <cn type="integer"> 6 </cn>
  3591. <cn type="integer"> 9 </cn>
  3592. </vector>
  3593. </apply>
  3594. </math>
  3595. om2mml();
  3596. <OMOBJ>
  3597. <OMBIND>
  3598. <OMS cd="quant1" name="forall"/>
  3599. <OMBVAR>
  3600. <OMV name="a"/>
  3601. </OMBVAR>
  3602. <OMA>
  3603. <OMS cd="relation1" name="eq"/>
  3604. <OMA>
  3605. <OMS cd="arith1" name="plus"/>
  3606. <OMV name="a"/>
  3607. <OMS cd="alg1" name="zero"/>
  3608. </OMA>
  3609. <OMV name="a"/>
  3610. </OMA>
  3611. </OMBIND>
  3612. </OMOBJ>
  3613. Intermediate representation:
  3614. (forall nil (bvar a 1) (eq nil (plus nil a 0) a))
  3615. <math>
  3616. <apply><forall/>
  3617. <bvar>
  3618. <ci> a </ci>
  3619. </bvar>
  3620. <apply><eq/>
  3621. <apply><plus/>
  3622. <ci> a </ci>
  3623. <cn type="integer"> 0 </cn>
  3624. </apply>
  3625. <ci> a </ci>
  3626. </apply>
  3627. </apply>
  3628. </math>
  3629. om2mml();
  3630. <OMOBJ>
  3631. <OMBIND>
  3632. <OMS cd="quant1" name="forall"/>
  3633. <OMBVAR>
  3634. <OMV name="a"/>
  3635. </OMBVAR>
  3636. <OMA>
  3637. <OMS cd="relation1" name="eq"/>
  3638. <OMA>
  3639. <OMS cd="arith1" name="times"/>
  3640. <OMS cd="alg1" name="one"/>
  3641. <OMV name="a"/>
  3642. </OMA>
  3643. <OMV name="a"/>
  3644. </OMA>
  3645. </OMBIND>
  3646. </OMOBJ>
  3647. Intermediate representation:
  3648. (forall nil (bvar a 1) (eq nil (times nil 1 a) a))
  3649. <math>
  3650. <apply><forall/>
  3651. <bvar>
  3652. <ci> a </ci>
  3653. </bvar>
  3654. <apply><eq/>
  3655. <apply><times/>
  3656. <cn type="integer"> 1 </cn>
  3657. <ci> a </ci>
  3658. </apply>
  3659. <ci> a </ci>
  3660. </apply>
  3661. </apply>
  3662. </math>
  3663. om2mml();
  3664. <OMOBJ>
  3665. <OMA>
  3666. <OMS cd="relation1" name="eq"/>
  3667. <OMA>
  3668. <OMS cd="bigfloat1" name="bigfloat"/>
  3669. <OMV name="m"/>
  3670. <OMV name="r"/>
  3671. <OMV name="e"/>
  3672. </OMA>
  3673. <OMA>
  3674. <OMS cd="arith1" name="times"/>
  3675. <OMV name="m"/>
  3676. <OMA>
  3677. <OMS cd="arith1" name="power"/>
  3678. <OMV name="r"/>
  3679. <OMV name="e"/>
  3680. </OMA>
  3681. </OMA>
  3682. </OMA>
  3683. </OMOBJ>
  3684. Intermediate representation:
  3685. (eq nil (semantic (bigfloat (o m s c d = " b i g f l o a t 1 " n a m e = " b
  3686. i g f l o a t " /)) m r e) (times nil m (power nil r e)))
  3687. <math>
  3688. <apply><eq/>
  3689. <apply>
  3690. <fn>
  3691. <semantic>
  3692. <ci><mo>bigfloat</mo></ci>
  3693. <annotation-xml encoding="OpenMath">
  3694. <oms cd="bigfloat1" name="bigfloat"/>
  3695. </annotation-xml>
  3696. </semantic>
  3697. </fn>
  3698. <ci> m </ci>
  3699. <ci> r </ci>
  3700. <ci> e </ci>
  3701. </apply>
  3702. <apply><times/>
  3703. <ci> m </ci>
  3704. <apply><power/>
  3705. <ci> r </ci>
  3706. <ci> e </ci>
  3707. </apply>
  3708. </apply>
  3709. </apply>
  3710. </math>
  3711. % The integral symbols defint and int are ambigious as defined
  3712. % in the CDs. They do not specify their variable of integration
  3713. % explicitly. The following shows that when the function
  3714. % to integrate is defined as a lambda expression, then the
  3715. % bound variable is easily determined. However, in other
  3716. % cases, it is not possible to determine the bound variable.
  3717. om2mml();
  3718. <OMOBJ>
  3719. <OMA>
  3720. <OMS cd="calculus1" name="int"/>
  3721. <OMBIND>
  3722. <OMS cd="fns1" name="lambda"/>
  3723. <OMBVAR>
  3724. <OMV name="x"/>
  3725. </OMBVAR>
  3726. <OMA>
  3727. <OMS cd="transc1" name="sin"/>
  3728. <OMV name="x"/>
  3729. </OMA>
  3730. </OMBIND>
  3731. </OMA>
  3732. </OMOBJ>
  3733. Intermediate representation:
  3734. (int nil (bvar x 1) (sin nil x))
  3735. <math>
  3736. <apply><int/>
  3737. <bvar>
  3738. <ci> x </ci>
  3739. </bvar>
  3740. <apply><sin/>
  3741. <ci> x </ci>
  3742. </apply>
  3743. </apply>
  3744. </math>
  3745. om2mml();
  3746. <OMOBJ>
  3747. <OMA>
  3748. <OMS cd="calculus1" name="int"/>
  3749. <OMA>
  3750. <OMS cd="arith1" name="plus"/>
  3751. <OMV name="x"/>
  3752. <OMV name="y"/>
  3753. </OMA>
  3754. </OMA>
  3755. </OMOBJ>
  3756. Intermediate representation:
  3757. (int nil (bvar x 1) (plus nil x y))
  3758. <math>
  3759. <apply><int/>
  3760. <bvar>
  3761. <ci> x </ci>
  3762. </bvar>
  3763. <apply><plus/>
  3764. <ci> x </ci>
  3765. <ci> y </ci>
  3766. </apply>
  3767. </apply>
  3768. </math>
  3769. % Some calculus
  3770. om2mml();
  3771. <OMOBJ>
  3772. <OMA>
  3773. <OMS cd="relation1" name="eq"/>
  3774. <OMA>
  3775. <OMS cd="calculus1" name="diff"/>
  3776. <OMBIND>
  3777. <OMS cd="fns1" name="lambda"/>
  3778. <OMBVAR>
  3779. <OMV name="x"/>
  3780. </OMBVAR>
  3781. <OMA>
  3782. <OMS cd="arith1" name="plus"/>
  3783. <OMV name="x"/>
  3784. <OMF dec="1.0"/>
  3785. </OMA>
  3786. </OMBIND>
  3787. </OMA>
  3788. <OMF dec="1.0"/>
  3789. </OMA>
  3790. </OMOBJ>
  3791. Intermediate representation:
  3792. (eq nil (diff nil (bvar x 1) (plus nil x 1.0)) 1.0)
  3793. <math>
  3794. <apply><eq/>
  3795. <apply><diff/>
  3796. <bvar>
  3797. <ci> x </ci>
  3798. </bvar>
  3799. <apply><plus/>
  3800. <ci> x </ci>
  3801. <cn type="real"> 1.0 </cn>
  3802. </apply>
  3803. </apply>
  3804. <cn type="real"> 1.0 </cn>
  3805. </apply>
  3806. </math>
  3807. om2mml();
  3808. <OMOBJ>
  3809. <OMA>
  3810. <OMS cd="relation1" name="eq"/>
  3811. <OMA>
  3812. <OMS cd="calculus1" name="partialdiff"/>
  3813. <OMA>
  3814. <OMS cd="list1" name="list"/>
  3815. <OMI> 1 </OMI>
  3816. <OMI> 3 </OMI>
  3817. </OMA>
  3818. <OMBIND>
  3819. <OMS cd="fns1" name="lambda"/>
  3820. <OMBVAR>
  3821. <OMV name="x"/>
  3822. <OMV name="y"/>
  3823. <OMV name="z"/>
  3824. </OMBVAR>
  3825. <OMA>
  3826. <OMS cd="arith2" name="times"/>
  3827. <OMV name="x"/>
  3828. <OMV name="y"/>
  3829. <OMV name="z"/>
  3830. </OMA>
  3831. </OMBIND>
  3832. </OMA>
  3833. <OMV name="y"/>
  3834. </OMA>
  3835. </OMOBJ>
  3836. Intermediate representation:
  3837. (eq nil (partialdiff nil (bvar z 1) (bvar x 1) (times nil x y z)) y)
  3838. <math>
  3839. <apply><eq/>
  3840. <apply><partialdiff/>
  3841. <bvar>
  3842. <ci> z </ci>
  3843. </bvar>
  3844. <bvar>
  3845. <ci> x </ci>
  3846. </bvar>
  3847. <apply><times/>
  3848. <ci> x </ci>
  3849. <ci> y </ci>
  3850. <ci> z </ci>
  3851. </apply>
  3852. </apply>
  3853. <ci> y </ci>
  3854. </apply>
  3855. </math>
  3856. om2mml();
  3857. <OMOBJ>
  3858. <OMA>
  3859. <OMS cd="relation1" name="eq"/>
  3860. <OMA>
  3861. <OMS cd="integer1" name="factorial"/>
  3862. <OMV name="n"/>
  3863. </OMA>
  3864. <OMA>
  3865. <OMS cd="arith1" name="product"/>
  3866. <OMA>
  3867. <OMS cd="interval1" name="integer_interval"/>
  3868. <OMI> 1 </OMI>
  3869. <OMV name="n"/>
  3870. </OMA>
  3871. <OMBIND>
  3872. <OMS cd="fns1" name="lambda"/>
  3873. <OMBVAR>
  3874. <OMV name="i"/>
  3875. </OMBVAR>
  3876. <OMV name="i"/>
  3877. </OMBIND>
  3878. </OMA>
  3879. </OMA>
  3880. </OMOBJ>
  3881. Intermediate representation:
  3882. (eq nil (factorial nil n) (product nil (bvar i 1) (lowupperlimit nil 1 n) i))
  3883. <math>
  3884. <apply><eq/>
  3885. <apply><factorial/>
  3886. <ci> n </ci>
  3887. </apply>
  3888. <apply><product/>
  3889. <bvar>
  3890. <ci> i </ci>
  3891. </bvar>
  3892. <lowlimit>
  3893. <cn type="integer"> 1 </cn>
  3894. </lowlimit>
  3895. <uplimit>
  3896. <ci> n </ci>
  3897. </uplimit>
  3898. <ci> i </ci>
  3899. </apply>
  3900. </apply>
  3901. </math>
  3902. om2mml();
  3903. <OMOBJ>
  3904. <OMA>
  3905. <OMS cd="logic1" name="not"/>
  3906. <OMBIND>
  3907. <OMS cd="quant1" name="exists"/>
  3908. <OMBVAR>
  3909. <OMV name="c"/>
  3910. </OMBVAR>
  3911. <OMA>
  3912. <OMS cd="logic1" name="and"/>
  3913. <OMA>
  3914. <OMS cd="set1" name="in"/>
  3915. <OMA>
  3916. <OMS cd="arith1" name="divide"/>
  3917. <OMV name="a"/>
  3918. <OMV name="c"/>
  3919. </OMA>
  3920. <OMS cd="setname1" name="Z"/>
  3921. </OMA>
  3922. <OMA>
  3923. <OMS cd="set1" name="in"/>
  3924. <OMA>
  3925. <OMS cd="arith1" name="divide"/>
  3926. <OMV name="b"/>
  3927. <OMV name="c"/>
  3928. </OMA>
  3929. <OMS cd="setname1" name="Z"/>
  3930. </OMA>
  3931. <OMA>
  3932. <OMS cd="relation1" name="gt"/>
  3933. <OMV name="c"/>
  3934. <OMA>
  3935. <OMS cd="integer1" name="gcd"/>
  3936. <OMV name="a"/>
  3937. <OMV name="b"/>
  3938. </OMA>
  3939. </OMA>
  3940. </OMA>
  3941. </OMBIND>
  3942. </OMA>
  3943. </OMOBJ>
  3944. Intermediate representation:
  3945. (not nil (exists nil (bvar c 1) (and nil (in nil (divide nil a c) (semantic (z (
  3946. o m s c d = " s e t n a m e 1 " n a m e = " z " /)))) (in nil (divide nil b
  3947. c) (semantic (z (o m s c d = " s e t n a m e 1 " n a m e = " z " /)))) (gt
  3948. nil c (gcd nil a b)))))
  3949. <math>
  3950. <apply><not/>
  3951. <apply><exists/>
  3952. <bvar>
  3953. <ci> c </ci>
  3954. </bvar>
  3955. <apply><and/>
  3956. <apply><in/>
  3957. <apply><divide/>
  3958. <ci> a </ci>
  3959. <ci> c </ci>
  3960. </apply>
  3961. <semantic>
  3962. <ci><mo>z</mo></ci>
  3963. <annotation-xml encoding="OpenMath">
  3964. <oms cd="setname1" name="z"/>
  3965. </annotation-xml>
  3966. </semantic>
  3967. </apply>
  3968. <apply><in/>
  3969. <apply><divide/>
  3970. <ci> b </ci>
  3971. <ci> c </ci>
  3972. </apply>
  3973. <semantic>
  3974. <ci><mo>z</mo></ci>
  3975. <annotation-xml encoding="OpenMath">
  3976. <oms cd="setname1" name="z"/>
  3977. </annotation-xml>
  3978. </semantic>
  3979. </apply>
  3980. <apply><gt/>
  3981. <ci> c </ci>
  3982. <apply><gcd/>
  3983. <ci> a </ci>
  3984. <ci> b </ci>
  3985. </apply>
  3986. </apply>
  3987. </apply>
  3988. </apply>
  3989. </apply>
  3990. </math>
  3991. om2mml();
  3992. <OMOBJ>
  3993. <OMBIND>
  3994. <OMS cd="quant1" name="forall"/>
  3995. <OMBVAR>
  3996. <OMV name="x"/>
  3997. </OMBVAR>
  3998. <OMA>
  3999. <OMS cd="logic1" name="implies"/>
  4000. <OMS cd="logic1" name="false"/>
  4001. <OMV name="x"/>
  4002. </OMA>
  4003. </OMBIND>
  4004. </OMOBJ>
  4005. Intermediate representation:
  4006. (forall nil (bvar x 1) (implies nil &false; x))
  4007. <math>
  4008. <apply><forall/>
  4009. <bvar>
  4010. <ci> x </ci>
  4011. </bvar>
  4012. <apply><implies/>
  4013. <cn type="constant"> &false; </cn>
  4014. <ci> x </ci>
  4015. </apply>
  4016. </apply>
  4017. </math>
  4018. om2mml();
  4019. <OMOBJ>
  4020. <OMA>
  4021. <OMS cd="relation1" name="eq"/>
  4022. <OMA>
  4023. <OMS cd="minmax1" name="max"/>
  4024. <OMI> 1 </OMI>
  4025. <OMI> 9 </OMI>
  4026. <OMI> 5 </OMI>
  4027. </OMA>
  4028. <OMI> 9 </OMI>
  4029. </OMA>
  4030. </OMOBJ>
  4031. Intermediate representation:
  4032. (eq nil (max nil 1 9 5) 9)
  4033. <math>
  4034. <apply><eq/>
  4035. <apply><max/>
  4036. <cn type="integer"> 1 </cn>
  4037. <cn type="integer"> 9 </cn>
  4038. <cn type="integer"> 5 </cn>
  4039. </apply>
  4040. <cn type="integer"> 9 </cn>
  4041. </apply>
  4042. </math>
  4043. % The following examples belong to the multiset CD
  4044. om2mml();
  4045. <OMOBJ>
  4046. <OMA>
  4047. <OMS cd="logic1" name="implies"/>
  4048. <OMA>
  4049. <OMS cd="logic1" name="and"/>
  4050. <OMA>
  4051. <OMS cd="multiset1" name="in"/>
  4052. <OMV name="a"/>
  4053. <OMV name="A"/>
  4054. </OMA>
  4055. <OMA>
  4056. <OMS cd="multiset1" name="in"/>
  4057. <OMV name="a"/>
  4058. <OMV name="B"/>
  4059. </OMA>
  4060. </OMA>
  4061. <OMA>
  4062. <OMS cd="multiset1" name="in"/>
  4063. <OMV name="a"/>
  4064. <OMA>
  4065. <OMS cd="multiset1" name="intersect"/>
  4066. <OMV name="A"/>
  4067. <OMV name="B"/>
  4068. </OMA>
  4069. </OMA>
  4070. </OMA>
  4071. </OMOBJ>
  4072. Intermediate representation:
  4073. (implies nil (and nil (in nil a a) (in nil a b)) (in nil a (intersect nil a b)))
  4074. <math>
  4075. <apply><implies/>
  4076. <apply><and/>
  4077. <apply><in/>
  4078. <ci> a </ci>
  4079. <ci> a </ci>
  4080. </apply>
  4081. <apply><in/>
  4082. <ci> a </ci>
  4083. <ci> b </ci>
  4084. </apply>
  4085. </apply>
  4086. <apply><in/>
  4087. <ci> a </ci>
  4088. <apply><intersect/>
  4089. <ci> a </ci>
  4090. <ci> b </ci>
  4091. </apply>
  4092. </apply>
  4093. </apply>
  4094. </math>
  4095. om2mml();
  4096. <OMOBJ>
  4097. <OMA>
  4098. <OMS cd="multiset1" name="multiset"/>
  4099. <OMI> 4 </OMI>
  4100. <OMI> 1 </OMI>
  4101. <OMI> 0 </OMI>
  4102. <OMI> 1 </OMI>
  4103. <OMI> 4 </OMI>
  4104. </OMA>
  4105. </OMOBJ>
  4106. Intermediate representation:
  4107. (set ((type multiset)) 4 1 0 1 4)
  4108. <math>
  4109. <set type="multiset">
  4110. <cn type="integer"> 4 </cn>
  4111. <cn type="integer"> 1 </cn>
  4112. <cn type="integer"> 0 </cn>
  4113. <cn type="integer"> 1 </cn>
  4114. <cn type="integer"> 4 </cn>
  4115. </set>
  4116. </math>
  4117. om2mml();
  4118. <OMOBJ>
  4119. <OMA>
  4120. <OMS cd="logic1" name="and"/>
  4121. <OMA>
  4122. <OMS cd="multiset1" name="subset"/>
  4123. <OMA>
  4124. <OMS cd="multiset1" name="intersect"/>
  4125. <OMV name="A"/>
  4126. <OMV name="B"/>
  4127. </OMA>
  4128. <OMV name="A"/>
  4129. </OMA>
  4130. <OMA>
  4131. <OMS cd="multiset1" name="subset"/>
  4132. <OMA>
  4133. <OMS cd="multiset1" name="intersect"/>
  4134. <OMV name="A"/>
  4135. <OMV name="B"/>
  4136. </OMA>
  4137. <OMV name="B"/>
  4138. </OMA>
  4139. </OMA>
  4140. </OMOBJ>
  4141. Intermediate representation:
  4142. (and nil (subset nil (intersect nil a b) a) (subset nil (intersect nil a b) b))
  4143. <math>
  4144. <apply><and/>
  4145. <apply><subset/>
  4146. <apply><intersect/>
  4147. <ci> a </ci>
  4148. <ci> b </ci>
  4149. </apply>
  4150. <ci> a </ci>
  4151. </apply>
  4152. <apply><subset/>
  4153. <apply><intersect/>
  4154. <ci> a </ci>
  4155. <ci> b </ci>
  4156. </apply>
  4157. <ci> b </ci>
  4158. </apply>
  4159. </apply>
  4160. </math>
  4161. om2mml();
  4162. <OMOBJ>
  4163. <OMA>
  4164. <OMS cd="logic1" name="and"/>
  4165. <OMA>
  4166. <OMS cd="multiset1" name="subset"/>
  4167. <OMV name="A"/>
  4168. <OMA>
  4169. <OMS cd="multiset1" name="union"/>
  4170. <OMV name="A"/>
  4171. <OMV name="B"/>
  4172. </OMA>
  4173. </OMA>
  4174. <OMA>
  4175. <OMS cd="multiset1" name="subset"/>
  4176. <OMV name="B"/>
  4177. <OMA>
  4178. <OMS cd="multiset1" name="union"/>
  4179. <OMV name="A"/>
  4180. <OMV name="B"/>
  4181. </OMA>
  4182. </OMA>
  4183. </OMA>
  4184. </OMOBJ>
  4185. Intermediate representation:
  4186. (and nil (subset nil a (union nil a b)) (subset nil b (union nil a b)))
  4187. <math>
  4188. <apply><and/>
  4189. <apply><subset/>
  4190. <ci> a </ci>
  4191. <apply><union/>
  4192. <ci> a </ci>
  4193. <ci> b </ci>
  4194. </apply>
  4195. </apply>
  4196. <apply><subset/>
  4197. <ci> b </ci>
  4198. <apply><union/>
  4199. <ci> a </ci>
  4200. <ci> b </ci>
  4201. </apply>
  4202. </apply>
  4203. </apply>
  4204. </math>
  4205. om2mml();
  4206. <OMOBJ>
  4207. <OMBIND>
  4208. <OMS cd="quant1" name="forall"/>
  4209. <OMBVAR>
  4210. <OMV name="A"/>
  4211. <OMV name="B"/>
  4212. <OMV name="C"/>
  4213. </OMBVAR>
  4214. <OMA>
  4215. <OMS cd="relation1" name="eq"/>
  4216. <OMA>
  4217. <OMS cd="multiset1" name="union"/>
  4218. <OMV name="A"/>
  4219. <OMA>
  4220. <OMS cd="multiset1" name="intersect"/>
  4221. <OMV name="B"/>
  4222. <OMV name="C"/>
  4223. </OMA>
  4224. </OMA>
  4225. <OMA>
  4226. <OMS cd="multiset1" name="intersect"/>
  4227. <OMA>
  4228. <OMS cd="multiset1" name="union"/>
  4229. <OMV name="A"/>
  4230. <OMV name="B"/>
  4231. </OMA>
  4232. <OMA>
  4233. <OMS cd="multiset1" name="union"/>
  4234. <OMV name="A"/>
  4235. <OMV name="C"/>
  4236. </OMA>
  4237. </OMA>
  4238. </OMA>
  4239. </OMBIND>
  4240. </OMOBJ>
  4241. Intermediate representation:
  4242. (forall nil (bvar a 1) (bvar b 1) (bvar c 1) (eq nil (union nil a (intersect nil
  4243. b c)) (intersect nil (union nil a b) (union nil a c))))
  4244. <math>
  4245. <apply><forall/>
  4246. <bvar>
  4247. <ci> a </ci>
  4248. </bvar>
  4249. <bvar>
  4250. <ci> b </ci>
  4251. </bvar>
  4252. <bvar>
  4253. <ci> c </ci>
  4254. </bvar>
  4255. <apply><eq/>
  4256. <apply><union/>
  4257. <ci> a </ci>
  4258. <apply><intersect/>
  4259. <ci> b </ci>
  4260. <ci> c </ci>
  4261. </apply>
  4262. </apply>
  4263. <apply><intersect/>
  4264. <apply><union/>
  4265. <ci> a </ci>
  4266. <ci> b </ci>
  4267. </apply>
  4268. <apply><union/>
  4269. <ci> a </ci>
  4270. <ci> c </ci>
  4271. </apply>
  4272. </apply>
  4273. </apply>
  4274. </apply>
  4275. </math>
  4276. om2mml();
  4277. <OMOBJ>
  4278. <OMA>
  4279. <OMS cd="multiset1" name="subset"/>
  4280. <OMA>
  4281. <OMS cd="multiset1" name="setdiff"/>
  4282. <OMV name="A"/>
  4283. <OMV name="B"/>
  4284. </OMA>
  4285. <OMV name="A"/>
  4286. </OMA>
  4287. </OMOBJ>
  4288. Intermediate representation:
  4289. (subset nil (setdiff nil a b) a)
  4290. <math>
  4291. <apply><subset/>
  4292. <apply><setdiff/>
  4293. <ci> a </ci>
  4294. <ci> b </ci>
  4295. </apply>
  4296. <ci> a </ci>
  4297. </apply>
  4298. </math>
  4299. om2mml();
  4300. <OMOBJ>
  4301. <OMA>
  4302. <OMS cd="logic1" name="implies"/>
  4303. <OMA>
  4304. <OMS cd="logic1" name="and"/>
  4305. <OMA>
  4306. <OMS cd="multiset1" name="subset"/>
  4307. <OMV name="B"/>
  4308. <OMV name="A"/>
  4309. </OMA>
  4310. <OMA>
  4311. <OMS cd="multiset1" name="subset"/>
  4312. <OMV name="C"/>
  4313. <OMV name="B"/>
  4314. </OMA>
  4315. </OMA>
  4316. <OMA>
  4317. <OMS cd="multiset1" name="subset"/>
  4318. <OMV name="C"/>
  4319. <OMV name="A"/>
  4320. </OMA>
  4321. </OMA>
  4322. </OMOBJ>
  4323. Intermediate representation:
  4324. (implies nil (and nil (subset nil b a) (subset nil c b)) (subset nil c a))
  4325. <math>
  4326. <apply><implies/>
  4327. <apply><and/>
  4328. <apply><subset/>
  4329. <ci> b </ci>
  4330. <ci> a </ci>
  4331. </apply>
  4332. <apply><subset/>
  4333. <ci> c </ci>
  4334. <ci> b </ci>
  4335. </apply>
  4336. </apply>
  4337. <apply><subset/>
  4338. <ci> c </ci>
  4339. <ci> a </ci>
  4340. </apply>
  4341. </apply>
  4342. </math>
  4343. om2mml();
  4344. <OMOBJ>
  4345. <OMA>
  4346. <OMS cd="multiset1" name="notin"/>
  4347. <OMI> 4 </OMI>
  4348. <OMA>
  4349. <OMS cd="multiset1" name="multiset"/>
  4350. <OMI> 1 </OMI>
  4351. <OMI> 1 </OMI>
  4352. <OMI> 2 </OMI>
  4353. <OMI> 3 </OMI>
  4354. </OMA>
  4355. </OMA>
  4356. </OMOBJ>
  4357. Intermediate representation:
  4358. (notin nil 4 (set ((type multiset)) 1 1 2 3))
  4359. <math>
  4360. <apply><notin/>
  4361. <cn type="integer"> 4 </cn>
  4362. <set type="multiset">
  4363. <cn type="integer"> 1 </cn>
  4364. <cn type="integer"> 1 </cn>
  4365. <cn type="integer"> 2 </cn>
  4366. <cn type="integer"> 3 </cn>
  4367. </set>
  4368. </apply>
  4369. </math>
  4370. om2mml();
  4371. <OMOBJ>
  4372. <OMA>
  4373. <OMS cd="multiset1" name="prsubset"/>
  4374. <OMA>
  4375. <OMS cd="multiset1" name="multiset"/>
  4376. <OMI> 2 </OMI>
  4377. <OMI> 3 </OMI>
  4378. </OMA>
  4379. <OMA>
  4380. <OMS cd="multiset1" name="multiset"/>
  4381. <OMI> 2 </OMI>
  4382. <OMI> 2 </OMI>
  4383. <OMI> 3 </OMI>
  4384. </OMA>
  4385. </OMA>
  4386. </OMOBJ>
  4387. Intermediate representation:
  4388. (prsubset nil (set ((type multiset)) 2 3) (set ((type multiset)) 2 2 3))
  4389. <math>
  4390. <apply><prsubset/>
  4391. <set type="multiset">
  4392. <cn type="integer"> 2 </cn>
  4393. <cn type="integer"> 3 </cn>
  4394. </set>
  4395. <set type="multiset">
  4396. <cn type="integer"> 2 </cn>
  4397. <cn type="integer"> 2 </cn>
  4398. <cn type="integer"> 3 </cn>
  4399. </set>
  4400. </apply>
  4401. </math>
  4402. om2mml();
  4403. <OMOBJ>
  4404. <OMA>
  4405. <OMS cd="multiset1" name="notsubset"/>
  4406. <OMA>
  4407. <OMS cd="multiset1" name="multiset"/>
  4408. <OMI> 2 </OMI>
  4409. <OMI> 3 </OMI>
  4410. <OMI> 3 </OMI>
  4411. </OMA>
  4412. <OMA>
  4413. <OMS cd="multiset1" name="multiset"/>
  4414. <OMI> 1 </OMI>
  4415. <OMI> 2 </OMI>
  4416. <OMI> 3 </OMI>
  4417. </OMA>
  4418. </OMA>
  4419. </OMOBJ>
  4420. Intermediate representation:
  4421. (notsubset nil (set ((type multiset)) 2 3 3) (set ((type multiset)) 1 2 3))
  4422. <math>
  4423. <apply><notsubset/>
  4424. <set type="multiset">
  4425. <cn type="integer"> 2 </cn>
  4426. <cn type="integer"> 3 </cn>
  4427. <cn type="integer"> 3 </cn>
  4428. </set>
  4429. <set type="multiset">
  4430. <cn type="integer"> 1 </cn>
  4431. <cn type="integer"> 2 </cn>
  4432. <cn type="integer"> 3 </cn>
  4433. </set>
  4434. </apply>
  4435. </math>
  4436. om2mml();
  4437. <OMOBJ>
  4438. <OMA>
  4439. <OMS cd="multiset1" name="notprsubset"/>
  4440. <OMA>
  4441. <OMS cd="multiset1" name="multiset"/>
  4442. <OMI> 1 </OMI>
  4443. <OMI> 2 </OMI>
  4444. <OMI> 1 </OMI>
  4445. </OMA>
  4446. <OMA>
  4447. <OMS cd="multiset1" name="multiset"/>
  4448. <OMI> 1 </OMI>
  4449. <OMI> 2 </OMI>
  4450. <OMI> 1 </OMI>
  4451. </OMA>
  4452. </OMA>
  4453. </OMOBJ>
  4454. Intermediate representation:
  4455. (notprsubset nil (set ((type multiset)) 1 2 1) (set ((type multiset)) 1 2 1))
  4456. <math>
  4457. <apply><notprsubset/>
  4458. <set type="multiset">
  4459. <cn type="integer"> 1 </cn>
  4460. <cn type="integer"> 2 </cn>
  4461. <cn type="integer"> 1 </cn>
  4462. </set>
  4463. <set type="multiset">
  4464. <cn type="integer"> 1 </cn>
  4465. <cn type="integer"> 2 </cn>
  4466. <cn type="integer"> 1 </cn>
  4467. </set>
  4468. </apply>
  4469. </math>
  4470. % Examples from CD nums1
  4471. om2mml();
  4472. <OMOBJ>
  4473. <OMA>
  4474. <OMS cd="relation1" name="eq"/>
  4475. <OMI> 8 </OMI>
  4476. <OMA>
  4477. <OMS cd="nums1" name="based_integer"/>
  4478. <OMI> 8 </OMI>
  4479. <OMSTR> 10 </OMSTR>
  4480. </OMA>
  4481. </OMA>
  4482. </OMOBJ>
  4483. Intermediate representation:
  4484. (eq nil 8 (based_integer nil 8 (string 10)))
  4485. <math>
  4486. <apply><eq/>
  4487. <cn type="integer"> 8 </cn>
  4488. <cn type="integer" base="8"> 10 </cn>
  4489. </apply>
  4490. </math>
  4491. om2mml();
  4492. <OMOBJ>
  4493. <OMA>
  4494. <OMS cd="nums1" name="rational"/>
  4495. <OMI> 1 </OMI>
  4496. <OMI> 2 </OMI>
  4497. </OMA>
  4498. </OMOBJ>
  4499. Intermediate representation:
  4500. (rational nil 1 2)
  4501. <math>
  4502. <cn type="rational">1<sep/>2</cn>
  4503. </math>
  4504. om2mml();
  4505. <OMOBJ>
  4506. <OMBIND>
  4507. <OMS cd="quant1" name="forall"/>
  4508. <OMBVAR>
  4509. <OMV name="x"/>
  4510. <OMV name="y"/>
  4511. </OMBVAR>
  4512. <OMA>
  4513. <OMS cd="relation1" name="eq"/>
  4514. <OMA>
  4515. <OMS cd="nums1" name="complex_cartesian"/>
  4516. <OMV name="x"/>
  4517. <OMV name="y"/>
  4518. </OMA>
  4519. <OMA>
  4520. <OMS cd="arith1" name="plus"/>
  4521. <OMV name="x"/>
  4522. <OMA>
  4523. <OMS cd="arith1" name="times"/>
  4524. <OMS cd="nums1" name="i"/>
  4525. <OMV name="y"/>
  4526. </OMA>
  4527. </OMA>
  4528. </OMA>
  4529. </OMBIND>
  4530. </OMOBJ>
  4531. Intermediate representation:
  4532. (forall nil (bvar x 1) (bvar y 1) (eq nil (plus nil x (times nil y &imaginaryi;)
  4533. ) (plus nil x (times nil &imaginaryi; y))))
  4534. <math>
  4535. <apply><forall/>
  4536. <bvar>
  4537. <ci> x </ci>
  4538. </bvar>
  4539. <bvar>
  4540. <ci> y </ci>
  4541. </bvar>
  4542. <apply><eq/>
  4543. <apply><plus/>
  4544. <ci> x </ci>
  4545. <apply><times/>
  4546. <ci> y </ci>
  4547. <cn type="constant"> &imaginaryi; </cn>
  4548. </apply>
  4549. </apply>
  4550. <apply><plus/>
  4551. <ci> x </ci>
  4552. <apply><times/>
  4553. <cn type="constant"> &imaginaryi; </cn>
  4554. <ci> y </ci>
  4555. </apply>
  4556. </apply>
  4557. </apply>
  4558. </apply>
  4559. </math>
  4560. om2mml();
  4561. <OMOBJ>
  4562. <OMBIND>
  4563. <OMS cd="quant1" name="forall"/>
  4564. <OMBVAR>
  4565. <OMV name="x"/>
  4566. <OMV name="y"/>
  4567. <OMV name="r"/>
  4568. <OMV name="a"/>
  4569. </OMBVAR>
  4570. <OMA>
  4571. <OMS cd="logic1" name="implies"/>
  4572. <OMA>
  4573. <OMS cd="logic1" name="and"/>
  4574. <OMA>
  4575. <OMS cd="relation1" name="eq"/>
  4576. <OMA>
  4577. <OMS cd="arith1" name="times"/>
  4578. <OMV name="r"/>
  4579. <OMA>
  4580. <OMS cd="transc1" name="sin"/>
  4581. <OMV name="a"/>
  4582. </OMA>
  4583. </OMA>
  4584. <OMV name="y"/>
  4585. </OMA>
  4586. <OMA>
  4587. <OMS cd="relation1" name="eq"/>
  4588. <OMA>
  4589. <OMS cd="arith1" name="times"/>
  4590. <OMV name="r"/>
  4591. <OMA>
  4592. <OMS cd="transc1" name="cos"/>
  4593. <OMV name="a"/>
  4594. </OMA>
  4595. </OMA>
  4596. <OMV name="x"/>
  4597. </OMA>
  4598. </OMA>
  4599. <OMA>
  4600. <OMS cd="relation1" name="eq"/>
  4601. <OMA>
  4602. <OMS cd="nums1" name="complex_polar"/>
  4603. <OMV name="r"/>
  4604. <OMV name="a"/>
  4605. </OMA>
  4606. <OMA>
  4607. <OMS cd="nums1" name="complex_cartesian"/>
  4608. <OMV name="x"/>
  4609. <OMV name="y"/>
  4610. </OMA>
  4611. </OMA>
  4612. </OMA>
  4613. </OMBIND>
  4614. </OMOBJ>
  4615. Intermediate representation:
  4616. (forall nil (bvar x 1) (bvar y 1) (bvar r 1) (bvar a 1) (implies nil (and nil (
  4617. eq nil (times nil r (sin nil a)) y) (eq nil (times nil r (cos nil a)) x)) (eq
  4618. nil (times nil r (exp nil (times nil a &imaginaryi;))) (plus nil x (times nil y
  4619. &imaginaryi;)))))
  4620. <math>
  4621. <apply><forall/>
  4622. <bvar>
  4623. <ci> x </ci>
  4624. </bvar>
  4625. <bvar>
  4626. <ci> y </ci>
  4627. </bvar>
  4628. <bvar>
  4629. <ci> r </ci>
  4630. </bvar>
  4631. <bvar>
  4632. <ci> a </ci>
  4633. </bvar>
  4634. <apply><implies/>
  4635. <apply><and/>
  4636. <apply><eq/>
  4637. <apply><times/>
  4638. <ci> r </ci>
  4639. <apply><sin/>
  4640. <ci> a </ci>
  4641. </apply>
  4642. </apply>
  4643. <ci> y </ci>
  4644. </apply>
  4645. <apply><eq/>
  4646. <apply><times/>
  4647. <ci> r </ci>
  4648. <apply><cos/>
  4649. <ci> a </ci>
  4650. </apply>
  4651. </apply>
  4652. <ci> x </ci>
  4653. </apply>
  4654. </apply>
  4655. <apply><eq/>
  4656. <apply><times/>
  4657. <ci> r </ci>
  4658. <apply><exp/>
  4659. <apply><times/>
  4660. <ci> a </ci>
  4661. <cn type="constant"> &imaginaryi; </cn>
  4662. </apply>
  4663. </apply>
  4664. </apply>
  4665. <apply><plus/>
  4666. <ci> x </ci>
  4667. <apply><times/>
  4668. <ci> y </ci>
  4669. <cn type="constant"> &imaginaryi; </cn>
  4670. </apply>
  4671. </apply>
  4672. </apply>
  4673. </apply>
  4674. </apply>
  4675. </math>
  4676. om2mml();
  4677. <OMOBJ>
  4678. <OMBIND>
  4679. <OMS cd="quant1" name="forall"/>
  4680. <OMBVAR>
  4681. <OMV name="x"/>
  4682. </OMBVAR>
  4683. <OMA>
  4684. <OMS cd="logic1" name="implies"/>
  4685. <OMA>
  4686. <OMS cd="logic1" name="and"/>
  4687. <OMA>
  4688. <OMS cd="set1" name="in"/>
  4689. <OMV name="a"/>
  4690. <OMS cd="setname1" name="R"/>
  4691. </OMA>
  4692. <OMA>
  4693. <OMS cd="set1" name="in"/>
  4694. <OMV name="k"/>
  4695. <OMS cd="setname1" name="Z"/>
  4696. </OMA>
  4697. </OMA>
  4698. <OMA>
  4699. <OMS cd="relation1" name="eq"/>
  4700. <OMA>
  4701. <OMS cd="nums1" name="complex_polar"/>
  4702. <OMV name="x"/>
  4703. <OMV name="a"/>
  4704. </OMA>
  4705. <OMA>
  4706. <OMS cd="nums1" name="complex_polar"/>
  4707. <OMV name="x"/>
  4708. <OMA>
  4709. <OMS cd="arith1" name="plus"/>
  4710. <OMV name="a"/>
  4711. <OMA>
  4712. <OMS cd="arith1" name="times"/>
  4713. <OMI> 2 </OMI>
  4714. <OMS cd="nums1" name="pi"/>
  4715. <OMV name="k"/>
  4716. </OMA>
  4717. </OMA>
  4718. </OMA>
  4719. </OMA>
  4720. </OMA>
  4721. </OMBIND>
  4722. </OMOBJ>
  4723. Intermediate representation:
  4724. (forall nil (bvar x 1) (implies nil (and nil (in nil a (semantic (r (o m s c d
  4725. = " s e t n a m e 1 " n a m e = " r " /)))) (in nil k (semantic (z (o m s c
  4726. d = " s e t n a m e 1 " n a m e = " z " /))))) (eq nil (times nil x (exp nil (
  4727. times nil a &imaginaryi;))) (times nil x (exp nil (times nil (plus nil a (times
  4728. nil 2 &pi; k)) &imaginaryi;))))))
  4729. <math>
  4730. <apply><forall/>
  4731. <bvar>
  4732. <ci> x </ci>
  4733. </bvar>
  4734. <apply><implies/>
  4735. <apply><and/>
  4736. <apply><in/>
  4737. <ci> a </ci>
  4738. <semantic>
  4739. <ci><mo>r</mo></ci>
  4740. <annotation-xml encoding="OpenMath">
  4741. <oms cd="setname1" name="r"/>
  4742. </annotation-xml>
  4743. </semantic>
  4744. </apply>
  4745. <apply><in/>
  4746. <ci> k </ci>
  4747. <semantic>
  4748. <ci><mo>z</mo></ci>
  4749. <annotation-xml encoding="OpenMath">
  4750. <oms cd="setname1" name="z"/>
  4751. </annotation-xml>
  4752. </semantic>
  4753. </apply>
  4754. </apply>
  4755. <apply><eq/>
  4756. <apply><times/>
  4757. <ci> x </ci>
  4758. <apply><exp/>
  4759. <apply><times/>
  4760. <ci> a </ci>
  4761. <cn type="constant"> &imaginaryi; </cn>
  4762. </apply>
  4763. </apply>
  4764. </apply>
  4765. <apply><times/>
  4766. <ci> x </ci>
  4767. <apply><exp/>
  4768. <apply><times/>
  4769. <apply><plus/>
  4770. <ci> a </ci>
  4771. <apply><times/>
  4772. <cn type="integer"> 2 </cn>
  4773. <cn type="constant"> &pi; </cn>
  4774. <ci> k </ci>
  4775. </apply>
  4776. </apply>
  4777. <cn type="constant"> &imaginaryi; </cn>
  4778. </apply>
  4779. </apply>
  4780. </apply>
  4781. </apply>
  4782. </apply>
  4783. </apply>
  4784. </math>
  4785. om2mml();
  4786. <OMOBJ>
  4787. <OMA>
  4788. <OMS cd="relation1" name="eq"/>
  4789. <OMS cd="nums1" name="e"/>
  4790. <OMA>
  4791. <OMS cd="arith1" name="sum"/>
  4792. <OMA>
  4793. <OMS cd="interval1" name="integer_interval"/>
  4794. <OMS cd="alg1" name="zero"/>
  4795. <OMS cd="nums1" name="infinity"/>
  4796. </OMA>
  4797. <OMBIND>
  4798. <OMS cd="fns1" name="lambda"/>
  4799. <OMBVAR>
  4800. <OMV name="j"/>
  4801. </OMBVAR>
  4802. <OMA>
  4803. <OMS cd="arith1" name="divide"/>
  4804. <OMS cd="alg1" name="one"/>
  4805. <OMA>
  4806. <OMS cd="integer1" name="factorial"/>
  4807. <OMV name="j"/>
  4808. </OMA>
  4809. </OMA>
  4810. </OMBIND>
  4811. </OMA>
  4812. </OMA>
  4813. </OMOBJ>
  4814. Intermediate representation:
  4815. (eq nil &exponentiale; (sum nil (bvar j 1) (lowupperlimit nil 0 &infin;) (divide
  4816. nil 1 (factorial nil j))))
  4817. <math>
  4818. <apply><eq/>
  4819. <cn type="constant"> &exponentiale; </cn>
  4820. <apply><sum/>
  4821. <bvar>
  4822. <ci> j </ci>
  4823. </bvar>
  4824. <lowlimit>
  4825. <cn type="integer"> 0 </cn>
  4826. </lowlimit>
  4827. <uplimit>
  4828. <cn type="constant"> &infin; </cn>
  4829. </uplimit>
  4830. <apply><divide/>
  4831. <cn type="integer"> 1 </cn>
  4832. <apply><factorial/>
  4833. <ci> j </ci>
  4834. </apply>
  4835. </apply>
  4836. </apply>
  4837. </apply>
  4838. </math>
  4839. om2mml();
  4840. <OMOBJ>
  4841. <OMA>
  4842. <OMS cd="relation1" name="eq"/>
  4843. <OMA>
  4844. <OMS cd="arith1" name="power"/>
  4845. <OMS cd="nums1" name="i"/>
  4846. <OMI> 2 </OMI>
  4847. </OMA>
  4848. <OMA>
  4849. <OMS cd="arith1" name="minus"/>
  4850. <OMS cd="alg1" name="one"/>
  4851. </OMA>
  4852. </OMA>
  4853. </OMOBJ>
  4854. Intermediate representation:
  4855. (eq nil (power nil &imaginaryi; 2) (minus nil 1))
  4856. <math>
  4857. <apply><eq/>
  4858. <apply><power/>
  4859. <cn type="constant"> &imaginaryi; </cn>
  4860. <cn type="integer"> 2 </cn>
  4861. </apply>
  4862. <apply><minus/>
  4863. <cn type="integer"> 1 </cn>
  4864. </apply>
  4865. </apply>
  4866. </math>
  4867. om2mml();
  4868. <OMOBJ>
  4869. <OMBIND>
  4870. <OMS cd="quant1" name="forall"/>
  4871. <OMBVAR>
  4872. <OMV name="x"/>
  4873. <OMV name="y"/>
  4874. </OMBVAR>
  4875. <OMA>
  4876. <OMS cd="relation1" name="eq"/>
  4877. <OMV name="y"/>
  4878. <OMA>
  4879. <OMS name="imaginary" cd="nums1"/>
  4880. <OMA>
  4881. <OMS name="complex_cartesian" cd="nums1"/>
  4882. <OMV name="x"/>
  4883. <OMV name="y"/>
  4884. </OMA>
  4885. </OMA>
  4886. </OMA>
  4887. </OMBIND>
  4888. </OMOBJ>
  4889. Intermediate representation:
  4890. (forall nil (bvar x 1) (bvar y 1) (eq nil y (imaginary nil (plus nil x (times
  4891. nil y &imaginaryi;)))))
  4892. <math>
  4893. <apply><forall/>
  4894. <bvar>
  4895. <ci> x </ci>
  4896. </bvar>
  4897. <bvar>
  4898. <ci> y </ci>
  4899. </bvar>
  4900. <apply><eq/>
  4901. <ci> y </ci>
  4902. <apply><imaginary/>
  4903. <apply><plus/>
  4904. <ci> x </ci>
  4905. <apply><times/>
  4906. <ci> y </ci>
  4907. <cn type="constant"> &imaginaryi; </cn>
  4908. </apply>
  4909. </apply>
  4910. </apply>
  4911. </apply>
  4912. </apply>
  4913. </math>
  4914. om2mml();
  4915. <OMOBJ>
  4916. <OMBIND>
  4917. <OMS cd="quant1" name="forall"/>
  4918. <OMBVAR>
  4919. <OMV name="x"/>
  4920. <OMV name="y"/>
  4921. </OMBVAR>
  4922. <OMA>
  4923. <OMS cd="relation1" name="eq"/>
  4924. <OMV name="x"/>
  4925. <OMA>
  4926. <OMS name="real" cd="nums1"/>
  4927. <OMA>
  4928. <OMS name="complex_cartesian" cd="nums1"/>
  4929. <OMV name="x"/>
  4930. <OMV name="y"/>
  4931. </OMA>
  4932. </OMA>
  4933. </OMA>
  4934. </OMBIND>
  4935. </OMOBJ>
  4936. Intermediate representation:
  4937. (forall nil (bvar x 1) (bvar y 1) (eq nil x (real nil (plus nil x (times nil y
  4938. &imaginaryi;)))))
  4939. <math>
  4940. <apply><forall/>
  4941. <bvar>
  4942. <ci> x </ci>
  4943. </bvar>
  4944. <bvar>
  4945. <ci> y </ci>
  4946. </bvar>
  4947. <apply><eq/>
  4948. <ci> x </ci>
  4949. <apply><real/>
  4950. <apply><plus/>
  4951. <ci> x </ci>
  4952. <apply><times/>
  4953. <ci> y </ci>
  4954. <cn type="constant"> &imaginaryi; </cn>
  4955. </apply>
  4956. </apply>
  4957. </apply>
  4958. </apply>
  4959. </apply>
  4960. </math>
  4961. om2mml();
  4962. <OMOBJ>
  4963. <OMA>
  4964. <OMS cd="logic1" name="implies"/>
  4965. <OMA>
  4966. <OMS cd="set1" name="in"/>
  4967. <OMV name="a"/>
  4968. <OMS cd="setname1" name="R"/>
  4969. </OMA>
  4970. <OMA>
  4971. <OMS cd="relation1" name="lt"/>
  4972. <OMV name="x"/>
  4973. <OMS cd="nums1" name="infinity"/>
  4974. </OMA>
  4975. </OMA>
  4976. </OMOBJ>
  4977. Intermediate representation:
  4978. (implies nil (in nil a (semantic (r (o m s c d = " s e t n a m e 1 " n a m e
  4979. = " r " /)))) (lt nil x &infin;))
  4980. <math>
  4981. <apply><implies/>
  4982. <apply><in/>
  4983. <ci> a </ci>
  4984. <semantic>
  4985. <ci><mo>r</mo></ci>
  4986. <annotation-xml encoding="OpenMath">
  4987. <oms cd="setname1" name="r"/>
  4988. </annotation-xml>
  4989. </semantic>
  4990. </apply>
  4991. <apply><lt/>
  4992. <ci> x </ci>
  4993. <cn type="constant"> &infin; </cn>
  4994. </apply>
  4995. </apply>
  4996. </math>
  4997. om2mml();
  4998. <OMOBJ>
  4999. <OMA>
  5000. <OMS cd="relation1" name="neq"/>
  5001. <OMS cd="nums1" name="NaN"/>
  5002. <OMS cd="nums1" name="NaN"/>
  5003. </OMA>
  5004. </OMOBJ>
  5005. Intermediate representation:
  5006. (neq nil &notanumber; &notanumber;)
  5007. <math>
  5008. <apply><neq/>
  5009. <ci> &notanumber; </ci>
  5010. <ci> &notanumber; </ci>
  5011. </apply>
  5012. </math>
  5013. om2mml();
  5014. <OMOBJ>
  5015. <OMA>
  5016. <OMS cd="relation1" name="eq"/>
  5017. <OMS cd="nums1" name="pi"/>
  5018. <OMA>
  5019. <OMS cd="arith1" name="sum"/>
  5020. <OMA>
  5021. <OMS cd="interval1" name="integer_interval"/>
  5022. <OMS cd="alg1" name="zero"/>
  5023. <OMS cd="nums1" name="infinity"/>
  5024. </OMA>
  5025. <OMBIND>
  5026. <OMS cd="fns1" name="lambda"/>
  5027. <OMBVAR>
  5028. <OMV name="j"/>
  5029. </OMBVAR>
  5030. <OMA>
  5031. <OMS cd="arith1" name="minus"/>
  5032. <OMA>
  5033. <OMS cd="arith1" name="divide"/>
  5034. <OMS cd="alg1" name="one"/>
  5035. <OMA>
  5036. <OMS cd="arith1" name="plus"/>
  5037. <OMA>
  5038. <OMS cd="arith1" name="times"/>
  5039. <OMI> 4 </OMI>
  5040. <OMV name="j"/>
  5041. </OMA>
  5042. <OMS cd="alg1" name="one"/>
  5043. </OMA>
  5044. </OMA>
  5045. <OMA>
  5046. <OMS cd="arith1" name="divide"/>
  5047. <OMS cd="alg1" name="one"/>
  5048. <OMA>
  5049. <OMS cd="arith1" name="plus"/>
  5050. <OMA>
  5051. <OMS cd="arith1" name="times"/>
  5052. <OMI> 4 </OMI>
  5053. <OMV name="j"/>
  5054. </OMA>
  5055. <OMS cd="alg1" name="one"/>
  5056. </OMA>
  5057. </OMA>
  5058. </OMA>
  5059. </OMBIND>
  5060. </OMA>
  5061. </OMA>
  5062. </OMOBJ>
  5063. Intermediate representation:
  5064. (eq nil &pi; (sum nil (bvar j 1) (lowupperlimit nil 0 &infin;) (minus nil (
  5065. divide nil 1 (plus nil (times nil 4 j) 1)) (divide nil 1 (plus nil (times nil 4
  5066. j) 1)))))
  5067. <math>
  5068. <apply><eq/>
  5069. <cn type="constant"> &pi; </cn>
  5070. <apply><sum/>
  5071. <bvar>
  5072. <ci> j </ci>
  5073. </bvar>
  5074. <lowlimit>
  5075. <cn type="integer"> 0 </cn>
  5076. </lowlimit>
  5077. <uplimit>
  5078. <cn type="constant"> &infin; </cn>
  5079. </uplimit>
  5080. <apply><minus/>
  5081. <apply><divide/>
  5082. <cn type="integer"> 1 </cn>
  5083. <apply><plus/>
  5084. <apply><times/>
  5085. <cn type="integer"> 4 </cn>
  5086. <ci> j </ci>
  5087. </apply>
  5088. <cn type="integer"> 1 </cn>
  5089. </apply>
  5090. </apply>
  5091. <apply><divide/>
  5092. <cn type="integer"> 1 </cn>
  5093. <apply><plus/>
  5094. <apply><times/>
  5095. <cn type="integer"> 4 </cn>
  5096. <ci> j </ci>
  5097. </apply>
  5098. <cn type="integer"> 1 </cn>
  5099. </apply>
  5100. </apply>
  5101. </apply>
  5102. </apply>
  5103. </apply>
  5104. </math>
  5105. om2mml();
  5106. <OMOBJ>
  5107. <OMBIND>
  5108. <OMS cd="quant1" name="forall"/>
  5109. <OMBVAR>
  5110. <OMV name="x"/>
  5111. </OMBVAR>
  5112. <OMA>
  5113. <OMS cd="logic1" name="and"/>
  5114. <OMA>
  5115. <OMS cd="relation1" name="lt"/>
  5116. <OMA>
  5117. <OMS cd="arith1" name="minus"/>
  5118. <OMA>
  5119. <OMS cd="rounding1" name="ceiling"/>
  5120. <OMV name="x"/>
  5121. </OMA>
  5122. <OMS cd="alg1" name="one"/>
  5123. </OMA>
  5124. <OMV name="x"/>
  5125. </OMA>
  5126. <OMA>
  5127. <OMS cd="relation1" name="leq"/>
  5128. <OMV name="x"/>
  5129. <OMA>
  5130. <OMS cd="rounding1" name="ceiling"/>
  5131. <OMV name="x"/>
  5132. </OMA>
  5133. </OMA>
  5134. </OMA>
  5135. </OMBIND>
  5136. </OMOBJ>
  5137. Intermediate representation:
  5138. (forall nil (bvar x 1) (and nil (lt nil (minus nil (semantic (ceiling (o m s c
  5139. d = " r o u n d i n g 1 " n a m e = " c e i l i n g " /)) x) 1) x) (leq nil x
  5140. (semantic (ceiling (o m s c d = " r o u n d i n g 1 " n a m e = " c e i l i
  5141. n g " /)) x))))
  5142. <math>
  5143. <apply><forall/>
  5144. <bvar>
  5145. <ci> x </ci>
  5146. </bvar>
  5147. <apply><and/>
  5148. <apply><lt/>
  5149. <apply><minus/>
  5150. <apply>
  5151. <fn>
  5152. <semantic>
  5153. <ci><mo>ceiling</mo></ci>
  5154. <annotation-xml encoding="OpenMath">
  5155. <oms cd="rounding1" name="ceiling"/>
  5156. </annotation-xml>
  5157. </semantic>
  5158. </fn>
  5159. <ci> x </ci>
  5160. </apply>
  5161. <cn type="integer"> 1 </cn>
  5162. </apply>
  5163. <ci> x </ci>
  5164. </apply>
  5165. <apply><leq/>
  5166. <ci> x </ci>
  5167. <apply>
  5168. <fn>
  5169. <semantic>
  5170. <ci><mo>ceiling</mo></ci>
  5171. <annotation-xml encoding="OpenMath">
  5172. <oms cd="rounding1" name="ceiling"/>
  5173. </annotation-xml>
  5174. </semantic>
  5175. </fn>
  5176. <ci> x </ci>
  5177. </apply>
  5178. </apply>
  5179. </apply>
  5180. </apply>
  5181. </math>
  5182. om2mml();
  5183. <OMOBJ>
  5184. <OMA>
  5185. <OMS cd="relation1" name="eq"/>
  5186. <OMA>
  5187. <OMS cd="stats1" name="mean"/>
  5188. <OMI> 1 </OMI> <OMI> 2 </OMI> <OMI> 3 </OMI>
  5189. </OMA>
  5190. <OMI> 3 </OMI>
  5191. </OMA>
  5192. </OMOBJ>
  5193. Intermediate representation:
  5194. (eq nil (mean nil 1 2 3) 3)
  5195. <math>
  5196. <apply><eq/>
  5197. <apply><mean/>
  5198. <cn type="integer"> 1 </cn>
  5199. <cn type="integer"> 2 </cn>
  5200. <cn type="integer"> 3 </cn>
  5201. </apply>
  5202. <cn type="integer"> 3 </cn>
  5203. </apply>
  5204. </math>
  5205. om2mml();
  5206. <OMOBJ>
  5207. <OMA>
  5208. <OMS cd="stats1" name="sdev"/>
  5209. <OMF dec="3.1"/>
  5210. <OMF dec="2.2"/>
  5211. <OMF dec="1.8"/>
  5212. <OMF dec="1.1"/>
  5213. <OMF dec="3.3"/>
  5214. <OMF dec="2.4"/>
  5215. <OMF dec="5.5"/>
  5216. <OMF dec="2.3"/>
  5217. <OMF dec="1.7"/>
  5218. <OMF dec="1.8"/>
  5219. <OMF dec="3.4"/>
  5220. <OMF dec="4.0"/>
  5221. <OMF dec="3.3"/>
  5222. </OMA>
  5223. </OMOBJ>
  5224. Intermediate representation:
  5225. (sdev nil 3.1 2.2 1.8 1.1 3.3 2.4 5.5 2.3 1.7 1.8 3.4 4.0 3.3)
  5226. <math>
  5227. <apply><sdev/>
  5228. <cn type="real"> 3.1 </cn>
  5229. <cn type="real"> 2.2 </cn>
  5230. <cn type="real"> 1.8 </cn>
  5231. <cn type="real"> 1.1 </cn>
  5232. <cn type="real"> 3.3 </cn>
  5233. <cn type="real"> 2.4 </cn>
  5234. <cn type="real"> 5.5 </cn>
  5235. <cn type="real"> 2.3 </cn>
  5236. <cn type="real"> 1.7 </cn>
  5237. <cn type="real"> 1.8 </cn>
  5238. <cn type="real"> 3.4 </cn>
  5239. <cn type="real"> 4.0 </cn>
  5240. <cn type="real"> 3.3 </cn>
  5241. </apply>
  5242. </math>
  5243. om2mml();
  5244. <OMOBJ>
  5245. <OMA>
  5246. <OMS cd="logic1" name="implies"/>
  5247. <OMA>
  5248. <OMS cd="relation1" name="eq"/>
  5249. <OMA>
  5250. <OMS cd="arith1" name="power"/>
  5251. <OMV name="a"/>
  5252. <OMV name="b"/>
  5253. </OMA>
  5254. <OMV name="c"/>
  5255. </OMA>
  5256. <OMA>
  5257. <OMS cd="relation1" name="eq"/>
  5258. <OMA>
  5259. <OMS cd="transc1" name="log"/>
  5260. <OMV name="a"/>
  5261. <OMV name="c"/>
  5262. </OMA>
  5263. <OMV name="b"/>
  5264. </OMA>
  5265. </OMA>
  5266. </OMOBJ>
  5267. Intermediate representation:
  5268. (implies nil (eq nil (power nil a b) c) (eq nil (log nil a c) b))
  5269. <math>
  5270. <apply><implies/>
  5271. <apply><eq/>
  5272. <apply><power/>
  5273. <ci> a </ci>
  5274. <ci> b </ci>
  5275. </apply>
  5276. <ci> c </ci>
  5277. </apply>
  5278. <apply><eq/>
  5279. <apply><log/>
  5280. <logbase>
  5281. <ci> a </ci>
  5282. </logbase>
  5283. <ci> c </ci>
  5284. <apply>
  5285. <ci> b </ci>
  5286. </apply>
  5287. </apply>
  5288. </math>
  5289. om2mml();
  5290. <OMOBJ>
  5291. <OMA>
  5292. <OMS name="and" cd="logic1"/>
  5293. <OMA>
  5294. <OMS name="lt" cd="relation1"/>
  5295. <OMA>
  5296. <OMS name="unary_minus" cd="arith1"/>
  5297. <OMS name="pi" cd="nums1"/>
  5298. </OMA>
  5299. <OMA>
  5300. <OMS name="imaginary" cd="nums1"/>
  5301. <OMA>
  5302. <OMS name="ln" cd="transc1"/>
  5303. <OMV name="x"/>
  5304. </OMA>
  5305. </OMA>
  5306. </OMA>
  5307. <OMA>
  5308. <OMS name="leq" cd="relation1"/>
  5309. <OMA>
  5310. <OMS name="imaginary" cd="nums1"/>
  5311. <OMA>
  5312. <OMS name="ln" cd="transc1"/>
  5313. <OMV name="x"/>
  5314. </OMA>
  5315. </OMA>
  5316. <OMS name="pi" cd="nums1"/>
  5317. </OMA>
  5318. </OMA>
  5319. </OMOBJ>
  5320. Intermediate representation:
  5321. (and nil (lt nil (minus nil &pi;) (imaginary nil (ln nil x))) (leq nil (
  5322. imaginary nil (ln nil x)) &pi;))
  5323. <math>
  5324. <apply><and/>
  5325. <apply><lt/>
  5326. <apply><minus/>
  5327. <cn type="constant"> &pi; </cn>
  5328. </apply>
  5329. <apply><imaginary/>
  5330. <apply><ln/>
  5331. <ci> x </ci>
  5332. </apply>
  5333. </apply>
  5334. </apply>
  5335. <apply><leq/>
  5336. <apply><imaginary/>
  5337. <apply><ln/>
  5338. <ci> x </ci>
  5339. </apply>
  5340. </apply>
  5341. <cn type="constant"> &pi; </cn>
  5342. </apply>
  5343. </apply>
  5344. </math>
  5345. om2mml();
  5346. <OMOBJ>
  5347. <OMA>
  5348. <OMS cd="relation1" name="eq"/>
  5349. <OMA>
  5350. <OMS cd="veccalc1" name="curl"/>
  5351. <OMV name="F"/>
  5352. </OMA>
  5353. <OMA>
  5354. <OMS cd="arith1" name="plus"/>
  5355. <OMA>
  5356. <OMS cd="linalg1" name="vectorproduct"/>
  5357. <OMA>
  5358. <OMS cd="linalg1" name="vector"/>
  5359. <OMI> 1 </OMI>
  5360. <OMI> 0 </OMI>
  5361. <OMI> 0 </OMI>
  5362. </OMA>
  5363. <OMA>
  5364. <OMS cd="calculus1" name="partialdiff"/>
  5365. <OMA>
  5366. <OMS cd="list1" name="list"/>
  5367. <OMI> 1 </OMI>
  5368. </OMA>
  5369. <OMV name="F"/>
  5370. </OMA>
  5371. </OMA>
  5372. <OMA>
  5373. <OMS cd="linalg1" name="vectorproduct"/>
  5374. <OMA>
  5375. <OMS cd="linalg1" name="vector"/>
  5376. <OMI> 0 </OMI>
  5377. <OMI> 1 </OMI>
  5378. <OMI> 0 </OMI>
  5379. </OMA>
  5380. <OMA>
  5381. <OMS cd="calculus1" name="partialdiff"/>
  5382. <OMA>
  5383. <OMS cd="list1" name="list"/>
  5384. <OMI> 2 </OMI>
  5385. </OMA>
  5386. <OMV name="F"/>
  5387. </OMA>
  5388. </OMA>
  5389. <OMA>
  5390. <OMS cd="linalg1" name="vectorproduct"/>
  5391. <OMA>
  5392. <OMS cd="linalg1" name="vector"/>
  5393. <OMI> 0 </OMI>
  5394. <OMI> 0 </OMI>
  5395. <OMI> 1 </OMI>
  5396. </OMA>
  5397. <OMA>
  5398. <OMS cd="calculus1" name="partialdiff"/>
  5399. <OMA>
  5400. <OMS cd="list1" name="list"/>
  5401. <OMI> 3 </OMI>
  5402. </OMA>
  5403. <OMV name="F"/>
  5404. </OMA>
  5405. </OMA>
  5406. </OMA>
  5407. </OMA>
  5408. </OMOBJ>
  5409. Intermediate representation:
  5410. (eq nil (curl nil f) (plus nil (vectorproduct nil (vectorml nil 1 0 0) (
  5411. partialdiff nil f)) (vectorproduct nil (vectorml nil 0 1 0) (partialdiff nil f))
  5412. (vectorproduct nil (vectorml nil 0 0 1) (partialdiff nil f))))
  5413. <math>
  5414. <apply><eq/>
  5415. <apply><curl/>
  5416. <ci> f </ci>
  5417. </apply>
  5418. <apply><plus/>
  5419. <apply><vectorproduct/>
  5420. <vector>
  5421. <cn type="integer"> 1 </cn>
  5422. <cn type="integer"> 0 </cn>
  5423. <cn type="integer"> 0 </cn>
  5424. </vector>
  5425. <apply><partialdiff/>
  5426. <ci> f </ci>
  5427. </apply>
  5428. </apply>
  5429. <apply><vectorproduct/>
  5430. <vector>
  5431. <cn type="integer"> 0 </cn>
  5432. <cn type="integer"> 1 </cn>
  5433. <cn type="integer"> 0 </cn>
  5434. </vector>
  5435. <apply><partialdiff/>
  5436. <ci> f </ci>
  5437. </apply>
  5438. </apply>
  5439. <apply><vectorproduct/>
  5440. <vector>
  5441. <cn type="integer"> 0 </cn>
  5442. <cn type="integer"> 0 </cn>
  5443. <cn type="integer"> 1 </cn>
  5444. </vector>
  5445. <apply><partialdiff/>
  5446. <ci> f </ci>
  5447. </apply>
  5448. </apply>
  5449. </apply>
  5450. </apply>
  5451. </math>
  5452. om2mml();
  5453. <OMOBJ>
  5454. <OMBIND>
  5455. <OMS cd="quant1" name="forall"/>
  5456. <OMBVAR>
  5457. <OMV name="x"/>
  5458. </OMBVAR>
  5459. <OMA>
  5460. <OMS cd="logic1" name="and"/>
  5461. <OMA>
  5462. <OMS cd="relation1" name="lt"/>
  5463. <OMA>
  5464. <OMS name="unary_minus" cd="arith1"/>
  5465. <OMS cd="nums1" name="pi"/>
  5466. </OMA>
  5467. <OMA>
  5468. <OMS name="arg" cd="arith2"/>
  5469. <OMV name="x"/>
  5470. </OMA>
  5471. </OMA>
  5472. <OMA>
  5473. <OMS cd="relation1" name="leq"/>
  5474. <OMA>
  5475. <OMS name="arg" cd="arith2"/>
  5476. <OMV name="x"/>
  5477. </OMA>
  5478. <OMS cd="nums1" name="pi"/>
  5479. </OMA>
  5480. </OMA>
  5481. </OMBIND>
  5482. </OMOBJ>
  5483. Intermediate representation:
  5484. (forall nil (bvar x 1) (and nil (lt nil (minus nil &pi;) (arg nil x)) (leq nil (
  5485. arg nil x) &pi;)))
  5486. <math>
  5487. <apply><forall/>
  5488. <bvar>
  5489. <ci> x </ci>
  5490. </bvar>
  5491. <apply><and/>
  5492. <apply><lt/>
  5493. <apply><minus/>
  5494. <cn type="constant"> &pi; </cn>
  5495. </apply>
  5496. <apply><arg/>
  5497. <ci> x </ci>
  5498. </apply>
  5499. </apply>
  5500. <apply><leq/>
  5501. <apply><arg/>
  5502. <ci> x </ci>
  5503. </apply>
  5504. <cn type="constant"> &pi; </cn>
  5505. </apply>
  5506. </apply>
  5507. </apply>
  5508. </math>
  5509. om2mml();
  5510. <OMOBJ>
  5511. <OMBIND>
  5512. <OMS cd="quant1" name="forall"/>
  5513. <OMBVAR>
  5514. <OMV name="a"/>
  5515. </OMBVAR>
  5516. <OMA>
  5517. <OMS cd="relation1" name="eq"/>
  5518. <OMA>
  5519. <OMS cd="arith2" name="inverse"/>
  5520. <OMA>
  5521. <OMS cd="arith2" name="inverse"/>
  5522. <OMV name="a"/>
  5523. </OMA>
  5524. </OMA>
  5525. <OMV name="a"/>
  5526. </OMA>
  5527. </OMBIND>
  5528. </OMOBJ>
  5529. Intermediate representation:
  5530. (forall nil (bvar a 1) (eq nil (inverse nil (inverse nil a)) a))
  5531. <math>
  5532. <apply><forall/>
  5533. <bvar>
  5534. <ci> a </ci>
  5535. </bvar>
  5536. <apply><eq/>
  5537. <apply><inverse/>
  5538. <apply><inverse/>
  5539. <ci> a </ci>
  5540. </apply>
  5541. </apply>
  5542. <ci> a </ci>
  5543. </apply>
  5544. </apply>
  5545. </math>
  5546. % An example of elements which do not have a MathML
  5547. % equivalent. This example comes from the fns1 CD
  5548. om2mml();
  5549. <OMOBJ>
  5550. <OMBIND>
  5551. <OMS cd="quant1" name="forall"/>
  5552. <OMBVAR>
  5553. <OMV name="n"/>
  5554. </OMBVAR>
  5555. <OMA>
  5556. <OMS cd="relation1" name="eq"/>
  5557. <OMA>
  5558. <OMS cd="fns2" name="apply_to_list"/>
  5559. <OMA>
  5560. <OMS cd="arith1" name="plus"/>
  5561. <OMA>
  5562. <OMS cd="list1" name="make_list"/>
  5563. <OMI> 1 </OMI>
  5564. <OMV name="n"/>
  5565. <OMS cd="fns1" name="identity"/>
  5566. </OMA>
  5567. </OMA>
  5568. </OMA>
  5569. <OMA>
  5570. <OMS cd="arith1" name="divide"/>
  5571. <OMA>
  5572. <OMS cd="arith1" name="times"/>
  5573. <OMV name="n"/>
  5574. <OMA>
  5575. <OMS cd="arith1" name="plus"/>
  5576. <OMV name="n"/>
  5577. <OMI> 1 </OMI>
  5578. </OMA>
  5579. </OMA>
  5580. <OMI> 2 </OMI>
  5581. </OMA>
  5582. </OMA>
  5583. </OMBIND>
  5584. </OMOBJ>
  5585. Intermediate representation:
  5586. (forall nil (bvar n 1) (eq nil (semantic (apply_to_list (o m s c d = " f n s 2
  5587. " n a m e = " a p p l y _ t o _ l i s t " /)) (plus nil (semantic (make_list (
  5588. o m s c d = " l i s t 1 " n a m e = " m a k e _ l i s t " /)) 1 n (semantic
  5589. (identity (o m s c d = " f n s 1 " n a m e = " i d e n t i t y " /)))))) (
  5590. divide nil (times nil n (plus nil n 1)) 2)))
  5591. <math>
  5592. <apply><forall/>
  5593. <bvar>
  5594. <ci> n </ci>
  5595. </bvar>
  5596. <apply><eq/>
  5597. <apply>
  5598. <fn>
  5599. <semantic>
  5600. <ci><mo>apply_to_list</mo></ci>
  5601. <annotation-xml encoding="OpenMath">
  5602. <oms cd="fns2" name="apply_to_list"/>
  5603. </annotation-xml>
  5604. </semantic>
  5605. </fn>
  5606. <apply><plus/>
  5607. <apply>
  5608. <fn>
  5609. <semantic>
  5610. <ci><mo>make_list</mo></ci>
  5611. <annotation-xml encoding="OpenMath">
  5612. <oms cd="list1" name="make_list"/>
  5613. </annotation-xml>
  5614. </semantic>
  5615. </fn>
  5616. <cn type="integer"> 1 </cn>
  5617. <ci> n </ci>
  5618. <semantic>
  5619. <ci><mo>identity</mo></ci>
  5620. <annotation-xml encoding="OpenMath">
  5621. <oms cd="fns1" name="identity"/>
  5622. </annotation-xml>
  5623. </semantic>
  5624. </apply>
  5625. </apply>
  5626. </apply>
  5627. <apply><divide/>
  5628. <apply><times/>
  5629. <ci> n </ci>
  5630. <apply><plus/>
  5631. <ci> n </ci>
  5632. <cn type="integer"> 1 </cn>
  5633. </apply>
  5634. </apply>
  5635. <cn type="integer"> 2 </cn>
  5636. </apply>
  5637. </apply>
  5638. </apply>
  5639. </math>
  5640. om2mml();
  5641. <OMOBJ>
  5642. <OMA>
  5643. <OMS cd="relation1" name="eq"/>
  5644. <OMA>
  5645. <OMS cd="linalg3" name="determinant"/>
  5646. <OMA>
  5647. <OMS cd="linalg3" name="identity"/>
  5648. <OMV name="n"/>
  5649. </OMA>
  5650. </OMA>
  5651. <OMS cd="alg1" name="one"/>
  5652. </OMA>
  5653. </OMOBJ>
  5654. Intermediate representation:
  5655. (eq nil (determinant nil (semantic (identity (o m s c d = " l i n a l g 3 "
  5656. n a m e = " i d e n t i t y " /)) n)) 1)
  5657. <math>
  5658. <apply><eq/>
  5659. <apply><determinant/>
  5660. <apply>
  5661. <fn>
  5662. <semantic>
  5663. <ci><mo>identity</mo></ci>
  5664. <annotation-xml encoding="OpenMath">
  5665. <oms cd="linalg3" name="identity"/>
  5666. </annotation-xml>
  5667. </semantic>
  5668. </fn>
  5669. <ci> n </ci>
  5670. </apply>
  5671. </apply>
  5672. <cn type="integer"> 1 </cn>
  5673. </apply>
  5674. </math>
  5675. om2mml();
  5676. <OMOBJ>
  5677. <OMA>
  5678. <OMS cd="relation1" name="eq"/>
  5679. <OMA>
  5680. <OMS cd="linalg3" name="transpose"/>
  5681. <OMA>
  5682. <OMS cd="linalg1" name="matrix"/>
  5683. <OMA>
  5684. <OMS cd="linalg1" name="matrixrow"/>
  5685. <OMI> 0 </OMI>
  5686. <OMI> 1 </OMI>
  5687. </OMA>
  5688. <OMA>
  5689. <OMS cd="linalg1" name="matrixrow"/>
  5690. <OMI> 2 </OMI>
  5691. <OMI> 3 </OMI>
  5692. </OMA>
  5693. </OMA>
  5694. </OMA>
  5695. <OMA>
  5696. <OMS cd="linalg1" name="matrix"/>
  5697. <OMA>
  5698. <OMS cd="linalg1" name="matrixrow"/>
  5699. <OMI> 0 </OMI>
  5700. <OMI> 2 </OMI>
  5701. </OMA>
  5702. <OMA>
  5703. <OMS cd="linalg1" name="matrixrow"/>
  5704. <OMI> 1 </OMI>
  5705. <OMI> 3 </OMI>
  5706. </OMA>
  5707. </OMA>
  5708. </OMA>
  5709. </OMOBJ>
  5710. Intermediate representation:
  5711. (eq nil (transpose nil (matrix nil matrixrow ((0 1) (2 3)))) (matrix nil
  5712. matrixrow ((0 2) (1 3))))
  5713. <math>
  5714. <apply><eq/>
  5715. <apply><transpose/>
  5716. <matrix>
  5717. <matrixrow>
  5718. <cn type="integer"> 0 </cn>
  5719. <cn type="integer"> 1 </cn>
  5720. </matrixrow>
  5721. <matrixrow>
  5722. <cn type="integer"> 2 </cn>
  5723. <cn type="integer"> 3 </cn>
  5724. </matrixrow>
  5725. </matrix>
  5726. </apply>
  5727. <matrix>
  5728. <matrixrow>
  5729. <cn type="integer"> 0 </cn>
  5730. <cn type="integer"> 2 </cn>
  5731. </matrixrow>
  5732. <matrixrow>
  5733. <cn type="integer"> 1 </cn>
  5734. <cn type="integer"> 3 </cn>
  5735. </matrixrow>
  5736. </matrix>
  5737. </apply>
  5738. </math>
  5739. om2mml();
  5740. <OMOBJ>
  5741. <OMA>
  5742. <OMS cd="logic2" name="equivalent"/>
  5743. <OMA>
  5744. <OMS cd="logic2" name="equivalent"/>
  5745. <OMV name="A"/>
  5746. <OMV name="B"/>
  5747. </OMA>
  5748. <OMA>
  5749. <OMS cd="logic1" name="and"/>
  5750. <OMA>
  5751. <OMS cd="logic1" name="implies"/>
  5752. <OMV name="A"/>
  5753. <OMV name="B"/>
  5754. </OMA>
  5755. <OMA>
  5756. <OMS cd="logic1" name="implies"/>
  5757. <OMV name="B"/>
  5758. <OMV name="A"/>
  5759. </OMA>
  5760. </OMA>
  5761. </OMA>
  5762. </OMOBJ>
  5763. Intermediate representation:
  5764. (equivalent nil (equivalent nil a b) (and nil (implies nil a b) (implies nil b a
  5765. )))
  5766. <math>
  5767. <apply><equivalent/>
  5768. <apply><equivalent/>
  5769. <ci> a </ci>
  5770. <ci> b </ci>
  5771. </apply>
  5772. <apply><and/>
  5773. <apply><implies/>
  5774. <ci> a </ci>
  5775. <ci> b </ci>
  5776. </apply>
  5777. <apply><implies/>
  5778. <ci> b </ci>
  5779. <ci> a </ci>
  5780. </apply>
  5781. </apply>
  5782. </apply>
  5783. </math>
  5784. om2mml();
  5785. <OMOBJ>
  5786. <OMATTR>
  5787. <OMATP>
  5788. <OMS cd="typmml" name="type"/>
  5789. <OMS cd="typmml" name="complex_polar_type"/>
  5790. </OMATP>
  5791. <OMV name="z"/>
  5792. </OMATTR>
  5793. </OMOBJ>
  5794. Intermediate representation:
  5795. (ci ((type complex_polar)) z)
  5796. <math>
  5797. <ci type="complex_polar">z</ci>
  5798. </math>
  5799. % Examples of assigning types to variables.
  5800. om2mml();
  5801. <OMOBJ>
  5802. <OMATTR>
  5803. <OMATP>
  5804. <OMS cd="typmml" name="type"/>
  5805. <OMS cd="typmml" name="integer_type"/>
  5806. </OMATP>
  5807. <OMV name="z"/>
  5808. </OMATTR>
  5809. </OMOBJ>
  5810. Intermediate representation:
  5811. (ci ((type integer)) z)
  5812. <math>
  5813. <ci type="integer">z</ci>
  5814. </math>
  5815. om2mml();
  5816. <OMOBJ>
  5817. <OMATTR>
  5818. <OMATP>
  5819. <OMS cd="typmml" name="type"/>
  5820. <OMS cd="typmml" name="real_type"/>
  5821. </OMATP>
  5822. <OMV name="z"/>
  5823. </OMATTR>
  5824. </OMOBJ>
  5825. Intermediate representation:
  5826. (ci ((type real)) z)
  5827. <math>
  5828. <ci type="real">z</ci>
  5829. </math>
  5830. om2mml();
  5831. <OMOBJ>
  5832. <OMATTR>
  5833. <OMATP>
  5834. <OMS cd="typmml" name="type"/>
  5835. <OMS cd="typmml" name="rational_type"/>
  5836. </OMATP>
  5837. <OMV name="z"/>
  5838. </OMATTR>
  5839. </OMOBJ>
  5840. Intermediate representation:
  5841. (ci ((type rational)) z)
  5842. <math>
  5843. <ci type="rational">z</ci>
  5844. </math>
  5845. % These examples show the use of attributions within OpenMath
  5846. % expressions.
  5847. om2mml();
  5848. <OMOBJ>
  5849. <OMA>
  5850. <OMATTR>
  5851. <OMATP>
  5852. <OMS cd="typmml" name="type"/>
  5853. <OMS cd="typmml" name="fn_type"/>
  5854. </OMATP>
  5855. <OMV name="f"/>
  5856. </OMATTR>
  5857. <OMI>1</OMI>
  5858. <OMI>2</OMI>
  5859. <OMI>3</OMI>
  5860. </OMA>
  5861. </OMOBJ>
  5862. Intermediate representation:
  5863. (f nil 1 2 3)
  5864. <math>
  5865. <apply>
  5866. <csymbol>
  5867. <ci>f</ci>
  5868. </csymbol>
  5869. <cn type="integer"> 1 </cn>
  5870. <cn type="integer"> 2 </cn>
  5871. <cn type="integer"> 3 </cn>
  5872. </apply>
  5873. </math>
  5874. om2mml();
  5875. <OMOBJ>
  5876. <OMA>
  5877. <OMS cd="arith1" name=times/>
  5878. <OMATTR>
  5879. <OMATP>
  5880. <OMS cd="typmml" name="type"/>
  5881. <OMS cd="typmml" name="matrix_type"/>
  5882. </OMATP>
  5883. <OMV name=A/>
  5884. </OMATTR>
  5885. <OMA>
  5886. <OMS cd="transc1" name=sin/>
  5887. <OMV name=x/>
  5888. </OMA>
  5889. </OMA>
  5890. </OMOBJ>
  5891. Intermediate representation:
  5892. (times nil (ci ((type matrix)) a) (sin nil x))
  5893. <math>
  5894. <apply><times/>
  5895. <ci type="matrix">a</ci>
  5896. <apply><sin/>
  5897. <ci> x </ci>
  5898. </apply>
  5899. </apply>
  5900. </math>
  5901. om2mml();
  5902. <OMOBJ>
  5903. <OMA>
  5904. <OMS cd="linalg3" name="vector_selector"/>
  5905. <OMI>2</OMI>
  5906. <OMA>
  5907. <OMS cd="linalg1" name="vector"/>
  5908. <OMI> 3 </OMI>
  5909. <OMI> 6 </OMI>
  5910. <OMI> 9 </OMI>
  5911. </OMA>
  5912. </OMA>
  5913. </OMOBJ>
  5914. Intermediate representation:
  5915. (selector nil (vectorml nil 3 6 9) 2)
  5916. <math>
  5917. <apply><selector/>
  5918. <vector>
  5919. <cn type="integer"> 3 </cn>
  5920. <cn type="integer"> 6 </cn>
  5921. <cn type="integer"> 9 </cn>
  5922. </vector>
  5923. <cn type="integer"> 2 </cn>
  5924. </apply>
  5925. </math>
  5926. om2mml();
  5927. <OMOBJ>
  5928. <OMA>
  5929. <OMS cd="linalg3" name="vector_selector"/>
  5930. <OMI>2</OMI>
  5931. <OMA>
  5932. <OMS cd="linalg1" name="matrixrow"/>
  5933. <OMI> 0 </OMI>
  5934. <OMI> 1 </OMI>
  5935. <OMI> 0 </OMI>
  5936. </OMA>
  5937. </OMA>
  5938. </OMOBJ>
  5939. Intermediate representation:
  5940. (selector nil (semantic (matrixrow (o m s c d = " l i n a l g 1 " n a m e =
  5941. " m a t r i x r o w " /)) 0 1 0) 2)
  5942. <math>
  5943. <apply><selector/>
  5944. <apply>
  5945. <fn>
  5946. <semantic>
  5947. <ci><mo>matrixrow</mo></ci>
  5948. <annotation-xml encoding="OpenMath">
  5949. <oms cd="linalg1" name="matrixrow"/>
  5950. </annotation-xml>
  5951. </semantic>
  5952. </fn>
  5953. <cn type="integer"> 0 </cn>
  5954. <cn type="integer"> 1 </cn>
  5955. <cn type="integer"> 0 </cn>
  5956. </apply>
  5957. <cn type="integer"> 2 </cn>
  5958. </apply>
  5959. </math>
  5960. om2mml();
  5961. <OMOBJ>
  5962. <OMBIND>
  5963. <OMS cd="quant1" name="forall"/>
  5964. <OMBVAR>
  5965. <OMV name="M"/>
  5966. </OMBVAR>
  5967. <OMA>
  5968. <OMS cd="logic1" name="and"/>
  5969. <OMA>
  5970. <OMS cd="relation1" name="eq"/>
  5971. <OMA>
  5972. <OMS cd="arith1" name="times"/>
  5973. <OMA>
  5974. <OMS cd="linalg3" name="zero"/>
  5975. <OMA>
  5976. <OMS cd="linalg3" name="rowcount"/>
  5977. <OMV name="M"/>
  5978. </OMA>
  5979. <OMA>
  5980. <OMS cd="linalg3" name="rowcount"/>
  5981. <OMV name="M"/>
  5982. </OMA>
  5983. </OMA>
  5984. <OMV name="M"/>
  5985. </OMA>
  5986. <OMA>
  5987. <OMS cd="linalg3" name="zero"/>
  5988. <OMA>
  5989. <OMS cd="linalg3" name="rowcount"/>
  5990. <OMV name="M"/>
  5991. </OMA>
  5992. <OMA>
  5993. <OMS cd="linalg3" name="columncount"/>
  5994. <OMV name="M"/>
  5995. </OMA>
  5996. </OMA>
  5997. </OMA>
  5998. <OMA>
  5999. <OMS cd="relation1" name="eq"/>
  6000. <OMA>
  6001. <OMS cd="arith1" name="times"/>
  6002. <OMV name="M"/>
  6003. <OMA>
  6004. <OMS cd="linalg3" name="zero"/>
  6005. <OMA>
  6006. <OMS cd="linalg3" name="columncount"/>
  6007. <OMV name="M"/>
  6008. </OMA>
  6009. <OMA>
  6010. <OMS cd="linalg3" name="columncount"/>
  6011. <OMV name="M"/>
  6012. </OMA>
  6013. </OMA>
  6014. </OMA>
  6015. <OMA>
  6016. <OMS cd="linalg3" name="zero"/>
  6017. <OMA>
  6018. <OMS cd="linalg3" name="rowcount"/>
  6019. <OMV name="M"/>
  6020. </OMA>
  6021. <OMA>
  6022. <OMS cd="linalg3" name="columncount"/>
  6023. <OMV name="M"/>
  6024. </OMA>
  6025. </OMA>
  6026. </OMA>
  6027. </OMA>
  6028. </OMBIND>
  6029. </OMOBJ>
  6030. Intermediate representation:
  6031. (forall nil (bvar m 1) (and nil (eq nil (times nil (semantic (zero (o m s c d
  6032. = " l i n a l g 3 " n a m e = " z e r o " /)) (semantic (rowcount (o m s c d
  6033. = " l i n a l g 3 " n a m e = " r o w c o u n t " /)) m) (semantic (rowcount (
  6034. o m s c d = " l i n a l g 3 " n a m e = " r o w c o u n t " /)) m)) m) (
  6035. semantic (zero (o m s c d = " l i n a l g 3 " n a m e = " z e r o " /)) (
  6036. semantic (rowcount (o m s c d = " l i n a l g 3 " n a m e = " r o w c o u n
  6037. t " /)) m) (semantic (columncount (o m s c d = " l i n a l g 3 " n a m e = "
  6038. c o l u m n c o u n t " /)) m))) (eq nil (times nil m (semantic (zero (o m s c
  6039. d = " l i n a l g 3 " n a m e = " z e r o " /)) (semantic (columncount (o m s
  6040. c d = " l i n a l g 3 " n a m e = " c o l u m n c o u n t " /)) m) (semantic
  6041. (columncount (o m s c d = " l i n a l g 3 " n a m e = " c o l u m n c o u n
  6042. t " /)) m))) (semantic (zero (o m s c d = " l i n a l g 3 " n a m e = " z e
  6043. r o " /)) (semantic (rowcount (o m s c d = " l i n a l g 3 " n a m e = " r o
  6044. w c o u n t " /)) m) (semantic (columncount (o m s c d = " l i n a l g 3 " n
  6045. a m e = " c o l u m n c o u n t " /)) m)))))
  6046. <math>
  6047. <apply><forall/>
  6048. <bvar>
  6049. <ci> m </ci>
  6050. </bvar>
  6051. <apply><and/>
  6052. <apply><eq/>
  6053. <apply><times/>
  6054. <apply>
  6055. <fn>
  6056. <semantic>
  6057. <ci><mo>zero</mo></ci>
  6058. <annotation-xml encoding="OpenMath">
  6059. <oms cd="linalg3" name="zero"/>
  6060. </annotation-xml>
  6061. </semantic>
  6062. </fn>
  6063. <apply>
  6064. <fn>
  6065. <semantic>
  6066. <ci><mo>rowcount</mo></ci>
  6067. <annotation-xml encoding="OpenMath">
  6068. <oms cd="linalg3" name="rowcount"/>
  6069. </annotation-xml>
  6070. </semantic>
  6071. </fn>
  6072. <ci> m </ci>
  6073. </apply>
  6074. <apply>
  6075. <fn>
  6076. <semantic>
  6077. <ci><mo>rowcount</mo></ci>
  6078. <annotation-xml encoding="OpenMath">
  6079. <oms cd="linalg3" name="rowcount"/>
  6080. </annotation-xml>
  6081. </semantic>
  6082. </fn>
  6083. <ci> m </ci>
  6084. </apply>
  6085. </apply>
  6086. <ci> m </ci>
  6087. </apply>
  6088. <apply>
  6089. <fn>
  6090. <semantic>
  6091. <ci><mo>zero</mo></ci>
  6092. <annotation-xml encoding="OpenMath">
  6093. <oms cd="linalg3" name="zero"/>
  6094. </annotation-xml>
  6095. </semantic>
  6096. </fn>
  6097. <apply>
  6098. <fn>
  6099. <semantic>
  6100. <ci><mo>rowcount</mo></ci>
  6101. <annotation-xml encoding="OpenMath">
  6102. <oms cd="linalg3" name="rowcount"/>
  6103. </annotation-xml>
  6104. </semantic>
  6105. </fn>
  6106. <ci> m </ci>
  6107. </apply>
  6108. <apply>
  6109. <fn>
  6110. <semantic>
  6111. <ci><mo>columncount</mo></ci>
  6112. <annotation-xml encoding="OpenMath">
  6113. <oms cd="linalg3" name="columncount"/>
  6114. </annotation-xml>
  6115. </semantic>
  6116. </fn>
  6117. <ci> m </ci>
  6118. </apply>
  6119. </apply>
  6120. </apply>
  6121. <apply><eq/>
  6122. <apply><times/>
  6123. <ci> m </ci>
  6124. <apply>
  6125. <fn>
  6126. <semantic>
  6127. <ci><mo>zero</mo></ci>
  6128. <annotation-xml encoding="OpenMath">
  6129. <oms cd="linalg3" name="zero"/>
  6130. </annotation-xml>
  6131. </semantic>
  6132. </fn>
  6133. <apply>
  6134. <fn>
  6135. <semantic>
  6136. <ci><mo>columncount</mo></ci>
  6137. <annotation-xml encoding="OpenMath">
  6138. <oms cd="linalg3" name="columncount"/>
  6139. </annotation-xml>
  6140. </semantic>
  6141. </fn>
  6142. <ci> m </ci>
  6143. </apply>
  6144. <apply>
  6145. <fn>
  6146. <semantic>
  6147. <ci><mo>columncount</mo></ci>
  6148. <annotation-xml encoding="OpenMath">
  6149. <oms cd="linalg3" name="columncount"/>
  6150. </annotation-xml>
  6151. </semantic>
  6152. </fn>
  6153. <ci> m </ci>
  6154. </apply>
  6155. </apply>
  6156. </apply>
  6157. <apply>
  6158. <fn>
  6159. <semantic>
  6160. <ci><mo>zero</mo></ci>
  6161. <annotation-xml encoding="OpenMath">
  6162. <oms cd="linalg3" name="zero"/>
  6163. </annotation-xml>
  6164. </semantic>
  6165. </fn>
  6166. <apply>
  6167. <fn>
  6168. <semantic>
  6169. <ci><mo>rowcount</mo></ci>
  6170. <annotation-xml encoding="OpenMath">
  6171. <oms cd="linalg3" name="rowcount"/>
  6172. </annotation-xml>
  6173. </semantic>
  6174. </fn>
  6175. <ci> m </ci>
  6176. </apply>
  6177. <apply>
  6178. <fn>
  6179. <semantic>
  6180. <ci><mo>columncount</mo></ci>
  6181. <annotation-xml encoding="OpenMath">
  6182. <oms cd="linalg3" name="columncount"/>
  6183. </annotation-xml>
  6184. </semantic>
  6185. </fn>
  6186. <ci> m </ci>
  6187. </apply>
  6188. </apply>
  6189. </apply>
  6190. </apply>
  6191. </apply>
  6192. </math>
  6193. om2mml();
  6194. <OMOBJ>
  6195. <OMA>
  6196. <OMS cd="linalg3" name="vector_selector"/>
  6197. <OMI> 1 </OMI>
  6198. <OMATTR>
  6199. <OMATP>
  6200. <OMS cd="typmml" name="type"/>
  6201. <OMS cd="typmml" name="vector_type"/>
  6202. </OMATP>
  6203. <OMV name=A/>
  6204. </OMATTR>
  6205. </OMA>
  6206. </OMOBJ>
  6207. Intermediate representation:
  6208. (selector nil (ci ((type vectorml)) a) 1)
  6209. <math>
  6210. <apply><selector/>
  6211. <ci type="vector">a</ci>
  6212. <cn type="integer"> 1 </cn>
  6213. </apply>
  6214. </math>
  6215. om2mml();
  6216. <OMOBJ>
  6217. <OMA>
  6218. <OMS cd="linalg3" name="matrix_selector"/>
  6219. <OMI> 1 </OMI>
  6220. <OMI> 1 </OMI>
  6221. <OMATTR>
  6222. <OMATP>
  6223. <OMS cd="typmml" name="type"/>
  6224. <OMS cd="typmml" name="matrix_type"/>
  6225. </OMATP>
  6226. <OMV name=A/>
  6227. </OMATTR>
  6228. </OMA>
  6229. </OMOBJ>
  6230. Intermediate representation:
  6231. (selector nil (ci ((type matrix)) a) 1 1)
  6232. <math>
  6233. <apply><selector/>
  6234. <ci type="matrix">a</ci>
  6235. <cn type="integer"> 1 </cn>
  6236. <cn type="integer"> 1 </cn>
  6237. </apply>
  6238. </math>
  6239. % The following two examples were produced by REDUCE in MathML with the
  6240. % MathML interface, then translated to OpenMath. It is now possible to
  6241. % translate them back to MathML.
  6242. om2mml();
  6243. <OMOBJ>
  6244. <OMA>
  6245. <OMS cd="list1" name="list"/>
  6246. <OMA>
  6247. <OMS cd="list1" name="list"/>
  6248. <OMA>
  6249. <OMS cd="relation1" name="eq">
  6250. <OMV name="x"/>
  6251. <OMA>
  6252. <OMATTR>
  6253. <OMATP>
  6254. <OMS cd="typmml" name="type"/>
  6255. <OMS cd="typmml" name="fn_type"/>
  6256. </OMATP>
  6257. <OMV name="root_of"/>
  6258. </OMATTR>
  6259. <OMA>
  6260. <OMS cd="arith1" name="plus">
  6261. <OMA>
  6262. <OMS cd="arith1" name="minus">
  6263. <OMA>
  6264. <OMS cd="arith1" name="power">
  6265. <OMV name="y"/>
  6266. <OMV name="x_"/>
  6267. </OMA>
  6268. </OMA>
  6269. <OMA>
  6270. <OMS cd="arith1" name="minus">
  6271. <OMA>
  6272. <OMS cd="arith1" name="times">
  6273. <OMA>
  6274. <OMS cd="calculus1" name="int"/>
  6275. <OMBIND>
  6276. <OMS cd="fns1" name="lambda"/>
  6277. <OMBVAR>
  6278. <OMV name="x_"/>
  6279. </OMBVAR>
  6280. <OMA>
  6281. <OMS cd="arith1" name="power">
  6282. <OMV name="x_"/>
  6283. <OMV name="x_"/>
  6284. </OMA>
  6285. </OMBIND>
  6286. </OMA>
  6287. <OMV name="y"/>
  6288. </OMA>
  6289. </OMA>
  6290. <OMV name="x_"/>
  6291. <OMV name="y"/>
  6292. </OMA>
  6293. <OMV name="x_"/>
  6294. <OMV name="tag_1"/>
  6295. </OMA>
  6296. </OMA>
  6297. <OMA>
  6298. <OMS cd="relation1" name="eq">
  6299. <OMV name="a"/>
  6300. <OMA>
  6301. <OMS cd="arith1" name="plus">
  6302. <OMV name="x"/>
  6303. <OMV name="y"/>
  6304. </OMA>
  6305. </OMA>
  6306. </OMA>
  6307. </OMA>
  6308. </OMOBJ>
  6309. Intermediate representation:
  6310. (list nil (list nil (eq nil x (root_of nil (plus nil (minus nil (power nil y x_)
  6311. ) (minus nil (times nil (int nil (bvar x_ 1) (power nil x_ x_)) y)) x_ y) x_
  6312. tag_1)) (eq nil a (plus nil x y))))
  6313. <math>
  6314. <list>
  6315. <list>
  6316. <apply><eq/>
  6317. <ci> x </ci>
  6318. <apply>
  6319. <csymbol>
  6320. <ci>root_of</ci>
  6321. </csymbol>
  6322. <apply><plus/>
  6323. <apply><minus/>
  6324. <apply><power/>
  6325. <ci> y </ci>
  6326. <ci> x_ </ci>
  6327. </apply>
  6328. </apply>
  6329. <apply><minus/>
  6330. <apply><times/>
  6331. <apply><int/>
  6332. <bvar>
  6333. <ci> x_ </ci>
  6334. </bvar>
  6335. <apply><power/>
  6336. <ci> x_ </ci>
  6337. <ci> x_ </ci>
  6338. </apply>
  6339. </apply>
  6340. <ci> y </ci>
  6341. </apply>
  6342. </apply>
  6343. <ci> x_ </ci>
  6344. <ci> y </ci>
  6345. </apply>
  6346. <ci> x_ </ci>
  6347. <ci> tag_1 </ci>
  6348. </apply>
  6349. </apply>
  6350. <apply><eq/>
  6351. <ci> a </ci>
  6352. <apply><plus/>
  6353. <ci> x </ci>
  6354. <ci> y </ci>
  6355. </apply>
  6356. </apply>
  6357. </list>
  6358. </list>
  6359. </math>
  6360. om2mml();
  6361. <OMOBJ>
  6362. <OMA>
  6363. <OMS cd="list1" name="list"/>
  6364. <OMA>
  6365. <OMS cd="list1" name="list"/>
  6366. <OMA>
  6367. <OMS cd="relation1" name="eq">
  6368. <OMV name="x"/>
  6369. <OMA>
  6370. <OMATTR>
  6371. <OMATP>
  6372. <OMS cd="typmml" name="type"/>
  6373. <OMS cd="typmml" name="fn_type"/>
  6374. </OMATP>
  6375. <OMV name="root_of"/>
  6376. </OMATTR>
  6377. <OMA>
  6378. <OMS cd="arith1" name="plus">
  6379. <OMA>
  6380. <OMS cd="arith1" name="times">
  6381. <OMA>
  6382. <OMS cd="transc1" name="exp">
  6383. <OMA>
  6384. <OMS cd="arith1" name="plus">
  6385. <OMS cd="nums1" name="i"/>
  6386. <OMV name="x_"/>
  6387. </OMA>
  6388. </OMA>
  6389. <OMV name="y"/>
  6390. </OMA>
  6391. <OMA>
  6392. <OMS cd="transc1" name="exp">
  6393. <OMA>
  6394. <OMS cd="arith1" name="plus">
  6395. <OMS cd="nums1" name="i"/>
  6396. <OMV name="x_"/>
  6397. </OMA>
  6398. </OMA>
  6399. <OMA>
  6400. <OMS cd="arith1" name="power">
  6401. <OMV name="x_"/>
  6402. <OMA>
  6403. <OMS cd="arith1" name="plus">
  6404. <OMV name="y"/>
  6405. <OMI> 1 </OMI>
  6406. </OMA>
  6407. </OMA>
  6408. <OMA>
  6409. <OMS cd="arith1" name="times">
  6410. <OMA>
  6411. <OMS cd="calculus1" name="int"/>
  6412. <OMBIND>
  6413. <OMS cd="fns1" name="lambda"/>
  6414. <OMBVAR>
  6415. <OMV name="x_"/>
  6416. </OMBVAR>
  6417. <OMA>
  6418. <OMS cd="arith1" name="power">
  6419. <OMV name="x_"/>
  6420. <OMV name="x_"/>
  6421. </OMA>
  6422. </OMBIND>
  6423. </OMA>
  6424. <OMA>
  6425. <OMS cd="arith1" name="power">
  6426. <OMV name="y"/>
  6427. <OMI> 2 </OMI>
  6428. </OMA>
  6429. </OMA>
  6430. <OMA>
  6431. <OMS cd="arith1" name="times">
  6432. <OMA>
  6433. <OMS cd="calculus1" name="int"/>
  6434. <OMBIND>
  6435. <OMS cd="fns1" name="lambda"/>
  6436. <OMBVAR>
  6437. <OMV name="x_"/>
  6438. </OMBVAR>
  6439. <OMA>
  6440. <OMS cd="arith1" name="power">
  6441. <OMV name="x_"/>
  6442. <OMV name="x_"/>
  6443. </OMA>
  6444. </OMBIND>
  6445. </OMA>
  6446. <OMV name="y"/>
  6447. </OMA>
  6448. </OMA>
  6449. <OMV name="x_"/>
  6450. <OMV name="tag_2"/>
  6451. </OMA>
  6452. </OMA>
  6453. <OMA>
  6454. <OMS cd="relation1" name="eq">
  6455. <OMV name="z"/>
  6456. <OMV name="y"/>
  6457. </OMA>
  6458. </OMA>
  6459. </OMA>
  6460. </OMOBJ>
  6461. Intermediate representation:
  6462. (list nil (list nil (eq nil x (root_of nil (plus nil (times nil (exp nil (plus
  6463. nil &imaginaryi; x_)) y) (exp nil (plus nil &imaginaryi; x_)) (power nil x_ (
  6464. plus nil y 1)) (times nil (int nil (bvar x_ 1) (power nil x_ x_)) (power nil y 2
  6465. )) (times nil (int nil (bvar x_ 1) (power nil x_ x_)) y)) x_ tag_2)) (eq nil z y
  6466. )))
  6467. <math>
  6468. <list>
  6469. <list>
  6470. <apply><eq/>
  6471. <ci> x </ci>
  6472. <apply>
  6473. <csymbol>
  6474. <ci>root_of</ci>
  6475. </csymbol>
  6476. <apply><plus/>
  6477. <apply><times/>
  6478. <apply><exp/>
  6479. <apply><plus/>
  6480. <cn type="constant"> &imaginaryi; </cn>
  6481. <ci> x_ </ci>
  6482. </apply>
  6483. </apply>
  6484. <ci> y </ci>
  6485. </apply>
  6486. <apply><exp/>
  6487. <apply><plus/>
  6488. <cn type="constant"> &imaginaryi; </cn>
  6489. <ci> x_ </ci>
  6490. </apply>
  6491. </apply>
  6492. <apply><power/>
  6493. <ci> x_ </ci>
  6494. <apply><plus/>
  6495. <ci> y </ci>
  6496. <cn type="integer"> 1 </cn>
  6497. </apply>
  6498. </apply>
  6499. <apply><times/>
  6500. <apply><int/>
  6501. <bvar>
  6502. <ci> x_ </ci>
  6503. </bvar>
  6504. <apply><power/>
  6505. <ci> x_ </ci>
  6506. <ci> x_ </ci>
  6507. </apply>
  6508. </apply>
  6509. <apply><power/>
  6510. <ci> y </ci>
  6511. <cn type="integer"> 2 </cn>
  6512. </apply>
  6513. </apply>
  6514. <apply><times/>
  6515. <apply><int/>
  6516. <bvar>
  6517. <ci> x_ </ci>
  6518. </bvar>
  6519. <apply><power/>
  6520. <ci> x_ </ci>
  6521. <ci> x_ </ci>
  6522. </apply>
  6523. </apply>
  6524. <ci> y </ci>
  6525. </apply>
  6526. </apply>
  6527. <ci> x_ </ci>
  6528. <ci> tag_2 </ci>
  6529. </apply>
  6530. </apply>
  6531. <apply><eq/>
  6532. <ci> z </ci>
  6533. <ci> y </ci>
  6534. </apply>
  6535. </list>
  6536. </list>
  6537. </math>
  6538. om2mml();
  6539. <OMOBJ>
  6540. <OMATTR>
  6541. <OMATP>
  6542. <OMS cd="cc" name="type"/>
  6543. <OMS cd="omtypes" name="integer"/>
  6544. </OMATP>
  6545. <OMI> 0 </OMI>
  6546. </OMATTR>
  6547. </OMOBJ>
  6548. Intermediate representation:
  6549. (cn ((type integer)) 0)
  6550. <math>
  6551. <cn type="integer">0</cn>
  6552. </math>
  6553. om2mml();
  6554. <OMOBJ>
  6555. <OMATTR>
  6556. <OMATP>
  6557. <OMS cd="cc" name="type"/>
  6558. <OMS cd="omtypes" name="float"/>
  6559. </OMATP>
  6560. <OMF dec=1.0/>
  6561. </OMATTR>
  6562. </OMOBJ>
  6563. Intermediate representation:
  6564. (cn ((type semantic)) 1.0)
  6565. <math>
  6566. <cn type="semantic">1.0</cn>
  6567. </math>
  6568. om2mml();
  6569. <OMOBJ>
  6570. <OMA>
  6571. <OMS name="complex_cartesian" cd="nums1"/>
  6572. <OMV name="x"/>
  6573. <OMV name="y"/>
  6574. </OMA>
  6575. </OMOBJ>
  6576. Intermediate representation:
  6577. (plus nil x (times nil y &imaginaryi;))
  6578. <math>
  6579. <apply><plus/>
  6580. <ci> x </ci>
  6581. <apply><times/>
  6582. <ci> y </ci>
  6583. <cn type="constant"> &imaginaryi; </cn>
  6584. </apply>
  6585. </apply>
  6586. </math>
  6587. om2mml();
  6588. <OMOBJ>
  6589. <OMA>
  6590. <OMS name="complex_polar" cd="nums1"/>
  6591. <OMV name="x"/>
  6592. <OMV name="y"/>
  6593. </OMA>
  6594. </OMOBJ>
  6595. Intermediate representation:
  6596. (times nil x (exp nil (times nil y &imaginaryi;)))
  6597. <math>
  6598. <apply><times/>
  6599. <ci> x </ci>
  6600. <apply><exp/>
  6601. <apply><times/>
  6602. <ci> y </ci>
  6603. <cn type="constant"> &imaginaryi; </cn>
  6604. </apply>
  6605. </apply>
  6606. </apply>
  6607. </math>
  6608. om2mml();
  6609. <OMOBJ>
  6610. <OMA>
  6611. <OMS name="rational" cd="nums1"/>
  6612. <OMV name="x"/>
  6613. <OMV name="y"/>
  6614. </OMA>
  6615. </OMOBJ>
  6616. Intermediate representation:
  6617. (divide nil x y)
  6618. <math>
  6619. <apply><divide/>
  6620. <ci> x </ci>
  6621. <ci> y </ci>
  6622. </apply>
  6623. </math>
  6624. om2mml();
  6625. <OMOBJ>
  6626. <OMA>
  6627. <OMS name="complex_cartesian" cd="nums1"/>
  6628. <OMI>4</OMI>
  6629. <OMI>2</OMI>
  6630. </OMA>
  6631. </OMOBJ>
  6632. Intermediate representation:
  6633. (complex_cartesian nil 4 2)
  6634. <math>
  6635. <cn type="complex-cartesian"> 4 <sep/> 2 </cn>
  6636. </math>
  6637. om2mml();
  6638. <OMOBJ>
  6639. <OMA>
  6640. <OMS name="complex_polar" cd="nums1"/>
  6641. <OMI>4</OMI>
  6642. <OMI>2</OMI>
  6643. </OMA>
  6644. </OMOBJ>
  6645. Intermediate representation:
  6646. (complex_polar nil 4 2)
  6647. <math>
  6648. <cn type="complex-polar"> 4 <sep/> 2 </cn>
  6649. </math>
  6650. om2mml();
  6651. <OMOBJ>
  6652. <OMA>
  6653. <OMS name="rational" cd="nums1"/>
  6654. <OMI>4</OMI>
  6655. <OMI>2</OMI>
  6656. </OMA>
  6657. </OMOBJ>
  6658. Intermediate representation:
  6659. (rational nil 4 2)
  6660. <math>
  6661. <cn type="rational">4<sep/>2</cn>
  6662. </math>
  6663. % end;
  6664. end;
  6665. Time for test: 90 ms