\begin{patch}{XPBWPolynomialXmpPagePatch1}
\begin{paste}{XPBWPolynomialXmpPageFull1}{XPBWPolynomialXmpPageEmpty1}
\pastebutton{XPBWPolynomialXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{a:Symbol := 'a\bound{a }}
\indentrel{3}\begin{verbatim}
   (1)  a
                                           Type: Symbol
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty1}
\begin{paste}{XPBWPolynomialXmpPageEmpty1}{XPBWPolynomialXmpPagePatch1}
\pastebutton{XPBWPolynomialXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{a:Symbol := 'a\bound{a }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch2}
\begin{paste}{XPBWPolynomialXmpPageFull2}{XPBWPolynomialXmpPageEmpty2}
\pastebutton{XPBWPolynomialXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{b:Symbol := 'b\bound{b }}
\indentrel{3}\begin{verbatim}
   (2)  b
                                           Type: Symbol
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty2}
\begin{paste}{XPBWPolynomialXmpPageEmpty2}{XPBWPolynomialXmpPagePatch2}
\pastebutton{XPBWPolynomialXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{b:Symbol := 'b\bound{b }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch3}
\begin{paste}{XPBWPolynomialXmpPageFull3}{XPBWPolynomialXmpPageEmpty3}
\pastebutton{XPBWPolynomialXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{RN := Fraction(Integer)\bound{RN }}
\indentrel{3}\begin{verbatim}
   (3)  Fraction(Integer)
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty3}
\begin{paste}{XPBWPolynomialXmpPageEmpty3}{XPBWPolynomialXmpPagePatch3}
\pastebutton{XPBWPolynomialXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{RN := Fraction(Integer)\bound{RN }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch4}
\begin{paste}{XPBWPolynomialXmpPageFull4}{XPBWPolynomialXmpPageEmpty4}
\pastebutton{XPBWPolynomialXmpPageFull4}{\hidepaste}
\tab{5}\spadcommand{word := FreeMonoid Symbol\bound{word }}
\indentrel{3}\begin{verbatim}
   (4)  FreeMonoid(Symbol)
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty4}
\begin{paste}{XPBWPolynomialXmpPageEmpty4}{XPBWPolynomialXmpPagePatch4}
\pastebutton{XPBWPolynomialXmpPageEmpty4}{\showpaste}
\tab{5}\spadcommand{word := FreeMonoid Symbol\bound{word }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch5}
\begin{paste}{XPBWPolynomialXmpPageFull5}{XPBWPolynomialXmpPageEmpty5}
\pastebutton{XPBWPolynomialXmpPageFull5}{\hidepaste}
\tab{5}\spadcommand{lword := LyndonWord(Symbol)\bound{lword }}
\indentrel{3}\begin{verbatim}
   (5)  LyndonWord(Symbol)
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty5}
\begin{paste}{XPBWPolynomialXmpPageEmpty5}{XPBWPolynomialXmpPagePatch5}
\pastebutton{XPBWPolynomialXmpPageEmpty5}{\showpaste}
\tab{5}\spadcommand{lword := LyndonWord(Symbol)\bound{lword }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch6}
\begin{paste}{XPBWPolynomialXmpPageFull6}{XPBWPolynomialXmpPageEmpty6}
\pastebutton{XPBWPolynomialXmpPageFull6}{\hidepaste}
\tab{5}\spadcommand{base := PoincareBirkhoffWittLyndonBasis Symbol\bound{base }}
\indentrel{3}\begin{verbatim}
   (6)  PoincareBirkhoffWittLyndonBasis(Symbol)
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty6}
\begin{paste}{XPBWPolynomialXmpPageEmpty6}{XPBWPolynomialXmpPagePatch6}
\pastebutton{XPBWPolynomialXmpPageEmpty6}{\showpaste}
\tab{5}\spadcommand{base := PoincareBirkhoffWittLyndonBasis Symbol\bound{base }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch7}
\begin{paste}{XPBWPolynomialXmpPageFull7}{XPBWPolynomialXmpPageEmpty7}
\pastebutton{XPBWPolynomialXmpPageFull7}{\hidepaste}
\tab{5}\spadcommand{dpoly := XDistributedPolynomial(Symbol, RN)\bound{dpoly }\free{RN }}
\indentrel{3}\begin{verbatim}
   (7)  XDistributedPolynomial(Symbol,Fraction(Integer))
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty7}
\begin{paste}{XPBWPolynomialXmpPageEmpty7}{XPBWPolynomialXmpPagePatch7}
\pastebutton{XPBWPolynomialXmpPageEmpty7}{\showpaste}
\tab{5}\spadcommand{dpoly := XDistributedPolynomial(Symbol, RN)\bound{dpoly }\free{RN }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch8}
\begin{paste}{XPBWPolynomialXmpPageFull8}{XPBWPolynomialXmpPageEmpty8}
\pastebutton{XPBWPolynomialXmpPageFull8}{\hidepaste}
\tab{5}\spadcommand{rpoly := XRecursivePolynomial(Symbol, RN)\bound{rpoly }\free{RN }}
\indentrel{3}\begin{verbatim}
   (8)  XRecursivePolynomial(Symbol,Fraction(Integer))
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty8}
\begin{paste}{XPBWPolynomialXmpPageEmpty8}{XPBWPolynomialXmpPagePatch8}
\pastebutton{XPBWPolynomialXmpPageEmpty8}{\showpaste}
\tab{5}\spadcommand{rpoly := XRecursivePolynomial(Symbol, RN)\bound{rpoly }\free{RN }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch9}
\begin{paste}{XPBWPolynomialXmpPageFull9}{XPBWPolynomialXmpPageEmpty9}
\pastebutton{XPBWPolynomialXmpPageFull9}{\hidepaste}
\tab{5}\spadcommand{lpoly := LiePolynomial(Symbol, RN)\bound{lpoly }\free{RN }}
\indentrel{3}\begin{verbatim}
   (9)  LiePolynomial(Symbol,Fraction(Integer))
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty9}
\begin{paste}{XPBWPolynomialXmpPageEmpty9}{XPBWPolynomialXmpPagePatch9}
\pastebutton{XPBWPolynomialXmpPageEmpty9}{\showpaste}
\tab{5}\spadcommand{lpoly := LiePolynomial(Symbol, RN)\bound{lpoly }\free{RN }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch10}
\begin{paste}{XPBWPolynomialXmpPageFull10}{XPBWPolynomialXmpPageEmpty10}
\pastebutton{XPBWPolynomialXmpPageFull10}{\hidepaste}
\tab{5}\spadcommand{poly := XPBWPolynomial(Symbol, RN)\bound{poly }\free{RN }}
\indentrel{3}\begin{verbatim}
   (10)  XPBWPolynomial(Symbol,Fraction(Integer))
                                             Type: Type
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty10}
\begin{paste}{XPBWPolynomialXmpPageEmpty10}{XPBWPolynomialXmpPagePatch10}
\pastebutton{XPBWPolynomialXmpPageEmpty10}{\showpaste}
\tab{5}\spadcommand{poly := XPBWPolynomial(Symbol, RN)\bound{poly }\free{RN }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch11}
\begin{paste}{XPBWPolynomialXmpPageFull11}{XPBWPolynomialXmpPageEmpty11}
\pastebutton{XPBWPolynomialXmpPageFull11}{\hidepaste}
\tab{5}\spadcommand{liste : List lword := LyndonWordsList([a,b], 6)\bound{liste }\free{lword a b }}
\indentrel{3}\begin{verbatim}
   (11)
                       2        2     3      2 2
   [[a], [b], [a b], [a b], [a b ], [a b], [a b ],
        3     4      3 2     2          2 3           2
    [a b ], [a b], [a b ], [a b a b], [a b ], [a b a b ],
        4     5      4 2     3          3 3     2     2
    [a b ], [a b], [a b ], [a b a b], [a b ], [a b a b ],
      2 2        2 4           3       5
    [a b a b], [a b ], [a b a b ], [a b ]]
                         Type: List(LyndonWord(Symbol))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty11}
