Eval - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Ordinals

 Eval
 substitute values for parameters in an ordinal

 Calling Sequence Eval(o, x=v) Eval(o, l)

Parameters

 o - x - name v - integer or polynomial with integer coefficients l - list or set of equations of type x=v

Description

 • The Eval(o, x=v) calling sequence substitutes the value $v$ for the parameter $x$ in the ordinal $o$, returning either an ordinal data structure, a nonnegative integer, or a polynomial with positive integer coefficients.
 • It is possible for $v$ to be a negative integer or a polynomial with some negative integer coefficients, provided that the result is a valid ordinal, which means it does not have any negative integer coefficients.
 • The resulting ordinal is simplified, namely, any coefficients that become zero are removed, and if only a single term with exponent $0$ is left after that, a nonnegative integer or a polynomial with positive integer coefficients is returned.
 • The Eval(o, l) calling sequence performs all the substitutions in l simultaneously.
 • This command can also be applied to a polynomial with positive integer coefficients representing a nonnegative integer ordinal.

Examples

 > $\mathrm{with}\left(\mathrm{Ordinals}\right)$
 $\left[{\mathrm{+}}{,}{\mathrm{.}}{,}{\mathrm{<}}{,}{\mathrm{<=}}{,}{\mathrm{Add}}{,}{\mathrm{Base}}{,}{\mathrm{Dec}}{,}{\mathrm{Decompose}}{,}{\mathrm{Div}}{,}{\mathrm{Eval}}{,}{\mathrm{Factor}}{,}{\mathrm{Gcd}}{,}{\mathrm{Lcm}}{,}{\mathrm{LessThan}}{,}{\mathrm{Log}}{,}{\mathrm{Max}}{,}{\mathrm{Min}}{,}{\mathrm{Mult}}{,}{\mathrm{Ordinal}}{,}{\mathrm{Power}}{,}{\mathrm{Split}}{,}{\mathrm{Sub}}{,}{\mathrm{^}}{,}{\mathrm{degree}}{,}{\mathrm{lcoeff}}{,}{\mathrm{log}}{,}{\mathrm{lterm}}{,}{\mathrm{\omega }}{,}{\mathrm{quo}}{,}{\mathrm{rem}}{,}{\mathrm{tcoeff}}{,}{\mathrm{tdegree}}{,}{\mathrm{tterm}}\right]$ (1)
 > $\mathrm{o1}≔\mathrm{Ordinal}\left(\left[\left[\mathrm{\omega },x\right],\left[2,3\right],\left[1,y+1\right],\left[0,4\right]\right]\right)$
 ${\mathrm{o1}}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{x}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{\cdot }\left({y}{+}{1}\right){+}{4}$ (2)
 > $\mathrm{Eval}\left(\mathrm{o1},x=0\right)$
 ${{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{\cdot }\left({y}{+}{1}\right){+}{4}$ (3)

Several substitutions can be done at once. It is also possible to substitute a polynomial for a parameter and not just an integer.

 > $\mathrm{Eval}\left(\mathrm{o1},\left[x={x}^{2}+1,y=4\right]\right)$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }\left({{x}}^{{2}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{\cdot }{5}{+}{4}$ (4)

The result need not be an ordinal data structure.

 > $\mathrm{o2}≔\mathrm{Ordinal}\left(\left[\left[2,{x}^{2}+x\right],\left[1,x\right],\left[0,4\right]\right]\right)$
 ${\mathrm{o2}}{≔}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{x}}^{{2}}{+}{x}\right){+}{\mathbf{\omega }}{\cdot }{x}{+}{4}$ (5)
 > $\mathrm{Eval}\left(\mathrm{o2},x=0\right)$
 ${4}$ (6)
 > $\mathrm{Eval}\left(\mathrm{\omega }·x,x=0\right)$
 ${0}$ (7)

The attempt to substitute a negative integer or a polynomial with negative coefficients may result in an error if the result has negative coefficients.

 > $\mathrm{o3}≔\mathrm{Ordinal}\left(\left[\left[1,2x+2\right],\left[0,3\right]\right]\right)$
 ${\mathrm{o3}}{≔}{\mathbf{\omega }}{\cdot }\left({2}{}{x}{+}{2}\right){+}{3}$ (8)
 > $\mathrm{Eval}\left(\mathrm{o3},x=-1\right)$
 ${3}$ (9)
 > $\mathrm{Eval}\left(\mathrm{o3},x=-2\right)$
 > $\mathrm{Eval}\left(\mathrm{o3},x=x-1\right)$
 ${\mathbf{\omega }}{\cdot }\left({2}{}{x}\right){+}{3}$ (10)
 > $\mathrm{Eval}\left(\mathrm{o3},x=x-2\right)$

The Eval command can also be applied to a polynomial with positive integer coefficients representing a constant ordinal.

 > $\mathrm{Eval}\left({x}^{2}+1,x=3\right)=\mathrm{eval}\left({x}^{2}+1,x=3\right)$
 ${10}{=}{10}$ (11)

Compatibility

 • The Ordinals[Eval] command was introduced in Maple 2015.
 • For more information on Maple 2015 changes, see Updates in Maple 2015.