\begin{patch}{ExSumGeneralFunctionPatch1}
\begin{paste}{ExSumGeneralFunctionFull1}{ExSumGeneralFunctionEmpty1}
\pastebutton{ExSumGeneralFunctionFull1}{\hidepaste}
\tab{5}\spadcommand{sum(k * x**k,k = 1..n)}
\indentrel{3}\begin{verbatim}
            2               n
        (n x  + (- n - 1)x)x  + x
   (1)  �������������������������
                2
               x  - 2x + 1
                               Type: Expression Integer
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumGeneralFunctionEmpty1}
\begin{paste}{ExSumGeneralFunctionEmpty1}{ExSumGeneralFunctionPatch1}
\pastebutton{ExSumGeneralFunctionEmpty1}{\showpaste}
\tab{5}\spadcommand{sum(k * x**k,k = 1..n)}
\end{paste}\end{patch}

\begin{patch}{ExSumInfinitePatch1}
\begin{paste}{ExSumInfiniteFull1}{ExSumInfiniteEmpty1}
\pastebutton{ExSumInfiniteFull1}{\hidepaste}
\tab{5}\spadcommand{limit( sum(1/(k * (k + 2)),k = 1..n) ,n = \%plusInfinity)}
\indentrel{3}\begin{verbatim}
        3
   (1)  �
        4
Type: Union(OrderedCompletion Fraction Polynomial Integer,...)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumInfiniteEmpty1}
\begin{paste}{ExSumInfiniteEmpty1}{ExSumInfinitePatch1}
\pastebutton{ExSumInfiniteEmpty1}{\showpaste}
\tab{5}\spadcommand{limit( sum(1/(k * (k + 2)),k = 1..n) ,n = \%plusInfinity)}
\end{paste}\end{patch}

\begin{patch}{ExSumClosedFormPatch1}
\begin{paste}{ExSumClosedFormFull1}{ExSumClosedFormEmpty1}
\pastebutton{ExSumClosedFormFull1}{\hidepaste}
\tab{5}\spadcommand{s := sum(k**2,k = a..b)\bound{s }}
\indentrel{3}\begin{verbatim}
          3     2         3     2
        2b  + 3b  + b - 2a  + 3a  - a
   (1)  �����������������������������
                      6
                      Type: Fraction Polynomial Integer
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumClosedFormEmpty1}
\begin{paste}{ExSumClosedFormEmpty1}{ExSumClosedFormPatch1}
\pastebutton{ExSumClosedFormEmpty1}{\showpaste}
\tab{5}\spadcommand{s := sum(k**2,k = a..b)\bound{s }}
\end{paste}\end{patch}

\begin{patch}{ExSumClosedFormPatch2}
\begin{paste}{ExSumClosedFormFull2}{ExSumClosedFormEmpty2}
\pastebutton{ExSumClosedFormFull2}{\hidepaste}
\tab{5}\spadcommand{eval(s,[a,b],[1,25])\free{s }}
\indentrel{3}\begin{verbatim}
   (2)  5525
                      Type: Fraction Polynomial Integer
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumClosedFormEmpty2}
\begin{paste}{ExSumClosedFormEmpty2}{ExSumClosedFormPatch2}
\pastebutton{ExSumClosedFormEmpty2}{\showpaste}
\tab{5}\spadcommand{eval(s,[a,b],[1,25])\free{s }}
\end{paste}\end{patch}

\begin{patch}{ExSumClosedFormPatch3}
\begin{paste}{ExSumClosedFormFull3}{ExSumClosedFormEmpty3}
\pastebutton{ExSumClosedFormFull3}{\hidepaste}
\tab{5}\spadcommand{reduce(+,[i**2 for i in 1..25])}
\indentrel{3}\begin{verbatim}
   (3)  5525
                                  Type: PositiveInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumClosedFormEmpty3}
\begin{paste}{ExSumClosedFormEmpty3}{ExSumClosedFormPatch3}
\pastebutton{ExSumClosedFormEmpty3}{\showpaste}
\tab{5}\spadcommand{reduce(+,[i**2 for i in 1..25])}
\end{paste}\end{patch}

\begin{patch}{ExSumPolynomialPatch1}
\begin{paste}{ExSumPolynomialFull1}{ExSumPolynomialEmpty1}
\pastebutton{ExSumPolynomialFull1}{\hidepaste}
\tab{5}\spadcommand{sum(3*k**2/(c**2 + 1) + 12*k/d,k = (3*a)..(4*b))}
\indentrel{3}\begin{verbatim}
   (1)
            3      2           3      2
       (128b  + 48b  + 4b - 54a  + 27a  - 3a)d
     + 
            2             2        2       2             2
       (192b  + 48b - 108a  + 36a)c  + 192b  + 48b - 108a
     + 
       36a
  /
        2
     (2c  + 2)d
           Type: Union(Fraction Polynomial Integer,...)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumPolynomialEmpty1}
