[om] Algebraic Numbers
Clare So
clare at dimsum.scl.csd.uwo.ca
Fri Nov 28 17:51:21 CET 2003
Dear OpenMathers,
The MONET group at ORCCA is trying to figure out the appropriate
OpenMath representation for algebraic numbers. We propose two
approaches. Let's say we would like to encode $ {\alpha}{x^2} +
(\alpha - 1)x + (1 + \alpha )y $ in OpenMath where \alpha is
the algebraic expression representing RootOf(z^2+z+1):
* First Approach *
<OMA>
<OMS cd="algext1" name="algebraicnumber"/>
<OMBIND>
<OMS cd="fns1" name="lambda"/>
<OMBVAR>
<OMV name="alpha"/>
</OMBVAR>
<OMA>
[$ {\alpha ^ 2} + \alpha + 1 $ in OpenMath]
</OMA>
<OMA>
[$ {\alpha}{x^2} + (\alpha - 1)x + (1 + \alpha )y $ in OpenMath]
</OMA>
</OMBIND>
</OMA>
For this approach, alpha is defined in the second argument of of
<OMS cd="fns1" name="lambda"/> and is used in the expression in the
third argument.
* Second Approach *
<OMA>
<OMS cd ="arith1" name="plus"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="algext1" name="algebraicnumber"/>
[$ {\alpha ^ 2} + \alpha + 1 $ in OpenMath]
</OMA>
<OMA>
<OMS cd="arith1" name="power"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMA>
<OMS cd="algext1" name="algebraicnumber"/>
[$ {\alpha ^ 2} + \alpha + 1 $ in OpenMath]
</OMA>
<OMI> 1 </OMI>
</OMA>
<OMV name="x"/>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMA>
<OMS cd="algext1" name="algebraicnumber"/>
[$ {\alpha ^ 2} + \alpha + 1 $ in OpenMath]
</OMA>
<OMI> 1 </OMI>
</OMA>
<OMV name="y"/>
</OMA>
</OMA>
The algebraic number is defined every time we need it.
First approach is a compact way to express algebraic number because
alpha is defined once for the entire expression. Second approach is
a straight-forward way because alpha is defined exactly the place we
need it.
Please let us know which approach you think should be used for this
purpose.
Clare & MONET group at UWO
--
om at openmath.org - general discussion on OpenMath
Post public announcements to om-announce at openmath.org
Automatic list maintenance software at majordomo at openmath.org
Mail om-owner at openmath.org for assistance with any problems
More information about the Om
mailing list