\begin{patch}{XPolynomialXmpPagePatch1} \begin{paste}{XPolynomialXmpPageFull1}{XPolynomialXmpPageEmpty1} \pastebutton{XPolynomialXmpPageFull1}{\hidepaste} \tab{5}\spadcommand{poly := XPolynomial(Integer)\bound{poly }} \indentrel{3}\begin{verbatim} (1) XPolynomial Integer Type: Domain \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty1} \begin{paste}{XPolynomialXmpPageEmpty1}{XPolynomialXmpPagePatch1} \pastebutton{XPolynomialXmpPageEmpty1}{\showpaste} \tab{5}\spadcommand{poly := XPolynomial(Integer)\bound{poly }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch2} \begin{paste}{XPolynomialXmpPageFull2}{XPolynomialXmpPageEmpty2} \pastebutton{XPolynomialXmpPageFull2}{\hidepaste} \tab{5}\spadcommand{pr: poly := 2*x + 3*y-5\free{poly }\bound{pr }} \indentrel{3}\begin{verbatim} (2) - 5 + x 2 + y 3 Type: XPolynomial Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty2} \begin{paste}{XPolynomialXmpPageEmpty2}{XPolynomialXmpPagePatch2} \pastebutton{XPolynomialXmpPageEmpty2}{\showpaste} \tab{5}\spadcommand{pr: poly := 2*x + 3*y-5\free{poly }\bound{pr }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch3} \begin{paste}{XPolynomialXmpPageFull3}{XPolynomialXmpPageEmpty3} \pastebutton{XPolynomialXmpPageFull3}{\hidepaste} \tab{5}\spadcommand{pr2: poly := pr*pr\free{poly }\bound{pr2 }} \indentrel{3}\begin{verbatim} (3) 25 + x(- 20 + x 4 + y 6) + y(- 30 + x 6 + y 9) Type: XPolynomial Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty3} \begin{paste}{XPolynomialXmpPageEmpty3}{XPolynomialXmpPagePatch3} \pastebutton{XPolynomialXmpPageEmpty3}{\showpaste} \tab{5}\spadcommand{pr2: poly := pr*pr\free{poly }\bound{pr2 }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch4} \begin{paste}{XPolynomialXmpPageFull4}{XPolynomialXmpPageEmpty4} \pastebutton{XPolynomialXmpPageFull4}{\hidepaste} \tab{5}\spadcommand{pd := expand pr\free{pr }\bound{pd }} \indentrel{3}\begin{verbatim} (4) - 5 + 2x + 3y Type: XDistributedPolynomial(Symbol,Integer) \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty4} \begin{paste}{XPolynomialXmpPageEmpty4}{XPolynomialXmpPagePatch4} \pastebutton{XPolynomialXmpPageEmpty4}{\showpaste} \tab{5}\spadcommand{pd := expand pr\free{pr }\bound{pd }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch5} \begin{paste}{XPolynomialXmpPageFull5}{XPolynomialXmpPageEmpty5} \pastebutton{XPolynomialXmpPageFull5}{\hidepaste} \tab{5}\spadcommand{pd2 := pd*pd\free{pd }\bound{pd2 }} \indentrel{3}\begin{verbatim} 2 2 (5) 25 - 20x - 30y + 4x + 6x y + 6y x + 9y Type: XDistributedPolynomial(Symbol,Integer) \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty5} \begin{paste}{XPolynomialXmpPageEmpty5}{XPolynomialXmpPagePatch5} \pastebutton{XPolynomialXmpPageEmpty5}{\showpaste} \tab{5}\spadcommand{pd2 := pd*pd\free{pd }\bound{pd2 }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch6} \begin{paste}{XPolynomialXmpPageFull6}{XPolynomialXmpPageEmpty6} \pastebutton{XPolynomialXmpPageFull6}{\hidepaste} \tab{5}\spadcommand{expand(pr2) - pd2\free{pr2 }\free{pd2 }} \indentrel{3}\begin{verbatim} (6) 0 Type: XDistributedPolynomial(Symbol,Integer) \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty6} \begin{paste}{XPolynomialXmpPageEmpty6}{XPolynomialXmpPagePatch6} \pastebutton{XPolynomialXmpPageEmpty6}{\showpaste} \tab{5}\spadcommand{expand(pr2) - pd2\free{pr2 }\free{pd2 }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch7} \begin{paste}{XPolynomialXmpPageFull7}{XPolynomialXmpPageEmpty7} \pastebutton{XPolynomialXmpPageFull7}{\hidepaste} \tab{5}\spadcommand{qr := pr**3\free{pr }\bound{qr }} \indentrel{3}\begin{verbatim} (7) - 125 + x(150 + x(- 60 + x 8 + y 12) + y(- 90 + x 12 + y 18)) + y(225 + x(- 90 + x 12 + y 18) + y(- 135 + x 18 + y 27)) Type: XPolynomial Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty7} \begin{paste}{XPolynomialXmpPageEmpty7}{XPolynomialXmpPagePatch7} \pastebutton{XPolynomialXmpPageEmpty7}{\showpaste} \tab{5}\spadcommand{qr := pr**3\free{pr }\bound{qr }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch8} \begin{paste}{XPolynomialXmpPageFull8}{XPolynomialXmpPageEmpty8} \pastebutton{XPolynomialXmpPageFull8}{\hidepaste} \tab{5}\spadcommand{qd := pd**3\free{pd }\bound{qd }} \indentrel{3}\begin{verbatim} (8) 2 2 - 125 + 150x + 225y - 60x - 90x y - 90y x - 135y + 3 2 2 2 8x + 12x y + 12x y x + 18x y + 12y x + 18y x y + 2 3 18y x + 27y Type: XDistributedPolynomial(Symbol,Integer) \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty8} \begin{paste}{XPolynomialXmpPageEmpty8}{XPolynomialXmpPagePatch8} \pastebutton{XPolynomialXmpPageEmpty8}{\showpaste} \tab{5}\spadcommand{qd := pd**3\free{pd }\bound{qd }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch9} \begin{paste}{XPolynomialXmpPageFull9}{XPolynomialXmpPageEmpty9} \pastebutton{XPolynomialXmpPageFull9}{\hidepaste} \tab{5}\spadcommand{ trunc(qd,2)\free{qd }} \indentrel{3}\begin{verbatim} (9) 2 2 - 125 + 150x + 225y - 60x - 90x y - 90y x - 135y Type: XDistributedPolynomial(Symbol,Integer) \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty9} \begin{paste}{XPolynomialXmpPageEmpty9}{XPolynomialXmpPagePatch9} \pastebutton{XPolynomialXmpPageEmpty9}{\showpaste} \tab{5}\spadcommand{ trunc(qd,2)\free{qd }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch10} \begin{paste}{XPolynomialXmpPageFull10}{XPolynomialXmpPageEmpty10} \pastebutton{XPolynomialXmpPageFull10}{\hidepaste} \tab{5}\spadcommand{trunc(qr,2)\free{qr }} \indentrel{3}\begin{verbatim} (10) - 125 + x(150 + x(- 60) + y(- 90)) + y(225 + x(- 90) + y(- 135)) Type: XPolynomial Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty10} \begin{paste}{XPolynomialXmpPageEmpty10}{XPolynomialXmpPagePatch10} \pastebutton{XPolynomialXmpPageEmpty10}{\showpaste} \tab{5}\spadcommand{trunc(qr,2)\free{qr }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch11} \begin{paste}{XPolynomialXmpPageFull11}{XPolynomialXmpPageEmpty11} \pastebutton{XPolynomialXmpPageFull11}{\hidepaste} \tab{5}\spadcommand{Word := OrderedFreeMonoid Symbol\bound{Word }} \indentrel{3}\begin{verbatim} (11) OrderedFreeMonoid Symbol Type: Domain \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty11} \begin{paste}{XPolynomialXmpPageEmpty11}{XPolynomialXmpPagePatch11} \pastebutton{XPolynomialXmpPageEmpty11}{\showpaste} \tab{5}\spadcommand{Word := OrderedFreeMonoid Symbol\bound{Word }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch12} \begin{paste}{XPolynomialXmpPageFull12}{XPolynomialXmpPageEmpty12} \pastebutton{XPolynomialXmpPageFull12}{\hidepaste} \tab{5}\spadcommand{w: Word := x*y**2\free{Word }\bound{w }} \indentrel{3}\begin{verbatim} 2 (12) x y Type: OrderedFreeMonoid Symbol \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty12} \begin{paste}{XPolynomialXmpPageEmpty12}{XPolynomialXmpPagePatch12} \pastebutton{XPolynomialXmpPageEmpty12}{\showpaste} \tab{5}\spadcommand{w: Word := x*y**2\free{Word }\bound{w }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch13} \begin{paste}{XPolynomialXmpPageFull13}{XPolynomialXmpPageEmpty13} \pastebutton{XPolynomialXmpPageFull13}{\hidepaste} \tab{5}\spadcommand{rquo(qr,w)\free{qr }\free{w }} \indentrel{3}\begin{verbatim} (13) 18 Type: XPolynomial Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty13} \begin{paste}{XPolynomialXmpPageEmpty13}{XPolynomialXmpPagePatch13} \pastebutton{XPolynomialXmpPageEmpty13}{\showpaste} \tab{5}\spadcommand{rquo(qr,w)\free{qr }\free{w }} \end{paste}\end{patch} \begin{patch}{XPolynomialXmpPagePatch14} \begin{paste}{XPolynomialXmpPageFull14}{XPolynomialXmpPageEmpty14} \pastebutton{XPolynomialXmpPageFull14}{\hidepaste} \tab{5}\spadcommand{sh(pr,w::poly)\free{pr }\free{w }} \indentrel{3}\begin{verbatim} (14) x(x y y 4 + y(x y 2 + y(- 5 + x 2 + y 9))) + y x y y 3 Type: XPolynomial Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{XPolynomialXmpPageEmpty14} \begin{paste}{XPolynomialXmpPageEmpty14}{XPolynomialXmpPagePatch14} \pastebutton{XPolynomialXmpPageEmpty14}{\showpaste} \tab{5}\spadcommand{sh(pr,w::poly)\free{pr }\free{w }} \end{paste}\end{patch}