\begin{paste}{XPBWPolynomialXmpPageEmpty11}{XPBWPolynomialXmpPagePatch11}
\pastebutton{XPBWPolynomialXmpPageEmpty11}{\showpaste}
\tab{5}\spadcommand{liste : List lword := LyndonWordsList([a,b], 6)\bound{liste }\free{lword a b }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch12}
\begin{paste}{XPBWPolynomialXmpPageFull12}{XPBWPolynomialXmpPageEmpty12}
\pastebutton{XPBWPolynomialXmpPageFull12}{\hidepaste}
\tab{5}\spadcommand{0$poly\free{poly }}
\indentrel{3}\begin{verbatim}
   (12)  0
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty12}
\begin{paste}{XPBWPolynomialXmpPageEmpty12}{XPBWPolynomialXmpPagePatch12}
\pastebutton{XPBWPolynomialXmpPageEmpty12}{\showpaste}
\tab{5}\spadcommand{0$poly\free{poly }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch13}
\begin{paste}{XPBWPolynomialXmpPageFull13}{XPBWPolynomialXmpPageEmpty13}
\pastebutton{XPBWPolynomialXmpPageFull13}{\hidepaste}
\tab{5}\spadcommand{1$poly\free{poly }}
\indentrel{3}\begin{verbatim}
   (13)  1
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty13}
\begin{paste}{XPBWPolynomialXmpPageEmpty13}{XPBWPolynomialXmpPagePatch13}
\pastebutton{XPBWPolynomialXmpPageEmpty13}{\showpaste}
\tab{5}\spadcommand{1$poly\free{poly }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch14}
\begin{paste}{XPBWPolynomialXmpPageFull14}{XPBWPolynomialXmpPageEmpty14}
\pastebutton{XPBWPolynomialXmpPageFull14}{\hidepaste}
\tab{5}\spadcommand{p : poly := a\free{a poly }\bound{p }}
\indentrel{3}\begin{verbatim}
   (14)  [a]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty14}
