\begin{patch}{SetXmpPagePatch1}
\begin{paste}{SetXmpPageFull1}{SetXmpPageEmpty1}
\pastebutton{SetXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{s := set [x^2-1, y^2-1, z^2-1]\bound{s }}
\indentrel{3}\begin{verbatim}
          2       2       2
   (1)  {x  - 1, y  - 1, z  - 1}
                         Type: Set(Polynomial(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty1}
\begin{paste}{SetXmpPageEmpty1}{SetXmpPagePatch1}
\pastebutton{SetXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{s := set [x^2-1, y^2-1, z^2-1]\bound{s }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch2}
\begin{paste}{SetXmpPageFull2}{SetXmpPageEmpty2}
\pastebutton{SetXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{t := set [x^i - i+1 for i in 2..10 | prime? i]\bound{t }}
\indentrel{3}\begin{verbatim}
          2       3       5       7
   (2)  {x  - 1, x  - 2, x  - 4, x  - 6}
                         Type: Set(Polynomial(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty2}
\begin{paste}{SetXmpPageEmpty2}{SetXmpPagePatch2}
\pastebutton{SetXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{t := set [x^i - i+1 for i in 2..10 | prime? i]\bound{t }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch3}
\begin{paste}{SetXmpPageFull3}{SetXmpPageEmpty3}
\pastebutton{SetXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{i := intersect(s,t)\free{s t }\bound{i }}
\indentrel{3}\begin{verbatim}
          2
   (3)  {x  - 1}
                         Type: Set(Polynomial(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty3}
\begin{paste}{SetXmpPageEmpty3}{SetXmpPagePatch3}
\pastebutton{SetXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{i := intersect(s,t)\free{s t }\bound{i }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch4}
\begin{paste}{SetXmpPageFull4}{SetXmpPageEmpty4}
\pastebutton{SetXmpPageFull4}{\hidepaste}
\tab{5}\spadcommand{u := union(s,t)\free{s t }\bound{u }}
\indentrel{3}\begin{verbatim}
          2       2       2       3       5       7
   (4)  {x  - 1, y  - 1, z  - 1, x  - 2, x  - 4, x  - 6}
                         Type: Set(Polynomial(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty4}
\begin{paste}{SetXmpPageEmpty4}{SetXmpPagePatch4}
\pastebutton{SetXmpPageEmpty4}{\showpaste}
\tab{5}\spadcommand{u := union(s,t)\free{s t }\bound{u }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch5}
\begin{paste}{SetXmpPageFull5}{SetXmpPageEmpty5}
\pastebutton{SetXmpPageFull5}{\hidepaste}
\tab{5}\spadcommand{difference(s,t)\free{s t }}
\indentrel{3}\begin{verbatim}
          2       2
   (5)  {y  - 1, z  - 1}
                         Type: Set(Polynomial(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty5}
\begin{paste}{SetXmpPageEmpty5}{SetXmpPagePatch5}
\pastebutton{SetXmpPageEmpty5}{\showpaste}
\tab{5}\spadcommand{difference(s,t)\free{s t }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch6}
\begin{paste}{SetXmpPageFull6}{SetXmpPageEmpty6}
\pastebutton{SetXmpPageFull6}{\hidepaste}
\tab{5}\spadcommand{symmetricDifference(s,t)\free{s t }}
\indentrel{3}\begin{verbatim}
          2       2       3       5       7
   (6)  {y  - 1, z  - 1, x  - 2, x  - 4, x  - 6}
                         Type: Set(Polynomial(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty6}
\begin{paste}{SetXmpPageEmpty6}{SetXmpPagePatch6}
\pastebutton{SetXmpPageEmpty6}{\showpaste}
\tab{5}\spadcommand{symmetricDifference(s,t)\free{s t }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch7}
\begin{paste}{SetXmpPageFull7}{SetXmpPageEmpty7}
\pastebutton{SetXmpPageFull7}{\hidepaste}
\tab{5}\spadcommand{member?(y, s)\free{s }}
\indentrel{3}\begin{verbatim}
   (7)  false
                                          Type: Boolean
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty7}
\begin{paste}{SetXmpPageEmpty7}{SetXmpPagePatch7}
\pastebutton{SetXmpPageEmpty7}{\showpaste}
\tab{5}\spadcommand{member?(y, s)\free{s }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch8}
\begin{paste}{SetXmpPageFull8}{SetXmpPageEmpty8}
\pastebutton{SetXmpPageFull8}{\hidepaste}
\tab{5}\spadcommand{member?((y+1)*(y-1), s)\free{s }}
\indentrel{3}\begin{verbatim}
   (8)  true
                                          Type: Boolean
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty8}
\begin{paste}{SetXmpPageEmpty8}{SetXmpPagePatch8}
\pastebutton{SetXmpPageEmpty8}{\showpaste}
\tab{5}\spadcommand{member?((y+1)*(y-1), s)\free{s }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch9}
\begin{paste}{SetXmpPageFull9}{SetXmpPageEmpty9}
\pastebutton{SetXmpPageFull9}{\hidepaste}
\tab{5}\spadcommand{subset?(i, s)\free{i s }}
\indentrel{3}\begin{verbatim}
   (9)  true
                                          Type: Boolean
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty9}
\begin{paste}{SetXmpPageEmpty9}{SetXmpPagePatch9}
\pastebutton{SetXmpPageEmpty9}{\showpaste}
\tab{5}\spadcommand{subset?(i, s)\free{i s }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch10}
\begin{paste}{SetXmpPageFull10}{SetXmpPageEmpty10}
\pastebutton{SetXmpPageFull10}{\hidepaste}
\tab{5}\spadcommand{subset?(u, s)\free{u s }}
\indentrel{3}\begin{verbatim}
   (10)  false
                                          Type: Boolean
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty10}
\begin{paste}{SetXmpPageEmpty10}{SetXmpPagePatch10}
\pastebutton{SetXmpPageEmpty10}{\showpaste}
\tab{5}\spadcommand{subset?(u, s)\free{u s }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch11}
\begin{paste}{SetXmpPageFull11}{SetXmpPageEmpty11}
\pastebutton{SetXmpPageFull11}{\hidepaste}
\tab{5}\spadcommand{gs := set [g for i in 1..11 | primitive?(g := i::PF 11)]\bound{gs }}
\indentrel{3}\begin{verbatim}
   (11)  {2, 6, 7, 8}
                              Type: Set(PrimeField(11))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty11}
\begin{paste}{SetXmpPageEmpty11}{SetXmpPagePatch11}
\pastebutton{SetXmpPageEmpty11}{\showpaste}
\tab{5}\spadcommand{gs := set [g for i in 1..11 | primitive?(g := i::PF 11)]\bound{gs }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch12}
\begin{paste}{SetXmpPageFull12}{SetXmpPageEmpty12}
\pastebutton{SetXmpPageFull12}{\hidepaste}
\tab{5}\spadcommand{complement gs\free{gs }}
\indentrel{3}\begin{verbatim}
   (12)  {1, 3, 4, 5, 9, 10, 0}
                              Type: Set(PrimeField(11))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty12}
\begin{paste}{SetXmpPageEmpty12}{SetXmpPagePatch12}
\pastebutton{SetXmpPageEmpty12}{\showpaste}
\tab{5}\spadcommand{complement gs\free{gs }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch13}
\begin{paste}{SetXmpPageFull13}{SetXmpPageEmpty13}
\pastebutton{SetXmpPageFull13}{\hidepaste}
\tab{5}\spadcommand{a := set [i^2 for i in 1..5]\bound{a }}
\indentrel{3}\begin{verbatim}
   (13)  {1, 4, 9, 16, 25}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty13}
\begin{paste}{SetXmpPageEmpty13}{SetXmpPagePatch13}
\pastebutton{SetXmpPageEmpty13}{\showpaste}
\tab{5}\spadcommand{a := set [i^2 for i in 1..5]\bound{a }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch14}
\begin{paste}{SetXmpPageFull14}{SetXmpPageEmpty14}
\pastebutton{SetXmpPageFull14}{\hidepaste}
\tab{5}\spadcommand{insert!(32, a)\free{a }\bound{ainsert }}
\indentrel{3}\begin{verbatim}
   (14)  {1, 4, 9, 16, 25, 32}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty14}
\begin{paste}{SetXmpPageEmpty14}{SetXmpPagePatch14}
\pastebutton{SetXmpPageEmpty14}{\showpaste}
\tab{5}\spadcommand{insert!(32, a)\free{a }\bound{ainsert }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch15}
\begin{paste}{SetXmpPageFull15}{SetXmpPageEmpty15}
\pastebutton{SetXmpPageFull15}{\hidepaste}
\tab{5}\spadcommand{remove!(25, a)\free{a }\bound{aremove }}
\indentrel{3}\begin{verbatim}
   (15)  {1, 4, 9, 16, 32}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty15}
\begin{paste}{SetXmpPageEmpty15}{SetXmpPagePatch15}
\pastebutton{SetXmpPageEmpty15}{\showpaste}
\tab{5}\spadcommand{remove!(25, a)\free{a }\bound{aremove }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch16}
\begin{paste}{SetXmpPageFull16}{SetXmpPageEmpty16}
\pastebutton{SetXmpPageFull16}{\hidepaste}
\tab{5}\spadcommand{a\free{aremove ainsert }}
\indentrel{3}\begin{verbatim}
   (16)  {1, 4, 9, 16, 32}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty16}
\begin{paste}{SetXmpPageEmpty16}{SetXmpPagePatch16}
\pastebutton{SetXmpPageEmpty16}{\showpaste}
\tab{5}\spadcommand{a\free{aremove ainsert }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch17}
\begin{paste}{SetXmpPageFull17}{SetXmpPageEmpty17}
\pastebutton{SetXmpPageFull17}{\hidepaste}
\tab{5}\spadcommand{b := b0 := set [i^2 for i in 1..5]\bound{b }}
\indentrel{3}\begin{verbatim}
   (17)  {1, 4, 9, 16, 25}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty17}
\begin{paste}{SetXmpPageEmpty17}{SetXmpPagePatch17}
\pastebutton{SetXmpPageEmpty17}{\showpaste}
\tab{5}\spadcommand{b := b0 := set [i^2 for i in 1..5]\bound{b }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch18}
\begin{paste}{SetXmpPageFull18}{SetXmpPageEmpty18}
\pastebutton{SetXmpPageFull18}{\hidepaste}
\tab{5}\spadcommand{b := union(b,32)\free{b }\bound{binsert }}
\indentrel{3}\begin{verbatim}
   (18)  {1, 4, 9, 16, 25, 32}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty18}
