Semantic MathML

This is an approach to rewrite Content MathML so that it is expressable as RDF. If needed it is also possible to develop a completly new Ontology without respect to MathML. Comments, alternative Solutions and Corrections are welcome.

Authors

 * MovGP0

= Version 0.1 =

Numbers
The Number -485.487&times;107 will get expressed as: -485.487E7 Or more explicit as:  485487  10  4 

Complex Numbers, Quaternions
The Quaternion (4-dimensional complex number) 3+i4+j5+k6 could get expressed as:

  3   4   5 <rdf:_3> <rdf:_4> 6 <rdf:_4> or simpler: <variable rdf:type="vector"> 3   4    5    6

Where (Vector, rdfs:subClassOf, rdf:Seq). Because a Vector is a imprecise Description of a Quaternion you can also write more precise this Quaternion as: <function rdf:resource="add"> <number rdf:type="&xsd;integer">3 <function rdf:resource="times"> <constant rdf:resource="complexI" /> <number rdf:type="&xsd;integer">4 <function rdf:resource="times"> <constant rdf:resource="complexJ" /> <number rdf:type="&xsd;integer">5 <function rdf:resource="times"> <constant rdf:resource="complexK" /> <number rdf:type="&xsd;integer">6

(Typed) Parameters
<parameter rdf:type="vector" rdf:ID="x" />

Aliasing Functions
Original Version: <function rdf:resource="add"> 3  <function rdf:resource="add"> 4     5

Definition of new Class (Element): <rdf:about="add" rdf:type="function" /> <rdf:about="plus" owl:isSameAs="add" />

Use: 3    4     5

Lamda Construct
&lambda;(x, sin(x+1)) becomes: <define rdf:ID="foo" rdf:type="function"> <variable rdf:ID="foo-x"> <to> <function rdf:resource="sin"> <function rdf:resource="add"> <variable rdf:resource="foo-x" /> 1   </to>

Functions with multiple Parameters
Functions with multiple Parameters can get either constructed as <define rdf:ID="foo" rdf:type="function"> <variable rdf:ID="x" /> <to> <define rdf:ID="bar" rdf:type="function"> <variable rdf:ID="y" /> <to> <function rdf:resource="sin"> <function rdf:resource="add"> <variable rdf:resource="x" /> <variable rdf:resource="y" /> </to> </to> or as: <define rdf:ID="foo" rdf:type="function"> <parameters rdf:type="&rdf;Seq"> <variable rdf:ID="foo-x" /> <variable rdf:ID="foo-y" /> <to> <function rdf:resource="sin"> <function rdf:resource="add"> <variable rdf:resource="foo-x" /> <variable rdf:resource="bar-y" /> </to>

If the order of the varialbes doesn't matter you can write: <define rdf:ID="foo" rdf:type="function"> <parameters rdf:type="&rdf;Bag"> <variable rdf:ID="foo-x" /> <variable rdf:ID="foo-y" /> <to> <function rdf:resource="sin"> <function rdf:resource="add"> <variable rdf:resource="foo-x" /> <variable rdf:resource="bar-y" /> </to>

Functions with named Parameters
A function which needs named parameters like: <function rdf:resource="int"> <variable rdf:type="variable">...   <variable rdf:type="int-uplimit">...    <variable rdf:type="int-lowlimit">...    <variable rdf:type="function">...

could get defined as: <define rdf:ID="int"> <parameters rdf:type="&rdf;Bag"> <variable rdf:type="variable" rdf:ID="int-x" /> <variable rdf:type="function" rdf:ID="int-fun" /> <variable rdf:ID="int-uplimit" /> <variable rdf:ID="int-lowlimit" /> <to>...</to>

Predefined Functions
Taken from :

(can abbreviate forall as "all", exists as "ex")

Inverse
<function rdf:ID="arcsin" rdf:resource="inverse"> <function rdf:resouce="sin" />

Declarations
<function rdf:resource="&eq;" <variable rdf:ID="V" /> <variable rdf:ID="a" /></rdf:_1> <variable rdf:ID="b" /></rdf:_2> <rdf:_3><variable rdf:ID="c" /></rdf:_3>

Conditions
<if> ...   ...    ... </if>

Transformations
To be able to define functions properly it is needed to state which transformations are possible when a specific pattern occurs.

Examples:
 * x/y = x*y^(-1)
 * x-y = x+(-y)
 * x+y = y+x
 * x*(-y) = -(x*y)
 * x*y = y*x
 * (x+y)*z = (x*z)+(x*z)
 * (x^z)+(y^z) = (x+y)^z

See Addition,Subtraction,Multiplication,Division,Equality

Also there can be transformations which are working in the one direction, but not into the other direction.

