On 04/05/2015 09:34, Wenzel, Ken wrote:
Hello,
I wonder what is the correct way to represent a named function in OpenMath.
For example, I like to describe a function named "area" that computes the
area of a rectangle.
The corresponding Popcorn expression for the anonymous function is:
fns1.lambda[$a, $b -> $a * $b]
What is now the correct method to name this function.
I can, for example, just give it an ID like
fns1.lambda[$a, $b -> $a * $b] : area
and invoke it with #area(3, 4) at an later point.
But I think this is some kind of structure sharing since the lambda expression
is
simply copied into the resulting OpenMath object and not the invocation of
a single function named "area".
I would be grateful if somebody can help me.
Best regards,
Ken
You could define a binding to names within an openmath expression but if
I understand correct;y the question, the traditional place for such
bindings is in a Content Dictionary.
If you had a CD that defined a symbol area with an FMP that gave the
semantics in terms of that lambda expression, then you'd just need
<apply>
<OMS cd="mycd" mame="area"/>
....
David
________________________________
The Numerical Algorithms Group Ltd is a company registered in England and Wales
with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Microsoft Office 365.
________________________________
_______________________________________________
Om mailing list
[email protected]
http://openmath.org/mailman/listinfo/om