The OpenMath Standard

The OpenMath Standard

OM logo
Version: 2.0
The OpenMath Society
Editors
S. Buswell, O. Caprotti, D. P. Carlisle, M. C. Dewar, M. Gaëtano and M. Kohlhase
June 2004
© 2000–2004 The OpenMath Society

Abstract

This document describes version 2 of OpenMath: a standard for the representation and communication of mathematical objects. This version clarifies and extends OpenMath 1.1 [9]. OpenMath allows the meaning 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 computed with in a meaningful and correct way. It is designed to be machine-generatable and machine-readable, rather than written by hand.

The OpenMath Standard is the official reference for the OpenMath language and has been approved by the OpenMath Society. It is not intended as an introductory document or a user's guide, for the latest available material of this nature please consult the OpenMath web-site at http://www.openmath.org.

This document includes an overview of the OpenMath architecture, an abstract description of OpenMath objects and two mechanisms for producing concrete encodings of such objects. The first, in XML, is designed primarily for use on the web, in documents, and for applications which want to mix OpenMath 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 OpenMath language is encoded, as well as an XML encoding for them. Finally it includes guidelines for the development of OpenMath-compliant applications. Further background on OpenMath and guidelines for its use in applications may be found in the accompanying Primer [10].

Contents

1 Introduction to OpenMath
    1.1 OpenMath Architecture
    1.2 OpenMath Objects and Encodings
    1.3 Content Dictionaries
    1.4 Additional Files
    1.5 Phrasebooks
OpenMath Objects
    2.1 Formal Definition of OpenMath Objects
        2.1.1 Basic OpenMath objects
        2.1.2 Derived OpenMath Objects
        2.1.3 OpenMath Objects
        2.1.4 OpenMath Symbol Roles
    2.2 Further Description of OpenMath Objects
    2.3 Names
    2.4 Summary
OpenMath Encodings
    3.1 The XML Encoding
        3.1.1 A Schema for the XML Encoding
        3.1.2 Informal description of the XML Encoding
        3.1.3 Some Notes on References
            3.1.3.1 An Acyclicity Constraint
            3.1.3.2 Sharing and Bound Variables
        3.1.4 Embedding OpenMath in XML Documents
    3.2 The Binary Encoding
        3.2.1 A Grammar for the Binary Encoding
        3.2.2 Description of the Grammar
        3.2.3 Example of Binary Encoding
        3.2.4 Sharing
            3.2.4.1 Sharing in Objects beginning with the identifier [24]
            3.2.4.2 Sharing with References (beginning with [24+64])
        3.2.5 Implementation Note
        3.2.6 Relation to the OpenMath 1 binary encoding
    3.3 Summary
4 Content Dictionaries
    4.1 Introduction
    4.2 Abstract Content Dictionaries
        4.2.1 Content Dictionary Status
        4.2.2 Content Dictionary Version Numbers
    4.3 The Reference Encoding for Content Dictionaries
        4.3.1 The Relax NG Schema for Content Dictionaries
        4.3.2 Further Description of the CD Schema
    4.4 Additional Information
        4.4.1 Signature Dictionaries
            4.4.1.1 Abstract Specification of a Signature Dictionary
            4.4.1.2 A Relax NG Schema for a Signature Dictionary
            4.4.1.3 Examples
        4.4.2 CDGroups
            4.4.2.1 The Specification of CDGroups
            4.4.2.2 Further Requirements of a CDGroup
    4.5 Content Dictionaries Reviewing Process
OpenMath Compliance
    5.1 Encodings
        5.1.1 The XML Encoding
            5.1.1.1 Generating Valid XML
            5.1.1.2 Decimal versus Hexadecimal Float Representation
    5.2 OpenMath Foreign Objects
    5.3 Content Dictionaries
    5.4 Lexical Errors
    5.5 OpenMath 1 Objects
A CD Files
    A.1 The meta Content Dictionary
    A.2 The arith1 Content Dictionary File
    A.3 The arith1 STS Signature File
    A.4 The MathML CDGroup
    A.5 The error Content Dictionary
OpenMath Schema in Relax NG XML Syntax (Normative)
C Restricting the OpenMath Schema (Non-Normative)
OpenMath Schema in XSD Syntax (Non-Normative)
OpenMath DTD (Non-Normative)
F Changes between OpenMath 1.1 and OpenMath 2 (Non-Normative)
    F.1 Changes to the Formal Definition of Objects
    F.2 Changes to the encodings
    F.3 Changes to Content Dictionaries
G Bibliography

List of Figures

1.1 The OpenMath Architecture
2.1 The OpenMath application and binding objects for sin (x ) and λ x.x + 2 in tree-like notation.
3.1 Shared vs. unshared representations
3.2 Sharing between OpenMath objects (A cycle of order 2).
3.3 Grammar of the binary encoding of OpenMath objects.
3.4 Streaming a large Integer in the Binary Encoding.
3.5 A Simple example of the OpenMath binary encoding.
3.6 A binary encoding of the OpenMath object from Figure 3.1.
4.1 Relax NG Specification of CDGroups