\begin{paste}{XPBWPolynomialXmpPageEmpty14}{XPBWPolynomialXmpPagePatch14}
\pastebutton{XPBWPolynomialXmpPageEmpty14}{\showpaste}
\tab{5}\spadcommand{p : poly := a\free{a poly }\bound{p }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch15}
\begin{paste}{XPBWPolynomialXmpPageFull15}{XPBWPolynomialXmpPageEmpty15}
\pastebutton{XPBWPolynomialXmpPageFull15}{\hidepaste}
\tab{5}\spadcommand{q : poly := b\free{b poly }\bound{q }}
\indentrel{3}\begin{verbatim}
   (15)  [b]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty15}
\begin{paste}{XPBWPolynomialXmpPageEmpty15}{XPBWPolynomialXmpPagePatch15}
\pastebutton{XPBWPolynomialXmpPageEmpty15}{\showpaste}
\tab{5}\spadcommand{q : poly := b\free{b poly }\bound{q }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch16}
\begin{paste}{XPBWPolynomialXmpPageFull16}{XPBWPolynomialXmpPageEmpty16}
\pastebutton{XPBWPolynomialXmpPageFull16}{\hidepaste}
\tab{5}\spadcommand{pq: poly := p*q\free{p q poly }\bound{pq }}
\indentrel{3}\begin{verbatim}
   (16)  [a b] + [b][a]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty16}
\begin{paste}{XPBWPolynomialXmpPageEmpty16}{XPBWPolynomialXmpPagePatch16}
\pastebutton{XPBWPolynomialXmpPageEmpty16}{\showpaste}
\tab{5}\spadcommand{pq: poly := p*q\free{p q poly }\bound{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch17}
\begin{paste}{XPBWPolynomialXmpPageFull17}{XPBWPolynomialXmpPageEmpty17}
\pastebutton{XPBWPolynomialXmpPageFull17}{\hidepaste}
\tab{5}\spadcommand{pq :: dpoly\free{pq dpoly }}
\indentrel{3}\begin{verbatim}
   (17)  a b
 Type: XDistributedPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty17}
\begin{paste}{XPBWPolynomialXmpPageEmpty17}{XPBWPolynomialXmpPagePatch17}
\pastebutton{XPBWPolynomialXmpPageEmpty17}{\showpaste}
\tab{5}\spadcommand{pq :: dpoly\free{pq dpoly }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch18}
\begin{paste}{XPBWPolynomialXmpPageFull18}{XPBWPolynomialXmpPageEmpty18}
\pastebutton{XPBWPolynomialXmpPageFull18}{\hidepaste}
\tab{5}\spadcommand{mirror pq\free{pq }}
\indentrel{3}\begin{verbatim}
   (18)  [b][a]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty18}
\begin{paste}{XPBWPolynomialXmpPageEmpty18}{XPBWPolynomialXmpPagePatch18}
\pastebutton{XPBWPolynomialXmpPageEmpty18}{\showpaste}
\tab{5}\spadcommand{mirror pq\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch19}
\begin{paste}{XPBWPolynomialXmpPageFull19}{XPBWPolynomialXmpPageEmpty19}
\pastebutton{XPBWPolynomialXmpPageFull19}{\hidepaste}
\tab{5}\spadcommand{listOfTerms pq\free{pq }}
\indentrel{3}\begin{verbatim}
   (19)  [[k = [b][a], c = 1], [k = [a b], c = 1]]
