Ordinals
Div
left Euclidean division of ordinals
quo
left Euclidean quotient of ordinals
rem
left Euclidean remainder of ordinals
Calling Sequence
Parameters
Returns
Description
Examples
Compatibility
Div(a, b)
quo(a, b)
rem(a, b)
a, b
-
ordinals, nonnegative integers, or polynomials with positive integer coefficients
Div returns an expression sequence q, r such that a=b⋅q+r, where q and r are ordinals, nonnegative integers, or polynomials with positive integer coefficients, and r is as small as possible.
quo returns just q and rem returns just r.
The Div(a, b) calling sequence computes the unique ordinal numbers q and r such that a=b⋅q+r and r≺b, where ≺ is the strict ordering of ordinals.
If b=0, a division by zero error is raised.
The ordinal a is left divisible by b if and only if r=0.
If one of a and b is a parametric ordinal and the division cannot be performed, an error is raised.
The quo and rem commands overload the corresponding top-level routines quo and rem, respectively. The top-level commands are still accessible via the :- qualifier, that is, :-quo and :-rem, respectively.
with⁡Ordinals
`+`,`.`,`<`,<=,Add,Base,Dec,Decompose,Div,Eval,Factor,Gcd,Lcm,LessThan,Log,Max,Min,Mult,Ordinal,Power,Split,Sub,`^`,degree,lcoeff,log,lterm,ω,quo,rem,tcoeff,tdegree,tterm
a≔Ordinal⁡ω,1,3,2,2,5,0,4
a≔ωω+ω3⋅2+ω2⋅5+4
b≔Ordinal⁡2,4,1,7,0,5
b≔ω2⋅4+ω⋅7+5
q,r≔Div⁡a,b
q,r≔ωω+ω⋅2+1,ω2+4
quo⁡a,b=q
ωω+ω⋅2+1=ωω+ω⋅2+1
rem⁡a,b=r
ω2+4=ω2+4
a=b·q+r
ωω+ω3⋅2+ω2⋅5+4=ωω+ω3⋅2+ω2⋅5+4
r<b
true
Any of the arguments can be an integer.
Div⁡a,2
ωω+ω3⋅2+ω2⋅5+2,0
Div⁡b,3
ω2⋅4+ω⋅7+1,2
Div⁡b,0
Error, (in Ordinals:-Div) division by zero
Parametric examples.
c≔Ordinal⁡2,4⁢x,1,y+10,0,z
c≔ω2⋅4⁢x+ω⋅y+10+z
Div⁡c,b
Error, (in Ordinals:-Div) unable to divide
q,r≔Div⁡Eval⁡c,x=x+1,b
q,r≔x+1,ω⋅y+3+z
The Ordinals[Div], Ordinals[quo] and Ordinals[rem] commands were introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
Ordinals[Gcd]
Ordinals[Log]
Ordinals[Mult]
Ordinals[Ordinal]
Ordinals[Sub]
overload
Download Help Document