On Writing Openmath Content Dictionaries

On Writing Openmath Content Dictionaries

On Writing Op enMath Content Dictionaries James H. Davenp ort Dept. Mathematical Sciences University of Bath Bath BA2 7AY England [email protected] Abstract by which Op enMath achieves its goal of b eing an \an ex- tensible framework for exchanging semantically-ri ch repre- This pap er is based on various discussion with the Op en- sentations of mathematical ob jects". So the motivation for Math Consortium, and recently at the UniversityofWest- writing a CD is that there is some semantics that one wishes ern Ontario. All errors are the author's. Many helpful sug- to exchange. The consequences of this motivation are the gestions have b een made, particularly by Dr. Dewar and following. Dr. Naylor. 1. There must b e a \new" piece of semantic information This pap er outlines some of the issues that a ect au- to convey. thors of Op enMath Content Dictionarie s, and their asso ci- ated Small Typ e System [4] les. 2. It must b e p ossible to write down informally the \com- mented mathematical prop erties" or CMPs the se- mantics that the author of the CD intends to convey. 1 Intro duction It should also b e p ossible to write Formal Mathemat- This pap er addresses the following questions ab out the writ- ical Prop erties FMPs, but this is not necessary, and ing of Op enMath Content Dictionaries CDs, and asso ci- is clearly imp ossible for all of mathematics. It maybe ated Small Typ e System STS [4] les. that some of the new items can b e de ned in terms of others, even if not everything can b e de ned formally. 1. Why write a Content Dictionary? 3. There must b e a motivation for wishing to convey it. 2. What should I lo ok at b efore/while writing a Content One such motivation would b e that two algebra systems Dictionary? wished to communicate ob jects with these semantics, but this is far from the only motivation. Databases 3. What should I b ear in mind while writing a Content might contain these ob jects consider the data de- Dictionary? scrib ed in [2], or wemay wish to search in pap ers containing such items in formulae. 4. What is approval for a Content Dictionary, and howdo I get a Content Dictionary approved? 3 An example: multisets 1.1 Content Dictionary Groups MathML [12] de nes the concept of set, and says that it can 1 A Content Dictionary Group is a le normally with exten- haveatype attribute of normal or multiset. Op enMath sion .cdg which sp eci es a grouping of CDs for a logical has a set1.ocd and corresp onding set1.sts available as purp ose. For example, the MathML group is a group of [9] which de ne the semantics for ordinary sets. Though CDs whose symb ols are equivalent to the symb ols of Con- they do not explicitly say so, it is the case that A [ A = A. 2 tent MathML [12, App endix C]. Since Op enMath do es not have the same sort of attribute A CD can b e in more than one CD group. For example, concept that MathML has, we need a way to enco de multi- setname1.ocd is in the MathML CD group, since it contains sets in Op enMath. symb ols Z etc. which are in content MathML. It is also in The following p ossibili ti es exist. the setname.cdg group, which also contains setname2.ocd, 1. Add a multiset constructor to set1.ocd which has various set names, suchasP, which are not in content MathML. 2. De ne a new CD probably called multiset1 with the same op erators as set1 except that set would proba- 2 Why write a CD? bly b e called multiset but di erent semantics. 3. De ne a new CD probably called multiset1 with op- A Content Dictionary is a fundamental concept of Op en- erators suchasmultiset-union etc. Math. The symb ols contained in a CD form the mechanism 1 Presumably the default, though this is not made explicit. Supp orted by the Op enMath Esprit Pro ject 24.696. 2 For go o d reasons: it's only p ossible in XML to have xed at- tributes of the MathML kind, whichwould con ict with the extensi- bility of Op enMath. 1 The rst has some drawbacks. 5 What to Bear in Mind The semantics are not the same, so one needs to say The key things to b ear in mind while writing a CD are the something like \If A is a set rather than a multiset following. then A [ A = A". Lest this seem trivial, consider the fact that 1. Op enMath is ab out semantics, rather than the elegance of rendering. There are many alternativeways to de- A [ B =AnB[A\B[BnA termine how something is rendered, but this is the job is true for sets but false for multisets: if A = of MathML [12], particularly its presentation mo de, f1; 1; 2g and B = f1; 2; 2g, the the left-hand side is rather than of Op enMath. f1; 1; 1; 2; 2; 2g, but the right-hand side is f1; 1; 2; 2g. One example will illustrate this p oint. A colleague com- mented as follows. \It o ccurred to me whilst writing It is then imp ossible to distinguish b etween the op er- that some Op enMath phrases like`a; b; c 2 Z' seem to ation of union on sets and multisets. Some texts use o ccur quite frequently in mathematics. At the moment di erent symb ols for the two, thus allowing a text to the only way to enco de this in Op enMath is the follow- write \A [ A = A, but A t A 6= A". It is also p ossible ing: that an algorithm might wish to consider b oth. Hence the choice lies b etween the second and third. This is <OMA> a matter of preference, but it seems that the general Op en- <OMS cd="logic1" name="and"/> 3 Math convention has b een to cho ose the second rather than <OMA> the third. In the current context, one can see that <OMS cd="set1" name="in"/> <OMS name="multiset-union" cd="multiset1"/> <OMV name="a"/> <OMS cd="setname1" name="Z"/> seems somewhat redundant compared with </OMA> <OMS name="union" cd="multiset1"/> <OMA> <OMS cd="set1" name="in"/> Examples of a CD and the asso ciated STS le constructed <OMV name="b"/> on this principle are given in the full version [5], also [9]. <OMS cd="setname1" name="Z"/> </OMA> 4 What to Lo ok at <OMA> <OMS cd="set1" name="in"/> The key do cument is the formal Op enMath standard [8]. <OMV name="c"/> Clearly this do cument is imp ortant, as is the description of <OMS cd="setname1" name="Z"/> the Small Typ e System [4]. Existing CDs, particularly the 4 </OMA> draft ocial ones at [9], are a useful source of layout , but </OMA> also of examples of how things can b e describ ed. In par- ticular, when lo oking at writing multiset1.ocd, the author Surely it would b e much neater if instead 'in' was made lo oked carefully at set1.ocd.However, the reader will no- n + 1-ary, and we could say something like: tice that not all the examples were blindly copied: some have b een changed to examples more appropriate for the case at <OMA> hand. <OMS cd="set1" name="in"/> In the eld in whichyou are working, there may b e some <OMV name="a"/> standard reference works, e.g. [1] in the area of sp ecial func- <OMV name="b"/> tions. These should certainly b e consulted, but it should b e <OMV name="c"/> b orne in mind that suchworks, however famous, may not b e <OMS cd="setname1" name="Z"/> complete see [3] for examples. Equally, there may b e stan- </OMA> dard software systems, and it would make sense to lo ok at them rst. However, one should not exp ect uniformity here. :::". The following table shows what happ ens on an apparently simple example: the de nition of arccot1. We note, however, that no \new" semantics were in- [1] 1st printing 3=4 inconsistent volved: indeed the fact that an existing representation [1] 9th printing =4 in Op enMath was quoted essentially proves this. This [6] 5th edition ? inconsistent led to the analysis in Table 1, and a general principl e: [13] 30th edition 3=4 inconsistent MathML Content and Op enMath will aim for sim- Maple V release 5 3=4 plicity in the core language at the cost of requiring a Axiom 2.1 3=4 more complex translation into \go o d" written mathe- Mathematica [11] =4 matics. Reduce 3.4.1 =4 in oating p oint At this p oint, the reader maywell ob ject that this prin- Matlab 5.3.0 =4 in oating p oint ciple has not always b een followed in the most basic Matlab 5.3.0 3=4 symb olic to olb ox Op enMath Content Dictionaries . For example, wehave 3 For example, the op erator in arith2 is called times not not and in,sowhy notin, since the justi cation for re- commutat iv e-t im es .However, this is not an invariable rule, since the placing prop osed CD for multi-valued inverse functions uses Log for the multi- valued equivalent of log, since this is the common mathematical con- <OMA> vention.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us