Type: List(Record(k: PoincareBirkhoffWittLyndonBasis(Symbol),c: Fraction(Integer)))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty19}
\begin{paste}{XPBWPolynomialXmpPageEmpty19}{XPBWPolynomialXmpPagePatch19}
\pastebutton{XPBWPolynomialXmpPageEmpty19}{\showpaste}
\tab{5}\spadcommand{listOfTerms pq\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch20}
\begin{paste}{XPBWPolynomialXmpPageFull20}{XPBWPolynomialXmpPageEmpty20}
\pastebutton{XPBWPolynomialXmpPageFull20}{\hidepaste}
\tab{5}\spadcommand{reductum pq\free{pq }}
\indentrel{3}\begin{verbatim}
   (20)  [a b]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty20}
\begin{paste}{XPBWPolynomialXmpPageEmpty20}{XPBWPolynomialXmpPagePatch20}
\pastebutton{XPBWPolynomialXmpPageEmpty20}{\showpaste}
\tab{5}\spadcommand{reductum pq\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch21}
\begin{paste}{XPBWPolynomialXmpPageFull21}{XPBWPolynomialXmpPageEmpty21}
\pastebutton{XPBWPolynomialXmpPageFull21}{\hidepaste}
\tab{5}\spadcommand{leadingMonomial pq\free{pq }}
\indentrel{3}\begin{verbatim}
   (21)  [b][a]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty21}
\begin{paste}{XPBWPolynomialXmpPageEmpty21}{XPBWPolynomialXmpPagePatch21}
\pastebutton{XPBWPolynomialXmpPageEmpty21}{\showpaste}
\tab{5}\spadcommand{leadingMonomial pq\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch22}
\begin{paste}{XPBWPolynomialXmpPageFull22}{XPBWPolynomialXmpPageEmpty22}
\pastebutton{XPBWPolynomialXmpPageFull22}{\hidepaste}
\tab{5}\spadcommand{coefficients pq\free{pq }}
\indentrel{3}\begin{verbatim}
   (22)  [1, 1]
                          Type: List(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty22}
\begin{paste}{XPBWPolynomialXmpPageEmpty22}{XPBWPolynomialXmpPagePatch22}
\pastebutton{XPBWPolynomialXmpPageEmpty22}{\showpaste}
\tab{5}\spadcommand{coefficients pq\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch23}
\begin{paste}{XPBWPolynomialXmpPageFull23}{XPBWPolynomialXmpPageEmpty23}
\pastebutton{XPBWPolynomialXmpPageFull23}{\hidepaste}
\tab{5}\spadcommand{leadingTerm pq\free{pq }}
\indentrel{3}\begin{verbatim}
   (23)  [k = [b][a], c = 1]
Type: Record(k: PoincareBirkhoffWittLyndonBasis(Symbol),c: Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty23}
\begin{paste}{XPBWPolynomialXmpPageEmpty23}{XPBWPolynomialXmpPagePatch23}
\pastebutton{XPBWPolynomialXmpPageEmpty23}{\showpaste}
\tab{5}\spadcommand{leadingTerm pq\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch24}
\begin{paste}{XPBWPolynomialXmpPageFull24}{XPBWPolynomialXmpPageEmpty24}
\pastebutton{XPBWPolynomialXmpPageFull24}{\hidepaste}
\tab{5}\spadcommand{degree pq\free{pq }}
\indentrel{3}\begin{verbatim}
   (24)  2
                                  Type: PositiveInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty24}
