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

Online Help

All Products    Maple    MapleSim


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

Calling Sequence

Div(a, b)

quo(a, b)

rem(a, b)

Parameters

a, b

-

ordinals, nonnegative integers, or polynomials with positive integer coefficients

Returns

• 

Div returns an expression sequence q, r such that a=bq+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.

Description

• 

The Div(a, b) calling sequence computes the unique ordinal numbers q and r such that a=bq+r and rb, 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.

Examples

withOrdinals

`+`&comma;`.`&comma;`<`&comma;<=&comma;Add&comma;Base&comma;Dec&comma;Decompose&comma;Div&comma;Eval&comma;Factor&comma;Gcd&comma;Lcm&comma;LessThan&comma;Log&comma;Max&comma;Min&comma;Mult&comma;Ordinal&comma;Power&comma;Split&comma;Sub&comma;`^`&comma;degree&comma;lcoeff&comma;log&comma;lterm&comma;ω&comma;quo&comma;rem&comma;tcoeff&comma;tdegree&comma;tterm

(1)

aOrdinalω&comma;1&comma;3&comma;2&comma;2&comma;5&comma;0&comma;4

aωω&plus;ω32&plus;ω25&plus;4

(2)

bOrdinal2&comma;4&comma;1&comma;7&comma;0&comma;5

bω24&plus;ω7&plus;5

(3)

q,rDiva&comma;b

q,rωω&plus;ω2&plus;1,ω2&plus;4

(4)

quoa&comma;b=q

ωω&plus;ω2&plus;1=ωω&plus;ω2&plus;1

(5)

rema&comma;b=r

ω2&plus;4=ω2&plus;4

(6)

a=b·q+r

ωω&plus;ω32&plus;ω25&plus;4=ωω&plus;ω32&plus;ω25&plus;4

(7)

r<b

true

(8)

Any of the arguments can be an integer.

Diva&comma;2

ωω&plus;ω32&plus;ω25&plus;2&comma;0

(9)

Divb&comma;3

ω24&plus;ω7&plus;1&comma;2

(10)

Divb&comma;0

Error, (in Ordinals:-Div) division by zero

Parametric examples.

cOrdinal2&comma;4x&comma;1&comma;y+10&comma;0&comma;z

cω24x&plus;ωy+10&plus;z

(11)

Divc&comma;b

Error, (in Ordinals:-Div) unable to divide

q,rDivEvalc&comma;x=x+1&comma;b

q,rx+1,ωy+3&plus;z

(12)

Compatibility

• 

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

Ordinals[Gcd]

Ordinals[Log]

Ordinals[Mult]

Ordinals[Ordinal]

Ordinals[Sub]

overload