OreTools[Modular]

 Minus
 subtract two Ore polynomials
 ScalarMultiply
 multiply an Ore polynomial on the left by a scalar
 Multiply
 multiply two Ore polynomials

 Calling Sequence Modular[Add](Ore1, Ore2, p) Modular[Minus](Ore1, Ore2, p) Modular[ScalarMultiply](s, Ore1, p) Modular[Multiply](Ore1, Ore2, p, A)

Parameters

 Ore1, Ore2 - Ore polynomials; to define an Ore polynomial, use the OrePoly structure s - scalar from the coefficient domain p - prime A - Ore algebra; to define an Ore algebra, use the SetOreRing command

Description

 • The Modular[Add](Ore1, Ore2, m) calling sequence adds the two Ore polynomials Ore1 and Ore2 modulo p.
 • The Modular[Minus](Ore1, Ore2, p) calling sequence subtracts the Ore polynomial Ore2 from the Ore polynomial Ore1 modulo p.
 • The Modular[ScalarMultiply](s, Ore1, p) calling sequence multiplies the Ore polynomial Ore1 on the left by the scalar s modulo p.
 • The Modular[Multiply](Ore1, Ore2, p, A) calling sequence multiplies the two Ore polynomials Ore1 and Ore2 in the Ore algebra A modulo m.

Examples

 > $\mathrm{with}\left(\mathrm{OreTools}\right):$

Define the shift algebra.

 > $A≔\mathrm{SetOreRing}\left(n,'\mathrm{shift}'\right)$
 ${A}{≔}{\mathrm{UnivariateOreRing}}{}\left({n}{,}{\mathrm{shift}}\right)$ (1)
 > $\mathrm{Ore1}≔\mathrm{OrePoly}\left(-\frac{n}{n-1},-\frac{-5n+{n}^{2}+3}{n-1},n-3\right)$
 ${\mathrm{Ore1}}{≔}{\mathrm{OrePoly}}{}\left({-}\frac{{n}}{{n}{-}{1}}{,}{-}\frac{{{n}}^{{2}}{-}{5}{}{n}{+}{3}}{{n}{-}{1}}{,}{n}{-}{3}\right)$ (2)
 > $\mathrm{Ore2}≔\mathrm{OrePoly}\left(-n,3n-{n}^{2}-1,{\left(n-1\right)}^{2}\right)$
 ${\mathrm{Ore2}}{≔}{\mathrm{OrePoly}}{}\left({-}{n}{,}{-}{{n}}^{{2}}{+}{3}{}{n}{-}{1}{,}{\left({n}{-}{1}\right)}^{{2}}\right)$ (3)
 > ${\mathrm{Modular}}_{\mathrm{Add}}\left(\mathrm{Ore1},\mathrm{Ore2},7\right)$
 ${\mathrm{OrePoly}}{}\left(\frac{{6}{}{{n}}^{{2}}}{{n}{+}{6}}{,}\frac{{6}{}{{n}}^{{3}}{+}{3}{}{{n}}^{{2}}{+}{n}{+}{5}}{{n}{+}{6}}{,}{{n}}^{{2}}{+}{6}{}{n}{+}{5}\right)$ (4)
 > ${\mathrm{Modular}}_{\mathrm{Minus}}\left(\mathrm{Ore1},\mathrm{Ore2},7\right)$
 ${\mathrm{OrePoly}}{}\left(\frac{{{n}}^{{2}}{+}{5}{}{n}}{{n}{+}{6}}{,}\frac{{{n}}^{{3}}{+}{2}{}{{n}}^{{2}}{+}{2}{}{n}{+}{3}}{{n}{+}{6}}{,}{6}{}{{n}}^{{2}}{+}{3}{}{n}{+}{3}\right)$ (5)
 > ${\mathrm{Modular}}_{\mathrm{ScalarMultiply}}\left(22,\mathrm{Ore1},17\right)$
 ${\mathrm{OrePoly}}{}\left(\frac{{12}{}{n}}{{n}{+}{16}}{,}\frac{{12}{}{{n}}^{{2}}{+}{8}{}{n}{+}{2}}{{n}{+}{16}}{,}{5}{}{n}{+}{2}\right)$ (6)
 > ${\mathrm{Modular}}_{\mathrm{Multiply}}\left(\mathrm{Ore1},\mathrm{Ore2},11,A\right)$
 ${\mathrm{OrePoly}}{}\left(\frac{{{n}}^{{2}}}{{n}{+}{10}}{,}\frac{{2}{}{{n}}^{{3}}{+}{4}{}{{n}}^{{2}}{+}{10}{}{n}{+}{3}}{{n}{+}{10}}{,}\frac{{{n}}^{{4}}{+}{3}{}{{n}}^{{3}}{+}{6}{}{n}{+}{2}}{{n}{+}{10}}{,}\frac{{9}{}{{n}}^{{4}}{+}{8}{}{{n}}^{{3}}{+}{10}{}{{n}}^{{2}}{+}{4}{}{n}{+}{3}}{{n}{+}{10}}{,}\left({n}{+}{8}\right){}{\left({n}{+}{1}\right)}^{{2}}\right)$ (7)