OpenMath

OpenMath is a standard for exchange of mathematical objects, currently (2014) at version 2.

In the future, OpenMath3 is expected to be equivalent to strict Content-MathML3; both of these standards are under construction. It is mostly MathML that has been changed to match OpenMath.

Basic OpenMath tags (node types):

OMI
Integer
OMF
Floating-point number (64-bit IEEE, i.e., a double)
OMV
Variable
OMS
Symbol defined in some external Content Dictionary (CD).
OMA
Application (like function application)

Composite OpenMath expressions are usually constructed as an OMA whose first child is the symbol denoting the operation or function, e.g.

<OMA>
    <OMS cd="arith1" name="plus"/>
    <OMI> 2 </OMI>
    <OMF dec="3.4e5"/>
    <OMV name="y"/>
</OMA>

which is analogous to expr {2+3.4e5+$y}. If parsed by a little XML parser (or tdom), this (modulo whitespace) comes out as

OMA {} {{OMS {cd arith1 name plus} {}} {OMI {} {{#text 2}}} {OMF {dec 3.4e5} {}} {OMV {name y} {}}}

which is not too onerous to process in Tcl.

There are also some more advanced tags:

OMSTR, OMB
Strings and bytearrays
OMBIND, OMBVAR
Used when binding variables (like x is bound by the integral in ∫₁³ x² dx).
OMATTR, OMATP
Used for putting attributions on subexpressions.
OME
Errors
OMFOREIGN
Foreign format data
OMR
References (for sharing subexpressions, much like Tcl_Objs can be shared)