\begin{paste}{XPBWPolynomialXmpPageEmpty24}{XPBWPolynomialXmpPagePatch24}
\pastebutton{XPBWPolynomialXmpPageEmpty24}{\showpaste}
\tab{5}\spadcommand{degree pq\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch25}
\begin{paste}{XPBWPolynomialXmpPageFull25}{XPBWPolynomialXmpPageEmpty25}
\pastebutton{XPBWPolynomialXmpPageFull25}{\hidepaste}
\tab{5}\spadcommand{pq4:=exp(pq,4)\bound{pq4 }\free{pq }}
\indentrel{3}\begin{verbatim}
   (25)
                          1              1     2
     1 + [a b] + [b][a] + - [a b][a b] + - [a b ][a]
                          2              2
   + 
     1      2     3               1
     - [b][a b] + - [b][a b][a] + - [b][b][a][a]
     2            2               2
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty25}
\begin{paste}{XPBWPolynomialXmpPageEmpty25}{XPBWPolynomialXmpPagePatch25}
\pastebutton{XPBWPolynomialXmpPageEmpty25}{\showpaste}
\tab{5}\spadcommand{pq4:=exp(pq,4)\bound{pq4 }\free{pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch26}
\begin{paste}{XPBWPolynomialXmpPageFull26}{XPBWPolynomialXmpPageEmpty26}
\pastebutton{XPBWPolynomialXmpPageFull26}{\hidepaste}
\tab{5}\spadcommand{log(pq4,4) - pq\free{pq4 pq }}
\indentrel{3}\begin{verbatim}
   (26)  0
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty26}
\begin{paste}{XPBWPolynomialXmpPageEmpty26}{XPBWPolynomialXmpPagePatch26}
\pastebutton{XPBWPolynomialXmpPageEmpty26}{\showpaste}
\tab{5}\spadcommand{log(pq4,4) - pq\free{pq4 pq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch27}
\begin{paste}{XPBWPolynomialXmpPageFull27}{XPBWPolynomialXmpPageEmpty27}
\pastebutton{XPBWPolynomialXmpPageFull27}{\hidepaste}
\tab{5}\spadcommand{lp1 :lpoly := LiePoly liste.10\free{liste lpoly }\bound{lp1 }}
\indentrel{3}\begin{verbatim}
           3 2
   (27)  [a b ]
          Type: LiePolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty27}
\begin{paste}{XPBWPolynomialXmpPageEmpty27}{XPBWPolynomialXmpPagePatch27}
\pastebutton{XPBWPolynomialXmpPageEmpty27}{\showpaste}
\tab{5}\spadcommand{lp1 :lpoly := LiePoly liste.10\free{liste lpoly }\bound{lp1 }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch28}
\begin{paste}{XPBWPolynomialXmpPageFull28}{XPBWPolynomialXmpPageEmpty28}
\pastebutton{XPBWPolynomialXmpPageFull28}{\hidepaste}
\tab{5}\spadcommand{lp2 :lpoly := LiePoly liste.11\free{liste lpoly }\bound{lp2 }}
\indentrel{3}\begin{verbatim}
           2
   (28)  [a b a b]
          Type: LiePolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty28}
\begin{paste}{XPBWPolynomialXmpPageEmpty28}{XPBWPolynomialXmpPagePatch28}
\pastebutton{XPBWPolynomialXmpPageEmpty28}{\showpaste}
\tab{5}\spadcommand{lp2 :lpoly := LiePoly liste.11\free{liste lpoly }\bound{lp2 }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch29}
\begin{paste}{XPBWPolynomialXmpPageFull29}{XPBWPolynomialXmpPageEmpty29}
\pastebutton{XPBWPolynomialXmpPageFull29}{\hidepaste}
\tab{5}\spadcommand{lp :lpoly := [lp1, lp2]\free{lp1 lp2 lpoly }\bound{lp }}
\indentrel{3}\begin{verbatim}
           3 2 2
   (29)  [a b a b a b]
          Type: LiePolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty29}
\begin{paste}{XPBWPolynomialXmpPageEmpty29}{XPBWPolynomialXmpPagePatch29}
\pastebutton{XPBWPolynomialXmpPageEmpty29}{\showpaste}
\tab{5}\spadcommand{lp :lpoly := [lp1, lp2]\free{lp1 lp2 lpoly }\bound{lp }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch30}
\begin{paste}{XPBWPolynomialXmpPageFull30}{XPBWPolynomialXmpPageEmpty30}
\pastebutton{XPBWPolynomialXmpPageFull30}{\hidepaste}
\tab{5}\spadcommand{lpd1: dpoly := lp1\free{lp1 dpoly }\bound{lpd1 }}
\indentrel{3}\begin{verbatim}
   (30)
      3 2      2         2 2                     2 2
     a b  - 2 a b a b - a b a + 4 a b a b a - a b a
   + 
                2    2 3
     - 2 b a b a  + b a
 Type: XDistributedPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty30}
