Quo - Maple Help

Rem

inert rem function

Quo

inert quo function

 Calling Sequence Rem(a, b, x) Rem(a, b, x, 'q') Quo(a, b, x) Quo(a, b, x, 'r')

Parameters

 x - name (variable) a, b - polynomials in x q, r - unevaluated name

Description

 • The Rem and Quo functions are placeholders for representing the remainder and quotient respectively of a divided by b where a and b are polynomials in the variable x over a field.  They are used in conjunction with either  mod  or  $\mathrm{evala}$  as described below which define the coefficient domain.
 • Functionality:  Rem returns the remainder r and if the fourth argument q is present then the quotient is assigned to q. Quo returns the quotient q and if the fourth argument r is present then the remainder is assigned to r. The remainder r and quotient q satisfy:  $a=bq+r$.
 • The calls $\mathrm{Rem}\left(a,b,x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}p$ and $\mathrm{Quo}\left(a,b,x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}p$  compute the remainder and quotient respectively of a divided by b modulo p, a prime integer. The coefficients of a and b must be rational expressions over the rationals or over a finite field specified by RootOf expressions.  In particular, if the coefficients are integers then the computation is done over the field of integers modulo p.
 • The calls $\mathrm{evala}\left(\mathrm{Rem}\left(a,b,x\right)\right)$  and $\mathrm{evala}\left(\mathrm{Quo}\left(a,b,x\right)\right)$ compute the remainder and quotient respectively of a and b, where the coefficients of a and b are multivariate polynomials with coefficients in an algebraic number (or function) field.

Examples

 > $a≔{x}^{4}+5{x}^{3}+6:$
 > $b≔{x}^{2}+2x+7:$
 > $r≔\mathrm{Rem}\left(a,b,x,'q'\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}13$
 ${r}{≔}{5}{}{x}{+}{6}$ (1)
 > $q$
 ${{x}}^{{2}}{+}{3}{}{x}$ (2)
 > $\mathrm{Expand}\left(a-bq-r\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}13$
 ${0}$ (3)
 > $c≔{x}^{2}-x+3:$
 > $d≔x-\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\right):$
 > $\mathrm{evala}\left(\mathrm{Quo}\left(c,d,x\right)\right)$
 ${\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}\right){+}{x}{-}{1}$ (4)
 > $\mathrm{evala}\left(\mathrm{Rem}\left(c,d,x\right)\right)$
 ${-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}\right){+}{6}$ (5)