Gcd - Maple Help

Ordinals

 Gcd
 greatest common left divisor of ordinals

 Calling Sequence Gcd(a, b, ...)

Parameters

 a, b, ... - ordinals, nonnegative integers, or polynomials with positive integer coefficients

Description

 • The Gcd(a, b, ...) calling sequence computes the unique greatest common left divisor of the given ordinal numbers. It returns either an ordinal data structure, a nonnegative integer, or a polynomial with positive integer coefficients.
 • If some of the arguments are parametric ordinals and the greatest common left divisor cannot be determined, an error is raised.

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)
 > $a≔\mathrm{Ordinal}\left(\left[\left[\mathrm{\omega },1\right],\left[1,2\right],\left[0,1\right]\right]\right)$
 ${a}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{1}$ (2)
 > $b≔\mathrm{Ordinal}\left(\left[\left[3,1\right],\left[1,1\right],\left[0,1\right]\right]\right)$
 ${b}{≔}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{+}{1}$ (3)
 > $c≔\mathrm{Ordinal}\left(\left[\left[2,1\right],\left[1,3\right],\left[0,1\right]\right]\right)$
 ${c}{≔}{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{3}{+}{1}$ (4)
 > $\mathrm{Gcd}\left(a,b,c\right)$
 ${\mathbf{\omega }}{+}{1}$ (5)
 > $\mathrm{Div}\left(a,\right)$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{+}{2}{,}{0}$ (6)
 > $\mathrm{Div}\left(b,\right)$
 ${{\mathbf{\omega }}}^{{2}}{+}{1}{,}{0}$ (7)
 > $\mathrm{Div}\left(c,\right)$
 ${\mathbf{\omega }}{+}{3}{,}{0}$ (8)

Any of the arguments can be a positive integer.

 > $\mathrm{Gcd}\left(12,20,30\right)$
 ${2}$ (9)
 > $\mathrm{Gcd}\left(18,12·b,30·c\right)$
 ${6}$ (10)
 > $\mathrm{Gcd}\left(3,\mathrm{\omega }\right)$
 ${3}$ (11)
 > $\mathrm{Gcd}\left(3,\mathrm{\omega },\mathrm{\omega }+1\right)$
 ${1}$ (12)

Parametric examples.

 > $d≔\mathrm{Ordinal}\left(\left[\left[2,x\right],\left[1,3\right],\left[0,1\right]\right]\right)$
 ${d}{≔}{{\mathbf{\omega }}}^{{2}}{\cdot }{x}{+}{\mathbf{\omega }}{\cdot }{3}{+}{1}$ (13)
 > $\mathrm{Gcd}\left(a,b,d\right)$
 ${\mathbf{\omega }}{+}{1}$ (14)
 > $e≔\mathrm{Ordinal}\left(\left[\left[2,1\right],\left[1,1\right],\left[0,1\right]\right]\right)$
 ${e}{≔}{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{+}{1}$ (15)
 > $\mathrm{Gcd}\left(d,e\right)$
 ${\mathbf{\omega }}{+}{1}$ (16)
 > $\mathrm{Div}\left(d,\right)$
 ${\mathbf{\omega }}{\cdot }{x}{+}{3}{,}{0}$ (17)
 > $\mathrm{Div}\left(e,\right)$
 ${\mathbf{\omega }}{+}{1}{,}{0}$ (18)
 > $f≔\mathrm{Ordinal}\left(\left[\left[3,1\right],\left[1,3\right],\left[0,1\right]\right]\right)$
 ${f}{≔}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{3}{+}{1}$ (19)
 > $\mathrm{Gcd}\left(d,f\right)$
 > $\mathrm{Gcd}\left(\mathrm{Eval}\left(d,x=x+1\right),f\right)$
 ${\mathbf{\omega }}{\cdot }{3}{+}{1}$ (20)
 > $g≔\mathrm{Ordinal}\left(\left[\left[4,1\right],\left[2,x+1\right]\right]\right)$
 ${g}{≔}{{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({x}{+}{1}\right)$ (21)
 > $h≔\mathrm{Ordinal}\left(\left[\left[3,2\right],\left[1,y+1\right],\left[0,z\right]\right]\right)$
 ${h}{≔}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }\left({y}{+}{1}\right){+}{z}$ (22)
 > $\mathrm{Gcd}\left(g,h\right)$
 ${\mathbf{\omega }}{\cdot }\left({y}{+}{1}\right){+}{z}$ (23)
 > $\mathrm{Div}\left(g,\right)$
 ${{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }\left({x}{+}{1}\right){,}{0}$ (24)
 > $\mathrm{Div}\left(h,\right)$
 ${{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{1}{,}{0}$ (25)
 > $\mathrm{Gcd}\left(4,h,\mathrm{\omega }+6\right)$
 ${\mathrm{igcd}}{}\left({2}{,}{z}\right)$ (26)

Compatibility

 • The Ordinals[Gcd] command was introduced in Maple 2015.