[Om] Specification of functions, preserving function signatures
W Naylor
wn at cs.bath.ac.uk
Thu Dec 8 15:07:25 CET 2005
I've just discovered a bug on the OpenMath site (this is the mirror at
http://openmath.activemath.org/ as the official one seems to be down
today!) There are currently two versions of fn3, the one at:
http://openmath.activemath.org/cd/fns3.xhtml
which I am refering to, this seems to have come out of a paper due to
Arjeh Cohen, "CD experiences" May 9th 2003, and one from Mike Dewar on the
contributed site:
http://openmath.activemath.org/cd/contrib/cd/fns3.xhtml
this is about properties of functions,
cheers,
Bill
On Thu, 8 Dec 2005, W Naylor wrote:
>
> Hi all,
>
> as part of my project, I am implementing an OpenMath phrasebook for aldor
> (http://www.aldor.org/). I am looking at mappings for function objects,
> these can be specified using:
>
> <OMBIND>
> <OMS cd="fns1" name="lambda"/>
> ...
>
> however this holds no typing information. One possible solution is to use
> attribution where the attribute is
> <OMS cd="ecc" name="type"/>
> this has role 'semantic-attribution' so preserves semantic information, an
> example would be f:Z->N x +-> x^2 as
> <OMATR>
> <OMATP>
> <OMS cd="ecc" name="type"/>
> <OMS cd="setname1" name="N"/>
> </OMATP>
> <OMBIND>
> <OMS cd="fns1" name="lambda"/>
> <OMBVAR>
> <OMATR>
> <OMATP>
> <OMS cd="ecc" name="type"/>
> <OMS cd="setname1" name="Z"/>
> </OMATP>
> <OMV name="x"/>
> </OMATR>
> </OMBVAR>
> <OMA>
> <OMS cd="arith1" name="power"/>
> <OMV name="x"/>
> <OMI>2</OMI>
> </OMA>
> </OMBIND>
> </OMATR>
>
> (I personally find this a bit ugly)
>
> Another possibility is to use the function symbol from fns3
>
> <OMA>
> <OMS cd="fns3" name="function"/>
> <OMS cd="setname1" name="Z"/>
> <OMS cd="setname1" name="N"/>
> <OMBIND>
> <OMS cd="fns1" name="lambda"/>
> <OMBVAR>
> <OMV name="x"/>
> </OMBVAR>
> <OMA>
> <OMS cd="arith1" name="power"/>
> <OMV name="x"/>
> <OMI>2</OMI>
> </OMA>
> </OMBIND>
> </OMA>
>
> I find the second solution nicer (the type information is kept together,
> though multiple arguments will involve cross products ... not so nice on
> the aldor side :-| ), however fns3 is an experimental CD, whereas
> semantic-attribution is in the OM2 specification.
>
> I would appreciate other peoples opinion/experience on this matter
>
> cheers,
>
> Bill
>
>
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> -
> - Dr. W.A. Naylor
> -
> - http://www.cs.bath.ac.uk/~wn
> - http://orcca.on.ca/~bill
> -
> - work tel: +44 1225 386183
> -
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>
> _______________________________________________
> Om mailing list
> Om at openmath.org
> http://openmath.org/mailman/listinfo/om
>
>
>
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-
- Dr. W.A. Naylor
-
- http://www.cs.bath.ac.uk/~wn
- http://orcca.on.ca/~bill
-
- work tel: +44 1225 386183
-
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
More information about the Om
mailing list