\begin{patch}{QuaternionXmpPagePatch1}
\begin{paste}{QuaternionXmpPageFull1}{QuaternionXmpPageEmpty1}
\pastebutton{QuaternionXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{q := quatern(2/11,-8,3/4,1)\bound{q }}
\indentrel{3}\begin{verbatim}
         2         3
   (1)  -- - 8 i + - j + k
        11         4
                    Type: Quaternion(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty1}
\begin{paste}{QuaternionXmpPageEmpty1}{QuaternionXmpPagePatch1}
\pastebutton{QuaternionXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{q := quatern(2/11,-8,3/4,1)\bound{q }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch2}
\begin{paste}{QuaternionXmpPageFull2}{QuaternionXmpPageEmpty2}
\pastebutton{QuaternionXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{[real q, imagI q, imagJ q, imagK q]\free{q }}
\indentrel{3}\begin{verbatim}
          2       3
   (2)  [--, - 8, -, 1]
         11       4
                          Type: List(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty2}
\begin{paste}{QuaternionXmpPageEmpty2}{QuaternionXmpPagePatch2}
\pastebutton{QuaternionXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{[real q, imagI q, imagJ q, imagK q]\free{q }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch3}
\begin{paste}{QuaternionXmpPageFull3}{QuaternionXmpPageEmpty3}
\pastebutton{QuaternionXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{inv q\free{q }}
\indentrel{3}\begin{verbatim}
          352     15488      484       1936
   (3)  ------ + ------ i - ----- j - ------ k
        126993   126993     42331     126993
                    Type: Quaternion(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty3}
\begin{paste}{QuaternionXmpPageEmpty3}{QuaternionXmpPagePatch3}
\pastebutton{QuaternionXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{inv q\free{q }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch4}
\begin{paste}{QuaternionXmpPageFull4}{QuaternionXmpPageEmpty4}
\pastebutton{QuaternionXmpPageFull4}{\hidepaste}
\tab{5}\spadcommand{q^6\free{q }}
\indentrel{3}\begin{verbatim}
   (4)
       2029490709319345   48251690851     144755072553
     - ---------------- - ----------- i + ------------ j
          7256313856        1288408         41229056
   + 
     48251690851
     ----------- k
       10307264
                    Type: Quaternion(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty4}
\begin{paste}{QuaternionXmpPageEmpty4}{QuaternionXmpPagePatch4}
\pastebutton{QuaternionXmpPageEmpty4}{\showpaste}
\tab{5}\spadcommand{q^6\free{q }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch5}
\begin{paste}{QuaternionXmpPageFull5}{QuaternionXmpPageEmpty5}
\pastebutton{QuaternionXmpPageFull5}{\hidepaste}
\tab{5}\spadcommand{r := quatern(-2,3,23/9,-89); q + r\bound{r }\free{q }}
\indentrel{3}\begin{verbatim}
          20         119
   (5)  - -- - 5 i + --- j - 88 k
          11          36
                    Type: Quaternion(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty5}
\begin{paste}{QuaternionXmpPageEmpty5}{QuaternionXmpPagePatch5}
\pastebutton{QuaternionXmpPageEmpty5}{\showpaste}
\tab{5}\spadcommand{r := quatern(-2,3,23/9,-89); q + r\bound{r }\free{q }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch6}
\begin{paste}{QuaternionXmpPageFull6}{QuaternionXmpPageEmpty6}
\pastebutton{QuaternionXmpPageFull6}{\hidepaste}
\tab{5}\spadcommand{q * r - r * q\free{q r }}
\indentrel{3}\begin{verbatim}
          2495              817
   (6)  - ---- i - 1418 j - --- k
           18                18
                    Type: Quaternion(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty6}
\begin{paste}{QuaternionXmpPageEmpty6}{QuaternionXmpPagePatch6}
\pastebutton{QuaternionXmpPageEmpty6}{\showpaste}
\tab{5}\spadcommand{q * r - r * q\free{q r }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch7}
\begin{paste}{QuaternionXmpPageFull7}{QuaternionXmpPageEmpty7}
\pastebutton{QuaternionXmpPageFull7}{\hidepaste}
\tab{5}\spadcommand{i:=quatern(0,1,0,0); j:=quatern(0,0,1,0); k:=quatern(0,0,0,1)\bound{i j k }}
\indentrel{3}\begin{verbatim}
   (7)  k
                              Type: Quaternion(Integer)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty7}
\begin{paste}{QuaternionXmpPageEmpty7}{QuaternionXmpPagePatch7}
\pastebutton{QuaternionXmpPageEmpty7}{\showpaste}
\tab{5}\spadcommand{i:=quatern(0,1,0,0); j:=quatern(0,0,1,0); k:=quatern(0,0,0,1)\bound{i j k }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch8}
\begin{paste}{QuaternionXmpPageFull8}{QuaternionXmpPageEmpty8}
\pastebutton{QuaternionXmpPageFull8}{\hidepaste}
\tab{5}\spadcommand{[i*i, j*j, k*k, i*j, j*k, k*i, q*i]\free{i j k q }}
\indentrel{3}\begin{verbatim}
                                      2         3
   (8)  [- 1, - 1, - 1, k, i, j, 8 + -- i + j - - k]
                                     11         4
              Type: List(Quaternion(Fraction(Integer)))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty8}
\begin{paste}{QuaternionXmpPageEmpty8}{QuaternionXmpPagePatch8}
\pastebutton{QuaternionXmpPageEmpty8}{\showpaste}
\tab{5}\spadcommand{[i*i, j*j, k*k, i*j, j*k, k*i, q*i]\free{i j k q }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch9}
\begin{paste}{QuaternionXmpPageFull9}{QuaternionXmpPageEmpty9}
\pastebutton{QuaternionXmpPageFull9}{\hidepaste}
\tab{5}\spadcommand{norm q\free{q }}
\indentrel{3}\begin{verbatim}
        126993
   (9)  ------
         1936
                                Type: Fraction(Integer)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty9}
\begin{paste}{QuaternionXmpPageEmpty9}{QuaternionXmpPagePatch9}
\pastebutton{QuaternionXmpPageEmpty9}{\showpaste}
\tab{5}\spadcommand{norm q\free{q }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch10}
\begin{paste}{QuaternionXmpPageFull10}{QuaternionXmpPageEmpty10}
\pastebutton{QuaternionXmpPageFull10}{\hidepaste}
\tab{5}\spadcommand{conjugate q\free{q }\bound{prev }}
\indentrel{3}\begin{verbatim}
          2         3
   (10)  -- + 8 i - - j - k
         11         4
                    Type: Quaternion(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty10}
\begin{paste}{QuaternionXmpPageEmpty10}{QuaternionXmpPagePatch10}
\pastebutton{QuaternionXmpPageEmpty10}{\showpaste}
\tab{5}\spadcommand{conjugate q\free{q }\bound{prev }}
\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPagePatch11}
\begin{paste}{QuaternionXmpPageFull11}{QuaternionXmpPageEmpty11}
\pastebutton{QuaternionXmpPageFull11}{\hidepaste}
\tab{5}\spadcommand{q * \%\free{q prev }}
\indentrel{3}\begin{verbatim}
         126993
   (11)  ------
          1936
                    Type: Quaternion(Fraction(Integer))
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{QuaternionXmpPageEmpty11}
\begin{paste}{QuaternionXmpPageEmpty11}{QuaternionXmpPagePatch11}
\pastebutton{QuaternionXmpPageEmpty11}{\showpaste}
\tab{5}\spadcommand{q * \%\free{q prev }}
\end{paste}\end{patch}

