1\begin{patch}{XPolynomialXmpPagePatch1}
2\begin{paste}{XPolynomialXmpPageFull1}{XPolynomialXmpPageEmpty1}
3\pastebutton{XPolynomialXmpPageFull1}{\hidepaste}
4\tab{5}\spadcommand{poly := XPolynomial(Integer)\bound{poly }}
5\indentrel{3}\begin{verbatim}
6   (1)  XPolynomial(Integer)
7                                             Type: Type
8\end{verbatim}
9\indentrel{-3}\end{paste}\end{patch}
10
11\begin{patch}{XPolynomialXmpPageEmpty1}
12\begin{paste}{XPolynomialXmpPageEmpty1}{XPolynomialXmpPagePatch1}
13\pastebutton{XPolynomialXmpPageEmpty1}{\showpaste}
14\tab{5}\spadcommand{poly := XPolynomial(Integer)\bound{poly }}
15\end{paste}\end{patch}
16
17\begin{patch}{XPolynomialXmpPagePatch2}
18\begin{paste}{XPolynomialXmpPageFull2}{XPolynomialXmpPageEmpty2}
19\pastebutton{XPolynomialXmpPageFull2}{\hidepaste}
20\tab{5}\spadcommand{pr: poly := 2*x + 3*y-5\free{poly }\bound{pr }}
21\indentrel{3}\begin{verbatim}
22   (2)  - 5 + x 2 + y 3
23                             Type: XPolynomial(Integer)
24\end{verbatim}
25\indentrel{-3}\end{paste}\end{patch}
26
27\begin{patch}{XPolynomialXmpPageEmpty2}
28\begin{paste}{XPolynomialXmpPageEmpty2}{XPolynomialXmpPagePatch2}
29\pastebutton{XPolynomialXmpPageEmpty2}{\showpaste}
30\tab{5}\spadcommand{pr: poly := 2*x + 3*y-5\free{poly }\bound{pr }}
31\end{paste}\end{patch}
32
33\begin{patch}{XPolynomialXmpPagePatch3}
34\begin{paste}{XPolynomialXmpPageFull3}{XPolynomialXmpPageEmpty3}
35\pastebutton{XPolynomialXmpPageFull3}{\hidepaste}
36\tab{5}\spadcommand{pr2: poly := pr*pr\free{poly }\bound{pr2 }}
37\indentrel{3}\begin{verbatim}
38   (3)  25 + x(- 20 + x 4 + y 6) + y(- 30 + x 6 + y 9)
39                             Type: XPolynomial(Integer)
40\end{verbatim}
41\indentrel{-3}\end{paste}\end{patch}
42
43\begin{patch}{XPolynomialXmpPageEmpty3}
44\begin{paste}{XPolynomialXmpPageEmpty3}{XPolynomialXmpPagePatch3}
45\pastebutton{XPolynomialXmpPageEmpty3}{\showpaste}
46\tab{5}\spadcommand{pr2: poly := pr*pr\free{poly }\bound{pr2 }}
47\end{paste}\end{patch}
48
49\begin{patch}{XPolynomialXmpPagePatch4}
50\begin{paste}{XPolynomialXmpPageFull4}{XPolynomialXmpPageEmpty4}
51\pastebutton{XPolynomialXmpPageFull4}{\hidepaste}
52\tab{5}\spadcommand{pd := expand pr\free{pr }\bound{pd }}
53\indentrel{3}\begin{verbatim}
54   (4)  - 5 + 2 x + 3 y
55           Type: XDistributedPolynomial(Symbol,Integer)
56\end{verbatim}
57\indentrel{-3}\end{paste}\end{patch}
58
59\begin{patch}{XPolynomialXmpPageEmpty4}
60\begin{paste}{XPolynomialXmpPageEmpty4}{XPolynomialXmpPagePatch4}
61\pastebutton{XPolynomialXmpPageEmpty4}{\showpaste}
62\tab{5}\spadcommand{pd := expand pr\free{pr }\bound{pd }}
63\end{paste}\end{patch}
64
65\begin{patch}{XPolynomialXmpPagePatch5}
66\begin{paste}{XPolynomialXmpPageFull5}{XPolynomialXmpPageEmpty5}
67\pastebutton{XPolynomialXmpPageFull5}{\hidepaste}
68\tab{5}\spadcommand{pd2 := pd*pd\free{pd }\bound{pd2 }}
69\indentrel{3}\begin{verbatim}
70                              2                      2
71   (5)  25 - 20 x - 30 y + 4 x  + 6 x y + 6 y x + 9 y
72           Type: XDistributedPolynomial(Symbol,Integer)
73\end{verbatim}
74\indentrel{-3}\end{paste}\end{patch}
75
76\begin{patch}{XPolynomialXmpPageEmpty5}
77\begin{paste}{XPolynomialXmpPageEmpty5}{XPolynomialXmpPagePatch5}
78\pastebutton{XPolynomialXmpPageEmpty5}{\showpaste}
79\tab{5}\spadcommand{pd2 := pd*pd\free{pd }\bound{pd2 }}
80\end{paste}\end{patch}
81
82\begin{patch}{XPolynomialXmpPagePatch6}
83\begin{paste}{XPolynomialXmpPageFull6}{XPolynomialXmpPageEmpty6}
84\pastebutton{XPolynomialXmpPageFull6}{\hidepaste}
85\tab{5}\spadcommand{expand(pr2) - pd2\free{pr2 }\free{pd2 }}
86\indentrel{3}\begin{verbatim}
87   (6)  0
88           Type: XDistributedPolynomial(Symbol,Integer)
89\end{verbatim}
90\indentrel{-3}\end{paste}\end{patch}
91
92\begin{patch}{XPolynomialXmpPageEmpty6}
93\begin{paste}{XPolynomialXmpPageEmpty6}{XPolynomialXmpPagePatch6}
94\pastebutton{XPolynomialXmpPageEmpty6}{\showpaste}
95\tab{5}\spadcommand{expand(pr2) - pd2\free{pr2 }\free{pd2 }}
96\end{paste}\end{patch}
97
98\begin{patch}{XPolynomialXmpPagePatch7}
99\begin{paste}{XPolynomialXmpPageFull7}{XPolynomialXmpPageEmpty7}
100\pastebutton{XPolynomialXmpPageFull7}{\hidepaste}
101\tab{5}\spadcommand{qr := pr^3\free{pr }\bound{qr }}
102\indentrel{3}\begin{verbatim}
103   (7)
104     - 125
105   +
106     x(150 + x(- 60 + x 8 + y 12) + y(- 90 + x 12 + y 18))
107   +
108   y(225 + x(- 90 + x 12 + y 18) + y(- 135 + x 18 + y 27))
109                             Type: XPolynomial(Integer)
110\end{verbatim}
111\indentrel{-3}\end{paste}\end{patch}
112
113\begin{patch}{XPolynomialXmpPageEmpty7}
114\begin{paste}{XPolynomialXmpPageEmpty7}{XPolynomialXmpPagePatch7}
115\pastebutton{XPolynomialXmpPageEmpty7}{\showpaste}
116\tab{5}\spadcommand{qr := pr^3\free{pr }\bound{qr }}
117\end{paste}\end{patch}
118
119\begin{patch}{XPolynomialXmpPagePatch8}
120\begin{paste}{XPolynomialXmpPageFull8}{XPolynomialXmpPageEmpty8}
121\pastebutton{XPolynomialXmpPageFull8}{\hidepaste}
122\tab{5}\spadcommand{qd := pd^3\free{pd }\bound{qd }}
123\indentrel{3}\begin{verbatim}
124   (8)
125                                 2
126     - 125 + 150 x + 225 y - 60 x  - 90 x y - 90 y x
127   +
128            2      3       2                     2
129     - 135 y  + 8 x  + 12 x y + 12 x y x + 18 x y
130   +
131           2                  2        3
132     12 y x  + 18 y x y + 18 y x + 27 y
133           Type: XDistributedPolynomial(Symbol,Integer)
134\end{verbatim}
135\indentrel{-3}\end{paste}\end{patch}
136
137\begin{patch}{XPolynomialXmpPageEmpty8}
138\begin{paste}{XPolynomialXmpPageEmpty8}{XPolynomialXmpPagePatch8}
139\pastebutton{XPolynomialXmpPageEmpty8}{\showpaste}
140\tab{5}\spadcommand{qd := pd^3\free{pd }\bound{qd }}
141\end{paste}\end{patch}
142
143\begin{patch}{XPolynomialXmpPagePatch9}
144\begin{paste}{XPolynomialXmpPageFull9}{XPolynomialXmpPageEmpty9}
145\pastebutton{XPolynomialXmpPageFull9}{\hidepaste}
146\tab{5}\spadcommand{trunc(qd,2)\free{qd }}
147\indentrel{3}\begin{verbatim}
148   (9)
149                                 2
150     - 125 + 150 x + 225 y - 60 x  - 90 x y - 90 y x
151   +
152            2
153     - 135 y
154           Type: XDistributedPolynomial(Symbol,Integer)
155\end{verbatim}
156\indentrel{-3}\end{paste}\end{patch}
157
158\begin{patch}{XPolynomialXmpPageEmpty9}
159\begin{paste}{XPolynomialXmpPageEmpty9}{XPolynomialXmpPagePatch9}
160\pastebutton{XPolynomialXmpPageEmpty9}{\showpaste}
161\tab{5}\spadcommand{trunc(qd,2)\free{qd }}
162\end{paste}\end{patch}
163
164\begin{patch}{XPolynomialXmpPagePatch10}
165\begin{paste}{XPolynomialXmpPageFull10}{XPolynomialXmpPageEmpty10}
166\pastebutton{XPolynomialXmpPageFull10}{\hidepaste}
167\tab{5}\spadcommand{trunc(qr,2)\free{qr }}
168\indentrel{3}\begin{verbatim}
169   (10)
170     - 125 + x(150 + x(- 60) + y(- 90))
171   +
172     y(225 + x(- 90) + y(- 135))
173                             Type: XPolynomial(Integer)
174\end{verbatim}
175\indentrel{-3}\end{paste}\end{patch}
176
177\begin{patch}{XPolynomialXmpPageEmpty10}
178\begin{paste}{XPolynomialXmpPageEmpty10}{XPolynomialXmpPagePatch10}
179\pastebutton{XPolynomialXmpPageEmpty10}{\showpaste}
180\tab{5}\spadcommand{trunc(qr,2)\free{qr }}
181\end{paste}\end{patch}
182
183\begin{patch}{XPolynomialXmpPagePatch11}
184\begin{paste}{XPolynomialXmpPageFull11}{XPolynomialXmpPageEmpty11}
185\pastebutton{XPolynomialXmpPageFull11}{\hidepaste}
186\tab{5}\spadcommand{Word := FreeMonoid Symbol\bound{Word }}
187\indentrel{3}\begin{verbatim}
188   (11)  FreeMonoid(Symbol)
189                                             Type: Type
190\end{verbatim}
191\indentrel{-3}\end{paste}\end{patch}
192
193\begin{patch}{XPolynomialXmpPageEmpty11}
194\begin{paste}{XPolynomialXmpPageEmpty11}{XPolynomialXmpPagePatch11}
195\pastebutton{XPolynomialXmpPageEmpty11}{\showpaste}
196\tab{5}\spadcommand{Word := FreeMonoid Symbol\bound{Word }}
197\end{paste}\end{patch}
198
199\begin{patch}{XPolynomialXmpPagePatch12}
200\begin{paste}{XPolynomialXmpPageFull12}{XPolynomialXmpPageEmpty12}
201\pastebutton{XPolynomialXmpPageFull12}{\hidepaste}
202\tab{5}\spadcommand{w: Word := x*y^2\free{Word }\bound{w }}
203\indentrel{3}\begin{verbatim}
204            2
205   (12)  x y
206                               Type: FreeMonoid(Symbol)
207\end{verbatim}
208\indentrel{-3}\end{paste}\end{patch}
209
210\begin{patch}{XPolynomialXmpPageEmpty12}
211\begin{paste}{XPolynomialXmpPageEmpty12}{XPolynomialXmpPagePatch12}
212\pastebutton{XPolynomialXmpPageEmpty12}{\showpaste}
213\tab{5}\spadcommand{w: Word := x*y^2\free{Word }\bound{w }}
214\end{paste}\end{patch}
215
216\begin{patch}{XPolynomialXmpPagePatch13}
217\begin{paste}{XPolynomialXmpPageFull13}{XPolynomialXmpPageEmpty13}
218\pastebutton{XPolynomialXmpPageFull13}{\hidepaste}
219\tab{5}\spadcommand{rquo(qr,w)\free{qr }\free{w }}
220\indentrel{3}\begin{verbatim}
221   (13)  18
222                             Type: XPolynomial(Integer)
223\end{verbatim}
224\indentrel{-3}\end{paste}\end{patch}
225
226\begin{patch}{XPolynomialXmpPageEmpty13}
227\begin{paste}{XPolynomialXmpPageEmpty13}{XPolynomialXmpPagePatch13}
228\pastebutton{XPolynomialXmpPageEmpty13}{\showpaste}
229\tab{5}\spadcommand{rquo(qr,w)\free{qr }\free{w }}
230\end{paste}\end{patch}
231
232\begin{patch}{XPolynomialXmpPagePatch14}
233\begin{paste}{XPolynomialXmpPageFull14}{XPolynomialXmpPageEmpty14}
234\pastebutton{XPolynomialXmpPageFull14}{\hidepaste}
235\tab{5}\spadcommand{sh(pr,w::poly)\free{pr }\free{w }}
236\indentrel{3}\begin{verbatim}
237   (14)
238   x(x y y 4 + y(x y 2 + y(- 5 + x 2 + y 9))) + y x y y 3
239                             Type: XPolynomial(Integer)
240\end{verbatim}
241\indentrel{-3}\end{paste}\end{patch}
242
243\begin{patch}{XPolynomialXmpPageEmpty14}
244\begin{paste}{XPolynomialXmpPageEmpty14}{XPolynomialXmpPagePatch14}
245\pastebutton{XPolynomialXmpPageEmpty14}{\showpaste}
246\tab{5}\spadcommand{sh(pr,w::poly)\free{pr }\free{w }}
247\end{paste}\end{patch}
248
249