OpenMath Content Dictionary: fns4
Canonical URL:
http://www.openmath.org/cd/fns4.ocd
CD File:
fns4.ocd
CD as XML Encoded OpenMath:
fns4.omcd
Defines:
assign_to , maps_to
Date:
2004-12-20
Version:
2
(Revision 1)
Review Date:
2006-06-01
Status:
experimental
This CD holds further symbols concerning functions. A
particularly interesting symbol is
maps_to
which extends the usual lambda binder.
Another is
assign_to
which helps to specify (partially) the image of a function on a specific
element.
Description:
This symbol denotes a binding constructor.
The body of the binder should be a list [A1,A2] of length 2.
It is used to represent a function assignment A1 -> A2, where the bound
variables occur in A1 and possibly in A2. The expressions A1, A2 should
represent objects uniquely determined by given values of the bound variables,
wihtin the range of definition of the domain.
Example:
The following object defines a function from the unit circle in R^2
assigning the angle the vector from the origin to the point makes with the
horizontal axis.
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0">
<OMBIND><OMS cd="fns4" name="maps_to"/>
<OMBVAR><OMV name="x"/><OMV name="y"/></OMBVAR>
<OMA><OMS cd="list1" name="list"/>
<OMA><OMS cd="linalg2" name="vector"/>
<OMA><OMS cd="arith1" name="divide"/>
<OMA><OMS cd="arith1" name="minus"/>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="x"/> <OMI> 2 </OMI>
</OMA>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="y"/> <OMI> 2 </OMI>
</OMA>
</OMA>
<OMA><OMS cd="arith1" name="plus"/>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="x"/> <OMI> 2 </OMI>
</OMA>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="y"/> <OMI> 2 </OMI>
</OMA>
</OMA>
</OMA>
<OMA><OMS cd="arith1" name="divide"/>
<OMA><OMS cd="arith1" name="minus"/>
<OMA><OMS cd="arith1" name="times"/>
<OMI> 2 </OMI><OMV name="x"/><OMV name="y"/>
</OMA>
</OMA>
<OMA><OMS cd="arith1" name="plus"/>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="x"/> <OMI> 2 </OMI>
</OMA>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="y"/> <OMI> 2 </OMI>
</OMA>
</OMA>
</OMA>
</OMA>
<OMA><OMS cd="transc1" name="arcsin"/>
<OMA><OMS cd="arith1" name="divide"/>
<OMA><OMS cd="arith1" name="minus"/>
<OMA><OMS cd="arith1" name="times"/>
<OMI> 2 </OMI><OMV name="x"/><OMV name="y"/>
</OMA>
</OMA>
<OMA><OMS cd="arith1" name="minus"/>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="x"/> <OMI> 2 </OMI>
</OMA>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="y"/> <OMI> 2 </OMI>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<bind><csymbol cd="fns4">maps_to</csymbol>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<apply><csymbol cd="list1">list</csymbol>
<apply><csymbol cd="linalg2">vector</csymbol>
<apply><csymbol cd="arith1">divide</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="arith1">power</csymbol><ci>y</ci><cn type="integer">2</cn></apply>
</apply>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="arith1">power</csymbol><ci>y</ci><cn type="integer">2</cn></apply>
</apply>
</apply>
<apply><csymbol cd="arith1">divide</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<cn type="integer">2</cn>
<ci>x</ci>
<ci>y</ci>
</apply>
</apply>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="arith1">power</csymbol><ci>y</ci><cn type="integer">2</cn></apply>
</apply>
</apply>
</apply>
<apply><csymbol cd="transc1">arcsin</csymbol>
<apply><csymbol cd="arith1">divide</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<cn type="integer">2</cn>
<ci>x</ci>
<ci>y</ci>
</apply>
</apply>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="arith1">power</csymbol><ci>y</ci><cn type="integer">2</cn></apply>
</apply>
</apply>
</apply>
</apply>
</bind>
</math>
Prefix
maps_to
[
x
y ] .
(
list
(
vector
(
divide
(
minus
(
power
(
x , 2 )
,
power
(
y , 2 )
)
,
plus
(
power
(
x , 2 )
,
power
(
y , 2 )
)
)
,
divide
(
minus
(
times
( 2 ,
x ,
y )
)
,
plus
(
power
(
x , 2 )
,
power
(
y , 2 )
)
)
)
,
arcsin
(
divide
(
minus
(
times
( 2 ,
x ,
y )
)
,
minus
(
power
(
x , 2 )
,
power
(
y , 2 )
)
)
)
)
)
Popcorn
fns4.maps_to[$x, $y -> [linalg2.vector(($x ^ 2 - $y ^ 2) / ($x ^ 2 + $y ^ 2), (2 * $x * $y) / ($x ^ 2 + $y ^ 2)) , arcsin((2 * $x * $y) / ($x ^ 2 - $y ^ 2))]]
Rendered Presentation MathML
maps_to
x
,
y
.
(
x
2
-
y
2
x
2
+
y
2
,
2
x
y
x
2
+
y
2
)
arcsin
(
2
x
y
x
2
-
y
2
)
Signatures:
sts
Description:
This symbol denotes a function with a even and positive number of arguments.
When applied to a_1,b_1,....a_n,b_n, it represents the assignment
of b_i to a_i for each index i=1,...,n.
It can be used to specify the behaviour of a function f,
by giving the images b_i of a_i under f.
Example:
The following object specifies that a permutation on the letters
a,...,i is assigned to the permutation (1,2,3).
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0">
<OMA><OMS cd="fns4" name="assign_to"/>
<OMA><OMS cd="permutation1" name="permutation"/>
<OMA><OMS cd="permutation1" name="cycle"/>
<OMI>1</OMI> <OMI>2</OMI> <OMI>3</OMI>
</OMA>
</OMA>
<OMA><OMS cd="permutation1" name="permutation"/>
<OMA><OMS cd="permutation1" name="cycle"/>
<OMV name="a"/> <OMV name="e"/> <OMV name="b"/>
</OMA>
<OMA><OMS cd="permutation1" name="cycle"/>
<OMV name="c"/> <OMV name="f"/> <OMV name="h"/>
</OMA>
<OMA><OMS cd="permutation1" name="cycle"/>
<OMV name="d"/> <OMV name="g"/> <OMV name="i"/>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="fns4">assign_to</csymbol>
<apply><csymbol cd="permutation1">permutation</csymbol>
<apply><csymbol cd="permutation1">cycle</csymbol>
<cn type="integer">1</cn>
<cn type="integer">2</cn>
<cn type="integer">3</cn>
</apply>
</apply>
<apply><csymbol cd="permutation1">permutation</csymbol>
<apply><csymbol cd="permutation1">cycle</csymbol><ci>a</ci><ci>e</ci><ci>b</ci></apply>
<apply><csymbol cd="permutation1">cycle</csymbol><ci>c</ci><ci>f</ci><ci>h</ci></apply>
<apply><csymbol cd="permutation1">cycle</csymbol><ci>d</ci><ci>g</ci><ci>i</ci></apply>
</apply>
</apply>
</math>
Prefix
assign_to
(
permutation
(
cycle
(1, 2, 3)
)
,
permutation
(
cycle
(
a ,
e ,
b )
,
cycle
(
c ,
f ,
h )
,
cycle
(
d ,
g ,
i )
)
)
Popcorn
fns4.assign_to(permutation1.permutation(permutation1.cycle(1, 2, 3)), permutation1.permutation(permutation1.cycle($a, $e, $b), permutation1.cycle($c, $f, $h), permutation1.cycle($d, $g, $i)))
Rendered Presentation MathML
assign_to
(
permutation
(
cycle
(
1
,
2
,
3
)
)
,
permutation
(
cycle
(
a
,
e
,
b
)
,
cycle
(
c
,
f
,
h
)
,
cycle
(
d
,
g
,
i
)
)
)
Signatures:
sts