\begin{paste}{XPBWPolynomialXmpPageEmpty30}{XPBWPolynomialXmpPagePatch30}
\pastebutton{XPBWPolynomialXmpPageEmpty30}{\showpaste}
\tab{5}\spadcommand{lpd1: dpoly := lp1\free{lp1 dpoly }\bound{lpd1 }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch31}
\begin{paste}{XPBWPolynomialXmpPageFull31}{XPBWPolynomialXmpPageEmpty31}
\pastebutton{XPBWPolynomialXmpPageFull31}{\hidepaste}
\tab{5}\spadcommand{lpd2: dpoly := lp2\free{lp2 dpoly }\bound{lpd2 }}
\indentrel{3}\begin{verbatim}
   (31)
      2         2 2           2                     2 2
     a b a b - a b a - 3 a b a b + 4 a b a b a - a b a
   + 
          3         2             2
     2 b a b - 3 b a b a + b a b a
 Type: XDistributedPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty31}
\begin{paste}{XPBWPolynomialXmpPageEmpty31}{XPBWPolynomialXmpPagePatch31}
\pastebutton{XPBWPolynomialXmpPageEmpty31}{\showpaste}
\tab{5}\spadcommand{lpd2: dpoly := lp2\free{lp2 dpoly }\bound{lpd2 }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch32}
\begin{paste}{XPBWPolynomialXmpPageFull32}{XPBWPolynomialXmpPageEmpty32}
\pastebutton{XPBWPolynomialXmpPageFull32}{\hidepaste}
\tab{5}\spadcommand{lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1\free{dpoly lpd1 lpd2 }\bound{lpd }}
\indentrel{3}\begin{verbatim}
   (32)
      3 2 2         3 2 2 2       3 2     2
     a b a b a b - a b a b a - 3 a b a b a b
   + 
        3 2             3 2   2 2      3 3 3
     4 a b a b a b a - a b a b a  + 2 a b a b
   + 
          3 3 2       3 3     2    2       3 2
     - 3 a b a b a + a b a b a  - a b a b a b
   + 
        2       2 2       2           2
     3 a b a b a b a + 6 a b a b a b a b
   + 
           2                     2         2 2
     - 12 a b a b a b a b a + 3 a b a b a b a
   + 
          2     2 3       2     2 2       2     3 3
     - 4 a b a b a b + 6 a b a b a b a - a b a b a
   + 
      2 2 4 2      2 2 3           2 2 2   2
     a b a b  - 3 a b a b a b + 3 a b a b a b
   + 
          2 2     3       2 2     2         2 2         2
     - 2 a b a b a b + 3 a b a b a b a - 3 a b a b a b a
   + 
      2 2   2 3          2   3 2          2   2
     a b a b a  + 3 a b a b a b  - 6 a b a b a b a b
   + 
              2   2 2            2
     - 3 a b a b a b a + 12 a b a b a b a b a
   + 
              2     2 2          2 2     2          2 3 3
     - 3 a b a b a b a  - 6 a b a b a b a  + 3 a b a b a
   + 
                  4 2               3
     - 4 a b a b a b  + 12 a b a b a b a b
   + 
                   2   2                   3
     - 12 a b a b a b a b + 8 a b a b a b a b
   + 
                       2                          2
     - 12 a b a b a b a b a + 12 a b a b a b a b a
   + 
                    2 3      2 5 2        2 4
     - 4 a b a b a b a  + a b a b  - 3 a b a b a b
   + 
          2 3   2         2 2   3         2 2   2
     3 a b a b a b - 2 a b a b a b + 3 a b a b a b a
   + 
            2 2       2      2 2 2 3        3   3 2
     - 3 a b a b a b a  + a b a b a  - 2 b a b a b
   + 
          3   2             3   2 2         3
     4 b a b a b a b + 2 b a b a b a - 8 b a b a b a b a
   + 
          3     2 2        3 2     2        3 3 3
     2 b a b a b a  + 4 b a b a b a  - 2 b a b a
   + 
          2   4 2        2   3             2   3 2
     3 b a b a b  - 6 b a b a b a b - 3 b a b a b a
   + 
           2   2               2   2 2 2
     12 b a b a b a b a - 3 b a b a b a
   + 
            2           2        2     2 3          5 2
     - 6 b a b a b a b a  + 3 b a b a b a  - b a b a b
   + 
              4 2             3   2              3
     3 b a b a b a + 6 b a b a b a b - 12 b a b a b a b a
   + 
              3 2 2            2   3             2   2
     3 b a b a b a  - 4 b a b a b a b + 6 b a b a b a b a
   + 
              2 2 3    2 5         2 5 2       2 4   2
     - b a b a b a  + b a b a b - b a b a - 3 b a b a b
   + 
        2 4           2 4 2 2      2 3   3
     4 b a b a b a - b a b a  + 2 b a b a b
   + 
          2 3   2       2 3       2
     - 3 b a b a b a + b a b a b a
 Type: XDistributedPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty32}
