-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathomstd20-diff.html
More file actions
9628 lines (8368 loc) · 472 KB
/
omstd20-diff.html
File metadata and controls
9628 lines (8368 loc) · 472 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The OpenMath Standard</title>
<style>
body {
max-width:60em;
margin-left: 1em;
}
.tockey {
display:none;
}
@media screen and (min-width: 80em) {
body {
max-width: 60em;
margin-left: 21em;
}
.toc {
background-color:#EEE;
width:20em;
position:fixed;
height:100%;
top:0;
left:0;
}
.toc2 {
margin-left:.1em;
height:100%;
overflow-y:auto;
}
.tockey {
display:block;
text-align:center;
margin-top:1em;
}
}
li.tocchap {
list-style:none;
margin-top: .5em;
margin-left: 0pt;
padding-left: 0pt;
}
li.lof {
list-style:none;
margin-left: 0pt;
padding-left: 0pt;
}
.toc2> ul >li li {
list-style:none;
margin-left: 0pt;
padding-left: 10pt;
}
.toc2 ul {
margin-left: 0pt;
padding-left: 0pt;
}
li.tocchap > a {font-weight:bold;}
.toc2 a {
text-decoration:none;
color:#0000AA;
}
.toc2 a:hover {
text-decoration:underline;
}
.toc2 a:visited{
color:#0000AA;
}
h1{font-size:2em;}
h2{font-size:1.5em;}
h4{font-size:1.25em;}
h4{font-size:1em;}
h5{font-size:1em;}
div.mdata {
margin-top: .5em;
margin-bottom: .5em;
margin-left: 5em;
}
span.mdatahead {
font-weight: bold;
}
div.minitoc {
border-width: thin;
border-style: solid;
border-color: blue;
font-size: 90%;
margin-top: 1em;
margin-bottom: 1em;
padding: 1em 1em 1em 1em;
}
p {text-align:justify;
}
code {font-size: 125%;
font-family: monospace;
}
.figure {
border-width:thin;
border-style: solid;
border-color: black;
margin: 0.5em 0.5em 0.5em 0.5em;
padding: 0.5em 0.5em 0.5em 0.5em;
}
div.caption {
margin-top: 1em;
}
.footnote{
font-size: 75%;
font-style: italic;
}
.delliteral {
font-size: 75%;
background-color: #efefef;
border-color: black;
border-style: solid;
border-width: 1px;
padding: 1em;
color: red;
text-decoration: line-through;
}
.newliteral {
font-size: 75%;
background-color: #efefef;
border-color: black;
border-style: solid;
border-width: 1px;
padding: 1em;
color: green;
}
.literal {
font-size: 75%;
background-color: #efefef;
border-color: black;
border-style: solid;
border-width: 1px;
padding: 1em;
margin:bottom: 1em;
}
.del {
color: red;
text-decoration: line-through;
}
.new {
color: green;
background-color:#FFFFF0;
}
.chg {
background-color:#FFFFF0;
color: purple;
}
.changetoc {
border-style: solid;
border-color: black;
border-width: 1px;
margin: 2em 2em 2em 2em;
background-color: yellow;
}
.lowerroman {
list-style-type: lower-roman;
}
.definiendum {font-weight:bold;}
</style>
<script>
if (! navigator.userAgent.match(/Gecko\//)) {
var scr=document.createElement("script");
scr.setAttribute("src","http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_HTMLorMML");
document.getElementsByTagName("head")[0].appendChild(scr);
}
</script></head>
<body>
<h1>The <i>OpenMath</i> Standard</h1>
<div>
<div class="mdata">
<img src="keylogo.png" alt="OM logo" />
</div>
<div class="mdata">
Version: 2.0r2
</div>
<div class="mdata">
The OpenMath Society
</div>
<div class="mdata"><span class="mdatahead">Editors</span><br />
S. Buswell, O. Caprotti, D. P. Carlisle, M. C. Dewar, M. Gaëtano, M. Kohlhase, J. H. Davenport (revision 1), P. D.F. Ion (revision 1) and T. Wiesing (revision 2)
</div>
<div class="mdata">
July 2019
</div>
<div class="mdata" style="font-size:110%;background-color:#EEE;padding:.5em;">
<b>Editors' Draft:</b> Built 2019-08-03<br />
Source Repository: <a href="https://github.com/OpenMath/OMSTD/">https://github.com/OpenMath/OMSTD</a><br />
This Version: <a href="https://openmath.github.io/standard/om20-editors-draft/">https://openmath.github.io/standard/om20-editors-draft</a><br />
Normative version: <a href="https://openmath.github.io/standard/om20-2017-07-22/">https://openmath.github.io/standard/om20-2017-07-22/</a>
</div>
<div class="mdata">© 2000–2019 The OpenMath Society</div>
</div>
<div>
<h3>Abstract</h3>
<p>This document describes <span class="chg">version 2 revision 2</span> of
<i>OpenMath</i>: a standard for
the representation and communication of mathematical objects.
This revision clarifies the first <i>OpenMath</i> 2.0
<a href="#OM_2.0r0">[13]</a>.
<i>OpenMath</i>
allows the <i>meaning</i> of an object to be encoded
rather than just a visual representation. It is designed to allow the
free exchange of mathematical objects between software systems and human
beings. On the worldwide web it is designed to allow mathematical
expressions embedded in web pages to be manipulated and used in computations in
a meaningful and correct way. It is designed to be machine-generatable
and machine-readable, rather than written by hand.
</p><p>The <i>OpenMath</i> Standard is the official reference for
the <i>OpenMath</i> language and has been approved by the <i>OpenMath</i> Society. It is not
intended as an introductory document or a user's guide, for the latest
available material of this nature, and the latest version of the standard,
please consult the <i>OpenMath</i> web-site at
<a href="http://www.openmath.org">http://www.openmath.org</a>.</p><p>This document includes an overview of the
<i>OpenMath</i> architecture, an abstract description of <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s and two
mechanisms for producing concrete encodings of such objects. The first,
in <abbr>XML</abbr> (either innate or Strict Content MathML), is designed primarily
for use on the web, in documents, and
for applications which want to mix <i>OpenMath</i> as a content representation with
MathML as a presentation format. The second, a binary format, is
designed for applications which wish to exchange very large objects, or
a lot of data as efficiently as possible. This document also includes a
description of Content Dictionaries - the mechanism by which the meaning
of a symbol in the <i>OpenMath</i> language is encoded, as well as an XML encoding
for them. Finally it includes guidelines for the development of
<i>OpenMath</i>-compliant applications. Further background
on <i>OpenMath</i> and guidelines for its use in applications may be found in the
accompanying Primer <a href="#OM_primer">[14]</a>.</p>
</div>
<div class="changetoc">
<h3>Change-marked edition notes</h3>
<p>
This edition contains colour coded change markings
relative to the OpenMath 2.0 document...</p>
<ul>
<li class="new">New text is marked with css class "new" (green).</li>
<li class="del">Deleted text is marked with css class "del" (red).</li>
<li class="chg">Changed text is marked with css class "chg" (purple).</li>
</ul>
<p>Sections with modified text</p>
<span>
<a href="#sec_intro-obj" class="new">
1.2 <span>
<i>OpenMath</i> Objects and Encodings
</span>
</a>
</span>
<br />
<span>
<a href="#sec_json-the-json-encoding" class="new">
3.3 <span>
The JSON encoding
</span>
</a>
</span>
<br />
<span>
<a href="#sec_enc_summary" class="new">
3.4 <span>
Summary
</span>
</a>
</span>
<br />
<span>
<a href="#chgr3" class="new">
I.3 <span>
Changes in 2.0 Revision 3 (July 2019)
</span>
</a>
</span>
<br />
</div>
<div class="toc"><div class="toc2"><div class="tockey"><a href="/"><img width="50%" src="keylogo.png" alt="OM logo" /></a></div><h2 id="toc">Contents</h2><ul><li class="tocchap"><a href="#cha_int">1 Introduction to <i>OpenMath</i></a><ul><li><a href="#sec_om-arch">1.1 <i>OpenMath</i> Architecture</a></li></ul><ul><li><a href="#sec_intro-obj">1.2 <i>OpenMath</i> Objects and Encodings</a></li></ul><ul><li><a href="#sec_intro-cd">1.3 Content Dictionaries</a></li></ul><ul><li><a href="#sec_addnfiles">1.4 Additional Files</a></li></ul><ul><li><a href="#sec_phrasebooks">1.5 Phrasebooks</a></li></ul></li><li class="tocchap"><a href="#cha_obj">2 <i>OpenMath</i> Objects</a><ul><li><a href="#sec_omabs">2.1 Formal Definition of <i>OpenMath</i> Objects</a><ul><li><a href="#sec_basic">2.1.1 Basic <i>OpenMath</i> objects</a></li></ul><ul><li><a href="#sec_derived">2.1.2 Derived <i>OpenMath</i> Objects</a></li></ul><ul><li><a href="#sec_compound">2.1.3 <i>OpenMath</i> Objects</a></li></ul><ul><li><a href="#sec_roles">2.1.4 <i>OpenMath</i> Symbol Roles</a></li></ul></li></ul><ul><li><a href="#sec_omin">2.2 Further Description of <i>OpenMath</i> Objects</a></li></ul><ul><li><a href="#sec_names">2.3 Names</a></li></ul><ul><li><a href="#sec_summary">2.4 Summary</a></li></ul></li><li class="tocchap"><a href="#cha_enco">3 <i>OpenMath</i> Encodings</a><ul><li><a href="#sec_xml">3.1 The <abbr>XML</abbr> Encoding</a><ul><li><a href="#ssec_xml">3.1.1 A Schema for the <abbr>XML</abbr> Encoding</a></li></ul><ul><li><a href="#sec_xml-desc">3.1.2 Informal description of
the <abbr>XML</abbr> Encoding</a></li></ul><ul><li><a href="#sec_references">3.1.3 Some Notes on References</a><ul><li><a href="#sec_acyclicity">3.1.3.1 An Acyclicity Constraint</a></li></ul><ul><li><a href="#sec_sharing_bvars">3.1.3.2 Sharing and Bound Variables</a></li></ul></li></ul><ul><li><a href="#xmldoc">3.1.4 Embedding <i>OpenMath</i> in <abbr>XML</abbr> Documents</a></li></ul></li></ul><ul><li><a href="#sec_binary">3.2 The Binary Encoding</a><ul><li><a href="#sec_binary_grammar">3.2.1 A Grammar for the Binary Encoding</a></li></ul><ul><li><a href="#sec_bin-desc">3.2.2 Description of the Grammar</a></li></ul><ul><li><a href="#sec_bin_example">3.2.3 Example of Binary Encoding</a></li></ul><ul><li><a href="#sec_both_sharing">3.2.4 Sharing</a><ul><li><a href="#sec_sharing">3.2.4.1 Sharing in Objects beginning with the identifier [24]</a></li></ul><ul><li><a href="#sec_sharing_references">3.2.4.2 Sharing with References (beginning with [24+64])</a></li></ul></li></ul><ul><li><a href="#sec_impl_note">3.2.5 Implementation Note</a></li></ul><ul><li><a href="#sec_relation_OM1_binary">3.2.6 Relation to the <i>OpenMath</i> 1 binary encoding</a></li></ul></li></ul><ul><li><a href="#sec_json-the-json-encoding" class="new">3.3 The JSON encoding</a><ul><li><a href="#sec_json-general-structure">3.3.1 General Structure</a></li></ul><ul><li><a href="#sec_json-omobj-om-object-constructor">3.3.2 The Object Constructor</a></li></ul><ul><li><a href="#sec_json-oms---symbol">3.3.3 OpenMath Symbols</a></li></ul><ul><li><a href="#sec_json-omv---variable">3.3.4 Variables</a></li></ul><ul><li><a href="#sec_json-omi---integers">3.3.5 Integers</a><ul><li><a href="#sec_json-json-integers">3.3.5.1 JSON Integers</a></li></ul><ul><li><a href="#sec_json-decimal-integers">3.3.5.2 Decimal Integers</a></li></ul><ul><li><a href="#sec_json-hexadecimal-integers">3.3.5.3 Hexadecimal Integers</a></li></ul></li></ul><ul><li><a href="#sec_json-omf---floats">3.3.6 Floats</a><ul><li><a href="#sec_json-json-floats">3.3.6.1 JSON Floats</a></li></ul><ul><li><a href="#sec_json-decimal-floating-point-numbers">3.3.6.2 Decimal Floating Point Numbers</a></li></ul><ul><li><a href="#sec_json-hexadecimal-floats">3.3.6.3 Hexadecimal Floats</a></li></ul></li></ul><ul><li><a href="#sec_json-omb---bytes">3.3.7 Bytes</a><ul><li><a href="#sec_json-json-byte-arrays">3.3.7.1 JSON Byte Arrays</a></li></ul><ul><li><a href="#sec_json-base64-encoded-bytes">3.3.7.2 Base64-encoded bytes</a></li></ul></li></ul><ul><li><a href="#sec_json-oms-strings">3.3.8 Strings</a></li></ul><ul><li><a href="#sec_json-oma-application">3.3.9 Applications</a></li></ul><ul><li><a href="#sec_json-oma-attribution">3.3.10 Attribution</a></li></ul><ul><li><a href="#sec_json-omb---binding">3.3.11 Binding</a></li></ul><ul><li><a href="#sec_json-ome---errors">3.3.12 Errors</a></li></ul><ul><li><a href="#sec_json-omrs-and-structure-sharing">3.3.13 References and Structure Sharing</a></li></ul><ul><li><a href="#sec_json-omforeign---foreign-objects">3.3.14 Foreign Objects</a></li></ul></li></ul><ul><li><a href="#sec_enc_summary">3.4 Summary</a></li></ul></li><li class="tocchap"><a href="#cha_cd">4 Content Dictionaries</a><ul><li><a href="#sec_cd_summary">4.1 Introduction</a></li></ul><ul><li><a href="#sect_func">4.2 Abstract Content Dictionaries</a><ul><li><a href="#sec_status">4.2.1 Content Dictionary Status</a></li></ul><ul><li><a href="#sec_version">4.2.2 Content Dictionary Version Numbers</a></li></ul></li></ul><ul><li><a href="#sec_xml_cd">4.3 The Reference Encoding for Content Dictionaries</a><ul><li><a href="#sec_cd_schema">4.3.1 The Relax NG Schema for Content Dictionaries</a></li></ul><ul><li><a href="#sect_pcdata">4.3.2 Further Description of the CD Schema</a></li></ul></li></ul><ul><li><a href="#addfiles">4.4 Additional Information</a><ul><li><a href="#sigfiles">4.4.1 Signature Dictionaries</a><ul><li><a href="#sect_sigpcdata">4.4.1.1 Abstract Specification of a Signature Dictionary</a></li></ul><ul><li><a href="#sect_sigschema">4.4.1.2 A Relax NG Schema for a Signature Dictionary</a></li></ul><ul><li><a href="#sect_sigex">4.4.1.3 Examples</a></li></ul></li></ul><ul><li><a href="#ssec_cdgroups">4.4.2 CDGroups</a><ul><li><a href="#sec_dtd_cdg">4.4.2.1 The Specification of CDGroups</a></li></ul><ul><li><a href="#sect_cdgpcdata">4.4.2.2 Further Requirements of a CDGroup</a></li></ul></li></ul></li></ul><ul><li><a href="#cdapprove">4.5 Content Dictionaries Reviewing Process</a></li></ul></li><li class="tocchap"><a href="#cha_comp">5 <i>OpenMath</i> Compliance</a><ul><li><a href="#sec_compl_encoding">5.1 Encodings</a><ul><li><a href="#sec_compl_xml_encoding">5.1.1 The XML Encoding</a><ul><li><a href="#sec_compl_xml_encoding_val">5.1.1.1 Generating Valid XML</a></li></ul><ul><li><a href="#sec_compl_xml_encoding_float">5.1.1.2 Decimal versus Hexadecimal Float Representation</a></li></ul></li></ul></li></ul><ul><li><a href="#sec_compl_omforeign">5.2 <i>OpenMath</i> Foreign Objects</a></li></ul><ul><li><a href="#sec_compl_cd">5.3 Content Dictionaries</a></li></ul><ul><li><a href="#sec_comp_lex">5.4 Lexical Errors</a></li></ul><ul><li><a href="#sec_compl_om1">5.5 <i>OpenMath</i> 1 Objects</a></li></ul></li><li class="tocchap"><a href="#app_cdfiles">A CD Files</a><ul><li><a href="#app_cdcd">A.1 The <b>meta</b> Content Dictionary</a></li></ul><ul><li><a href="#arith1.ocd">A.2 The <b>arith1</b> Content Dictionary File</a></li></ul><ul><li><a href="#arith1.sts">A.3 The <b>arith1</b> STS Signature File</a></li></ul><ul><li><a href="#mathml.cdg">A.4 The <b>MathML</b> CDGroup</a></li></ul><ul><li><a href="#errorcd">A.5 The <b>error</b> Content Dictionary</a></li></ul></li><li class="tocchap"><a href="#app_openmath.rng">B <i>OpenMath</i> Schema in Relax NG XML Syntax (Normative)</a></li><li class="tocchap"><a href="#app_relaxrestricted">C Restricting the <i>OpenMath</i> Schema (Non-Normative)</a></li><li class="tocchap"><a href="#app_xsd">D <i>OpenMath</i> Schema in XSD Syntax (Non-Normative)</a></li><li class="tocchap"><a href="#app_dtd">E <i>OpenMath</i> DTD (Non-Normative)</a></li><li class="tocchap"><a href="#app_dts">F <i>OpenMath</i> .d.ts (Normative)</a></li><li class="tocchap"><a href="#app_json">G <i>OpenMath</i> .json Schema (Non-Normative)</a></li><li class="tocchap"><a href="#app_whats_new">H Changes between <i>OpenMath</i> 1.1 and <i>OpenMath</i> 2 (Non-Normative)</a><ul><li><a href="#chgformal">H.1 Changes to the Formal Definition of Objects</a></li></ul><ul><li><a href="#chgenc">H.2 Changes to the encodings</a></li></ul><ul><li><a href="#chgcd">H.3 Changes to Content Dictionaries</a></li></ul></li><li class="tocchap"><a href="#om2-revisions">I Revisions to <i>OpenMath</i> 2 (Non-Normative)</a><ul><li><a href="#chgr1">I.1 Changes in 2.0 Revision 1 (July 2017) </a></li></ul><ul><li><a href="#chgr2">I.2 Changes in 2.0 Revision 2 (August 2018)</a></li></ul><ul><li><a href="#chgr3" class="new">I.3 Changes in 2.0 Revision 3 (July 2019)</a></li></ul></li><li class="tocchap"><a href="#bibliography">J Bibliography</a></li></ul><h2>List of Figures</h2><ul><li class="lot"><a href="#fig_om">1.1 The <i>OpenMath</i> Architecture</a></li><li class="lot"><a href="#fig_obj">2.1 The <i>OpenMath</i> application and binding objects for
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>sin</mi> <mo>(</mo><mi>x</mi> <mo>)</mo></math> and
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi> <mi>x</mi><mo>.</mo><mi>x</mi> <mo>+</mo>
<mn>2</mn></math> in tree-like notation.</a></li><li class="lot"><a href="#fig_shared_vs_unshared">3.1 Shared vs. unshared representations</a></li><li class="lot"><a href="#fig_sharing_between">3.2 Sharing between <i>OpenMath</i> objects (A cycle of order <math xmlns="http://www.w3.org/1998/Math/MathML"><mn>2</mn></math>).</a></li><li class="lot"><a href="#fig_bin-enc">3.3 Grammar of the binary encoding of <i>OpenMath</i> objects.</a></li><li class="lot"><a href="#fig_bin-enc_stream">3.4 Streaming a large Integer in the Binary Encoding.</a></li><li class="lot"><a href="#fig_bin-enc_ex">3.5 A Simple example of the <i>OpenMath</i> binary encoding.</a></li><li class="lot"><a href="#fig_bin-enc2">3.6 A binary encoding of the <i>OpenMath</i> object from Figure 3.1.</a></li><li class="lot"><a href="#fig_cdgroup.dtd">4.1 Relax NG Specification of CDGroups</a></li></ul></div></div>
<div><h2 id="cha_int">
Chapter 1<br />Introduction to <i>OpenMath</i></h2>
<p>This chapter briefly introduces <i>OpenMath</i> concepts and notions that are
referred to in the rest of this document.</p>
<div><h3 id="sec_om-arch">1.1 <i>OpenMath</i> Architecture</h3>
<div class="figure" id="fig_om">
<img src="om-arch.png" alt="om-arch.png" />
<div class="caption">
Figure 1.1 The <i>OpenMath</i> Architecture</div></div>
<p>The architecture of <i>OpenMath</i> is described in <a href="#fig_om">Figure 1.1</a> and summarizes the interactions among the different
<i>OpenMath</i> components. There are three layers of representation of a
mathematical object. The first is a private layer that
is the internal representation used by an application. The second is
an abstract layer that is the representation as an <a href="#omobj" class="termref"><i>OpenMath</i> object</a>.
Note that these two layers may, in some cases, be the same.
The third is a communication layer that translates the <a href="#omobj" class="termref"><i>OpenMath</i> object</a> representation into
a stream of bytes. An application dependent program manipulates the
mathematical objects using its internal representation, it can convert
them to <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s and communicate them by using the byte stream
representation of <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s.</p>
<p>
This standard does not describe the mechanisms by which software systems may offer,
or make use of, computational services. The currently-suggested mechanism is the
Symbolic Computation Software Composability Protocol (SCSCP)
<a href="#SCSCP13">[8]</a>.
</p>
</div>
<div><h3 id="sec_intro-obj">1.2 <i>OpenMath</i> Objects and Encodings</h3>
<p><a href="#omobj" class="termref"><i>OpenMath</i> object</a>s are representations of mathematical entities that
can be communicated among various software applications in a
meaningful way, that is, preserving their
<span>“semantics”</span>.</p>
<p><a href="#omobj" class="termref"><i>OpenMath</i> object</a>s and encodings are described in detail in <a href="#cha_obj">Chapter 2</a> and <a href="#cha_enco">Chapter 3</a>.</p>
<p>The standard endorses two encodings
in <abbr>XML</abbr> (an innate one described here, and one in Strict Content
MathML)<span class="del">and</span><span class="new">,</span> a binary format <span class="new">and a JSON encoding</span>.
At the time of writing, these are the encodings
supported by most existing <i>OpenMath</i> tools and applications,
however they are not the only possible encodings of <i>OpenMath</i>
objects. Users who wish to define their own encoding,
are free to do so provided that there is
a well-defined correspondence
between the new encoding and the abstract model defined in <a href="#cha_obj">Chapter 2</a>.
</p>
</div>
<div><h3 id="sec_intro-cd">1.3 Content Dictionaries</h3>
<p>Content Dictionaries (CDs) are used to assign informal and formal
semantics to all symbols used in the <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s. They define the
symbols used to represent concepts arising in a particular area of
mathematics.</p>
<p>The Content Dictionaries are public, they represent the actual
common knowledge among <i>OpenMath</i> applications. Content Dictionaries fix
the <span>“meaning”</span> of objects independently of the
application. The application receiving the object may then recognize
whether or not, according to the semantics of the symbols defined in
the Content Dictionaries, the object can be transformed to the
corresponding internal representation used by the application.</p>
</div>
<div><h3 id="sec_addnfiles">1.4 Additional Files</h3>
<p>
Several additional files are related to Content Dictionaries. Signature Dictionaries contain the signatures of symbols defined in some
<i>OpenMath</i> Content Dictionary and their format is endorsed by this standard.
</p>
<p>Furthermore, the standard fixes how to define a specific
set of Content Dictionaries as a CDGroup.</p>
<p>Auxiliary files that define presentation and rendering or that
are used for manipulating and processing Content Dictionaries are not
discussed by the standard.</p>
</div>
<div><h3 id="sec_phrasebooks">1.5 Phrasebooks</h3>
<p>The conversion of an <a href="#omobj" class="termref"><i>OpenMath</i> object</a> to/from the internal
representation in a software application is performed by an interface
program called a <span id="phrasebook" class="definiendum">Phrasebook</span>. The translation is
governed by the Content Dictionaries and the specifics of the
application. It is envisioned that a software application dealing with
a specific area of mathematics declares which Content Dictionaries it
understands. As a consequence, it is expected that the <a href="#phrasebook" class="termref">Phrasebook</a> of
the application is able to translate <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s built using symbols
from these Content Dictionaries to/from the internal mathematical
objects of the application.
</p>
<p><a href="#omobj" class="termref"><i>OpenMath</i> object</a>s do not
specify any computational behaviour, they merely represent mathematical
expressions. Part of the <i>OpenMath</i> philosophy is to leave it to the
application to decide what it does with an object once it has received
it. <i>OpenMath</i> is not a query or programming language. Because of this,
<i>OpenMath</i> does not prescribe a way of forcing <span>“evaluation”</span> or
<span>“simplification”</span> of objects like
<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>2</mn><mo>+</mo><mn>3</mn></math> or
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>sin</mi><mo>(</mo><mi>π</mi><mo>)</mo></math>. Thus,
the same object <math xmlns="http://www.w3.org/1998/Math/MathML"><mn>2</mn><mo>+</mo><mn>3</mn></math> could be
transformed to <math xmlns="http://www.w3.org/1998/Math/MathML"><mn>5</mn></math> by a computer algebra system,
or displayed as <math xmlns="http://www.w3.org/1998/Math/MathML"><mn>2</mn><mo>+</mo><mn>3</mn></math> by a
typesetting tool. For such a query/programming language, the OpenMath Society recommends
the Symbolic Computation Software Composability Protocol (SCSCP)
<a href="#SCSCP13">[8]</a>.
</p>
</div>
</div>
<div><h2 id="cha_obj">
Chapter 2<br /><i>OpenMath</i> Objects</h2>
<p>
In this chapter we provide a self-contained description of <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s. We first do so
by means of an abstract grammar description (<a href="#sec_omabs">Section 2.1</a>) and then give
a more informal description (<a href="#sec_omin">Section 2.2</a>).
</p>
<div><h3 id="sec_omabs">2.1 Formal Definition of <i>OpenMath</i> Objects</h3>
<p><i>OpenMath</i> represents mathematical objects as terms or as labelled trees that are called
<span id="omobj" class="definiendum"><i>OpenMath</i> object</span>s or <i>OpenMath</i> expressions. The definition of an abstract
<a href="#omobj" class="termref"><i>OpenMath</i> object</a> is then the following.</p>
<div><h4 id="sec_basic">2.1.1 Basic <i>OpenMath</i> objects</h4>
<p>
The Basic <i>OpenMath</i> Objects form the leaves of the <i>OpenMath</i> Object tree. A Basic <i>OpenMath</i>
Object is of one of the following.
</p>
<ul>
<li><p><span>(i)</span> Integer.</p><p>
Integers in the mathematical sense, with no predefined range. They are
<span>“infinite precision”</span> integers (also called <span>“bignums”</span> in
computer algebra).
</p></li>
<li><p><span>(ii)</span> <abbr>IEEE</abbr> floating point number.</p><p>Double precision floating-point numbers following the <abbr>IEEE</abbr>
754-1985 standard <a href="#ieee754_85">[26]</a>.</p></li>
<li><p><span>(iii)</span> Character string.</p><p>A Unicode Character string. This also corresponds to
<span>“characters”</span> in
<abbr>XML</abbr>.</p></li>
<li><p><span>(iv)</span> Bytearray.</p><p>A sequence of bytes.</p></li>
<li><p><span>(v)</span> Symbol.</p><p>A Symbol encodes three fields of information, a <span id="symname" class="definiendum">symbol
name</span>, a <span id="cdname" class="definiendum">Content Dictionary name</span>, and (optionally) a
<span id="cdbase" class="definiendum">Content Dictionary base URI</span>, The name of a symbol is a
sequence of characters matching the regular expression described in <a href="#sec_names">Section 2.3</a>. The Content Dictionary is the location of the definition of
the symbol, consisting of a name (a sequence of characters matching the regular
expression described in <a href="#sec_names">Section 2.3</a>) and, optionally, a unique prefix
called a <span id="cdbase" class="definiendum">cdbase</span> which is used to disambiguate multiple
Content Dictionaries of the same name. There are other properties of the symbol that
are not explicit in these fields but whose values may be obtained by inspecting the
Content Dictionary specified. These include the symbol definition, formal properties
and examples and, optionally, a <a href="#role" class="termref">role</a> which is a restriction on where
the symbol may appear in an <a href="#omobj" class="termref"><i>OpenMath</i> object</a>. The possible roles are described in <a href="#sec_roles">Section 2.1.4</a>.
</p></li>
<li><p>
<span>(vi)</span> Variable.
</p><p>A Variable must have a <span id="varname" class="definiendum">name</span> which is a sequence of
characters matching a regular expression, as described in <a href="#sec_names">Section 2.3</a>.
</p></li>
</ul>
</div>
<div><h4 id="sec_derived">2.1.2 Derived <i>OpenMath</i> Objects</h4>
<p>Derived <i>OpenMath</i> objects are currently used as a way by which non-<i>OpenMath</i> data is embedded
inside an <a href="#omobj" class="termref"><i>OpenMath</i> object</a>. A <span id="derivedobj" class="definiendum">derived <i>OpenMath</i> object</span> is built as follows:
</p><ul>
<li><p><span>(i)</span> If <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math> is <i>not</i> an
<a href="#omobj" class="termref"><i>OpenMath</i> object</a>, then <math xmlns="http://www.w3.org/1998/Math/MathML"><mi mathvariant="bold">foreign</mi><mfenced><mi>A</mi></mfenced></math> is an <i>OpenMath</i> <span id="foreignobj" class="definiendum">foreign object</span>. An <i>OpenMath</i> foreign object may optionally have an
<span id="encoding" class="definiendum">encoding</span> field which describes how its contents should be
interpreted.</p></li>
</ul>
</div>
<div><h4 id="sec_compound">2.1.3 <i>OpenMath</i> Objects</h4>
<p><a href="#omobj" class="termref"><i>OpenMath</i> object</a>s are built recursively as follows.
</p><ul>
<li><p><span>(i)</span> Basic <i>OpenMath</i> objects are <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s.
(Note that <a href="#derivedobj" class="termref">derived <i>OpenMath</i> object</a>s are
<i>not</i> <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s, but are used to construct <i>OpenMath</i>
objects as described below.)</p></li>
<li><p>
<span>(ii)</span> If
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mn>1</mn></msub></math>,
<span>…</span>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mi>n</mi></msub></math> <math xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>n</mi><mo>></mo><mn>0</mn><mo>)</mo></math> are <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s, then
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mi mathvariant="bold">application</mi><mo>(</mo><msub><mi>A</mi><mn>1</mn></msub><mo>,</mo> <mi>…</mi><mo>,</mo> <msub><mi>A</mi><mi>n</mi></msub><mo>)</mo>
</math>
is an <span id="applobj" class="definiendum"><i>OpenMath</i> application object</span>. We call
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mn>1</mn></msub></math> the <span id="function" class="definiendum">function</span>
and <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mn>2</mn></msub></math> to
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mn>1</mn></msub></math> the <span id="argument" class="definiendum">argument</span>s.</p></li> <li><p><span>(iii)</span> If
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>S</mi><mn>1</mn></msub><mo>,</mo>
<mi>…</mi><mo>,</mo> <msub><mi>S</mi><mi>n</mi></msub></math> are <i>OpenMath</i> symbols, and
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math> is an <a href="#omobj" class="termref"><i>OpenMath</i> object</a>, and
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mn>1</mn></msub></math>, <span>…</span>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mi>n</mi></msub></math> <math xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>n</mi><mo>></mo><mn>0</mn><mo>)</mo></math> are <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s or
<a href="#derivedobj" class="termref">derived <i>OpenMath</i> object</a>s, then
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi mathvariant="bold">attribution</mi>
<mo>(</mo><mi>A</mi><mo>,</mo> <msub><mi>S</mi><mn>1</mn></msub>
<mspace width=".3em"></mspace> <msub><mi>A</mi><mn>1</mn></msub><mo>,</mo>
<mspace width=".3em"></mspace> <mi>…</mi> <mspace width=".3em"></mspace>
<mo>,</mo> <msub><mi>S</mi><mi>n</mi></msub> <mspace width=".3em"></mspace>
<msub><mi>A</mi><mi>n</mi></msub><mo>)</mo></math> is an <i>OpenMath</i> <span id="attrobj" class="definiendum">attribution object</span>. We call
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math> the <span id="attobj" class="definiendum">attributed object</span>, the
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>S</mi><mi>i</mi></msub></math> the <span id="key" class="definiendum">keys</span>, and the
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mi>i</mi></msub></math> the <span id="attval" class="definiendum">attribute
value</span>s.
</p><p>
If the <a href="#attobj" class="termref">attributed object</a> is a variable, the original attribution is called an
<span id="attvar" class="definiendum">attributed variable</span>.
</p></li>
<li><p>
<span>(iv)</span> If <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>B</mi></math> and
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>C</mi></math> are <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s, and
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>v</mi><mn>1</mn></msub></math>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>…</mi></math>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>v</mi><mi>n</mi></msub></math> <math xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>n</mi> <mo>≥</mo>
<mn>0</mn><mo>)</mo></math> are <i>OpenMath</i> variables or <a href="#attvar" class="termref">attributed variable</a>s, then
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mi mathvariant="bold">binding</mi> <mo>(</mo><mi>B</mi><mo>,</mo> <msub><mi>v</mi><mn>1</mn></msub><mo>,</mo> <mi>…</mi><mo>,</mo> <msub><mi>v</mi><mi>n</mi></msub><mo>,</mo> <mi>C</mi><mo>)</mo>
</math>
is an <i>OpenMath</i> <span id="bindingobj" class="definiendum">binding object</span>.
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>B</mi></math> is called the <span id="binder" class="definiendum">binder</span>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>v</mi><mn>1</mn></msub></math>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>…</mi></math>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>v</mi><mi>n</mi></msub></math> are called <span id="varbindings" class="definiendum">variable binding</span>s,
and <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>C</mi></math> is called the
<span id="body" class="definiendum">body</span> of the binding object above.
To distinguish the two different ways how variable objects are used, any variable object
that is not a variable binding is called a <span id="varreference" class="definiendum">variable reference</span>.
</p></li>
<li><p><span>(v)</span> If <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>S</mi></math> is an
<i>OpenMath</i> symbol and <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mn>1</mn></msub></math>,
<span>…</span>,
<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>A</mi><mi>n</mi></msub></math> <math xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>n</mi> <mo>≥</mo>
<mn>0</mn><mo>)</mo></math> are <a href="#omobj" class="termref"><i>OpenMath</i> object</a>s
or <a href="#derivedobj" class="termref">derived <i>OpenMath</i> object</a>s, then <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi mathvariant="bold">error</mi>
<mo>(</mo><mi>S</mi><mo>,</mo>
<msub><mi>A</mi><mn>1</mn></msub><mo>,</mo><mi>…</mi><mo>,</mo><msub><mi>A</mi><mi>n</mi></msub><mo>)</mo>
</math>
is an <i>OpenMath</i> <span id="errorobj" class="definiendum">error object</span>.</p></li>
</ul><p>
<a href="#omobj" class="termref"><i>OpenMath</i> object</a>s that are constructed via rules (ii)
to (v) are jointly called <span id="compoundobj" class="definiendum">compound <i>OpenMath</i> object</span>s.
</p>
</div>
<div><h4 id="sec_roles">2.1.4 <i>OpenMath</i> Symbol Roles</h4>
<p>
We say that an <i>OpenMath</i> symbol is used to <i>construct</i> an <a href="#omobj" class="termref"><i>OpenMath</i> object</a> if it
is the first child of an <a href="#applobj" class="termref"><i>OpenMath</i> application object</a>, <a href="#bindingobj" class="termref">binding object</a> or <a href="#errorobj" class="termref">error object</a>, or an even-indexed child of an <i>OpenMath</i> <a href="#attrobj" class="termref">attribution object</a>
(i.e. the <a href="#key" class="termref">keys</a> in a <i>(key, value)</i> pair). The <span id="role" class="definiendum">role</span> of an <i>OpenMath</i> symbol is a restriction on how it may be used to
construct a <a href="#compoundobj" class="termref">compound <i>OpenMath</i> object</a> and, in the case of the key in an <a href="#attrobj" class="termref">attribution object</a>, a
clarification of how that attribution should be interpreted. The possible roles are:
</p><ol class="lowerroman">
<li><p><span id="binderrole" class="definiendum">binder</span> The symbol may
appear as the first child of an <i>OpenMath</i> binding object.
</p></li>
<li><p><span id="attributionrole" class="definiendum">attribution</span>
The symbol may
be used as key in an <i>OpenMath</i> <a href="#attrobj" class="termref">attribution object</a>, i.e. as the first
element of a (key, value) pair, or in an equivalent context (for example
to refer to the value of an attribution). This form of attribution
may be ignored by an application, so should be used for information
which does not change the meaning of the attributed <i>OpenMath</i> object.
</p></li>
<li><p>
<span id="semantic-attribution-role" class="definiendum">semantic-attribution</span> This is the same as
<a href="#attributionrole" class="termref">attribution</a> except that it modifies the meaning of the
attributed <i>OpenMath</i> object and thus cannot be ignored by an application, without
changing the meaning.
</p></li>
<li><p>
<span id="errorrole" class="definiendum">error</span> The symbol may appear as the first child of an
<i>OpenMath</i> <a href="#errorobj" class="termref">error object</a>.
</p></li>
<li><p>
<span id="applicationrole" class="definiendum">application</span> The symbol may appear as the first
child of an <i>OpenMath</i> <a href="#applobj" class="termref"><i>OpenMath</i> application object</a>.
</p></li>
<li><p>
<span id="constantrole" class="definiendum">constant</span> The symbol cannot be used to construct an
<a href="#compoundobj" class="termref">compound <i>OpenMath</i> object</a>.
</p></li>
</ol><p>
A symbol cannot have more than one role and cannot be used to construct a <a href="#compoundobj" class="termref">compound <i>OpenMath</i> object</a> in a way which requires a different role (using the definition of
construct given earlier in this section). This means that one cannot use a symbol which
binds some variables to construct, say, an <a href="#applobj" class="termref"><i>OpenMath</i> application object</a>. However it does not
prevent the use of that symbol as an <a href="#argument" class="termref">argument</a> in an <a href="#applobj" class="termref"><i>OpenMath</i> application object</a>.
</p>
<p>
If no role is indicated then the symbol can be used anywhere. Note that this is not the
same as saying that the symbol's role is <a href="#constantrole" class="termref">constant</a>.
</p>
</div>
</div>
<div><h3 id="sec_omin">2.2 Further Description of <i>OpenMath</i> Objects</h3>
<p>
Informally, an <i>OpenMath</i> <span><i>object</i></span> can be viewed as a tree and is
also referred to as a term. The objects at the leaves of <i>OpenMath</i> trees are called <span><i>basic objects</i></span>. The basic objects supported by <i>OpenMath</i> are:
</p><dl>
<dt>Integer</dt>
<dd>
<p>Arbitrary Precision integers.</p>
</dd>
<dt>Float</dt>
<dd>
<p>
<i>OpenMath</i> floats are <abbr>IEEE</abbr> 754 Double precision floating-point
numbers. Other types of floating point number may be encoded in <i>OpenMath</i> by the use of
suitable content dictionaries.
</p>
</dd>
<dt>Character strings</dt>
<dd>
<p>are sequences of characters. These characters come from the Unicode
standard <a href="#UNICODE">[16]</a>.
</p>
</dd>
<dt>Bytearrays</dt>
<dd>
<p>are sequences of bytes. There is no <span>“byte”</span> in <i>OpenMath</i> as an object
of its own. However, a single byte can of course be represented by a bytearray of
length 1. The difference between strings and bytearrays is the following: a
character string is a sequence of bytes with a fixed interpretation (as
characters, Unicode texts may require several bytes to code one character),
whereas a bytearray is an uninterpreted sequence of bytes with no intrinsic
meaning. Bytearrays could be used inside <i>OpenMath</i> errors to provide information to,
for example, a debugger; they could also contain intermediate results of
calculations, or <span>“handles”</span> into computations or databases.</p>
</dd>
<dt>Symbols</dt>
<dd>
<p>
are uniquely defined by the Content Dictionary in which they occur and by a
name. The form of these definitions is explained in <a href="#cha_cd">Chapter 4</a>.
Each symbol has no more than one definition in a Content Dictionary. Many
Content Dictionaries may define differently a symbol with the same name
(e.g. the symbol <small><code>union</code></small> is defined as
associative-commutative set theoretic union in a Content Dictionary
<small><code>set1</code></small> but another Content Dictionary,
<small><code>multiset1</code></small> might define a symbol
<small><code>union</code></small> as the union of multi-sets).
</p>
</dd>
<dt>Variables</dt>
<dd>
<p>are meant to denote parameters, variables or indeterminates (such as bound
variables of function definitions, variables in summations and integrals, independent
variables of derivatives).
</p>
</dd>
</dl>
<p>
Although foreign objects can come with a standarized encoding
field, their interpretation is an issue beyond the <i>OpenMath</i>
standard. In particular, a foreign object is primarily data
that has been encoded in some format, and there is no
promise that foreign objects encountered within one encoding
of <i>OpenMath</i> can be faithfully represented in another.
</p>
<p>
Derived <i>OpenMath</i> objects are constructed from non-<i>OpenMath</i> data. They differ from bytearrays in
that they can have any structure. Currently there is only one way of making a <a href="#derivedobj" class="termref">derived <i>OpenMath</i> object</a>.
</p>
<dl>
<dt>Foreign</dt>
<dd>
<p>
is used to import a non-<i>OpenMath</i> object into an <i>OpenMath</i> attribution. Examples of its use
could be to annotate a formula with a visual or aural rendering, an animation,
etc. They may also appear in <i>OpenMath</i> <a href="#errorobj" class="termref">error object</a>s, for example to allow an
application to report an error in processing such an object.
</p>
</dd>
</dl>
<p>
The four following constructs can be used to make <a href="#compoundobj" class="termref">compound <i>OpenMath</i> object</a> out of
basic or <a href="#derivedobj" class="termref">derived <i>OpenMath</i> object</a>s.
</p>
<dl>
<dt>Application</dt>
<dd>
<p>
constructs an <i>OpenMath</i> object from a sequence of one or more <i>OpenMath</i> objects. The first
child of an application is referred to as its
<span>“head”</span> while the remaining objects are called its
<span>“arguments”</span>. An <i>OpenMath</i> <a href="#applobj" class="termref"><i>OpenMath</i> application object</a> can be used to convey
the mathematical notion of application of a <a href="#function" class="termref">function</a> to a set of
<a href="#argument" class="termref">argument</a>. For instance, suppose that the <i>OpenMath</i> symbol
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>sin</mi></math> is defined in a suitable Content
Dictionary, then <math xmlns="http://www.w3.org/1998/Math/MathML"><mi mathvariant="bold">application</mi><mo>(</mo><mi>sin</mi><mo>,</mo>
<mi>x</mi> <mo>)</mo></math> is the abstract <i>OpenMath</i> object
corresponding to <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>sin</mi> <mo>(</mo><mi>x</mi>
<mo>)</mo></math>. More generally, an <i>OpenMath</i> <a href="#applobj" class="termref"><i>OpenMath</i> application object</a> can
be used as a constructor to convey a mathematical object built from
other objects such as a polynomial constructed from a set of
monomials. Constructors build inhabitants of some symbolic type,
for instance the type of rational numbers or the type of
polynomials. The rational number, usually denoted as