\begin{paste}{ExSumPolynomialEmpty1}{ExSumPolynomialPatch1}
\pastebutton{ExSumPolynomialEmpty1}{\showpaste}
\tab{5}\spadcommand{sum(3*k**2/(c**2 + 1) + 12*k/d,k = (3*a)..(4*b))}
\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIPatch1}
\begin{paste}{ExSumListEntriesIFull1}{ExSumListEntriesIEmpty1}
\pastebutton{ExSumListEntriesIFull1}{\hidepaste}
\tab{5}\spadcommand{[i for i in 1..15]}
\indentrel{3}\begin{verbatim}
   (1)  [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
                             Type: List PositiveInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIEmpty1}
\begin{paste}{ExSumListEntriesIEmpty1}{ExSumListEntriesIPatch1}
\pastebutton{ExSumListEntriesIEmpty1}{\showpaste}
\tab{5}\spadcommand{[i for i in 1..15]}
\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIPatch2}
\begin{paste}{ExSumListEntriesIFull2}{ExSumListEntriesIEmpty2}
\pastebutton{ExSumListEntriesIFull2}{\hidepaste}
\tab{5}\spadcommand{reduce(+,[i for i in 1..15])}
\indentrel{3}\begin{verbatim}
   (2)  120
                                  Type: PositiveInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIEmpty2}
\begin{paste}{ExSumListEntriesIEmpty2}{ExSumListEntriesIPatch2}
\pastebutton{ExSumListEntriesIEmpty2}{\showpaste}
\tab{5}\spadcommand{reduce(+,[i for i in 1..15])}
\end{paste}\end{patch}

\begin{patch}{ExSumApproximateEPatch1}
\begin{paste}{ExSumApproximateEFull1}{ExSumApproximateEEmpty1}
\pastebutton{ExSumApproximateEFull1}{\hidepaste}
\tab{5}\spadcommand{reduce(+,[1.0/factorial(n) for n in 0..20])}
\indentrel{3}\begin{verbatim}
   (1)  2.7182818284 590452354
                                            Type: Float
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumApproximateEEmpty1}
\begin{paste}{ExSumApproximateEEmpty1}{ExSumApproximateEPatch1}
\pastebutton{ExSumApproximateEEmpty1}{\showpaste}
\tab{5}\spadcommand{reduce(+,[1.0/factorial(n) for n in 0..20])}
\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIIPatch1}
\begin{paste}{ExSumListEntriesIIFull1}{ExSumListEntriesIIEmpty1}
\pastebutton{ExSumListEntriesIIFull1}{\hidepaste}
\tab{5}\spadcommand{[n**2 for n in 5..20]}
\indentrel{3}\begin{verbatim}
   (1)
   [25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225,
    256, 289, 324, 361, 400]
                             Type: List PositiveInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIIEmpty1}
\begin{paste}{ExSumListEntriesIIEmpty1}{ExSumListEntriesIIPatch1}
\pastebutton{ExSumListEntriesIIEmpty1}{\showpaste}
\tab{5}\spadcommand{[n**2 for n in 5..20]}
\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIIPatch2}
\begin{paste}{ExSumListEntriesIIFull2}{ExSumListEntriesIIEmpty2}
\pastebutton{ExSumListEntriesIIFull2}{\hidepaste}
\tab{5}\spadcommand{reduce(+,[n**2 for n in 5..20])}
\indentrel{3}\begin{verbatim}
   (2)  2840
                                  Type: PositiveInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumListEntriesIIEmpty2}
\begin{paste}{ExSumListEntriesIIEmpty2}{ExSumListEntriesIIPatch2}
\pastebutton{ExSumListEntriesIIEmpty2}{\showpaste}
\tab{5}\spadcommand{reduce(+,[n**2 for n in 5..20])}
\end{paste}\end{patch}

\begin{patch}{ExSumCubesPatch1}
\begin{paste}{ExSumCubesFull1}{ExSumCubesEmpty1}
\pastebutton{ExSumCubesFull1}{\hidepaste}
\tab{5}\spadcommand{sum(k**3,k = 1..n)}
\indentrel{3}\begin{verbatim}
         4     3    2
        n  + 2n  + n
   (1)  �������������
              4
                      Type: Fraction Polynomial Integer
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumCubesEmpty1}
\begin{paste}{ExSumCubesEmpty1}{ExSumCubesPatch1}
\pastebutton{ExSumCubesEmpty1}{\showpaste}
\tab{5}\spadcommand{sum(k**3,k = 1..n)}
\end{paste}\end{patch}

\begin{patch}{ExSumCubesPatch2}
\begin{paste}{ExSumCubesFull2}{ExSumCubesEmpty2}
\pastebutton{ExSumCubesFull2}{\hidepaste}
\tab{5}\spadcommand{sum(k,k = 1..n) ** 2}
\indentrel{3}\begin{verbatim}
         4     3    2
        n  + 2n  + n
   (2)  �������������
              4
                      Type: Fraction Polynomial Integer
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{ExSumCubesEmpty2}
\begin{paste}{ExSumCubesEmpty2}{ExSumCubesPatch2}
\pastebutton{ExSumCubesEmpty2}{\showpaste}
\tab{5}\spadcommand{sum(k,k = 1..n) ** 2}
\end{paste}\end{patch}