\begin{paste}{XPBWPolynomialXmpPageEmpty32}{XPBWPolynomialXmpPagePatch32}
\pastebutton{XPBWPolynomialXmpPageEmpty32}{\showpaste}
\tab{5}\spadcommand{lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1\free{dpoly lpd1 lpd2 }\bound{lpd }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch33}
\begin{paste}{XPBWPolynomialXmpPageFull33}{XPBWPolynomialXmpPageEmpty33}
\pastebutton{XPBWPolynomialXmpPageFull33}{\hidepaste}
\tab{5}\spadcommand{lp :: dpoly - lpd\free{lpd dpoly lp }}
\indentrel{3}\begin{verbatim}
   (33)  0
 Type: XDistributedPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty33}
\begin{paste}{XPBWPolynomialXmpPageEmpty33}{XPBWPolynomialXmpPagePatch33}
\pastebutton{XPBWPolynomialXmpPageEmpty33}{\showpaste}
\tab{5}\spadcommand{lp :: dpoly - lpd\free{lpd dpoly lp }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch34}
\begin{paste}{XPBWPolynomialXmpPageFull34}{XPBWPolynomialXmpPageEmpty34}
\pastebutton{XPBWPolynomialXmpPageFull34}{\hidepaste}
\tab{5}\spadcommand{p := 3 * lp\free{lp }\bound{pp }}
\indentrel{3}\begin{verbatim}
             3 2 2
   (34)  3 [a b a b a b]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty34}
\begin{paste}{XPBWPolynomialXmpPageEmpty34}{XPBWPolynomialXmpPagePatch34}
\pastebutton{XPBWPolynomialXmpPageEmpty34}{\showpaste}
\tab{5}\spadcommand{p := 3 * lp\free{lp }\bound{pp }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch35}
\begin{paste}{XPBWPolynomialXmpPageFull35}{XPBWPolynomialXmpPageEmpty35}
\pastebutton{XPBWPolynomialXmpPageFull35}{\hidepaste}
\tab{5}\spadcommand{q := lp1\free{lp1 }\bound{qq }}
\indentrel{3}\begin{verbatim}
           3 2
   (35)  [a b ]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty35}
\begin{paste}{XPBWPolynomialXmpPageEmpty35}{XPBWPolynomialXmpPagePatch35}
\pastebutton{XPBWPolynomialXmpPageEmpty35}{\showpaste}
\tab{5}\spadcommand{q := lp1\free{lp1 }\bound{qq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch36}
\begin{paste}{XPBWPolynomialXmpPageFull36}{XPBWPolynomialXmpPageEmpty36}
\pastebutton{XPBWPolynomialXmpPageFull36}{\hidepaste}
\tab{5}\spadcommand{pq:= p * q\free{pp qq }\bound{pqpq }}
\indentrel{3}\begin{verbatim}
             3 2 2        3 2
   (36)  3 [a b a b a b][a b ]
         Type: XPBWPolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty36}