<define rdf:ID="commutative" rdf:type="transformation"> <function rdfs:range="function" rdf:type="&rdf;Seq" /> <parameter rdfs:range="variable" rdf:ID="transitive-x" /> <parameter rdfs:range="variable" rdf:ID="transitive-y" /> <to> <function rdfs:range="function" rdf:type="&rdf;Seq"> <parameter rdf:resource="transitive-y" /> <parameter rdf:resource="transitive-x" /> </to>

<define rdf:type="transformation"> <owl:SymmetricProperty /> <function rdfs:range="div"> <parameter rdfs:range="variable" rdf:ID="transitive-x" /> <parameter rdfs:range="variable" rdf:ID="transitive-y" /> <to> <function rdfs:range="times" /> <parameter rdf:resource="transitive-x" /> <function rdf:resource="sup"> <parameter rdf:resource="transitive-y" /></rdf:_1> <number rdf:type="&xsd;integer;">1 </rdf:_2> </to>

= Version 0.2 = Mathematical Expressions can get understood as Function-graphs. In that sense, each mathematical Operator, Variable, and Value is representet as a Node. The relations between this node creates the formula.

Example:
 * The formula  can get understood as this graph.

To solve such a system you need to find a way go get from the Constants to the Variables. Because not all Graphs are directing in the proper direction you need to transform these "false" directing graphs into their Counterpart. (Picture)

Example:


 * g(+,x) || g(-,x)
 * g(*,x) || g(1/x,x)
 * g(e^,x) || g(ln,x)
 * }
 * g(e^,x) || g(ln,x)
 * }
 * }
 * }

Such Transformations can get very complex. An Example is the Transformation of the Pattern. (Picture) or the Transformation of. In that examples the Graph is not changing its direction, but is translated from one Pattern to another. A simple change in the direction of a graph might be the Transformation  which says, that if you can move x from the one graph of = to the other, you have to negate x. The transformation can't get represented directly as plain math formula, so look at this Picture showing both, a graph transformation and a graph redirection.

Elementary Relations
Equality is a Relation, so you might model it using the symmetric -Relation. Implementing a -Operator is quite simple, just by deriving it from the   Class and allow only the  -Relation on it. This will force the same Value to all the Variables which are linked to that specific Equality-Instance. This is because of the definition:



Therefore if  and , then   is semantically solveable.

In the same way all other mathematical relations are represented directly by Properties.

Note that "Semantic MathML Lite" hould be as small than possible and supports besides that only the most common Syntax. Because RDF is extensible other Schemes calles ie. "Semantic MathML DL" or "Semantic MathML Full" can extend this to very complex algebra sets. The Full Version of this Ontology supports also the negation of this Relations like. Also Users are able to define there own extensions, because RDF is extensible. Anyway, a practical Semantic MathML Document should use only the most basic syntax that is possible for compatibility reasons.

Defining Functions
<function rdf:ID="Square"> <Exp> <Base><Parameter rdf:range="&smml;Variable" /></Base> <Exponent rdf:type="&xsd;int">2</Exponent> </Exp>
 * Defining a Function with one Parameter

Use: <Square>x</Square>

<function rdf:ID="Mean2"> <Frac> <Dividend> <Sum> <ParameterList min-lenght="2" max-lenght="2" rdf:type="Number" /> </Sum> </Dividend> <Divisor rdf:type="&xsd;int">2</Divisor> </Frac>
 * Defining a Function with a List of Parameters

Use: <Mean2> <Parameter rdf:type="int">7883</Parameter> <Parameter rdf:type="int">483</Parameter> </Mean2>

<function rdf:ID="ConvolutionFilter"> <Multiply> <Parameter Name="Filter" rdf:type="Vector" /> <Transpose> <Parameter Name="Signal" rdf:type="Vector" /> <Transpose> </Multiply>
 * Using Named Parameters

Use: <ConvolutionFilter> <Filter> <Vector> <Scalar rdf:type="&xsd;int">45</Scalar> ...     <Vector> </Filter> <Signal> <Vector> <Scalar rdf:type="&xsd;int">5</Scalar> ...     <Vector> </Signal> </ConvolutionFilter>

Defining Transformation Rules
Tranformations are used to define possible calculation-operations on a specific function. Therefore ie. the Add-Function can transformed into a Subtraction.

<Parameter Name="z"> <Add> <Parameter Name="x"> <Parameter Name="y"> </Add> </Parameter> <Parameter Name="z"> <Add> <Parameter Name="y"> <Parameter Name="x"> </Add> </Parameter>

<Parameter Name="z"> <Add> <Parameter Name="x"> <Parameter Name="y"> </Add> </Parameter> <Parameter Name="y"> <Add> <Parameter Name="z"> <Negate><Parameter Name="x"></Negate> </Add> </Parameter>

...

Instead of transformations there should be used properties to apply the most used transformation-rules to functions. The most common rules are:
 * Commutativity
 * Associativity
 * Distributivity
 * Flexibility

Draft

 * first Draft; not finished
 * Semantic MathML/0.1
 * second Draft; not finished
 * PhysicalML/0.2
 * Semantic MathML/0.2