OreTools

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

 Calling Sequence Add(Ore1, ..., Orek) Minus(Ore1, Ore2) ScalarMultiply(s, Ore1) Multiply(Ore1, ..., Orek, A)

Parameters

 Ore1, Ore2, ..., Orek - Ore polynomials; to define an Ore polynomial, use the OrePoly structure. s - scalar from the coefficient domain A - Ore algebra; to define an Ore algebra, use the SetOreRing function.

Description

 • The Add(Ore1, ..., Orek) calling sequence adds the Ore polynomials Ore1,..., Orek.
 • The Minus(Ore1, Ore2) calling sequence subtracts the Ore polynomial Ore2 from the Ore polynomial Ore1.
 • The ScalarMultiply(s, Ore1) calling sequence multiplies the Ore polynomial Ore1 on the left by the scalar s.
 • The Multiply(Ore1, ..., Orek, A) calling sequence multiplies the t Ore polynomials Ore1, ...,  Orek in the Ore algebra A.

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)

Perform arithmetic operations.

 > $\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{Add}\left(\mathrm{Ore1},\mathrm{Ore2},\mathrm{Ore1}\right)$
 ${\mathrm{OrePoly}}{}\left({-}\frac{{n}{}\left({n}{+}{1}\right)}{{n}{-}{1}}{,}{-}\frac{{{n}}^{{3}}{-}{2}{}{{n}}^{{2}}{-}{6}{}{n}{+}{5}}{{n}{-}{1}}{,}{{n}}^{{2}}{-}{5}\right)$ (4)
 > $\mathrm{Minus}\left(\mathrm{Ore1},\mathrm{Ore2}\right)$
 ${\mathrm{OrePoly}}{}\left(\frac{{n}{}\left({-}{2}{+}{n}\right)}{{n}{-}{1}}{,}\frac{{{n}}^{{3}}{-}{5}{}{{n}}^{{2}}{+}{9}{}{n}{-}{4}}{{n}{-}{1}}{,}{-}{{n}}^{{2}}{+}{3}{}{n}{-}{4}\right)$ (5)
 > $\mathrm{ScalarMultiply}\left(\mathrm{sqrt}\left(2\right),\mathrm{Ore1}\right)$
 ${\mathrm{OrePoly}}{}\left({-}\frac{\sqrt{{2}}{}{n}}{{n}{-}{1}}{,}{-}\frac{\sqrt{{2}}{}\left({{n}}^{{2}}{-}{5}{}{n}{+}{3}\right)}{{n}{-}{1}}{,}\sqrt{{2}}{}\left({n}{-}{3}\right)\right)$ (6)
 > $\mathrm{Multiply}\left(\mathrm{Ore1},\mathrm{Ore2},\mathrm{Ore1},A\right)$
 ${\mathrm{OrePoly}}{}\left({-}\frac{{{n}}^{{3}}}{{\left({n}{-}{1}\right)}^{{2}}}{,}{-}\frac{{3}{}{{n}}^{{5}}{-}{12}{}{{n}}^{{4}}{+}{10}{}{{n}}^{{2}}{+}{n}{-}{3}}{{n}{}{\left({n}{-}{1}\right)}^{{2}}}{,}{-}\frac{{3}{}{{n}}^{{6}}{-}{18}{}{{n}}^{{5}}{+}{2}{}{{n}}^{{4}}{+}{62}{}{{n}}^{{3}}{+}{8}{}{{n}}^{{2}}{-}{29}{}{n}{-}{3}}{{n}{}\left({n}{-}{1}\right){}\left({n}{+}{1}\right)}{,}{-}\frac{{{n}}^{{7}}{-}{11}{}{{n}}^{{6}}{+}{3}{}{{n}}^{{5}}{+}{92}{}{{n}}^{{4}}{-}{19}{}{{n}}^{{3}}{-}{168}{}{{n}}^{{2}}{+}{8}{}{n}{+}{75}}{\left({n}{-}{1}\right){}\left({n}{+}{1}\right){}\left({n}{+}{2}\right)}{,}\frac{{3}{}{{n}}^{{7}}{-}{5}{}{{n}}^{{6}}{-}{55}{}{{n}}^{{5}}{+}{37}{}{{n}}^{{4}}{+}{209}{}{{n}}^{{3}}{-}{100}{}{{n}}^{{2}}{-}{142}{}{n}{+}{57}}{\left({n}{-}{1}\right){}\left({n}{+}{2}\right){}\left({n}{+}{3}\right)}{,}{-}\frac{{3}{}{{n}}^{{6}}{-}{{n}}^{{5}}{-}{34}{}{{n}}^{{4}}{+}{2}{}{{n}}^{{3}}{+}{31}{}{{n}}^{{2}}{-}{2}{}{n}{-}{3}}{\left({n}{-}{1}\right){}\left({n}{+}{3}\right)}{,}\left({n}{-}{3}\right){}{\left({n}{+}{1}\right)}^{{3}}\right)$ (7)