\begin{paste}{XPBWPolynomialXmpPageEmpty36}{XPBWPolynomialXmpPagePatch36}
\pastebutton{XPBWPolynomialXmpPageEmpty36}{\showpaste}
\tab{5}\spadcommand{pq:= p * q\free{pp qq }\bound{pqpq }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch37}
\begin{paste}{XPBWPolynomialXmpPageFull37}{XPBWPolynomialXmpPageEmpty37}
\pastebutton{XPBWPolynomialXmpPageFull37}{\hidepaste}
\tab{5}\spadcommand{pr:rpoly := p :: rpoly\free{rpoly pp }\bound{pr }}
\indentrel{3}\begin{verbatim}
   (37)
       a
    *
           a
        *
               a b b
            *
                   a
                *
                     a b(a b 3 + b a(- 3))
                   + 
                     b(a(a b(- 9) + b a 12) + b a a(- 3))
               + 
                 b a(a(a b 6 + b a(- 9)) + b a a 3)
           + 
               b
            *
                   a b
                *
                       a
                    *
                         a(a b b(- 3) + b b a 9)
                       + 
                       b(a(a b 18 + b a(- 36)) + b a a 9)
                   + 
                       b
                    *
                         a a(a b(- 12) + b a 18)
                       + 
                         b a a a(- 3)
               + 
                   b a
                *
                       a
                    *
                     (a(a b b 3 + b a b(- 9)) + b a a b 9)
                   + 
                       b
                    *
                           a
                        *
                             a(a b(- 6) + b a 9)
                           + 
                             b a a(- 9)
                       + 
                         b a a a 3
       + 
           b
        *
               a
            *
                   a b
                *
                       a
                    *
                           a
                        *
                             a b b 9
                           + 
                             b(a b(- 18) + b a(- 9))
                       + 
                         b(a b a 36 + b a a(- 9))
                   + 
                     b(a b a a(- 18) + b a a a 9)
               + 
                   b a
                *
                       a
                    *
                         a(a b b(- 12) + b a b 36)
                       + 
                         b a a b(- 36)
                   + 
                       b
                    *
                           a
                        *
                             a(a b 24 + b a(- 36))
                           + 
                             b a a 36
                       + 
                         b a a a(- 12)
           + 
               b a a
            *
                 a(a(a b b 3 + b a b(- 9)) + b a a b 9)
               + 
                   b
                *
                     a(a(a b(- 6) + b a 9) + b a a(- 9))
                   + 
                     b a a a 3
   + 
       b
    *
           a
        *
               a
            *
                   a b
                *
                       a
                    *
                         a(a b b(- 6) + b(a b 12 + b a 6))
                       + 
                         b(a b a(- 24) + b a a 6)
                   + 
                     b(a b a a 12 + b a a a(- 6))
               + 
                   b a
                *
                       a
                    *
                           a
                        *
                             a b b 9
                           + 
                             b(a b(- 18) + b a(- 9))
                       + 
                         b(a b a 36 + b a a(- 9))
                   + 
                     b(a b a a(- 18) + b a a a 9)
           + 
               b a a
            *
                   a
                *
                     a(a b b(- 3) + b b a 9)
                   + 
                     b(a(a b 18 + b a(- 36)) + b a a 9)
               + 
               b(a a(a b(- 12) + b a 18) + b a a a(- 3))
       + 
           b a a a
        *
               a
            *
                 a b(a b 3 + b a(- 3))
               + 
                 b(a(a b(- 9) + b a 12) + b a a(- 3))
           + 
             b a(a(a b 6 + b a(- 9)) + b a a 3)
   Type: XRecursivePolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty37}
\begin{paste}{XPBWPolynomialXmpPageEmpty37}{XPBWPolynomialXmpPagePatch37}
\pastebutton{XPBWPolynomialXmpPageEmpty37}{\showpaste}
\tab{5}\spadcommand{pr:rpoly := p :: rpoly\free{rpoly pp }\bound{pr }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch38}
\begin{paste}{XPBWPolynomialXmpPageFull38}{XPBWPolynomialXmpPageEmpty38}
\pastebutton{XPBWPolynomialXmpPageFull38}{\hidepaste}
\tab{5}\spadcommand{qr:rpoly := q :: rpoly\free{rpoly qq }\bound{qr }}
\indentrel{3}\begin{verbatim}
   (38)
       a
    *
         a(a b b 1 + b(a b(- 2) + b a(- 1)))
       + 
         b(a b a 4 + b a a(- 1))
   + 
     b(a b a a(- 2) + b a a a 1)
   Type: XRecursivePolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty38}
\begin{paste}{XPBWPolynomialXmpPageEmpty38}{XPBWPolynomialXmpPagePatch38}
\pastebutton{XPBWPolynomialXmpPageEmpty38}{\showpaste}
\tab{5}\spadcommand{qr:rpoly := q :: rpoly\free{rpoly qq }\bound{qr }}
\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPagePatch39}
\begin{paste}{XPBWPolynomialXmpPageFull39}{XPBWPolynomialXmpPageEmpty39}
\pastebutton{XPBWPolynomialXmpPageFull39}{\hidepaste}
\tab{5}\spadcommand{pq :: rpoly - pr*qr\free{pr qr rpoly pqpq }}
\indentrel{3}\begin{verbatim}
   (39)  0
   Type: XRecursivePolynomial(Symbol,Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{XPBWPolynomialXmpPageEmpty39}
\begin{paste}{XPBWPolynomialXmpPageEmpty39}{XPBWPolynomialXmpPagePatch39}
\pastebutton{XPBWPolynomialXmpPageEmpty39}{\showpaste}
\tab{5}\spadcommand{pq :: rpoly - pr*qr\free{pr qr rpoly pqpq }}
\end{paste}\end{patch}