\begin{paste}{SetXmpPageEmpty18}{SetXmpPagePatch18}
\pastebutton{SetXmpPageEmpty18}{\showpaste}
\tab{5}\spadcommand{b := union(b,32)\free{b }\bound{binsert }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch19}
\begin{paste}{SetXmpPageFull19}{SetXmpPageEmpty19}
\pastebutton{SetXmpPageFull19}{\hidepaste}
\tab{5}\spadcommand{b := difference(b,25)\free{binsert }\bound{bremove }}
\indentrel{3}\begin{verbatim}
   (19)  {1, 4, 9, 16, 32}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty19}
\begin{paste}{SetXmpPageEmpty19}{SetXmpPagePatch19}
\pastebutton{SetXmpPageEmpty19}{\showpaste}
\tab{5}\spadcommand{b := difference(b,25)\free{binsert }\bound{bremove }}
\end{paste}\end{patch}

\begin{patch}{SetXmpPagePatch20}
\begin{paste}{SetXmpPageFull20}{SetXmpPageEmpty20}
\pastebutton{SetXmpPageFull20}{\hidepaste}
\tab{5}\spadcommand{b0\free{bremove }}
\indentrel{3}\begin{verbatim}
   (20)  {1, 4, 9, 16, 25}
                             Type: Set(PositiveInteger)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{SetXmpPageEmpty20}
\begin{paste}{SetXmpPageEmpty20}{SetXmpPagePatch20}
\pastebutton{SetXmpPageEmpty20}{\showpaste}
\tab{5}\spadcommand{b0\free{bremove }}
\end{paste}\end{patch}

