\documentstyle[makeidx]{article}
\makeindex
%\setlength{\oddsidemargin}{.5in}
%\setlength{\evensidemargin}{.5in}
%\setlength{\textwidth}{5.8in}
\begin{document}
%\setlength{\parindent}{0pt}
%\newcounter{bean}
%\begin{list}{\arabic{bean}.}{\usecounter{bean}\setlength{\leftmargin}{0pt}\setlength{\rightmargin}{0pt}\setlength{\listparindent}{20pt}\setlength{\parsep}{5pt}}
%\item[]


\noindent{\sc Event}:   Start with the initial {\bf nqthm} theory.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{delete} \\  
\=\+{\rm{delete}}\,({\it{x\/}}, {\it{l\/}})\index{delete} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{x\/}} $=$ {\rm{car}}\,({\it{l\/}})$\;\;${\bf then }{\rm{cdr}}\,({\it{l\/}}) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{l\/}}), {\rm{delete}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{l\/}}))\index{delete})$\;${\bf  endif}\- \\ 
{\bf else }{\it{l\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bagdiff} \\  
\=\+{\rm{bagdiff}}\,({\it{x\/}}, {\it{y\/}})\index{bagdiff} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{y\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{car}}\,({\it{y\/}}) $\in$ {\it{x\/}}$\;\;${\bf then }{\rm{bagdiff}}\,({\rm{delete}}\,({\rm{car}}\,({\it{y\/}}), {\it{x\/}})\index{delete}, {\rm{cdr}}\,({\it{y\/}}))\index{bagdiff} \\ 
{\bf else }{\rm{bagdiff}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{y\/}}))\index{bagdiff}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bagint} \\  
\=\+{\rm{bagint}}\,({\it{x\/}}, {\it{y\/}})\index{bagint} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{car}}\,({\it{x\/}}) $\in$ {\it{y\/}} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{x\/}}), {\rm{bagint}}\,({\rm{cdr}}\,({\it{x\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{x\/}}), {\it{y\/}})\index{delete})\index{bagint}) \\ 
{\bf else }{\rm{bagint}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{bagint}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{occurrences} \\  
\=\+{\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{x\/}} $=$ {\rm{car}}\,({\it{l\/}})$\;\;${\bf then }$1\;+$ {\rm{occurrences}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{l\/}}))\index{occurrences} \\ 
{\bf else }{\rm{occurrences}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{l\/}}))\index{occurrences}$\;${\bf  endif}\- \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{permutation} \\  
\=\+{\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{a\/}}) \\ 
{\bf then }({\rm{car}}\,({\it{a\/}}) $\in$ {\it{b\/}}) $\wedge$ {\rm{permutation}}\,({\rm{cdr}}\,({\it{a\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{b\/}})\index{delete})\index{permutation} \\ 
{\bf else }$\neg$ {\rm{listp}}\,({\it{b\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{setp} \\  
\=\+{\rm{setp}}\,({\it{l\/}})\index{setp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}})$\;\;${\bf then }({\rm{car}}\,({\it{l\/}}) $\not\in$ {\rm{cdr}}\,({\it{l\/}})) $\wedge$ {\rm{setp}}\,({\rm{cdr}}\,({\it{l\/}}))\index{setp} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{subbagp} \\  
\=\+{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{car}}\,({\it{x\/}}) $\in$ {\it{y\/}}$\;\;${\bf then }{\rm{subbagp}}\,({\rm{cdr}}\,({\it{x\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{x\/}}), {\it{y\/}})\index{delete})\index{subbagp} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-delete \\ \index{listp-delete}
\=\+{\rm{listp}}\,({\rm{delete}}\,({\it{x\/}}, {\it{l\/}})\index{delete}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}})$\;\;${\bf then }({\it{x\/}} $\not=$ {\rm{car}}\,({\it{l\/}})) $\vee$ {\rm{listp}}\,({\rm{cdr}}\,({\it{l\/}})) \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  delete-non-member \\ \index{delete-non-member}
({\it{x\/}} $\not\in$ {\it{y\/}}) $\rightarrow$ ({\rm{delete}}\,({\it{x\/}}, {\it{y\/}})\index{delete} $=$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  delete-delete \\ \index{delete-delete}
{\rm{delete}}\,({\it{y\/}}, {\rm{delete}}\,({\it{x\/}}, {\it{z\/}})\index{delete})\index{delete} $=$ {\rm{delete}}\,({\it{x\/}}, {\rm{delete}}\,({\it{y\/}}, {\it{z\/}})\index{delete})\index{delete}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-occurrences-zero \\ \index{equal-occurrences-zero}
({\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences} $=$ {\tt{0}}) $=$ ({\it{x\/}} $\not\in$ {\it{l\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-in-a-set \\ \index{occurrences-in-a-set}
\=\+{\rm{setp}}\,({\it{l\/}})\index{setp} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in$ {\it{l\/}}$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-cons \\ \index{occurrences-cons}
\=\+{\rm{occurrences}}\,({\it{x\/}}, {\rm{cons}}\,({\it{y\/}}, {\it{l\/}}))\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $=$ {\it{y\/}}$\;\;${\bf then }$1\;+$ {\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences} \\ 
{\bf else }{\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-delete \\ \index{occurrences-delete}
\=\+{\rm{occurrences}}\,({\it{x\/}}, {\rm{delete}}\,({\it{y\/}}, {\it{l\/}})\index{delete})\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $=$ {\it{y\/}} \\ 
{\bf then }\=\+{\bf if }{\it{x\/}} $\in$ {\it{l\/}}$\;\;${\bf then }{\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences} $-\;1$ \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-bagdiff \\ \index{occurrences-bagdiff}
{\rm{occurrences}}\,({\it{x\/}}, {\rm{bagdiff}}\,({\it{a\/}}, {\it{b\/}})\index{bagdiff})\index{occurrences} $=$ ({\rm{occurrences}}\,({\it{x\/}}, {\it{a\/}})\index{occurrences} $-$ {\rm{occurrences}}\,({\it{x\/}}, {\it{b\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-bagint \\ \index{occurrences-bagint}
\=\+{\rm{occurrences}}\,({\it{x\/}}, {\rm{bagint}}\,({\it{a\/}}, {\it{b\/}})\index{bagint})\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{occurrences}}\,({\it{x\/}}, {\it{a\/}})\index{occurrences} $<$ {\rm{occurrences}}\,({\it{x\/}}, {\it{b\/}})\index{occurrences}$\;\;${\bf then }{\rm{occurrences}}\,({\it{x\/}}, {\it{a\/}})\index{occurrences} \\ 
{\bf else }{\rm{occurrences}}\,({\it{x\/}}, {\it{b\/}})\index{occurrences}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-non-list \\ \index{member-non-list}
($\neg$ {\rm{listp}}\,({\it{l\/}})) $\rightarrow$ ({\it{x\/}} $\not\in$ {\it{l\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-cons \\ \index{member-cons}
({\it{x\/}} $\in$ {\rm{cons}}\,({\it{y\/}}, {\it{l\/}})) $=$ (({\it{x\/}} $=$ {\it{y\/}}) $\vee$ ({\it{x\/}} $\in$ {\it{l\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-delete-implies-membership \\ \index{member-delete-implies-membership}
({\it{x\/}} $\in$ {\rm{delete}}\,({\it{y\/}}, {\it{l\/}})\index{delete}) $\rightarrow$ ({\it{x\/}} $\in$ {\it{l\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-delete \\ \index{member-delete}
\=\+({\it{x\/}} $\in$ {\rm{delete}}\,({\it{y\/}}, {\it{l\/}})\index{delete}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in$ {\it{l\/}} \\ 
{\bf then }\=\+{\bf if }{\it{x\/}} $=$ {\it{y\/}}$\;\;${\bf then }{\tt{1}} $<$ {\rm{occurrences}}\,({\it{x\/}}, {\it{l\/}})\index{occurrences} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-implies-membership-equivalence \\ \index{permutation-implies-membership-eq!uivalence}
{\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} $\rightarrow$ (({\it{x\/}} $\in$ {\it{a\/}}) $=$ ({\it{x\/}} $\in$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-bagdiff \\ \index{member-bagdiff}
({\it{x\/}} $\in$ {\rm{bagdiff}}\,({\it{a\/}}, {\it{b\/}})\index{bagdiff}) $=$ ({\rm{occurrences}}\,({\it{x\/}}, {\it{b\/}})\index{occurrences} $<$ {\rm{occurrences}}\,({\it{x\/}}, {\it{a\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-bagint \\ \index{member-bagint}
({\it{x\/}} $\in$ {\rm{bagint}}\,({\it{a\/}}, {\it{b\/}})\index{bagint}) $=$ (({\it{x\/}} $\in$ {\it{a\/}}) $\wedge$ ({\it{x\/}} $\in$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-permutation \\ \index{not-permutation}
({\rm{listp}}\,({\it{b\/}}) $\wedge$ ({\rm{car}}\,({\it{b\/}}) $\not\in$ {\it{a\/}})) $\rightarrow$ ($\neg$ {\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-right-cons1 \\ \index{permutation-right-cons1}
\=\+({\rm{listp}}\,({\it{b\/}}) $\wedge$ ({\rm{car}}\,({\it{b\/}}) $\in$ {\it{a\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} $=$ {\rm{permutation}}\,({\rm{delete}}\,({\rm{car}}\,({\it{b\/}}), {\it{a\/}})\index{delete}, {\rm{cdr}}\,({\it{b\/}}))\index{permutation})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-right-cons \\ \index{permutation-right-cons}
\=\+{\rm{permutation}}\,({\it{a\/}}, {\rm{cons}}\,({\it{x\/}}, {\it{b\/}}))\index{permutation} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in$ {\it{a\/}}$\;\;${\bf then }{\rm{permutation}}\,({\rm{delete}}\,({\it{x\/}}, {\it{a\/}})\index{delete}, {\it{b\/}})\index{permutation} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-permutation \\ \index{commutativity-of-permutation}
{\rm{permutation}}\,({\it{b\/}}, {\it{a\/}})\index{permutation} $=$ {\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-reflexivity \\ \index{permutation-reflexivity}
{\rm{permutation}}\,({\it{l\/}}, {\it{l\/}})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-delete-delete \\ \index{permutation-delete-delete}
\=\+({\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} $\wedge$ ({\it{x\/}} $\in$ {\it{a\/}}) $\wedge$ ({\it{x\/}} $\in$ {\it{b\/}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{permutation}}\,({\rm{delete}}\,({\it{x\/}}, {\it{a\/}})\index{delete}, {\rm{delete}}\,({\it{x\/}}, {\it{b\/}})\index{delete})\index{permutation}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{transitivity-of-permutation-ind!uction} \\  
\=\+{\rm{transitivity-of-permutation-induction}}\,({\it{a\/}}, {\it{b\/}}, {\it{c\/}})\index{transitivity-of-permutation-ind!uction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{a\/}}) \\ 
{\bf then }{\rm{transitivity-of-permutation-induction}}\,(\=\+{\rm{cdr}}\,({\it{a\/}}), \\ 
{\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{b\/}})\index{delete}, \\ 
{\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{c\/}})\index{delete})\-\index{transitivity-of-permutation-ind!uction} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  transitivity-of-permutation-base-case \\ \index{transitivity-of-permutation-base!-case}
(({\it{a\/}} $\simeq\;${{\bf{nil}}}${}$) $\wedge$ {\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} $\wedge$ {\rm{permutation}}\,({\it{b\/}}, {\it{c\/}})\index{permutation}) $\rightarrow$ {\rm{permutation}}\,({\it{a\/}}, {\it{c\/}})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  transitivity-of-permutation-induction-step \\ \index{transitivity-of-permutation-ind!uction-step}
\=\+(\=\+{\rm{listp}}\,({\it{a\/}}) \\ 
$\wedge$$\;\;\;\;$(\=\+(\=\+{\rm{permutation}}\,({\rm{cdr}}\,({\it{a\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{b\/}})\index{delete})\index{permutation} \\ 
$\wedge$$\;\;\;\;${\rm{permutation}}\,({\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{b\/}})\index{delete}, {\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{c\/}})\index{delete})\index{permutation})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{permutation}}\,({\rm{cdr}}\,({\it{a\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{c\/}})\index{delete})\index{permutation})\- \\ 
$\wedge$$\;\;\;\;${\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} \\ 
$\wedge$$\;\;\;\;${\rm{permutation}}\,({\it{b\/}}, {\it{c\/}})\index{permutation})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{permutation}}\,({\it{a\/}}, {\it{c\/}})\index{permutation}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  transitivity-of-permutation \\ \index{transitivity-of-permutation}
({\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} $\wedge$ {\rm{permutation}}\,({\it{b\/}}, {\it{c\/}})\index{permutation}) $\rightarrow$ {\rm{permutation}}\,({\it{a\/}}, {\it{c\/}})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  setp-delete \\ \index{setp-delete}
{\rm{setp}}\,({\it{a\/}})\index{setp} $\rightarrow$ {\rm{setp}}\,({\rm{delete}}\,({\it{x\/}}, {\it{a\/}})\index{delete})\index{setp}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{setp-permutation-induction} \\  
\=\+{\rm{setp-permutation-induction}}\,({\it{a\/}}, {\it{b\/}})\index{setp-permutation-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{a\/}})$\;\;${\bf then }{\rm{setp-permutation-induction}}\,({\rm{cdr}}\,({\it{a\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{b\/}})\index{delete})\index{setp-permutation-induction} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  setp-permutation-base-case \\ \index{setp-permutation-base-case}
($\neg$ {\rm{listp}}\,({\it{a\/}})) $\rightarrow$ {\rm{setp}}\,({\it{a\/}})\index{setp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  setp-permutation-induction-step \\ \index{setp-permutation-induction-step}
\=\+(\=\+{\rm{listp}}\,({\it{a\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{setp}}\,({\it{b\/}})\index{setp} \\ 
$\wedge$$\;\;\;\;${\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation} \\ 
$\wedge$$\;\;\;\;$(\=\+({\rm{setp}}\,({\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{b\/}})\index{delete})\index{setp} $\wedge$ {\rm{permutation}}\,({\rm{cdr}}\,({\it{a\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{a\/}}), {\it{b\/}})\index{delete})\index{permutation}) \\ 
$\rightarrow$$\;\;\;\;${\rm{setp}}\,({\rm{cdr}}\,({\it{a\/}}))\index{setp})\-)\- \\ 
$\rightarrow$$\;\;\;\;${\rm{setp}}\,({\it{a\/}})\index{setp}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  setp-permutation \\ \index{setp-permutation}
({\rm{setp}}\,({\it{b\/}})\index{setp} $\wedge$ {\rm{permutation}}\,({\it{a\/}}, {\it{b\/}})\index{permutation}) $\rightarrow$ {\rm{setp}}\,({\it{a\/}})\index{setp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-delete \\ \index{subbagp-delete}
{\rm{subbagp}}\,({\it{x\/}}, {\rm{delete}}\,({\it{u\/}}, {\it{y\/}})\index{delete})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-cdr1 \\ \index{subbagp-cdr1}
{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-cdr2 \\ \index{subbagp-cdr2}
{\rm{subbagp}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{y\/}}))\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-bagint1 \\ \index{subbagp-bagint1}
{\rm{subbagp}}\,({\rm{bagint}}\,({\it{x\/}}, {\it{y\/}})\index{bagint}, {\it{x\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-bagint2 \\ \index{subbagp-bagint2}
{\rm{subbagp}}\,({\rm{bagint}}\,({\it{x\/}}, {\it{y\/}})\index{bagint}, {\it{y\/}})\index{subbagp}
\end{tabbing}


\noindent{\sc Event}:   Let us define the theory {\it{sets-and-bags}} to consist of the following events: subbagp-bagint2,
subbagp-bagint1,
subbagp-cdr2,
subbagp-cdr1,
subbagp-delete,
setp-delete,
permutation-delete-delete,
permutation-reflexivity,
commutativity-of-permutation,
permutation-right-cons,
permutation-right-cons1,
not-permutation,
member-bagint,
member-bagdiff,
member-delete,
member-delete-implies-membership,
member-cons,
member-non-list,
occurrences-bagint,
occurrences-bagdiff,
occurrences-delete,
occurrences-cons,
occurrences-in-a-set,
equal-occurrences-zero,
delete-delete,
delete-non-member,
listp-delete.\index{sets-and-bags}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  open-plus \\ \index{open-plus}
(($1\;+$ {\it{a\/}}) $+$ {\it{b\/}}) $=$ ($1\;+$ ({\it{a\/}} $+$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-stopper \\ \index{plus-stopper}
({\it{a\/}} $\simeq {\tt{0}}$) $\rightarrow$ (({\it{a\/}} $+$ {\it{b\/}}) $=$ {\rm{fix}}\,({\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-right-id2 \\ \index{plus-right-id2}
({\it{y\/}} $\simeq {\tt{0}}$) $\rightarrow$ (({\it{x\/}} $+$ {\it{y\/}}) $=$ {\rm{fix}}\,({\it{x\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-add1 \\ \index{plus-add1}
\=\+({\it{x\/}} $+$ ($1\;+$ {\it{y\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }$1\;+$ ({\it{x\/}} $+$ {\it{y\/}}) \\ 
{\bf else }$1\;+$ {\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-plus \\ \index{commutativity2-of-plus}
({\it{x\/}} $+$ {\it{y\/}} $+$ {\it{z\/}}) $=$ ({\it{y\/}} $+$ {\it{x\/}} $+$ {\it{z\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-plus \\ \index{commutativity-of-plus}
({\it{x\/}} $+$ {\it{y\/}}) $=$ ({\it{y\/}} $+$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-plus \\ \index{associativity-of-plus}
(({\it{x\/}} $+$ {\it{y\/}}) $+$ {\it{z\/}}) $=$ ({\it{x\/}} $+$ {\it{y\/}} $+$ {\it{z\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-plus-0 \\ \index{equal-plus-0}
(({\it{a\/}} $+$ {\it{b\/}}) $=$ {\tt{0}}) $=$ (({\it{a\/}} $\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $\simeq {\tt{0}}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-plus-1 \\ \index{equal-plus-1}
\=\+(({\it{a\/}} $+$ {\it{b\/}}) $=$ {\tt{1}}) \\ 
$=$$\;\;\;\;$((({\it{a\/}} $\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $=$ {\tt{1}})) $\vee$ (({\it{a\/}} $=$ {\tt{1}}) $\wedge$ ({\it{b\/}} $\simeq {\tt{0}}$)))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-cancellation \\ \index{plus-cancellation}
(({\it{a\/}} $+$ {\it{b\/}}) $=$ ({\it{a\/}} $+$ {\it{c\/}})) $=$ ({\rm{fix}}\,({\it{b\/}}) $=$ {\rm{fix}}\,({\it{c\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-difference-arg1-casesplit \\ \index{plus-difference-arg1-casesplit}
\=\+(({\it{a\/}} $-$ {\it{b\/}}) $+$ {\it{c\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }({\it{a\/}} $+$ {\it{c\/}}) $-$ {\it{b\/}} \\ 
{\bf else }{\rm{fix}}\,({\it{c\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-difference-arg1 \\ \index{plus-difference-arg1}
({\it{b\/}} $<$ {\it{a\/}}) $\rightarrow$ ((({\it{a\/}} $-$ {\it{b\/}}) $+$ {\it{c\/}}) $=$ (({\it{a\/}} $+$ {\it{c\/}}) $-$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-difference-arg2-casesplit \\ \index{plus-difference-arg2-casesplit}
\=\+({\it{a\/}} $+$ ({\it{b\/}} $-$ {\it{c\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{c\/}} $<$ {\it{b\/}}$\;\;${\bf then }({\it{a\/}} $+$ {\it{b\/}}) $-$ {\it{c\/}} \\ 
{\bf else }{\rm{fix}}\,({\it{a\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-difference-arg2 \\ \index{plus-difference-arg2}
({\it{c\/}} $<$ {\it{b\/}}) $\rightarrow$ (({\it{a\/}} $+$ ({\it{b\/}} $-$ {\it{c\/}})) $=$ (({\it{a\/}} $+$ {\it{b\/}}) $-$ {\it{c\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-difference-difference-casesplit \\ \index{plus-difference-difference-case!split}
\=\+(({\it{a\/}} $-$ {\it{b\/}}) $+$ ({\it{c\/}} $-$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\bf if }{\it{a\/}} $<$ {\it{b\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf then }\=\+{\bf if }\=\+{\bf if }{\it{c\/}} $<$ {\it{d\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-$\;\;${\bf then }({\it{a\/}} $+$ {\it{c\/}}) $-$ ({\it{b\/}} $+$ {\it{d\/}}) \\ 
{\bf else }{\it{a\/}} $-$ {\it{b\/}}$\;${\bf  endif}\- \\ 
{\bf elseif }\=\+{\bf if }{\it{c\/}} $<$ {\it{d\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-$\;\;${\bf then }{\it{c\/}} $-$ {\it{d\/}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-difference-difference \\ \index{plus-difference-difference}
\=\+(({\it{b\/}} $<$ {\it{a\/}}) $\wedge$ ({\it{d\/}} $<$ {\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $-$ {\it{b\/}}) $+$ ({\it{c\/}} $-$ {\it{d\/}})) $=$ (({\it{a\/}} $+$ {\it{c\/}}) $-$ ({\it{b\/}} $+$ {\it{d\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-elim \\ \index{difference-elim}
(({\it{y\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{y\/}} $\not<$ {\it{x\/}})) $\rightarrow$ (({\it{x\/}} $+$ ({\it{y\/}} $-$ {\it{x\/}})) $=$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-leq-arg1 \\ \index{difference-leq-arg1}
\=\+\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{a\/}} $-$ {\it{b\/}}) $=$ {\tt{0}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-x-x \\ \index{difference-x-x}
({\it{x\/}} $-$ {\it{x\/}}) $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-difference-0 \\ \index{equal-difference-0}
(({\tt{0}} $=$ ({\it{x\/}} $-$ {\it{y\/}})) $=$ ({\it{y\/}} $\not<$ {\it{x\/}})) $\wedge$ ((({\it{x\/}} $-$ {\it{y\/}}) $=$ {\tt{0}}) $=$ ({\it{y\/}} $\not<$ {\it{x\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-plus \\ \index{difference-plus}
((({\it{x\/}} $+$ {\it{y\/}}) $-$ {\it{x\/}}) $=$ {\rm{fix}}\,({\it{y\/}})) $\wedge$ ((({\it{y\/}} $+$ {\it{x\/}}) $-$ {\it{x\/}}) $=$ {\rm{fix}}\,({\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-plus-cancellation1 \\ \index{difference-plus-cancellation1}
(({\it{x\/}} $+$ {\it{y\/}}) $-$ ({\it{x\/}} $+$ {\it{z\/}})) $=$ ({\it{y\/}} $-$ {\it{z\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-plus-cancellation2 \\ \index{difference-plus-cancellation2}
(({\it{a\/}} $+$ {\it{c\/}}) $-$ ({\it{b\/}} $+$ {\it{c\/}})) $=$ ({\it{a\/}} $-$ {\it{b\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-cancellation-0 \\ \index{difference-cancellation-0}
({\it{x\/}} $=$ ({\it{x\/}} $-$ {\it{y\/}})) $=$ (({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ (({\it{x\/}} $=$ {\tt{0}}) $\vee$ ({\it{y\/}} $\simeq {\tt{0}}$)))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-cancellation-1 \\ \index{difference-cancellation-1}
\=\+(({\it{x\/}} $-$ {\it{y\/}}) $=$ ({\it{z\/}} $-$ {\it{y\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $<$ {\it{y\/}}$\;\;${\bf then }{\it{y\/}} $\not<$ {\it{z\/}} \\ 
{\bf elseif }{\it{z\/}} $<$ {\it{y\/}}$\;\;${\bf then }{\it{y\/}} $\not<$ {\it{x\/}} \\ 
{\bf else }{\rm{fix}}\,({\it{x\/}}) $=$ {\rm{fix}}\,({\it{z\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-1 \\ \index{difference-1}
({\it{x\/}} $-$ {\tt{1}}) $=$ ({\it{x\/}} $-\;1$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-2 \\ \index{difference-2}
(($1\;+$ ($1\;+$ {\it{x\/}})) $-$ {\tt{2}}) $=$ {\rm{fix}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-add1-plus-cancellation \\ \index{difference-add1-plus-cancellati!on}
(($1\;+$ ({\it{y\/}} $+$ {\it{z\/}})) $-$ {\it{z\/}}) $=$ ($1\;+$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-sub1-arg2 \\ \index{difference-sub1-arg2}
\=\+({\it{a\/}} $-$ ({\it{b\/}} $-\;1$)) \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\bf if }{\tt{1}} $<$ {\it{b\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-$\;\;${\bf then }{\rm{fix}}\,({\it{a\/}}) \\ 
{\bf elseif }{\it{a\/}} $<$ {\it{b\/}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }$1\;+$ ({\it{a\/}} $-$ {\it{b\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-difference-arg1 \\ \index{difference-difference-arg1}
(({\it{x\/}} $-$ {\it{y\/}}) $-$ {\it{z\/}}) $=$ ({\it{x\/}} $-$ ({\it{y\/}} $+$ {\it{z\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-difference-arg2 \\ \index{difference-difference-arg2}
\=\+({\it{a\/}} $-$ ({\it{b\/}} $-$ {\it{c\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\bf if }{\it{b\/}} $<$ {\it{c\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-$\;\;${\bf then }({\it{a\/}} $+$ {\it{c\/}}) $-$ {\it{b\/}} \\ 
{\bf else }{\rm{fix}}\,({\it{a\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-difference-difference \\ \index{difference-difference-difference}
\=\+(\=\+\=\+{\bf if }{\it{a\/}} $<$ {\it{b\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\it{c\/}} $<$ {\it{d\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-)\- \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $-$ {\it{b\/}}) $-$ ({\it{c\/}} $-$ {\it{d\/}})) $=$ (({\it{a\/}} $+$ {\it{d\/}}) $-$ ({\it{b\/}} $+$ {\it{c\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  difference-plus-cancellation3 \\ \index{difference-plus-cancellation3}
(({\it{w\/}} $+$ {\it{x\/}} $+$ {\it{a\/}}) $-$ ({\it{y\/}} $+$ {\it{z\/}} $+$ {\it{a\/}})) $=$ (({\it{w\/}} $+$ {\it{x\/}}) $-$ ({\it{y\/}} $+$ {\it{z\/}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{plus-fringe} \\  
\=\+{\rm{plus-fringe}}\,({\it{x\/}})\index{plus-fringe} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
{\bf then }{\rm{append}}\,({\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, {\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe}) \\ 
{\bf else }{\rm{list}}\,({\it{x\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{plus-tree} \\  
\=\+{\rm{plus-tree}}\,({\it{l\/}})\index{plus-tree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{l\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\tt{'}}{\tt{'}}{\tt{0}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{l\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{fix}}, {\rm{car}}\,({\it{l\/}})) \\ 
{\bf elseif }{\rm{cddr}}\,({\it{l\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{plus}}, {\rm{car}}\,({\it{l\/}}), {\rm{cadr}}\,({\it{l\/}})) \\ 
{\bf else }{\rm{list}}\,({\tt{'}}{\tt{plus}}, {\rm{car}}\,({\it{l\/}}), {\rm{plus-tree}}\,({\rm{cdr}}\,({\it{l\/}}))\index{plus-tree})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-eval\$-plus \\ \index{numberp-eval\$-plus}
({\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}})) $\rightarrow$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $\in\;${\bf{N}}${}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-eval\$-plus-tree \\ \index{numberp-eval\$-plus-tree}
{\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{l\/}})\index{plus-tree}, {\it{a\/}}) $\in\;${\bf{N}}${}$
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-implies-plus-tree-greatereqp \\ \index{member-implies-plus-tree-greate!reqp}
({\it{x\/}} $\in$ {\it{y\/}}) $\rightarrow$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{y\/}})\index{plus-tree}, {\it{a\/}}) $\not<$ {\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-tree-delete \\ \index{plus-tree-delete}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\rm{delete}}\,({\it{x\/}}, {\it{y\/}})\index{delete})\index{plus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in$ {\it{y\/}}$\;\;${\bf then }{\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{y\/}})\index{plus-tree}, {\it{a\/}}) $-$ {\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) \\ 
{\bf else }{\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{y\/}})\index{plus-tree}, {\it{a\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-implies-plus-tree-greatereqp \\ \index{subbagp-implies-plus-tree-greate!reqp}
{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\rightarrow$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{y\/}})\index{plus-tree}, {\it{a\/}}) $\not<$ {\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{x\/}})\index{plus-tree}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-tree-bagdiff \\ \index{plus-tree-bagdiff}
\=\+{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\rm{bagdiff}}\,({\it{y\/}}, {\it{x\/}})\index{bagdiff})\index{plus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{y\/}})\index{plus-tree}, {\it{a\/}}) $-$ {\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{x\/}})\index{plus-tree}, {\it{a\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-eval\$-bridge \\ \index{numberp-eval\$-bridge}
({\rm{eval\$}}\,({\bf{t}}, {\it{z\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{x\/}})\index{plus-tree}, {\it{a\/}})) $\rightarrow$ ({\rm{eval\$}}\,({\bf{t}}, {\it{z\/}}, {\it{a\/}}) $\in\;${\bf{N}}${}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bridge-to-subbagp-implies-plus-tree-greatereqp \\ \index{bridge-to-subbagp-implies-plus-t!ree-greatereqp}
\=\+(\=\+{\rm{subbagp}}\,({\it{y\/}}, {\rm{plus-fringe}}\,({\it{z\/}})\index{plus-fringe})\index{subbagp} \\ 
$\wedge$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{z\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\rm{plus-fringe}}\,({\it{z\/}})\index{plus-fringe})\index{plus-tree}, {\it{a\/}})))\- \\ 
$\rightarrow$$\;\;\;\;$(({\rm{eval\$}}\,({\bf{t}}, {\it{z\/}}, {\it{a\/}}) $<$ {\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{y\/}})\index{plus-tree}, {\it{a\/}})) $=$ {\bf{f}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-plus-tree-append \\ \index{eval\$-plus-tree-append}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{plus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{x\/}})\index{plus-tree}, {\it{a\/}}) $+$ {\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\it{y\/}})\index{plus-tree}, {\it{a\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-tree-plus-fringe \\ \index{plus-tree-plus-fringe}
{\rm{eval\$}}\,({\bf{t}}, {\rm{plus-tree}}\,({\rm{plus-fringe}}\,({\it{x\/}})\index{plus-fringe})\index{plus-tree}, {\it{a\/}}) $=$ {\rm{fix}}\,({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-implies-numberp \\ \index{member-implies-numberp}
(({\it{c\/}} $\in$ {\rm{plus-fringe}}\,({\it{x\/}})\index{plus-fringe}) $\wedge$ ({\rm{eval\$}}\,({\bf{t}}, {\it{c\/}}, {\it{a\/}}) $\in\;${\bf{N}}${}$)) $\rightarrow$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $\in\;${\bf{N}}${}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cadr-eval\$-list \\ \index{cadr-eval\$-list}
\=\+({\rm{car}}\,({\rm{eval\$}}\,({\tt{'}}{\tt{list}}, {\it{x\/}}, {\it{a\/}})) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{car}}\,({\it{x\/}}), {\it{a\/}})) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{cdr}}\,({\rm{eval\$}}\,({\tt{'}}{\tt{list}}, {\it{x\/}}, {\it{a\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}})$\;\;${\bf then }{\rm{eval\$}}\,({\tt{'}}{\tt{list}}, {\rm{cdr}}\,({\it{x\/}}), {\it{a\/}}) \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-quote \\ \index{eval\$-quote}
{\rm{eval\$}}\,({\bf{t}}, {\rm{cons}}\,({\tt{'}}{\tt{quote}}, {\it{args\/}}), {\it{a\/}}) $=$ {\rm{car}}\,({\it{args\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-eval\$ \\ \index{listp-eval\$}
{\rm{listp}}\,({\rm{eval\$}}\,({\tt{'}}{\tt{list}}, {\it{x\/}}, {\it{a\/}})) $=$ {\rm{listp}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-equal-plus} \\  
\=\+{\rm{cancel-equal-plus}}\,({\it{x\/}})\index{cancel-equal-plus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{equal}}) \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{equal}}, \\ 
{\rm{plus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\-\index{bagint})\-\index{bagdiff})\index{plus-tree}, \\ 
{\rm{plus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\-\index{bagint})\-\index{bagdiff})\index{plus-tree})\- \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caddr}}\,({\it{x\/}}) $\in$ {\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{if}}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{numberp}}, {\rm{caddr}}\,({\it{x\/}})), \\ 
{\rm{cons}}\,(\=\+{\tt{'}}{\tt{equal}}, \\ 
{\rm{cons}}\,(\=\+{\rm{plus-tree}}\,({\rm{delete}}\,(\=\+{\rm{caddr}}\,({\it{x\/}}), \\ 
{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe})\-\index{delete})\index{plus-tree}, \\ 
{\tt{'}}{\tt{(}}{\tt{'}}{\tt{0}}{\tt{)}})\-)\-, \\ 
{\rm{list}}\,({\tt{'}}{\tt{quote}}, {\bf{f}}))\- \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cadr}}\,({\it{x\/}}) $\in$ {\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{if}}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{numberp}}, {\rm{cadr}}\,({\it{x\/}})), \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{equal}}, \\ 
{\tt{'}}{\tt{'}}{\tt{0}}, \\ 
{\rm{plus-tree}}\,({\rm{delete}}\,({\rm{cadr}}\,({\it{x\/}}), {\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\index{delete})\index{plus-tree})\-, \\ 
{\rm{list}}\,({\tt{'}}{\tt{quote}}, {\bf{f}}))\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-equal-plus \\ \index{correctness-of-cancel-equal-plu!s}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-equal-plus}}\,({\it{x\/}})\index{cancel-equal-plus}, {\it{a\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-difference-plus} \\  
\=\+{\rm{cancel-difference-plus}}\,({\it{x\/}})\index{cancel-difference-plus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{difference}}) \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{difference}}, \\ 
{\rm{plus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\-\index{bagint})\-\index{bagdiff})\index{plus-tree}, \\ 
{\rm{plus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\-\index{bagint})\-\index{bagdiff})\index{plus-tree})\- \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caddr}}\,({\it{x\/}}) $\in$ {\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe})\- \\ 
{\bf then }{\rm{plus-tree}}\,({\rm{delete}}\,({\rm{caddr}}\,({\it{x\/}}), {\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe})\index{delete})\index{plus-tree} \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cadr}}\,({\it{x\/}}) $\in$ {\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\-$\;\;${\bf then }{\tt{'}}{\tt{'}}{\tt{0}} \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-difference-plus \\ \index{correctness-of-cancel-difference!-plus}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-difference-plus}}\,({\it{x\/}})\index{cancel-difference-plus}, {\it{a\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-diff-arg1 \\ \index{diff-diff-arg1}
(({\it{x\/}} $-$ {\it{y\/}}) $-$ {\it{z\/}}) $=$ ({\it{x\/}} $-$ ({\it{y\/}} $+$ {\it{z\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-diff-arg2-casesplit \\ \index{diff-diff-arg2-casesplit}
\=\+({\it{a\/}} $-$ ({\it{b\/}} $-$ {\it{c\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{c\/}} $<$ {\it{b\/}}$\;\;${\bf then }({\it{a\/}} $+$ {\it{c\/}}) $-$ {\it{b\/}} \\ 
{\bf else }{\rm{fix}}\,({\it{a\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-diff-arg2 \\ \index{diff-diff-arg2}
({\it{c\/}} $<$ {\it{b\/}}) $\rightarrow$ (({\it{a\/}} $-$ ({\it{b\/}} $-$ {\it{c\/}})) $=$ (({\it{a\/}} $+$ {\it{c\/}}) $-$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-diff-diff-casesplit \\ \index{diff-diff-diff-casesplit}
\=\+(({\it{a\/}} $-$ {\it{b\/}}) $-$ ({\it{c\/}} $-$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}} \\ 
{\bf then }\=\+{\bf if }{\it{d\/}} $<$ {\it{c\/}}$\;\;${\bf then }({\it{a\/}} $+$ {\it{d\/}}) $-$ ({\it{b\/}} $+$ {\it{c\/}}) \\ 
{\bf else }{\it{a\/}} $-$ {\it{b\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-diff-diff \\ \index{diff-diff-diff}
\=\+(({\it{b\/}} $<$ {\it{a\/}}) $\wedge$ ({\it{d\/}} $<$ {\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $-$ {\it{b\/}}) $-$ ({\it{c\/}} $-$ {\it{d\/}})) $=$ (({\it{a\/}} $+$ {\it{d\/}}) $-$ ({\it{b\/}} $+$ {\it{c\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-add1-arg2-casesplit \\ \index{diff-add1-arg2-casesplit}
\=\+({\it{a\/}} $-$ ($1\;+$ {\it{b\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }({\it{a\/}} $-$ {\it{b\/}}) $-\;1$ \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-add1-arg2 \\ \index{diff-add1-arg2}
({\it{b\/}} $<$ {\it{a\/}}) $\rightarrow$ (({\it{a\/}} $-$ ($1\;+$ {\it{b\/}})) $=$ (({\it{a\/}} $-$ {\it{b\/}}) $-\;1$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-sub1-arg2-casesplit \\ \index{diff-sub1-arg2-casesplit}
\=\+({\it{a\/}} $-$ ({\it{b\/}} $-\;1$)) \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\bf if }{\tt{1}} $<$ {\it{b\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-$\;\;${\bf then }{\rm{fix}}\,({\it{a\/}}) \\ 
{\bf elseif }{\it{a\/}} $<$ {\it{b\/}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }$1\;+$ ({\it{a\/}} $-$ {\it{b\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-sub1-arg2 \\ \index{diff-sub1-arg2}
\=\+(\=\+\=\+{\bf if }{\it{b\/}} $<$ {\tt{1}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\it{a\/}} $<$ {\it{b\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-)\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{a\/}} $-$ ({\it{b\/}} $-\;1$)) $=$ ($1\;+$ ({\it{a\/}} $-$ {\it{b\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  diff-x-x \\ \index{diff-x-x}
({\it{x\/}} $-$ {\it{x\/}}) $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-difference-cancellation \\ \index{lessp-difference-cancellation}
\=\+(({\it{a\/}} $-$ {\it{c\/}}) $<$ ({\it{b\/}} $-$ {\it{c\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\bf if }{\it{a\/}} $<$ {\it{c\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-$\;\;${\bf then }{\it{a\/}} $<$ {\it{b\/}} \\ 
{\bf else }{\it{c\/}} $<$ {\it{b\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-difference \\ \index{lessp-difference}
(({\it{x\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{y\/}} $\not\simeq {\tt{0}}$)) $\rightarrow$ ((({\it{x\/}} $-$ {\it{y\/}}) $<$ {\it{x\/}}) $=$ {\bf{t}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-lessp-plus} \\  
\=\+{\rm{cancel-lessp-plus}}\,({\it{x\/}})\index{cancel-lessp-plus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{lessp}}) \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{lessp}}, \\ 
{\rm{plus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\-\index{bagint})\-\index{bagdiff})\index{plus-tree}, \\ 
{\rm{plus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe}, \\ 
{\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\-\index{bagint})\-\index{bagdiff})\index{plus-tree})\- \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caddr}}\,({\it{x\/}}) $\in$ {\rm{plus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{plus-fringe})\- \\ 
{\bf then }{\rm{list}}\,({\tt{'}}{\tt{quote}}, {\bf{f}}) \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{plus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cadr}}\,({\it{x\/}}) $\in$ {\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{not}}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{zerop}}, \\ 
{\rm{plus-tree}}\,({\rm{delete}}\,({\rm{cadr}}\,({\it{x\/}}), {\rm{plus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{plus-fringe})\index{delete})\index{plus-tree})\-)\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-lessp-plus \\ \index{correctness-of-cancel-lessp-plu!s}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-lessp-plus}}\,({\it{x\/}})\index{cancel-lessp-plus}, {\it{a\/}})
\end{tabbing}


\noindent{\sc Event}:   Enable cancel-lessp-plus; name this event `cancel-lessp-plus-off'.\index{cancel-lessp-plus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable lessp-difference-cancellation; name this event `lessp-difference-cancellation-off'.\index{lessp-difference-cancellation-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-difference-plus; name this event `cancel-difference-plus-off'.\index{cancel-difference-plus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-equal-plus; name this event `cancel-equal-plus-off'.\index{cancel-equal-plus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable listp-eval\$; name this event `listp-eval\$-off'.\index{listp-eval\$-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-quote; name this event `eval\$-quote-off'.\index{eval\$-quote-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cadr-eval\$-list; name this event `cadr-eval\$-list-off'.\index{cadr-eval\$-list-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-implies-numberp; name this event `member-implies-numberp-off'.\index{member-implies-numberp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable plus-tree-plus-fringe; name this event `plus-tree-plus-fringe-off'.\index{plus-tree-plus-fringe-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-plus-tree-append; name this event `eval\$-plus-tree-append-off'.\index{eval\$-plus-tree-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bridge-to-subbagp-implies-plus-tree-greatereqp; name this event `bridge-to-subbagp-implies-plus-tree-greatereqp-off'.\index{bridge-to-subbagp-implies-plus-t!ree-greatereqp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numberp-eval\$-bridge; name this event `numberp-eval\$-bridge-off'.\index{numberp-eval\$-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable plus-tree-bagdiff; name this event `plus-tree-bagdiff-off'.\index{plus-tree-bagdiff-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-implies-plus-tree-greatereqp; name this event `subbagp-implies-plus-tree-greatereqp-off'.\index{subbagp-implies-plus-tree-greate!reqp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable plus-tree-delete; name this event `plus-tree-delete-off'.\index{plus-tree-delete-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-implies-plus-tree-greatereqp; name this event `member-implies-plus-tree-greatereqp-off'.\index{member-implies-plus-tree-greate!reqp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numberp-eval\$-plus-tree; name this event `numberp-eval\$-plus-tree-off'.\index{numberp-eval\$-plus-tree-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numberp-eval\$-plus; name this event `numberp-eval\$-plus-off'.\index{numberp-eval\$-plus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-plus-cancellation3; name this event `difference-plus-cancellation3-off'.\index{difference-plus-cancellation3-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-difference-difference; name this event `difference-difference-difference-off'.\index{difference-difference-difference!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-difference-arg2; name this event `difference-difference-arg2-off'.\index{difference-difference-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-difference-arg1; name this event `difference-difference-arg1-off'.\index{difference-difference-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-sub1-arg2; name this event `difference-sub1-arg2-off'.\index{difference-sub1-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-add1-plus-cancellation; name this event `difference-add1-plus-cancellation-off'.\index{difference-add1-plus-cancellati!on-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-2; name this event `difference-2-off'.\index{difference-2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-1; name this event `difference-1-off'.\index{difference-1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-cancellation-1; name this event `difference-cancellation-1-off'.\index{difference-cancellation-1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-cancellation-0; name this event `difference-cancellation-0-off'.\index{difference-cancellation-0-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-plus-cancellation2; name this event `difference-plus-cancellation2-off'.\index{difference-plus-cancellation2-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-plus-cancellation1; name this event `difference-plus-cancellation1-off'.\index{difference-plus-cancellation1-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-plus; name this event `difference-plus-off'.\index{difference-plus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable difference-x-x; name this event `difference-x-x-off'.\index{difference-x-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable plus-cancellation; name this event `plus-cancellation-off'.\index{plus-cancellation-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable open-plus; name this event `open-plus-off'.\index{open-plus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{addition}} to consist of the following events: plus-stopper,
plus-right-id2,
plus-add1,
commutativity2-of-plus,
commutativity-of-plus,
associativity-of-plus,
equal-plus-0,
equal-plus-1,
plus-difference-arg1-casesplit,
plus-difference-arg2-casesplit,
plus-difference-difference-casesplit,
plus-difference-arg1,
plus-difference-arg2,
plus-difference-difference,
correctness-of-cancel-equal-plus,
difference-elim,
difference-leq-arg1,
equal-difference-0,
correctness-of-cancel-difference-plus,
diff-diff-arg1,
diff-diff-arg2-casesplit,
diff-diff-diff-casesplit,
diff-add1-arg2-casesplit,
diff-sub1-arg2-casesplit,
diff-diff-arg2,
diff-diff-diff,
diff-add1-arg2,
diff-sub1-arg2,
diff-x-x,
lessp-difference,
correctness-of-cancel-lessp-plus.\index{addition}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{exp} \\  
\=\+{\rm{exp}}\,({\it{i\/}}, {\it{j\/}})\index{exp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{j\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\it{i\/}} $*$ {\rm{exp}}\,({\it{i\/}}, {\it{j\/}} $-\;1$)\index{exp}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-zero \\ \index{times-zero}
({\it{y\/}} $\simeq {\tt{0}}$) $\rightarrow$ (({\it{x\/}} $*$ {\it{y\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-add1 \\ \index{times-add1}
\=\+({\it{x\/}} $*$ ($1\;+$ {\it{y\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\it{x\/}} $+$ ({\it{x\/}} $*$ {\it{y\/}}) \\ 
{\bf else }{\rm{fix}}\,({\it{x\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-sub1 \\ \index{times-sub1}
({\it{b\/}} $\not\simeq {\tt{0}}$) $\rightarrow$ (({\it{a\/}} $*$ ({\it{b\/}} $-\;1$)) $=$ (({\it{a\/}} $*$ {\it{b\/}}) $-$ {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-times \\ \index{commutativity-of-times}
({\it{x\/}} $*$ {\it{y\/}}) $=$ ({\it{y\/}} $*$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-distributes-over-plus-proof \\ \index{times-distributes-over-plus-pro!of}
({\it{x\/}} $*$ ({\it{y\/}} $+$ {\it{z\/}})) $=$ (({\it{x\/}} $*$ {\it{y\/}}) $+$ ({\it{x\/}} $*$ {\it{z\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-distributes-over-plus \\ \index{times-distributes-over-plus}
\=\+(({\it{x\/}} $*$ ({\it{y\/}} $+$ {\it{z\/}})) $=$ (({\it{x\/}} $*$ {\it{y\/}}) $+$ ({\it{x\/}} $*$ {\it{z\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $+$ {\it{y\/}}) $*$ {\it{z\/}}) $=$ (({\it{x\/}} $*$ {\it{z\/}}) $+$ ({\it{y\/}} $*$ {\it{z\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-times \\ \index{commutativity2-of-times}
({\it{x\/}} $*$ {\it{y\/}} $*$ {\it{z\/}}) $=$ ({\it{y\/}} $*$ {\it{x\/}} $*$ {\it{z\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-times \\ \index{associativity-of-times}
(({\it{x\/}} $*$ {\it{y\/}}) $*$ {\it{z\/}}) $=$ ({\it{x\/}} $*$ {\it{y\/}} $*$ {\it{z\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-distributes-over-difference-proof \\ \index{times-distributes-over-differen!ce-proof}
(({\it{a\/}} $-$ {\it{b\/}}) $*$ {\it{c\/}}) $=$ (({\it{a\/}} $*$ {\it{c\/}}) $-$ ({\it{b\/}} $*$ {\it{c\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-distributes-over-difference \\ \index{times-distributes-over-differen!ce}
\=\+((({\it{a\/}} $-$ {\it{b\/}}) $*$ {\it{c\/}}) $=$ (({\it{a\/}} $*$ {\it{c\/}}) $-$ ({\it{b\/}} $*$ {\it{c\/}}))) \\ 
$\wedge$$\;\;\;\;$(({\it{a\/}} $*$ ({\it{b\/}} $-$ {\it{c\/}})) $=$ (({\it{a\/}} $*$ {\it{b\/}}) $-$ ({\it{a\/}} $*$ {\it{c\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-quotient-proof \\ \index{times-quotient-proof}
(({\it{x\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{y\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}})) $\rightarrow$ ((({\it{y\/}} $\div$ {\it{x\/}}) $*$ {\it{x\/}}) $=$ {\rm{fix}}\,({\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-quotient \\ \index{times-quotient}
\=\+(({\it{y\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{x\/}} ${}${\bf{mod}}${}$ {\it{y\/}}) $=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(((({\it{x\/}} $\div$ {\it{y\/}}) $*$ {\it{y\/}}) $=$ {\rm{fix}}\,({\it{x\/}})) $\wedge$ (({\it{y\/}} $*$ ({\it{x\/}} $\div$ {\it{y\/}})) $=$ {\rm{fix}}\,({\it{x\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-0 \\ \index{equal-times-0}
(({\it{x\/}} $*$ {\it{y\/}}) $=$ {\tt{0}}) $=$ (({\it{x\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{y\/}} $\simeq {\tt{0}}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-1 \\ \index{equal-times-1}
(({\it{a\/}} $*$ {\it{b\/}}) $=$ {\tt{1}}) $=$ (({\it{a\/}} $=$ {\tt{1}}) $\wedge$ ({\it{b\/}} $=$ {\tt{1}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-1-arg1 \\ \index{times-1-arg1}
({\tt{1}} $*$ {\it{x\/}}) $=$ {\rm{fix}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times1-proof \\ \index{lessp-times1-proof}
(({\it{a\/}} $<$ {\it{b\/}}) $\wedge$ ({\it{c\/}} $\not\simeq {\tt{0}}$)) $\rightarrow$ (({\it{a\/}} $<$ ({\it{b\/}} $*$ {\it{c\/}})) $=$ {\bf{t}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times1 \\ \index{lessp-times1}
\=\+(({\it{a\/}} $<$ {\it{b\/}}) $\wedge$ ({\it{c\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $<$ ({\it{b\/}} $*$ {\it{c\/}})) $=$ {\bf{t}}) $\wedge$ (({\it{a\/}} $<$ ({\it{c\/}} $*$ {\it{b\/}})) $=$ {\bf{t}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times2-proof \\ \index{lessp-times2-proof}
\=\+(\=\+\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\wedge$$\;\;\;\;$({\it{c\/}} $\not\simeq {\tt{0}}$))\- \\ 
$\rightarrow$$\;\;\;\;$((({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{a\/}}) $=$ {\bf{f}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times2 \\ \index{lessp-times2}
\=\+(\=\+\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\wedge$$\;\;\;\;$({\it{c\/}} $\not\simeq {\tt{0}}$))\- \\ 
$\rightarrow$$\;\;\;\;$(((({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{a\/}}) $=$ {\bf{f}}) $\wedge$ ((({\it{c\/}} $*$ {\it{b\/}}) $<$ {\it{a\/}}) $=$ {\bf{f}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times3-proof1 \\ \index{lessp-times3-proof1}
(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\tt{1}} $<$ {\it{b\/}})) $\rightarrow$ ({\it{a\/}} $<$ ({\it{a\/}} $*$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times3-proof2 \\ \index{lessp-times3-proof2}
({\it{a\/}} $<$ ({\it{a\/}} $*$ {\it{b\/}})) $\rightarrow$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\tt{1}} $<$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times3 \\ \index{lessp-times3}
\=\+(({\it{a\/}} $<$ ({\it{a\/}} $*$ {\it{b\/}})) $=$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\tt{1}} $<$ {\it{b\/}}))) \\ 
$\wedge$$\;\;\;\;$(({\it{a\/}} $<$ ({\it{b\/}} $*$ {\it{a\/}})) $=$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\tt{1}} $<$ {\it{b\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times-cancellation-proof \\ \index{lessp-times-cancellation-proof}
(({\it{x\/}} $*$ {\it{z\/}}) $<$ ({\it{y\/}} $*$ {\it{z\/}})) $=$ (({\it{z\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $<$ {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times-cancellation1 \\ \index{lessp-times-cancellation1}
\=\+((({\it{x\/}} $*$ {\it{z\/}}) $<$ ({\it{y\/}} $*$ {\it{z\/}})) $=$ (({\it{z\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $<$ {\it{y\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{z\/}} $*$ {\it{x\/}}) $<$ ({\it{y\/}} $*$ {\it{z\/}})) $=$ (({\it{z\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $<$ {\it{y\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $*$ {\it{z\/}}) $<$ ({\it{z\/}} $*$ {\it{y\/}})) $=$ (({\it{z\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $<$ {\it{y\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{z\/}} $*$ {\it{x\/}}) $<$ ({\it{z\/}} $*$ {\it{y\/}})) $=$ (({\it{z\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $<$ {\it{y\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times-cancellation2 \\ \index{lessp-times-cancellation2}
\=\+((({\it{b\/}} $*$ {\it{a\/}} $*$ {\it{c\/}}) $<$ ({\it{a\/}} $*$ {\it{d\/}})) $=$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}}))) \\ 
$\wedge$$\;\;\;\;$(\=\+((({\it{a\/}} $*$ {\it{c\/}}) $*$ {\it{b\/}}) $<$ ({\it{a\/}} $*$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}})))\- \\ 
$\wedge$$\;\;\;\;$((({\it{b\/}} $*$ {\it{a\/}} $*$ {\it{c\/}}) $<$ ({\it{d\/}} $*$ {\it{a\/}})) $=$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}}))) \\ 
$\wedge$$\;\;\;\;$(\=\+((({\it{a\/}} $*$ {\it{c\/}}) $*$ {\it{b\/}}) $<$ ({\it{d\/}} $*$ {\it{a\/}})) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}})))\- \\ 
$\wedge$$\;\;\;\;$((({\it{b\/}} $*$ {\it{c\/}} $*$ {\it{a\/}}) $<$ ({\it{a\/}} $*$ {\it{d\/}})) $=$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}}))) \\ 
$\wedge$$\;\;\;\;$(\=\+((({\it{c\/}} $*$ {\it{a\/}}) $*$ {\it{b\/}}) $<$ ({\it{a\/}} $*$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}})))\- \\ 
$\wedge$$\;\;\;\;$((({\it{b\/}} $*$ {\it{c\/}} $*$ {\it{a\/}}) $<$ ({\it{d\/}} $*$ {\it{a\/}})) $=$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}}))) \\ 
$\wedge$$\;\;\;\;$(\=\+((({\it{c\/}} $*$ {\it{a\/}}) $*$ {\it{b\/}}) $<$ ({\it{d\/}} $*$ {\it{a\/}})) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{b\/}} $*$ {\it{c\/}}) $<$ {\it{d\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-plus-times-proof \\ \index{lessp-plus-times-proof}
({\it{x\/}} $<$ {\it{a\/}}) $\rightarrow$ ((({\it{x\/}} $+$ ({\it{a\/}} $*$ {\it{b\/}})) $<$ ({\it{a\/}} $*$ {\it{c\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-plus-times1 \\ \index{lessp-plus-times1}
\=\+((({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}})) $<$ {\it{b\/}}) $=$ (({\it{a\/}} $<$ {\it{b\/}}) $\wedge$ ({\it{c\/}} $\simeq {\tt{0}}$))) \\ 
$\wedge$$\;\;\;\;$((({\it{a\/}} $+$ ({\it{c\/}} $*$ {\it{b\/}})) $<$ {\it{b\/}}) $=$ (({\it{a\/}} $<$ {\it{b\/}}) $\wedge$ ({\it{c\/}} $\simeq {\tt{0}}$))) \\ 
$\wedge$$\;\;\;\;$(((({\it{c\/}} $*$ {\it{b\/}}) $+$ {\it{a\/}}) $<$ {\it{b\/}}) $=$ (({\it{a\/}} $<$ {\it{b\/}}) $\wedge$ ({\it{c\/}} $\simeq {\tt{0}}$))) \\ 
$\wedge$$\;\;\;\;$(((({\it{b\/}} $*$ {\it{c\/}}) $+$ {\it{a\/}}) $<$ {\it{b\/}}) $=$ (({\it{a\/}} $<$ {\it{b\/}}) $\wedge$ ({\it{c\/}} $\simeq {\tt{0}}$)))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-plus-times2 \\ \index{lessp-plus-times2}
\=\+(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $<$ {\it{a\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{x\/}} $+$ ({\it{a\/}} $*$ {\it{b\/}})) $<$ ({\it{a\/}} $*$ {\it{c\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $+$ ({\it{b\/}} $*$ {\it{a\/}})) $<$ ({\it{a\/}} $*$ {\it{c\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $+$ ({\it{a\/}} $*$ {\it{b\/}})) $<$ ({\it{c\/}} $*$ {\it{a\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $+$ ({\it{b\/}} $*$ {\it{a\/}})) $<$ ({\it{c\/}} $*$ {\it{a\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$(((({\it{a\/}} $*$ {\it{b\/}}) $+$ {\it{x\/}}) $<$ ({\it{a\/}} $*$ {\it{c\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$(((({\it{b\/}} $*$ {\it{a\/}}) $+$ {\it{x\/}}) $<$ ({\it{a\/}} $*$ {\it{c\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$(((({\it{a\/}} $*$ {\it{b\/}}) $+$ {\it{x\/}}) $<$ ({\it{c\/}} $*$ {\it{a\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$(((({\it{b\/}} $*$ {\it{a\/}}) $+$ {\it{x\/}}) $<$ ({\it{c\/}} $*$ {\it{a\/}})) $=$ ({\it{b\/}} $<$ {\it{c\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-1-times \\ \index{lessp-1-times}
\=\+({\tt{1}} $<$ ({\it{a\/}} $*$ {\it{b\/}})) \\ 
$=$$\;\;\;\;$($\neg$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{b\/}} $\simeq {\tt{0}}$) $\vee$ (({\it{a\/}} $=$ {\tt{1}}) $\wedge$ ({\it{b\/}} $=$ {\tt{1}}))))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-sub1-times-0 \\ \index{equal-sub1-times-0}
\=\+((({\it{a\/}} $*$ {\it{b\/}}) $-\;1$) $=$ {\tt{0}}) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{b\/}} $\simeq {\tt{0}}$) $\vee$ (({\it{a\/}} $=$ {\tt{1}}) $\wedge$ ({\it{b\/}} $=$ {\tt{1}})))\-
\end{tabbing}


\noindent{\sc Event}:   Let us define the theory {\it{multiplication}} to consist of the following events: equal-sub1-times-0,
lessp-1-times,
lessp-plus-times2,
lessp-plus-times1,
lessp-times-cancellation2,
lessp-times-cancellation1,
lessp-times3,
lessp-times2,
lessp-times1,
times-1-arg1,
equal-times-1,
equal-times-0,
times-quotient,
times-distributes-over-difference,
associativity-of-times,
commutativity2-of-times,
times-distributes-over-plus,
commutativity-of-times,
times-sub1,
times-add1,
times-zero.\index{multiplication}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  lessp-remainder \\ \index{lessp-remainder}
(({\it{x\/}} ${}${\bf{mod}}${}$ {\it{y\/}}) $<$ {\it{y\/}}) $=$ ({\it{y\/}} $\not\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-noop \\ \index{remainder-noop}
({\it{a\/}} $<$ {\it{b\/}}) $\rightarrow$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\rm{fix}}\,({\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-of-non-number \\ \index{remainder-of-non-number}
({\it{a\/}} $\not\in\;${\bf{N}}${}$) $\rightarrow$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{n\/}}) $=$ ({\tt{0}} ${}${\bf{mod}}${}$ {\it{n\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-zero \\ \index{remainder-zero}
({\it{x\/}} $\simeq {\tt{0}}$) $\rightarrow$ (({\it{y\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\rm{fix}}\,({\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plus-remainder-times-quotient \\ \index{plus-remainder-times-quotient}
(({\it{x\/}} ${}${\bf{mod}}${}$ {\it{y\/}}) $+$ ({\it{y\/}} $*$ ({\it{x\/}} $\div$ {\it{y\/}}))) $=$ {\rm{fix}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-quotient-elim \\ \index{remainder-quotient-elim}
(({\it{y\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $\in\;${\bf{N}}${}$)) $\rightarrow$ ((({\it{x\/}} ${}${\bf{mod}}${}$ {\it{y\/}}) $+$ ({\it{y\/}} $*$ ({\it{x\/}} $\div$ {\it{y\/}}))) $=$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-sub1 \\ \index{remainder-sub1}
\=\+(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-\;1$) ${}${\bf{mod}}${}$ {\it{b\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}$\;\;${\bf then }{\it{b\/}} $-\;1$ \\ 
{\bf else }({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $-\;1$$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-add1 \\ \index{remainder-add1}
(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}) $\rightarrow$ ((($1\;+$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ ({\tt{1}} ${}${\bf{mod}}${}$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-plus-proof \\ \index{remainder-plus-proof}
(({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\rightarrow$ ((({\it{a\/}} $+$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-plus \\ \index{remainder-plus}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{a\/}} $+$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$((({\it{b\/}} $+$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $+$ {\it{y\/}} $+$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ (({\it{x\/}} $+$ {\it{y\/}}) ${}${\bf{mod}}${}$ {\it{c\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-remainder-plus-0-proof \\ \index{equal-remainder-plus-0-proof}
(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\rightarrow$ (((({\it{a\/}} $+$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $=$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-remainder-plus-0 \\ \index{equal-remainder-plus-0}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(((({\it{a\/}} $+$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $=$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}})) \\ 
$\wedge$$\;\;\;\;$(((({\it{b\/}} $+$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $=$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}})) \\ 
$\wedge$$\;\;\;\;$(\=\+((({\it{x\/}} $+$ {\it{y\/}} $+$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) \\ 
$=$$\;\;\;\;$((({\it{x\/}} $+$ {\it{y\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-remainder-plus-remainder-proof \\ \index{equal-remainder-plus-remainder-p!roof}
({\it{a\/}} $<$ {\it{c\/}}) $\rightarrow$ (((({\it{a\/}} $+$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})) $=$ ({\it{a\/}} $\simeq {\tt{0}}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-remainder-plus-remainder \\ \index{equal-remainder-plus-remainder}
\=\+({\it{a\/}} $<$ {\it{c\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(((({\it{a\/}} $+$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})) $=$ ({\it{a\/}} $\simeq {\tt{0}}$)) \\ 
$\wedge$$\;\;\;\;$(((({\it{b\/}} $+$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})) $=$ ({\it{a\/}} $\simeq {\tt{0}}$)))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times1-proof \\ \index{remainder-times1-proof}
(({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\rightarrow$ ((({\it{a\/}} $*$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times1 \\ \index{remainder-times1}
\=\+(({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(((({\it{a\/}} $*$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\wedge$ ((({\it{b\/}} $*$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times1-instance-proof \\ \index{remainder-times1-instance-proof}
(({\it{x\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ {\it{y\/}}) $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times1-instance \\ \index{remainder-times1-instance}
((({\it{x\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ {\it{y\/}}) $=$ {\tt{0}}) $\wedge$ ((({\it{x\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times-times-proof \\ \index{remainder-times-times-proof}
(({\it{x\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ ({\it{x\/}} $*$ {\it{z\/}})) $=$ ({\it{x\/}} $*$ ({\it{y\/}} ${}${\bf{mod}}${}$ {\it{z\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times-times \\ \index{remainder-times-times}
\=\+((({\it{x\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ ({\it{x\/}} $*$ {\it{z\/}})) $=$ ({\it{x\/}} $*$ ({\it{y\/}} ${}${\bf{mod}}${}$ {\it{z\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $*$ {\it{z\/}}) ${}${\bf{mod}}${}$ ({\it{y\/}} $*$ {\it{z\/}})) $=$ (({\it{x\/}} ${}${\bf{mod}}${}$ {\it{y\/}}) $*$ {\it{z\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times2-proof \\ \index{remainder-times2-proof}
(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}}) $\rightarrow$ (({\it{a\/}} ${}${\bf{mod}}${}$ ({\it{z\/}} $*$ {\it{y\/}})) $=$ ({\it{z\/}} $*$ (({\it{a\/}} $\div$ {\it{z\/}}) ${}${\bf{mod}}${}$ {\it{y\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times2 \\ \index{remainder-times2}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ ({\it{y\/}} $*$ {\it{z\/}})) $=$ ({\it{z\/}} $*$ (({\it{a\/}} $\div$ {\it{z\/}}) ${}${\bf{mod}}${}$ {\it{y\/}}))) \\ 
$\wedge$$\;\;\;\;$(({\it{a\/}} ${}${\bf{mod}}${}$ ({\it{z\/}} $*$ {\it{y\/}})) $=$ ({\it{z\/}} $*$ (({\it{a\/}} $\div$ {\it{z\/}}) ${}${\bf{mod}}${}$ {\it{y\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-times2-instance \\ \index{remainder-times2-instance}
\=\+((({\it{x\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ ({\it{x\/}} $*$ {\it{z\/}})) $=$ ({\it{x\/}} $*$ ({\it{y\/}} ${}${\bf{mod}}${}$ {\it{z\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{x\/}} $*$ {\it{z\/}}) ${}${\bf{mod}}${}$ ({\it{y\/}} $*$ {\it{z\/}})) $=$ (({\it{x\/}} ${}${\bf{mod}}${}$ {\it{y\/}}) $*$ {\it{z\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-difference1 \\ \index{remainder-difference1}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $-$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $-$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{double-remainder-induction} \\  
\=\+{\rm{double-remainder-induction}}\,({\it{a\/}}, {\it{b\/}}, {\it{c\/}})\index{double-remainder-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{c\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\it{a\/}} $<$ {\it{c\/}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\it{b\/}} $<$ {\it{c\/}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{double-remainder-induction}}\,({\it{a\/}} $-$ {\it{c\/}}, {\it{b\/}} $-$ {\it{c\/}}, {\it{c\/}})\index{double-remainder-induction}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-difference2 \\ \index{remainder-difference2}
\=\+((({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $\not=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }{\it{c\/}} $-$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-difference3 \\ \index{remainder-difference3}
\=\+((({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $\not=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }{\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-remainder-difference-0 \\ \index{equal-remainder-difference-0}
\=\+((({\it{a\/}} $-$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\bf if }{\it{a\/}} $<$ {\it{b\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-$\;\;${\bf then }({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-plus-fact \\ \index{lessp-plus-fact}
\=\+((({\it{b\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{c\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $\wedge$ ({\it{b\/}} $<$ {\it{c\/}}) $\wedge$ ({\it{a\/}} $<$ {\it{x\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $+$ {\it{b\/}}) $<$ {\it{c\/}}) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-plus-fact \\ \index{remainder-plus-fact}
\=\+((({\it{b\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{c\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $\wedge$ ({\it{a\/}} $<$ {\it{x\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $+$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{a\/}} $+$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-plus-times-times-proof \\ \index{remainder-plus-times-times-proo!f}
\=\+({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}})) ${}${\bf{mod}}${}$ ({\it{b\/}} $*$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$({\it{a\/}} $+$ (({\it{b\/}} $*$ {\it{c\/}}) ${}${\bf{mod}}${}$ ({\it{b\/}} $*$ {\it{d\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-plus-times-times \\ \index{remainder-plus-times-times}
\=\+({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+(({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}})) ${}${\bf{mod}}${}$ ({\it{b\/}} $*$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$({\it{a\/}} $+$ (({\it{b\/}} $*$ {\it{c\/}}) ${}${\bf{mod}}${}$ ({\it{b\/}} $*$ {\it{d\/}}))))\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{a\/}} $+$ ({\it{c\/}} $*$ {\it{b\/}})) ${}${\bf{mod}}${}$ ({\it{d\/}} $*$ {\it{b\/}})) \\ 
$=$$\;\;\;\;$({\it{a\/}} $+$ (({\it{c\/}} $*$ {\it{b\/}}) ${}${\bf{mod}}${}$ ({\it{d\/}} $*$ {\it{b\/}}))))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-plus-times-times-instance \\ \index{remainder-plus-times-times-inst!ance}
\=\+({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+(({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}}) $+$ ({\it{b\/}} $*$ {\it{d\/}})) ${}${\bf{mod}}${}$ ({\it{b\/}} $*$ {\it{e\/}})) \\ 
$=$$\;\;\;\;$({\it{a\/}} $+$ ({\it{b\/}} $*$ (({\it{c\/}} $+$ {\it{d\/}}) ${}${\bf{mod}}${}$ {\it{e\/}}))))\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{a\/}} $+$ ({\it{c\/}} $*$ {\it{b\/}}) $+$ ({\it{d\/}} $*$ {\it{b\/}})) ${}${\bf{mod}}${}$ ({\it{e\/}} $*$ {\it{b\/}})) \\ 
$=$$\;\;\;\;$({\it{a\/}} $+$ ({\it{b\/}} $*$ (({\it{c\/}} $+$ {\it{d\/}}) ${}${\bf{mod}}${}$ {\it{e\/}}))))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-exp \\ \index{remainder-exp}
({\it{k\/}} $\not\simeq {\tt{0}}$) $\rightarrow$ (({\rm{exp}}\,({\it{n\/}}, {\it{k\/}})\index{exp} ${}${\bf{mod}}${}$ {\it{n\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-remainder \\ \index{remainder-remainder}
(({\it{b\/}} ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ {\tt{0}}) $\rightarrow$ ((({\it{n\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ ({\it{n\/}} ${}${\bf{mod}}${}$ {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-1-arg1 \\ \index{remainder-1-arg1}
\=\+({\tt{1}} ${}${\bf{mod}}${}$ {\it{x\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $=$ {\tt{1}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\tt{1}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-1-arg2 \\ \index{remainder-1-arg2}
({\it{y\/}} ${}${\bf{mod}}${}$ {\tt{1}}) $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-x-x \\ \index{remainder-x-x}
({\it{x\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  transitivity-of-divides \\ \index{transitivity-of-divides}
((({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}})) $\rightarrow$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{double-number-induction} \\  
\=\+{\rm{double-number-induction}}\,({\it{i\/}}, {\it{j\/}})\index{double-number-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{i\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\it{j\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{double-number-induction}}\,({\it{i\/}} $-\;1$, {\it{j\/}} $-\;1$)\index{double-number-induction}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-exp-exp \\ \index{remainder-exp-exp}
\=\+\=\+{\bf if }{\it{j\/}} $<$ {\it{i\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\rightarrow$$\;\;\;\;$(({\rm{exp}}\,({\it{a\/}}, {\it{j\/}})\index{exp} ${}${\bf{mod}}${}$ {\rm{exp}}\,({\it{a\/}}, {\it{i\/}})\index{exp}) $=$ {\tt{0}})\-
\end{tabbing}


\noindent{\sc Event}:   Enable lessp-plus-fact; name this event `lessp-plus-fact-off'.\index{lessp-plus-fact-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-remainder-difference-0; name this event `equal-remainder-difference-0-off'.\index{equal-remainder-difference-0-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable remainder-difference3; name this event `remainder-difference3-off'.\index{remainder-difference3-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable remainder-times-times; name this event `remainder-times-times-off'.\index{remainder-times-times-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-remainder-plus-remainder; name this event `equal-remainder-plus-remainder-off'.\index{equal-remainder-plus-remainder-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable plus-remainder-times-quotient; name this event `plus-remainder-times-quotient-off'.\index{plus-remainder-times-quotient-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{remainders}} to consist of the following events: remainder-exp-exp,
remainder-x-x,
remainder-1-arg2,
remainder-1-arg1,
remainder-remainder,
remainder-exp,
remainder-plus-times-times-instance,
remainder-plus-times-times,
remainder-difference2,
remainder-difference1,
remainder-times2-instance,
remainder-times2,
remainder-times1-instance,
remainder-times1,
equal-remainder-plus-0,
remainder-plus,
remainder-add1,
remainder-sub1,
remainder-quotient-elim,
remainder-zero,
remainder-of-non-number,
remainder-noop,
lessp-remainder.\index{remainders}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  quotient-noop \\ \index{quotient-noop}
({\it{b\/}} $=$ {\tt{1}}) $\rightarrow$ (({\it{a\/}} $\div$ {\it{b\/}}) $=$ {\rm{fix}}\,({\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-of-non-number \\ \index{quotient-of-non-number}
({\it{a\/}} $\not\in\;${\bf{N}}${}$) $\rightarrow$ (({\it{a\/}} $\div$ {\it{n\/}}) $=$ ({\tt{0}} $\div$ {\it{n\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-zero \\ \index{quotient-zero}
({\it{x\/}} $\simeq {\tt{0}}$) $\rightarrow$ (({\it{y\/}} $\div$ {\it{x\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-add1 \\ \index{quotient-add1}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(($1\;+$ {\it{a\/}}) $\div$ {\it{b\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $=$ {\tt{1}}$\;\;${\bf then }$1\;+$ ({\it{a\/}} $\div$ {\it{b\/}}) \\ 
{\bf else }{\it{a\/}} $\div$ {\it{b\/}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-quotient-0 \\ \index{equal-quotient-0}
(({\it{a\/}} $\div$ {\it{b\/}}) $=$ {\tt{0}}) $=$ (({\it{b\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{a\/}} $<$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-sub1 \\ \index{quotient-sub1}
\=\+(({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-\;1$) $\div$ {\it{b\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}$\;\;${\bf then }({\it{a\/}} $\div$ {\it{b\/}}) $-\;1$ \\ 
{\bf else }{\it{a\/}} $\div$ {\it{b\/}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-plus-proof \\ \index{quotient-plus-proof}
(({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\rightarrow$ ((({\it{a\/}} $+$ {\it{b\/}}) $\div$ {\it{c\/}}) $=$ (({\it{a\/}} $\div$ {\it{c\/}}) $+$ ({\it{b\/}} $\div$ {\it{c\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-plus \\ \index{quotient-plus}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{a\/}} $+$ {\it{b\/}}) $\div$ {\it{c\/}}) $=$ (({\it{a\/}} $\div$ {\it{c\/}}) $+$ ({\it{b\/}} $\div$ {\it{c\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{b\/}} $+$ {\it{a\/}}) $\div$ {\it{c\/}}) $=$ (({\it{a\/}} $\div$ {\it{c\/}}) $+$ ({\it{b\/}} $\div$ {\it{c\/}}))) \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{x\/}} $+$ {\it{y\/}} $+$ {\it{a\/}}) $\div$ {\it{c\/}}) \\ 
$=$$\;\;\;\;$((({\it{x\/}} $+$ {\it{y\/}}) $\div$ {\it{c\/}}) $+$ ({\it{a\/}} $\div$ {\it{c\/}})))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-times-instance-temp-proof \\ \index{quotient-times-instance-temp-pr!oof}
\=\+(({\it{y\/}} $*$ {\it{x\/}}) $\div$ {\it{y\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{fix}}\,({\it{x\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-times-instance-temp \\ \index{quotient-times-instance-temp}
\=\+(\=\+(({\it{y\/}} $*$ {\it{x\/}}) $\div$ {\it{y\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{fix}}\,({\it{x\/}})$\;${\bf  endif}\-)\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{x\/}} $*$ {\it{y\/}}) $\div$ {\it{y\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{fix}}\,({\it{x\/}})$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-times-proof \\ \index{quotient-times-proof}
(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\rightarrow$ ((({\it{a\/}} $*$ {\it{b\/}}) $\div$ {\it{c\/}}) $=$ ({\it{b\/}} $*$ ({\it{a\/}} $\div$ {\it{c\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-times \\ \index{quotient-times}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{a\/}} $*$ {\it{b\/}}) $\div$ {\it{c\/}}) $=$ ({\it{b\/}} $*$ ({\it{a\/}} $\div$ {\it{c\/}}))) \\ 
$\wedge$$\;\;\;\;$((({\it{b\/}} $*$ {\it{a\/}}) $\div$ {\it{c\/}}) $=$ ({\it{b\/}} $*$ ({\it{a\/}} $\div$ {\it{c\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-times-instance \\ \index{quotient-times-instance}
\=\+(\=\+(({\it{y\/}} $*$ {\it{x\/}}) $\div$ {\it{y\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{fix}}\,({\it{x\/}})$\;${\bf  endif}\-)\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{x\/}} $*$ {\it{y\/}}) $\div$ {\it{y\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{fix}}\,({\it{x\/}})$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-times-times-proof \\ \index{quotient-times-times-proof}
\=\+(({\it{x\/}} $*$ {\it{y\/}}) $\div$ ({\it{x\/}} $*$ {\it{z\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\it{y\/}} $\div$ {\it{z\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-times-times \\ \index{quotient-times-times}
\=\+(\=\+(({\it{x\/}} $*$ {\it{y\/}}) $\div$ ({\it{x\/}} $*$ {\it{z\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\it{y\/}} $\div$ {\it{z\/}}$\;${\bf  endif}\-)\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{x\/}} $*$ {\it{z\/}}) $\div$ ({\it{y\/}} $*$ {\it{z\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{z\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\it{x\/}} $\div$ {\it{y\/}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-difference1 \\ \index{quotient-difference1}
\=\+(({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ ({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $-$ {\it{b\/}}) $\div$ {\it{c\/}}) $=$ (({\it{a\/}} $\div$ {\it{c\/}}) $-$ ({\it{b\/}} $\div$ {\it{c\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-lessp-arg1 \\ \index{quotient-lessp-arg1}
({\it{a\/}} $<$ {\it{b\/}}) $\rightarrow$ (({\it{a\/}} $\div$ {\it{b\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-difference2 \\ \index{quotient-difference2}
\=\+((({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $\not=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-$ {\it{b\/}}) $\div$ {\it{c\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }({\it{a\/}} $\div$ {\it{c\/}}) $-$ ($1\;+$ ({\it{b\/}} $\div$ {\it{c\/}})) \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-difference3 \\ \index{quotient-difference3}
\=\+((({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $\not=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-$ {\it{b\/}}) $\div$ {\it{c\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }({\it{a\/}} $\div$ {\it{c\/}}) $-$ ({\it{b\/}} $\div$ {\it{c\/}}) \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-equals-its-first-argument \\ \index{remainder-equals-its-first-argu!ment}
({\it{a\/}} $=$ ({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}})) $=$ (({\it{a\/}} $\in\;${\bf{N}}${}$) $\wedge$ (({\it{b\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{a\/}} $<$ {\it{b\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-remainder-times \\ \index{quotient-remainder-times}
(({\it{x\/}} ${}${\bf{mod}}${}$ ({\it{a\/}} $*$ {\it{b\/}})) $\div$ {\it{a\/}}) $=$ (({\it{x\/}} $\div$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{b\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-remainder \\ \index{quotient-remainder}
(({\it{c\/}} ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ {\tt{0}}) $\rightarrow$ ((({\it{b\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $\div$ {\it{a\/}}) $=$ (({\it{b\/}} $\div$ {\it{a\/}}) ${}${\bf{mod}}${}$ ({\it{c\/}} $\div$ {\it{a\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-remainder-instance \\ \index{quotient-remainder-instance}
(({\it{x\/}} ${}${\bf{mod}}${}$ ({\it{a\/}} $*$ {\it{b\/}})) $\div$ {\it{a\/}}) $=$ (({\it{x\/}} $\div$ {\it{a\/}}) ${}${\bf{mod}}${}$ {\it{b\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-plus-fact \\ \index{quotient-plus-fact}
\=\+((({\it{b\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{c\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $\wedge$ ({\it{a\/}} $<$ {\it{x\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $+$ {\it{b\/}}) $\div$ {\it{c\/}}) $=$ ({\it{b\/}} $\div$ {\it{c\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-plus-times-times-proof \\ \index{quotient-plus-times-times-proof}
\=\+({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}})) $\div$ ({\it{b\/}} $*$ {\it{d\/}})) $=$ (({\it{b\/}} $*$ {\it{c\/}}) $\div$ ({\it{b\/}} $*$ {\it{d\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-plus-times-times \\ \index{quotient-plus-times-times}
\=\+({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}})) $\div$ ({\it{b\/}} $*$ {\it{d\/}})) $=$ (({\it{b\/}} $*$ {\it{c\/}}) $\div$ ({\it{b\/}} $*$ {\it{d\/}}))) \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}})) $\div$ ({\it{b\/}} $*$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$(({\it{b\/}} $*$ {\it{c\/}}) $\div$ ({\it{b\/}} $*$ {\it{d\/}})))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-plus-times-times-instance \\ \index{quotient-plus-times-times-insta!nce}
\=\+({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+(({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{c\/}}) $+$ ({\it{b\/}} $*$ {\it{d\/}})) $\div$ ({\it{b\/}} $*$ {\it{e\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }({\it{c\/}} $+$ {\it{d\/}}) $\div$ {\it{e\/}}$\;${\bf  endif}\-)\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{a\/}} $+$ ({\it{c\/}} $*$ {\it{b\/}}) $+$ ({\it{d\/}} $*$ {\it{b\/}})) $\div$ ({\it{e\/}} $*$ {\it{b\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }({\it{d\/}} $+$ {\it{c\/}}) $\div$ {\it{e\/}}$\;${\bf  endif}\-)\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-quotient \\ \index{quotient-quotient}
(({\it{b\/}} $\div$ {\it{a\/}}) $\div$ {\it{c\/}}) $=$ ({\it{b\/}} $\div$ ({\it{a\/}} $*$ {\it{c\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-exp \\ \index{quotient-exp}
\=\+({\it{k\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{exp}}\,({\it{n\/}}, {\it{k\/}})\index{exp} $\div$ {\it{n\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{exp}}\,({\it{n\/}}, {\it{k\/}} $-\;1$)\index{exp}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  leq-quotient \\ \index{leq-quotient}
\=\+({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$\=\+{\bf if }({\it{b\/}} $\div$ {\it{c\/}}) $<$ ({\it{a\/}} $\div$ {\it{c\/}})$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-1-arg2 \\ \index{quotient-1-arg2}
({\it{n\/}} $\div$ {\tt{1}}) $=$ {\rm{fix}}\,({\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-1-arg1-casesplit \\ \index{quotient-1-arg1-casesplit}
({\it{n\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{n\/}} $=$ {\tt{1}}) $\vee$ ({\tt{1}} $<$ {\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-1-arg1 \\ \index{quotient-1-arg1}
\=\+({\tt{1}} $\div$ {\it{n\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $=$ {\tt{1}}$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-x-x \\ \index{quotient-x-x}
({\it{x\/}} $\not\simeq {\tt{0}}$) $\rightarrow$ (({\it{x\/}} $\div$ {\it{x\/}}) $=$ {\tt{1}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-quotient \\ \index{lessp-quotient}
(({\it{i\/}} $\div$ {\it{j\/}}) $<$ {\it{i\/}}) $=$ (({\it{i\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{j\/}} $\not=$ {\tt{1}}))
\end{tabbing}


\noindent{\sc Event}:   Enable quotient-times-instance-temp; name this event `quotient-times-instance-temp-off'.\index{quotient-times-instance-temp-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable remainder-equals-its-first-argument; name this event `remainder-equals-its-first-argument-off'.\index{remainder-equals-its-first-argu!ment-off}

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{quotients}} to consist of the following events: lessp-quotient,
quotient-x-x,
quotient-1-arg1,
quotient-1-arg1-casesplit,
quotient-1-arg2,
leq-quotient,
quotient-exp,
quotient-quotient,
quotient-plus-times-times-instance,
quotient-plus-times-times,
quotient-plus-times-times,
quotient-lessp-arg1,
quotient-remainder-instance,
quotient-remainder,
quotient-remainder-times,
quotient-difference3,
quotient-difference2,
quotient-difference1,
quotient-times-times,
quotient-times-instance,
quotient-times,
quotient-plus,
quotient-sub1,
equal-quotient-0,
quotient-add1,
quotient-zero,
quotient-of-non-number,
quotient-noop.\index{quotients}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  exp-zero \\ \index{exp-zero}
({\it{k\/}} $\simeq {\tt{0}}$) $\rightarrow$ ({\rm{exp}}\,({\it{n\/}}, {\it{k\/}})\index{exp} $=$ {\tt{1}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-add1 \\ \index{exp-add1}
{\rm{exp}}\,({\it{n\/}}, $1\;+$ {\it{k\/}})\index{exp} $=$ ({\it{n\/}} $*$ {\rm{exp}}\,({\it{n\/}}, {\it{k\/}})\index{exp})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-plus \\ \index{exp-plus}
{\rm{exp}}\,({\it{i\/}}, {\it{j\/}} $+$ {\it{k\/}})\index{exp} $=$ ({\rm{exp}}\,({\it{i\/}}, {\it{j\/}})\index{exp} $*$ {\rm{exp}}\,({\it{i\/}}, {\it{k\/}})\index{exp})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-0-arg1 \\ \index{exp-0-arg1}
\=\+{\rm{exp}}\,({\tt{0}}, {\it{k\/}})\index{exp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{k\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-1-arg1 \\ \index{exp-1-arg1}
{\rm{exp}}\,({\tt{1}}, {\it{k\/}})\index{exp} $=$ {\tt{1}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-0-arg2 \\ \index{exp-0-arg2}
{\rm{exp}}\,({\it{n\/}}, {\tt{0}})\index{exp} $=$ {\tt{1}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-times \\ \index{exp-times}
{\rm{exp}}\,({\it{i\/}} $*$ {\it{j\/}}, {\it{k\/}})\index{exp} $=$ ({\rm{exp}}\,({\it{i\/}}, {\it{k\/}})\index{exp} $*$ {\rm{exp}}\,({\it{j\/}}, {\it{k\/}})\index{exp})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-exp \\ \index{exp-exp}
{\rm{exp}}\,({\rm{exp}}\,({\it{i\/}}, {\it{j\/}})\index{exp}, {\it{k\/}})\index{exp} $=$ {\rm{exp}}\,({\it{i\/}}, {\it{j\/}} $*$ {\it{k\/}})\index{exp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-exp-0 \\ \index{equal-exp-0}
({\rm{exp}}\,({\it{n\/}}, {\it{k\/}})\index{exp} $=$ {\tt{0}}) $=$ (({\it{n\/}} $\simeq {\tt{0}}$) $\wedge$ ({\it{k\/}} $\not\simeq {\tt{0}}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-exp-1 \\ \index{equal-exp-1}
\=\+({\rm{exp}}\,({\it{n\/}}, {\it{k\/}})\index{exp} $=$ {\tt{1}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{k\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\it{n\/}} $=$ {\tt{1}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  exp-difference \\ \index{exp-difference}
\=\+(\=\+\=\+{\bf if }{\it{b\/}} $<$ {\it{c\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\wedge$$\;\;\;\;$({\it{a\/}} $\not\simeq {\tt{0}}$))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{exp}}\,({\it{a\/}}, {\it{b\/}} $-$ {\it{c\/}})\index{exp} $=$ ({\rm{exp}}\,({\it{a\/}}, {\it{b\/}})\index{exp} $\div$ {\rm{exp}}\,({\it{a\/}}, {\it{c\/}})\index{exp}))\-
\end{tabbing}


\noindent{\sc Event}:   Let us define the theory {\it{exponentiation}} to consist of the following events: equal-exp-0,
equal-exp-1,
exp-exp,
exp-add1,
exp-times,
exp-1-arg1,
exp-zero,
exp-0-arg2,
exp-0-arg1,
exp-difference,
exp-plus.\index{exponentiation}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{log} \\  
\=\+{\rm{log}}\,({\it{base\/}}, {\it{n\/}})\index{log} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{base\/}} $<$ {\tt{2}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }$1\;+$ {\rm{log}}\,({\it{base\/}}, {\it{n\/}} $\div$ {\it{base\/}})\index{log}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-log-0 \\ \index{equal-log-0}
({\rm{log}}\,({\it{base\/}}, {\it{n\/}})\index{log} $=$ {\tt{0}}) $=$ (({\it{base\/}} $<$ {\tt{2}}) $\vee$ ({\it{n\/}} $\simeq {\tt{0}}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-0 \\ \index{log-0}
({\it{n\/}} $\simeq {\tt{0}}$) $\rightarrow$ ({\rm{log}}\,({\it{base\/}}, {\it{n\/}})\index{log} $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-1 \\ \index{log-1}
({\tt{1}} $<$ {\it{base\/}}) $\rightarrow$ ({\rm{log}}\,({\it{base\/}}, {\tt{1}})\index{log} $=$ {\tt{1}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{double-log-induction} \\  
\=\+{\rm{double-log-induction}}\,({\it{base\/}}, {\it{a\/}}, {\it{b\/}})\index{double-log-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{base\/}} $<$ {\tt{2}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\it{a\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\it{b\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{double-log-induction}}\,({\it{base\/}}, {\it{a\/}} $\div$ {\it{base\/}}, {\it{b\/}} $\div$ {\it{base\/}})\index{double-log-induction}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  leq-log-log \\ \index{leq-log-log}
\=\+\=\+{\bf if }{\it{m\/}} $<$ {\it{n\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
$\rightarrow$$\;\;\;\;$\=\+{\bf if }{\rm{log}}\,({\it{c\/}}, {\it{m\/}})\index{log} $<$ {\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-quotient \\ \index{log-quotient}
({\tt{1}} $<$ {\it{c\/}}) $\rightarrow$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ {\it{c\/}})\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log} $-\;1$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-quotient-times-proof \\ \index{log-quotient-times-proof}
({\tt{1}} $<$ {\it{c\/}}) $\rightarrow$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ ({\it{c\/}} $*$ {\it{m\/}}))\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ {\it{m\/}})\index{log} $-\;1$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-quotient-times \\ \index{log-quotient-times}
\=\+({\tt{1}} $<$ {\it{c\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ ({\it{c\/}} $*$ {\it{m\/}}))\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ {\it{m\/}})\index{log} $-\;1$)) \\ 
$\wedge$$\;\;\;\;$({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ ({\it{m\/}} $*$ {\it{c\/}}))\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ {\it{m\/}})\index{log} $-\;1$)))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-quotient-exp \\ \index{log-quotient-exp}
({\tt{1}} $<$ {\it{c\/}}) $\rightarrow$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $\div$ {\rm{exp}}\,({\it{c\/}}, {\it{m\/}})\index{exp})\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log} $-$ {\it{m\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-times-proof \\ \index{log-times-proof}
(({\tt{1}} $<$ {\it{c\/}}) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$)) $\rightarrow$ ({\rm{log}}\,({\it{c\/}}, {\it{c\/}} $*$ {\it{n\/}})\index{log} $=$ ($1\;+$ {\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-times \\ \index{log-times}
\=\+(({\tt{1}} $<$ {\it{c\/}}) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{log}}\,({\it{c\/}}, {\it{c\/}} $*$ {\it{n\/}})\index{log} $=$ ($1\;+$ {\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log})) \\ 
$\wedge$$\;\;\;\;$({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $*$ {\it{c\/}})\index{log} $=$ ($1\;+$ {\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-times-exp-proof \\ \index{log-times-exp-proof}
(({\tt{1}} $<$ {\it{c\/}}) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$)) $\rightarrow$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $*$ {\rm{exp}}\,({\it{c\/}}, {\it{m\/}})\index{exp})\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log} $+$ {\it{m\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-times-exp \\ \index{log-times-exp}
\=\+(({\tt{1}} $<$ {\it{c\/}}) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{log}}\,({\it{c\/}}, {\it{n\/}} $*$ {\rm{exp}}\,({\it{c\/}}, {\it{m\/}})\index{exp})\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log} $+$ {\it{m\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{log}}\,({\it{c\/}}, {\rm{exp}}\,({\it{c\/}}, {\it{m\/}})\index{exp} $*$ {\it{n\/}})\index{log} $=$ ({\rm{log}}\,({\it{c\/}}, {\it{n\/}})\index{log} $+$ {\it{m\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  log-exp \\ \index{log-exp}
({\tt{1}} $<$ {\it{c\/}}) $\rightarrow$ ({\rm{log}}\,({\it{c\/}}, {\rm{exp}}\,({\it{c\/}}, {\it{n\/}})\index{exp})\index{log} $=$ ($1\;+$ {\it{n\/}}))
\end{tabbing}


\noindent{\sc Event}:   Let us define the theory {\it{logs}} to consist of the following events: log-exp,
log-times-exp,
log-times,
log-quotient-exp,
log-quotient-times,
log-quotient,
log-1,
log-0,
equal-log-0,
exp-exp.\index{logs}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{gcd} \\  
\=\+{\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{fix}}\,({\it{y\/}}) \\ 
{\bf elseif }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{x\/}} \\ 
{\bf elseif }{\it{x\/}} $<$ {\it{y\/}}$\;\;${\bf then }{\rm{gcd}}\,({\it{x\/}}, {\it{y\/}} $-$ {\it{x\/}})\index{gcd} \\ 
{\bf else }{\rm{gcd}}\,({\it{x\/}} $-$ {\it{y\/}}, {\it{y\/}})\index{gcd}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-gcd \\ \index{commutativity-of-gcd}
{\rm{gcd}}\,({\it{b\/}}, {\it{a\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{single-number-induction} \\  
\=\+{\rm{single-number-induction}}\,({\it{n\/}})\index{single-number-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{single-number-induction}}\,({\it{n\/}} $-\;1$)\index{single-number-induction}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-0 \\ \index{gcd-0}
({\rm{gcd}}\,({\tt{0}}, {\it{x\/}})\index{gcd} $=$ {\rm{fix}}\,({\it{x\/}})) $\wedge$ ({\rm{gcd}}\,({\it{x\/}}, {\tt{0}})\index{gcd} $=$ {\rm{fix}}\,({\it{x\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-1 \\ \index{gcd-1}
({\rm{gcd}}\,({\tt{1}}, {\it{x\/}})\index{gcd} $=$ {\tt{1}}) $\wedge$ ({\rm{gcd}}\,({\it{x\/}}, {\tt{1}})\index{gcd} $=$ {\tt{1}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-gcd-0 \\ \index{equal-gcd-0}
({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd} $=$ {\tt{0}}) $=$ (({\it{a\/}} $\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $\simeq {\tt{0}}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-gcd \\ \index{lessp-gcd}
({\it{b\/}} $\not\simeq {\tt{0}}$) $\rightarrow$ ((({\it{b\/}} $<$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}) $=$ {\bf{f}}) $\wedge$ (({\it{b\/}} $<$ {\rm{gcd}}\,({\it{b\/}}, {\it{a\/}})\index{gcd}) $=$ {\bf{f}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-plus-instance-temp-proof \\ \index{gcd-plus-instance-temp-proof}
{\rm{gcd}}\,({\it{a\/}}, {\it{a\/}} $+$ {\it{b\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-plus-instance-temp \\ \index{gcd-plus-instance-temp}
({\rm{gcd}}\,({\it{a\/}}, {\it{a\/}} $+$ {\it{b\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}) $\wedge$ ({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}} $+$ {\it{a\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-plus-proof \\ \index{gcd-plus-proof}
(({\it{b\/}} ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ {\tt{0}}) $\rightarrow$ ({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}} $+$ {\it{c\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-plus \\ \index{gcd-plus}
\=\+(({\it{b\/}} ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}} $+$ {\it{c\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd}) \\ 
$\wedge$$\;\;\;\;$({\rm{gcd}}\,({\it{a\/}}, {\it{c\/}} $+$ {\it{b\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd}) \\ 
$\wedge$$\;\;\;\;$({\rm{gcd}}\,({\it{b\/}} $+$ {\it{c\/}}, {\it{a\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd}) \\ 
$\wedge$$\;\;\;\;$({\rm{gcd}}\,({\it{c\/}} $+$ {\it{b\/}}, {\it{a\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-plus-instance \\ \index{gcd-plus-instance}
({\rm{gcd}}\,({\it{a\/}}, {\it{a\/}} $+$ {\it{b\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}) $\wedge$ ({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}} $+$ {\it{a\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-gcd \\ \index{remainder-gcd}
(({\it{a\/}} ${}${\bf{mod}}${}$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}) $=$ {\tt{0}}) $\wedge$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  distributivity-of-times-over-gcd-proof \\ \index{distributivity-of-times-over-gc!d-proof}
{\rm{gcd}}\,({\it{x\/}} $*$ {\it{z\/}}, {\it{y\/}} $*$ {\it{z\/}})\index{gcd} $=$ ({\it{z\/}} $*$ {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  distributivity-of-times-over-gcd \\ \index{distributivity-of-times-over-gc!d}
\=\+({\rm{gcd}}\,({\it{x\/}} $*$ {\it{z\/}}, {\it{y\/}} $*$ {\it{z\/}})\index{gcd} $=$ ({\it{z\/}} $*$ {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})) \\ 
$\wedge$$\;\;\;\;$({\rm{gcd}}\,({\it{z\/}} $*$ {\it{x\/}}, {\it{y\/}} $*$ {\it{z\/}})\index{gcd} $=$ ({\it{z\/}} $*$ {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})) \\ 
$\wedge$$\;\;\;\;$({\rm{gcd}}\,({\it{x\/}} $*$ {\it{z\/}}, {\it{z\/}} $*$ {\it{y\/}})\index{gcd} $=$ ({\it{z\/}} $*$ {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})) \\ 
$\wedge$$\;\;\;\;$({\rm{gcd}}\,({\it{z\/}} $*$ {\it{x\/}}, {\it{z\/}} $*$ {\it{y\/}})\index{gcd} $=$ ({\it{z\/}} $*$ {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-is-the-greatest \\ \index{gcd-is-the-greatest}
\=\+(({\it{x\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{y\/}} $\not\simeq {\tt{0}}$) $\wedge$ (({\it{x\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{y\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$\=\+{\bf if }{\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd} $<$ {\it{z\/}}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  common-divisor-divides-gcd \\ \index{common-divisor-divides-gcd}
((({\it{x\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{y\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}})) $\rightarrow$ (({\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-gcd-zero-case \\ \index{associativity-of-gcd-zero-case}
(({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{b\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{c\/}} $\simeq {\tt{0}}$)) $\rightarrow$ ({\rm{gcd}}\,({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}, {\it{c\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\rm{gcd}}\,({\it{b\/}}, {\it{c\/}})\index{gcd})\index{gcd})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-gcd \\ \index{associativity-of-gcd}
{\rm{gcd}}\,({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}, {\it{c\/}})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\rm{gcd}}\,({\it{b\/}}, {\it{c\/}})\index{gcd})\index{gcd}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-gcd-zero-case \\ \index{commutativity2-of-gcd-zero-case}
(({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{b\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{c\/}} $\simeq {\tt{0}}$)) $\rightarrow$ ({\rm{gcd}}\,({\it{b\/}}, {\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\rm{gcd}}\,({\it{b\/}}, {\it{c\/}})\index{gcd})\index{gcd})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-gcd \\ \index{commutativity2-of-gcd}
{\rm{gcd}}\,({\it{b\/}}, {\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd})\index{gcd} $=$ {\rm{gcd}}\,({\it{a\/}}, {\rm{gcd}}\,({\it{b\/}}, {\it{c\/}})\index{gcd})\index{gcd}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-x-x \\ \index{gcd-x-x}
{\rm{gcd}}\,({\it{x\/}}, {\it{x\/}})\index{gcd} $=$ {\rm{fix}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-idempotence \\ \index{gcd-idempotence}
({\rm{gcd}}\,({\it{x\/}}, {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})\index{gcd} $=$ {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd}) $\wedge$ ({\rm{gcd}}\,({\it{y\/}}, {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})\index{gcd} $=$ {\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})
\end{tabbing}


\noindent{\sc Event}:   Let us define the theory {\it{gcds}} to consist of the following events: commutativity2-of-gcd,
associativity-of-gcd,
common-divisor-divides-gcd,
distributivity-of-times-over-gcd,
lessp-gcd,
equal-gcd-0,
gcd-0,
gcd-idempotence,
gcd-x-x,
remainder-gcd,
gcd-plus,
gcd-plus-instance,
gcd-1,
commutativity-of-gcd.\index{gcds}

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{arithmetic}} to consist of the following events: addition,
multiplication,
remainders,
quotients,
exponentiation,
logs,
gcds.\index{arithmetic}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{integerp} \\  
{\rm{integerp}}\,({\it{x\/}})\index{integerp} $=$ (({\it{x\/}} $\in\;${\bf{N}}${}$) $\vee$ ({\rm{negativep}}\,({\it{x\/}}) $\wedge$ ({\rm{negative-guts}}\,({\it{x\/}}) $\not\simeq {\tt{0}}$)))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{fix-int} \\  
\=\+{\rm{fix-int}}\,({\it{x\/}})\index{fix-int} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{integerp}}\,({\it{x\/}})\index{integerp}$\;\;${\bf then }{\it{x\/}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{izerop} \\  
\=\+{\rm{izerop}}\,({\it{i\/}})\index{izerop} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{integerp}}\,({\it{i\/}})\index{integerp}$\;\;${\bf then }{\it{i\/}} $=$ {\tt{0}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ilessp} \\  
\=\+{\rm{ilessp}}\,({\it{i\/}}, {\it{j\/}})\index{ilessp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{negativep}}\,({\it{i\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\rm{negative-guts}}\,({\it{j\/}}) $<$ {\rm{negative-guts}}\,({\it{i\/}}) \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\it{i\/}} $<$ {\it{j\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ileq}$\;\;$
{\rm{ileq}}\,({\it{i\/}}, {\it{j\/}})\index{ileq} $=$ ({\rm{ilessp}}\,({\it{i\/}}, {\it{j\/}})\index{ilessp} $\vee$ ({\it{i\/}} $=$ {\it{j\/}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{iplus} \\  
\=\+{\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{negativep}}\,({\it{x\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{negativep}}\,({\it{y\/}}) \\ 
{\bf then }\=\+{\bf if }({\rm{negative-guts}}\,({\it{x\/}}) $\simeq {\tt{0}}$) $\wedge$ ({\rm{negative-guts}}\,({\it{y\/}}) $\simeq {\tt{0}}$)$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }$-$ ({\rm{negative-guts}}\,({\it{x\/}}) $+$ {\rm{negative-guts}}\,({\it{y\/}}))$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{y\/}} $<$ {\rm{negative-guts}}\,({\it{x\/}})$\;\;${\bf then }$-$ ({\rm{negative-guts}}\,({\it{x\/}}) $-$ {\it{y\/}}) \\ 
{\bf else }{\it{y\/}} $-$ {\rm{negative-guts}}\,({\it{x\/}})$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{negativep}}\,({\it{y\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{x\/}} $<$ {\rm{negative-guts}}\,({\it{y\/}})$\;\;${\bf then }$-$ ({\rm{negative-guts}}\,({\it{y\/}}) $-$ {\it{x\/}}) \\ 
{\bf else }{\it{x\/}} $-$ {\rm{negative-guts}}\,({\it{y\/}})$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}} $+$ {\it{y\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ineg} \\  
\=\+{\rm{ineg}}\,({\it{x\/}})\index{ineg} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{negativep}}\,({\it{x\/}})$\;\;${\bf then }{\rm{negative-guts}}\,({\it{x\/}}) \\ 
{\bf elseif }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }$-$ {\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{idifference}$\;\;$
{\rm{idifference}}\,({\it{x\/}}, {\it{y\/}})\index{idifference} $=$ {\rm{iplus}}\,({\it{x\/}}, {\rm{ineg}}\,({\it{y\/}})\index{ineg})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{iabs} \\  
\=\+{\rm{iabs}}\,({\it{i\/}})\index{iabs} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{negativep}}\,({\it{i\/}})$\;\;${\bf then }{\rm{negative-guts}}\,({\it{i\/}}) \\ 
{\bf else }{\rm{fix}}\,({\it{i\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{itimes} \\  
\=\+{\rm{itimes}}\,({\it{i\/}}, {\it{j\/}})\index{itimes} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{negativep}}\,({\it{i\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\rm{negative-guts}}\,({\it{i\/}}) $*$ {\rm{negative-guts}}\,({\it{j\/}}) \\ 
{\bf else }{\rm{fix-int}}\,($-$ ({\rm{negative-guts}}\,({\it{i\/}}) $*$ {\it{j\/}}))\index{fix-int}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\rm{fix-int}}\,($-$ ({\it{i\/}} $*$ {\rm{negative-guts}}\,({\it{j\/}})))\index{fix-int} \\ 
{\bf else }{\it{i\/}} $*$ {\it{j\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-fix-int \\ \index{integerp-fix-int}
{\rm{integerp}}\,({\rm{fix-int}}\,({\it{x\/}})\index{fix-int})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-iplus \\ \index{integerp-iplus}
{\rm{integerp}}\,({\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-idifference \\ \index{integerp-idifference}
{\rm{integerp}}\,({\rm{idifference}}\,({\it{x\/}}, {\it{y\/}})\index{idifference})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-ineg \\ \index{integerp-ineg}
{\rm{integerp}}\,({\rm{ineg}}\,({\it{x\/}})\index{ineg})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-iabs \\ \index{integerp-iabs}
{\rm{integerp}}\,({\rm{iabs}}\,({\it{x\/}})\index{iabs})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-itimes \\ \index{integerp-itimes}
{\rm{integerp}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-fix-int \\ \index{fix-int-fix-int}
{\rm{fix-int}}\,({\rm{fix-int}}\,({\it{x\/}})\index{fix-int})\index{fix-int} $=$ {\rm{fix-int}}\,({\it{x\/}})\index{fix-int}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-iplus \\ \index{fix-int-iplus}
{\rm{fix-int}}\,({\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus})\index{fix-int} $=$ {\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-idifference \\ \index{fix-int-idifference}
{\rm{fix-int}}\,({\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference})\index{fix-int} $=$ {\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-ineg \\ \index{fix-int-ineg}
{\rm{fix-int}}\,({\rm{ineg}}\,({\it{x\/}})\index{ineg})\index{fix-int} $=$ {\rm{ineg}}\,({\it{x\/}})\index{ineg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-iabs \\ \index{fix-int-iabs}
{\rm{fix-int}}\,({\rm{iabs}}\,({\it{x\/}})\index{iabs})\index{fix-int} $=$ {\rm{iabs}}\,({\it{x\/}})\index{iabs}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-itimes \\ \index{fix-int-itimes}
{\rm{fix-int}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes})\index{fix-int} $=$ {\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  ineg-id \\ \index{ineg-id}
($\neg$ {\rm{integerp}}\,({\it{x\/}})\index{integerp}) $\rightarrow$ ({\rm{ineg}}\,({\it{x\/}})\index{ineg} $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  ineg-iplus \\ \index{ineg-iplus}
{\rm{ineg}}\,({\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus})\index{ineg} $=$ {\rm{iplus}}\,({\rm{ineg}}\,({\it{a\/}})\index{ineg}, {\rm{ineg}}\,({\it{b\/}})\index{ineg})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  ineg-ineg \\ \index{ineg-ineg}
{\rm{ineg}}\,({\rm{ineg}}\,({\it{x\/}})\index{ineg})\index{ineg} $=$ {\rm{fix-int}}\,({\it{x\/}})\index{fix-int}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  ineg-idifference \\ \index{ineg-idifference}
{\rm{ineg}}\,({\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference})\index{ineg} $=$ {\rm{iplus}}\,({\rm{ineg}}\,({\it{a\/}})\index{ineg}, {\it{b\/}})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  ineg-fix-int \\ \index{ineg-fix-int}
{\rm{ineg}}\,({\rm{fix-int}}\,({\it{x\/}})\index{fix-int})\index{ineg} $=$ {\rm{ineg}}\,({\it{x\/}})\index{ineg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-left-id \\ \index{iplus-left-id}
($\neg$ {\rm{integerp}}\,({\it{x\/}})\index{integerp}) $\rightarrow$ ({\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus} $=$ {\rm{fix-int}}\,({\it{y\/}})\index{fix-int})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-right-id \\ \index{iplus-right-id}
($\neg$ {\rm{integerp}}\,({\it{y\/}})\index{integerp}) $\rightarrow$ ({\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus} $=$ {\rm{fix-int}}\,({\it{x\/}})\index{fix-int})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-0 \\ \index{iplus-0}
{\rm{iplus}}\,({\tt{0}}, {\it{x\/}})\index{iplus} $=$ {\rm{fix-int}}\,({\it{x\/}})\index{fix-int}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-iplus \\ \index{commutativity2-of-iplus}
{\rm{iplus}}\,({\it{x\/}}, {\rm{iplus}}\,({\it{y\/}}, {\it{z\/}})\index{iplus})\index{iplus} $=$ {\rm{iplus}}\,({\it{y\/}}, {\rm{iplus}}\,({\it{x\/}}, {\it{z\/}})\index{iplus})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-iplus \\ \index{commutativity-of-iplus}
{\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus} $=$ {\rm{iplus}}\,({\it{y\/}}, {\it{x\/}})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-iplus \\ \index{associativity-of-iplus}
{\rm{iplus}}\,({\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus}, {\it{z\/}})\index{iplus} $=$ {\rm{iplus}}\,({\it{x\/}}, {\rm{iplus}}\,({\it{y\/}}, {\it{z\/}})\index{iplus})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-cancellation \\ \index{iplus-cancellation}
({\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus} $=$ {\rm{iplus}}\,({\it{a\/}}, {\it{c\/}})\index{iplus}) $=$ ({\rm{fix-int}}\,({\it{b\/}})\index{fix-int} $=$ {\rm{fix-int}}\,({\it{c\/}})\index{fix-int})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-ineg1 \\ \index{iplus-ineg1}
{\rm{iplus}}\,({\it{a\/}}, {\rm{ineg}}\,({\it{a\/}})\index{ineg})\index{iplus} $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-ineg2 \\ \index{iplus-ineg2}
{\rm{iplus}}\,({\rm{ineg}}\,({\it{a\/}})\index{ineg}, {\it{a\/}})\index{iplus} $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-fix-int1 \\ \index{iplus-fix-int1}
{\rm{iplus}}\,({\rm{fix-int}}\,({\it{a\/}})\index{fix-int}, {\it{b\/}})\index{iplus} $=$ {\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-fix-int2 \\ \index{iplus-fix-int2}
{\rm{iplus}}\,({\it{a\/}}, {\rm{fix-int}}\,({\it{b\/}})\index{fix-int})\index{iplus} $=$ {\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-idifference-arg1 \\ \index{iplus-idifference-arg1}
{\rm{iplus}}\,({\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference}, {\it{c\/}})\index{iplus} $=$ {\rm{idifference}}\,({\rm{iplus}}\,({\it{a\/}}, {\it{c\/}})\index{iplus}, {\it{b\/}})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-idifference-arg2 \\ \index{iplus-idifference-arg2}
{\rm{iplus}}\,({\it{a\/}}, {\rm{idifference}}\,({\it{b\/}}, {\it{c\/}})\index{idifference})\index{iplus} $=$ {\rm{idifference}}\,({\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus}, {\it{c\/}})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-x-x \\ \index{idifference-x-x}
{\rm{idifference}}\,({\it{x\/}}, {\it{x\/}})\index{idifference} $=$ {\tt{0}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-iplus-canonicalizer1 \\ \index{idifference-iplus-canonicalizer!1}
{\rm{idifference}}\,({\rm{iplus}}\,({\it{a\/}}, {\it{b\/}})\index{iplus}, {\it{c\/}})\index{idifference} $=$ {\rm{iplus}}\,({\it{a\/}}, {\rm{idifference}}\,({\it{b\/}}, {\it{c\/}})\index{idifference})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-iplus \\ \index{idifference-iplus}
\=\+({\rm{idifference}}\,({\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus}, {\it{x\/}})\index{idifference} $=$ {\rm{fix-int}}\,({\it{y\/}})\index{fix-int}) \\ 
$\wedge$$\;\;\;\;$({\rm{idifference}}\,({\rm{iplus}}\,({\it{y\/}}, {\it{x\/}})\index{iplus}, {\it{x\/}})\index{idifference} $=$ {\rm{fix-int}}\,({\it{y\/}})\index{fix-int})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-right-id \\ \index{idifference-right-id}
($\neg$ {\rm{integerp}}\,({\it{b\/}})\index{integerp}) $\rightarrow$ ({\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference} $=$ {\rm{fix-int}}\,({\it{a\/}})\index{fix-int})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-idifference \\ \index{idifference-idifference}
{\rm{idifference}}\,({\rm{idifference}}\,({\it{x\/}}, {\it{y\/}})\index{idifference}, {\it{z\/}})\index{idifference} $=$ {\rm{idifference}}\,({\it{x\/}}, {\rm{iplus}}\,({\it{y\/}}, {\it{z\/}})\index{iplus})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-fix-int \\ \index{idifference-fix-int}
{\rm{idifference}}\,({\it{a\/}}, {\rm{fix-int}}\,({\it{b\/}})\index{fix-int})\index{idifference} $=$ {\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-0 \\ \index{idifference-0}
{\rm{idifference}}\,({\it{x\/}}, {\tt{0}})\index{idifference} $=$ {\rm{fix-int}}\,({\it{x\/}})\index{fix-int}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idifference-cancellation-1 \\ \index{idifference-cancellation-1}
({\rm{idifference}}\,({\it{x\/}}, {\it{y\/}})\index{idifference} $=$ {\rm{idifference}}\,({\it{z\/}}, {\it{y\/}})\index{idifference}) $=$ ({\rm{fix-int}}\,({\it{x\/}})\index{fix-int} $=$ {\rm{fix-int}}\,({\it{z\/}})\index{fix-int})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-idifference-0 \\ \index{equal-idifference-0}
({\tt{0}} $=$ {\rm{idifference}}\,({\it{x\/}}, {\it{y\/}})\index{idifference}) $=$ ({\rm{fix-int}}\,({\it{x\/}})\index{fix-int} $=$ {\rm{fix-int}}\,({\it{y\/}})\index{fix-int})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{iplus-fringe} \\  
\=\+{\rm{iplus-fringe}}\,({\it{x\/}})\index{iplus-fringe} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}}) \\ 
{\bf then }{\rm{append}}\,({\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe}, {\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe}) \\ 
{\bf else }{\rm{list}}\,({\it{x\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{iplus-tree} \\  
\=\+{\rm{iplus-tree}}\,({\it{l\/}})\index{iplus-tree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{l\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\tt{'}}{\tt{'}}{\tt{0}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{l\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{fix-int}}, {\rm{car}}\,({\it{l\/}})) \\ 
{\bf elseif }{\rm{cddr}}\,({\it{l\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{iplus}}, {\rm{car}}\,({\it{l\/}}), {\rm{cadr}}\,({\it{l\/}})) \\ 
{\bf else }{\rm{list}}\,({\tt{'}}{\tt{iplus}}, {\rm{car}}\,({\it{l\/}}), {\rm{iplus-tree}}\,({\rm{cdr}}\,({\it{l\/}}))\index{iplus-tree})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-iplus} \\  
\=\+{\rm{cancel-iplus}}\,({\it{x\/}})\index{cancel-iplus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{equal}}) \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}}) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{equal}}, \\ 
{\rm{iplus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\-\index{bagint})\-\index{bagdiff})\index{iplus-tree}, \\ 
{\rm{iplus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\-\index{bagint})\-\index{bagdiff})\index{iplus-tree})\- \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caddr}}\,({\it{x\/}}) $\in$ {\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{if}}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{integerp}}, {\rm{caddr}}\,({\it{x\/}})), \\ 
{\rm{cons}}\,(\=\+{\tt{'}}{\tt{equal}}, \\ 
{\rm{cons}}\,(\=\+{\rm{iplus-tree}}\,({\rm{delete}}\,(\=\+{\rm{caddr}}\,({\it{x\/}}), \\ 
{\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe})\-\index{delete})\index{iplus-tree}, \\ 
{\tt{'}}{\tt{(}}{\tt{'}}{\tt{0}}{\tt{)}})\-)\-, \\ 
{\rm{list}}\,({\tt{'}}{\tt{quote}}, {\bf{f}}))\- \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cadr}}\,({\it{x\/}}) $\in$ {\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{if}}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{integerp}}, {\rm{cadr}}\,({\it{x\/}})), \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{equal}}, \\ 
{\tt{'}}{\tt{'}}{\tt{0}}, \\ 
{\rm{iplus-tree}}\,({\rm{delete}}\,({\rm{cadr}}\,({\it{x\/}}), {\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\index{delete})\index{iplus-tree})\-, \\ 
{\rm{list}}\,({\tt{'}}{\tt{quote}}, {\bf{f}}))\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-eval\$-iplus \\ \index{integerp-eval\$-iplus}
({\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}})) $\rightarrow$ {\rm{integerp}}\,({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}))\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-eval\$-iplus-tree \\ \index{integerp-eval\$-iplus-tree}
{\rm{integerp}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{l\/}})\index{iplus-tree}, {\it{a\/}}))\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-eval\$-bridge \\ \index{integerp-eval\$-bridge}
({\rm{eval\$}}\,({\bf{t}}, {\it{z\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{x\/}})\index{iplus-tree}, {\it{a\/}})) $\rightarrow$ {\rm{integerp}}\,({\rm{eval\$}}\,({\bf{t}}, {\it{z\/}}, {\it{a\/}}))\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{eval\$-iplus-tree-append-inducti!on} \\  
\=\+{\rm{eval\$-iplus-tree-append-induction}}\,({\it{a\/}}, {\it{b\/}}, {\it{c\/}})\index{eval\$-iplus-tree-append-inducti!on} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{a\/}})$\;\;${\bf then }{\rm{eval\$-iplus-tree-append-induction}}\,({\rm{cdr}}\,({\it{a\/}}), {\it{b\/}}, {\it{c\/}})\index{eval\$-iplus-tree-append-inducti!on} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-iplus-tree-append \\ \index{eval\$-iplus-tree-append}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{iplus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;${\rm{iplus}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{x\/}})\index{iplus-tree}, {\it{a\/}}), {\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{y\/}})\index{iplus-tree}, {\it{a\/}}))\index{iplus}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-tree-iplus-fringe \\ \index{iplus-tree-iplus-fringe}
{\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\rm{iplus-fringe}}\,({\it{x\/}})\index{iplus-fringe})\index{iplus-tree}, {\it{a\/}}) $=$ {\rm{fix-int}}\,({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}))\index{fix-int}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-tree-delete \\ \index{iplus-tree-delete}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\rm{delete}}\,({\it{x\/}}, {\it{y\/}})\index{delete})\index{iplus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in$ {\it{y\/}}$\;\;${\bf then }{\rm{idifference}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{y\/}})\index{iplus-tree}, {\it{a\/}}), {\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}))\index{idifference} \\ 
{\bf else }{\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{y\/}})\index{iplus-tree}, {\it{a\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-tree-bagdiff \\ \index{iplus-tree-bagdiff}
\=\+{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\rm{bagdiff}}\,({\it{y\/}}, {\it{x\/}})\index{bagdiff})\index{iplus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;${\rm{idifference}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{y\/}})\index{iplus-tree}, {\it{a\/}}), {\rm{eval\$}}\,({\bf{t}}, {\rm{iplus-tree}}\,({\it{x\/}})\index{iplus-tree}, {\it{a\/}}))\index{idifference})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-integerp-implies-not-equal-iplus \\ \index{not-integerp-implies-not-equal-ip!lus}
($\neg$ {\rm{integerp}}\,({\it{a\/}})\index{integerp}) $\rightarrow$ (({\it{a\/}} $=$ {\rm{iplus}}\,({\it{b\/}}, {\it{c\/}})\index{iplus}) $=$ {\bf{f}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-iplus \\ \index{correctness-of-cancel-iplus}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-iplus}}\,({\it{x\/}})\index{cancel-iplus}, {\it{a\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-idifference-idifference \\ \index{iplus-idifference-idifference}
\=\+{\rm{iplus}}\,({\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference}, {\rm{idifference}}\,({\it{c\/}}, {\it{d\/}})\index{idifference})\index{iplus} \\ 
$=$$\;\;\;\;${\rm{idifference}}\,({\rm{iplus}}\,({\it{a\/}}, {\it{c\/}})\index{iplus}, {\rm{iplus}}\,({\it{b\/}}, {\it{d\/}})\index{iplus})\index{idifference}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-idifference} \\  
\=\+{\rm{cancel-idifference}}\,({\it{x\/}})\index{cancel-idifference} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{idifference}}) \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}}) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{idifference}}, \\ 
{\rm{iplus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\-\index{bagint})\-\index{bagdiff})\index{iplus-tree}, \\ 
{\rm{iplus-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe}, \\ 
{\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\-\index{bagint})\-\index{bagdiff})\index{iplus-tree})\- \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{cadr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caddr}}\,({\it{x\/}}) $\in$ {\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe})\- \\ 
{\bf then }{\rm{iplus-tree}}\,({\rm{delete}}\,({\rm{caddr}}\,({\it{x\/}}), {\rm{iplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{iplus-fringe})\index{delete})\index{iplus-tree} \\ 
{\bf elseif }\=\+{\rm{listp}}\,({\rm{caddr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{iplus}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cadr}}\,({\it{x\/}}) $\in$ {\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\- \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{ineg}}, \\ 
{\rm{iplus-tree}}\,({\rm{delete}}\,({\rm{cadr}}\,({\it{x\/}}), {\rm{iplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{iplus-fringe})\index{delete})\index{iplus-tree})\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-idifference \\ \index{correctness-of-cancel-idifferen!ce}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-idifference}}\,({\it{x\/}})\index{cancel-idifference}, {\it{a\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-zero1 \\ \index{itimes-zero1}
{\rm{izerop}}\,({\it{x\/}})\index{izerop} $\rightarrow$ ({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes} $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-zero2 \\ \index{itimes-zero2}
{\rm{izerop}}\,({\it{y\/}})\index{izerop} $\rightarrow$ ({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes} $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-fix-int1 \\ \index{itimes-fix-int1}
{\rm{itimes}}\,({\rm{fix-int}}\,({\it{a\/}})\index{fix-int}, {\it{b\/}})\index{itimes} $=$ {\rm{itimes}}\,({\it{a\/}}, {\it{b\/}})\index{itimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-fix-int2 \\ \index{itimes-fix-int2}
{\rm{itimes}}\,({\it{a\/}}, {\rm{fix-int}}\,({\it{b\/}})\index{fix-int})\index{itimes} $=$ {\rm{itimes}}\,({\it{a\/}}, {\it{b\/}})\index{itimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-itimes \\ \index{commutativity-of-itimes}
{\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes} $=$ {\rm{itimes}}\,({\it{y\/}}, {\it{x\/}})\index{itimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-distributes-over-iplus-proof \\ \index{itimes-distributes-over-iplus-p!roof}
{\rm{itimes}}\,({\it{x\/}}, {\rm{iplus}}\,({\it{y\/}}, {\it{z\/}})\index{iplus})\index{itimes} $=$ {\rm{iplus}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes}, {\rm{itimes}}\,({\it{x\/}}, {\it{z\/}})\index{itimes})\index{iplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-distributes-over-iplus \\ \index{itimes-distributes-over-iplus}
\=\+({\rm{itimes}}\,({\it{x\/}}, {\rm{iplus}}\,({\it{y\/}}, {\it{z\/}})\index{iplus})\index{itimes} $=$ {\rm{iplus}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes}, {\rm{itimes}}\,({\it{x\/}}, {\it{z\/}})\index{itimes})\index{iplus}) \\ 
$\wedge$$\;\;\;\;$({\rm{itimes}}\,({\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus}, {\it{z\/}})\index{itimes} $=$ {\rm{iplus}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{z\/}})\index{itimes}, {\rm{itimes}}\,({\it{y\/}}, {\it{z\/}})\index{itimes})\index{iplus})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-itimes \\ \index{commutativity2-of-itimes}
{\rm{itimes}}\,({\it{x\/}}, {\rm{itimes}}\,({\it{y\/}}, {\it{z\/}})\index{itimes})\index{itimes} $=$ {\rm{itimes}}\,({\it{y\/}}, {\rm{itimes}}\,({\it{x\/}}, {\it{z\/}})\index{itimes})\index{itimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-itimes \\ \index{associativity-of-itimes}
{\rm{itimes}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes}, {\it{z\/}})\index{itimes} $=$ {\rm{itimes}}\,({\it{x\/}}, {\rm{itimes}}\,({\it{y\/}}, {\it{z\/}})\index{itimes})\index{itimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-distributes-over-idifference-proof \\ \index{itimes-distributes-over-idiffere!nce-proof}
{\rm{itimes}}\,({\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference}, {\it{c\/}})\index{itimes} $=$ {\rm{idifference}}\,({\rm{itimes}}\,({\it{a\/}}, {\it{c\/}})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\it{c\/}})\index{itimes})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-distributes-over-idifference \\ \index{itimes-distributes-over-idiffere!nce}
\=\+({\rm{itimes}}\,({\rm{idifference}}\,({\it{a\/}}, {\it{b\/}})\index{idifference}, {\it{c\/}})\index{itimes} $=$ {\rm{idifference}}\,({\rm{itimes}}\,({\it{a\/}}, {\it{c\/}})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\it{c\/}})\index{itimes})\index{idifference}) \\ 
$\wedge$$\;\;\;\;$({\rm{itimes}}\,({\it{a\/}}, {\rm{idifference}}\,({\it{b\/}}, {\it{c\/}})\index{idifference})\index{itimes} $=$ {\rm{idifference}}\,({\rm{itimes}}\,({\it{a\/}}, {\it{b\/}})\index{itimes}, {\rm{itimes}}\,({\it{a\/}}, {\it{c\/}})\index{itimes})\index{idifference})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-itimes-0 \\ \index{equal-itimes-0}
({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes} $=$ {\tt{0}}) $=$ ({\rm{izerop}}\,({\it{x\/}})\index{izerop} $\vee$ {\rm{izerop}}\,({\it{y\/}})\index{izerop})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-itimes-1 \\ \index{equal-itimes-1}
\=\+({\rm{itimes}}\,({\it{a\/}}, {\it{b\/}})\index{itimes} $=$ {\tt{1}}) \\ 
$=$$\;\;\;\;$((({\it{a\/}} $=$ {\tt{1}}) $\wedge$ ({\it{b\/}} $=$ {\tt{1}})) $\vee$ (({\it{a\/}} $=$ {\tt{-1}}) $\wedge$ ({\it{b\/}} $=$ {\tt{-1}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-itimes-minus-1 \\ \index{equal-itimes-minus-1}
\=\+({\rm{itimes}}\,({\it{a\/}}, {\it{b\/}})\index{itimes} $=$ {\tt{-1}}) \\ 
$=$$\;\;\;\;$((({\it{a\/}} $=$ {\tt{-1}}) $\wedge$ ({\it{b\/}} $=$ {\tt{1}})) $\vee$ (({\it{a\/}} $=$ {\tt{1}}) $\wedge$ ({\it{b\/}} $=$ {\tt{-1}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-1-arg1 \\ \index{itimes-1-arg1}
{\rm{itimes}}\,({\tt{1}}, {\it{x\/}})\index{itimes} $=$ {\rm{fix-int}}\,({\it{x\/}})\index{fix-int}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-remainder-uniqueness \\ \index{quotient-remainder-uniqueness}
\=\+(({\it{a\/}} $=$ ({\it{r\/}} $+$ ({\it{b\/}} $*$ {\it{q\/}}))) $\wedge$ ({\it{r\/}} $<$ {\it{b\/}})) \\ 
$\rightarrow$$\;\;\;\;$(({\rm{fix}}\,({\it{r\/}}) $=$ ({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}})) $\wedge$ ({\rm{fix}}\,({\it{q\/}}) $=$ ({\it{a\/}} $\div$ {\it{b\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{iquotient} \\  
\=\+{\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{izerop}}\,({\it{j\/}})\index{izerop}$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\rm{negativep}}\,({\it{i\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{negativep}}\,({\it{j\/}}) \\ 
{\bf then }\=\+{\bf if }({\rm{negative-guts}}\,({\it{i\/}}) ${}${\bf{mod}}${}$ {\rm{negative-guts}}\,({\it{j\/}})) $=$ {\tt{0}} \\ 
{\bf then }{\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\rm{negative-guts}}\,({\it{j\/}}) \\ 
{\bf else }$1\;+$ ({\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\rm{negative-guts}}\,({\it{j\/}}))$\;${\bf  endif}\- \\ 
{\bf elseif }({\rm{negative-guts}}\,({\it{i\/}}) ${}${\bf{mod}}${}$ {\it{j\/}}) $=$ {\tt{0}} \\ 
{\bf then }{\rm{fix-int}}\,($-$ ({\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\it{j\/}}))\index{fix-int} \\ 
{\bf else }{\rm{fix-int}}\,($-$ ($1\;+$ ({\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\it{j\/}})))\index{fix-int}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\rm{fix-int}}\,($-$ ({\it{i\/}} $\div$ {\rm{negative-guts}}\,({\it{j\/}})))\index{fix-int} \\ 
{\bf else }{\it{i\/}} $\div$ {\it{j\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{iremainder} \\  
{\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder} $=$ {\rm{idifference}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\rm{itimes}}\,({\it{j\/}}, {\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient})\index{itimes})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-part1 \\ \index{division-theorem-part1}
{\rm{integerp}}\,({\it{i\/}})\index{integerp} $\rightarrow$ ({\rm{iplus}}\,({\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}, {\rm{itimes}}\,({\it{j\/}}, {\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient})\index{itimes})\index{iplus} $=$ {\it{i\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-part2 \\ \index{division-theorem-part2}
({\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ ({\it{j\/}} $\not=$ {\tt{0}})) $\rightarrow$ {\rm{ileq}}\,({\tt{0}}, {\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder})\index{ileq}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-part3 \\ \index{division-theorem-part3}
({\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ ({\it{j\/}} $\not=$ {\tt{0}})) $\rightarrow$ {\rm{ilessp}}\,({\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}, {\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ilessp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem \\ \index{division-theorem}
\=\+({\rm{integerp}}\,({\it{i\/}})\index{integerp} $\wedge$ {\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ ({\it{j\/}} $\not=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{iplus}}\,({\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}, {\rm{itimes}}\,({\it{j\/}}, {\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient})\index{itimes})\index{iplus} $=$ {\it{i\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{ileq}}\,({\tt{0}}, {\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder})\index{ileq} \\ 
$\wedge$$\;\;\;\;${\rm{ilessp}}\,({\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}, {\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ilessp})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-difference-lessp-arg2 \\ \index{quotient-difference-lessp-arg2}
\=\+((({\it{a\/}} ${}${\bf{mod}}${}$ {\it{c\/}}) $=$ {\tt{0}}) $\wedge$ ({\it{b\/}} $<$ {\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-$ {\it{b\/}}) $\div$ {\it{c\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{a\/}} $\div$ {\it{c\/}} \\ 
{\bf elseif }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }({\it{a\/}} $\div$ {\it{c\/}}) $-$ ($1\;+$ ({\it{b\/}} $\div$ {\it{c\/}})) \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iquotient-iremainder-uniqueness \\ \index{iquotient-iremainder-uniqueness}
\=\+(\=\+{\rm{integerp}}\,({\it{i\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{j\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{r\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{q\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $\not=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $=$ {\rm{iplus}}\,({\it{r\/}}, {\rm{itimes}}\,({\it{j\/}}, {\it{q\/}})\index{itimes})\index{iplus}) \\ 
$\wedge$$\;\;\;\;${\rm{ileq}}\,({\tt{0}}, {\it{r\/}})\index{ileq} \\ 
$\wedge$$\;\;\;\;${\rm{ilessp}}\,({\it{r\/}}, {\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ilessp})\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{r\/}} $=$ {\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}) $\wedge$ ({\it{q\/}} $=$ {\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient}))\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{idiv} \\  
\=\+{\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{izerop}}\,({\it{j\/}})\index{izerop}$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\rm{negativep}}\,({\it{i\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\rm{negative-guts}}\,({\it{j\/}}) \\ 
{\bf elseif }({\rm{negative-guts}}\,({\it{i\/}}) ${}${\bf{mod}}${}$ {\it{j\/}}) $=$ {\tt{0}} \\ 
{\bf then }{\rm{fix-int}}\,($-$ ({\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\it{j\/}}))\index{fix-int} \\ 
{\bf else }{\rm{fix-int}}\,($-$ ($1\;+$ ({\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\it{j\/}})))\index{fix-int}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{negativep}}\,({\it{j\/}}) \\ 
{\bf then }\=\+{\bf if }({\it{i\/}} ${}${\bf{mod}}${}$ {\rm{negative-guts}}\,({\it{j\/}})) $=$ {\tt{0}} \\ 
{\bf then }{\rm{fix-int}}\,($-$ ({\it{i\/}} $\div$ {\rm{negative-guts}}\,({\it{j\/}})))\index{fix-int} \\ 
{\bf else }{\rm{fix-int}}\,($-$ ($1\;+$ ({\it{i\/}} $\div$ {\rm{negative-guts}}\,({\it{j\/}}))))\index{fix-int}$\;${\bf  endif}\- \\ 
{\bf else }{\it{i\/}} $\div$ {\it{j\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{imod} \\  
{\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod} $=$ {\rm{idifference}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\rm{itimes}}\,({\it{j\/}}, {\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv})\index{itimes})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-neginf-part1 \\ \index{division-theorem-for-truncate-t!o-neginf-part1}
{\rm{integerp}}\,({\it{i\/}})\index{integerp} $\rightarrow$ ({\rm{iplus}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}, {\rm{itimes}}\,({\it{j\/}}, {\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv})\index{itimes})\index{iplus} $=$ {\it{i\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-neginf-part2 \\ \index{division-theorem-for-truncate-t!o-neginf-part2}
{\rm{ilessp}}\,({\tt{0}}, {\it{j\/}})\index{ilessp} $\rightarrow$ ({\rm{ileq}}\,({\tt{0}}, {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}, {\it{j\/}})\index{ilessp})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-neginf-part3 \\ \index{division-theorem-for-truncate-t!o-neginf-part3}
\=\+({\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ {\rm{ilessp}}\,({\it{j\/}}, {\tt{0}})\index{ilessp}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{ileq}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}, {\tt{0}})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\it{j\/}}, {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod})\index{ilessp})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-neginf \\ \index{division-theorem-for-truncate-t!o-neginf}
\=\+({\rm{integerp}}\,({\it{i\/}})\index{integerp} $\wedge$ {\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ ({\it{j\/}} $\not=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{iplus}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}, {\rm{itimes}}\,({\it{j\/}}, {\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv})\index{itimes})\index{iplus} $=$ {\it{i\/}}) \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\rm{ilessp}}\,({\tt{0}}, {\it{j\/}})\index{ilessp} \\ 
{\bf then }{\rm{ileq}}\,({\tt{0}}, {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}, {\it{j\/}})\index{ilessp} \\ 
{\bf else }{\rm{ileq}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}, {\tt{0}})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\it{j\/}}, {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod})\index{ilessp}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idiv-imod-uniqueness \\ \index{idiv-imod-uniqueness}
\=\+(\=\+{\rm{integerp}}\,({\it{i\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{j\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{r\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{q\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $\not=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $=$ {\rm{iplus}}\,({\it{r\/}}, {\rm{itimes}}\,({\it{j\/}}, {\it{q\/}})\index{itimes})\index{iplus}) \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\rm{ilessp}}\,({\tt{0}}, {\it{j\/}})\index{ilessp}$\;\;${\bf then }{\rm{ileq}}\,({\tt{0}}, {\it{r\/}})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\it{r\/}}, {\it{j\/}})\index{ilessp} \\ 
{\bf else }{\rm{ileq}}\,({\it{r\/}}, {\tt{0}})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\it{j\/}}, {\it{r\/}})\index{ilessp}$\;${\bf  endif}\-)\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{r\/}} $=$ {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}) $\wedge$ ({\it{q\/}} $=$ {\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv}))\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{iquo} \\  
\=\+{\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{izerop}}\,({\it{j\/}})\index{izerop}$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\rm{negativep}}\,({\it{i\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\rm{negative-guts}}\,({\it{j\/}}) \\ 
{\bf else }{\rm{fix-int}}\,($-$ ({\rm{negative-guts}}\,({\it{i\/}}) $\div$ {\it{j\/}}))\index{fix-int}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{negativep}}\,({\it{j\/}})$\;\;${\bf then }{\rm{fix-int}}\,($-$ ({\it{i\/}} $\div$ {\rm{negative-guts}}\,({\it{j\/}})))\index{fix-int} \\ 
{\bf else }{\it{i\/}} $\div$ {\it{j\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{irem} \\  
{\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem} $=$ {\rm{idifference}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\rm{itimes}}\,({\it{j\/}}, {\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo})\index{itimes})\index{idifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-zero-part1 \\ \index{division-theorem-for-truncate-t!o-zero-part1}
{\rm{integerp}}\,({\it{i\/}})\index{integerp} $\rightarrow$ ({\rm{iplus}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}, {\rm{itimes}}\,({\it{j\/}}, {\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo})\index{itimes})\index{iplus} $=$ {\it{i\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-zero-part2 \\ \index{division-theorem-for-truncate-t!o-zero-part2}
\=\+({\rm{integerp}}\,({\it{i\/}})\index{integerp} $\wedge$ {\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ ({\it{j\/}} $\not=$ {\tt{0}}) $\wedge$ {\rm{ileq}}\,({\tt{0}}, {\it{i\/}})\index{ileq}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{ileq}}\,({\tt{0}}, {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}, {\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ilessp})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-zero-part3 \\ \index{division-theorem-for-truncate-t!o-zero-part3}
\=\+({\rm{integerp}}\,({\it{i\/}})\index{integerp} $\wedge$ {\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ ({\it{j\/}} $\not=$ {\tt{0}}) $\wedge$ {\rm{ilessp}}\,({\it{i\/}}, {\tt{0}})\index{ilessp}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{ileq}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}, {\tt{0}})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\rm{ineg}}\,({\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ineg}, {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem})\index{ilessp})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  division-theorem-for-truncate-to-zero \\ \index{division-theorem-for-truncate-t!o-zero}
\=\+({\rm{integerp}}\,({\it{i\/}})\index{integerp} $\wedge$ {\rm{integerp}}\,({\it{j\/}})\index{integerp} $\wedge$ ({\it{j\/}} $\not=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{iplus}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}, {\rm{itimes}}\,({\it{j\/}}, {\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo})\index{itimes})\index{iplus} $=$ {\it{i\/}}) \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\rm{ileq}}\,({\tt{0}}, {\it{i\/}})\index{ileq} \\ 
{\bf then }{\rm{ileq}}\,({\tt{0}}, {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}, {\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ilessp} \\ 
{\bf else }\=\+{\rm{ileq}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}, {\tt{0}})\index{ileq} \\ 
$\wedge$$\;\;\;\;${\rm{ilessp}}\,({\rm{ineg}}\,({\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ineg}, {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem})\index{ilessp}\-$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iquo-irem-uniqueness \\ \index{iquo-irem-uniqueness}
\=\+(\=\+{\rm{integerp}}\,({\it{i\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{j\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{r\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\it{q\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $\not=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $=$ {\rm{iplus}}\,({\it{r\/}}, {\rm{itimes}}\,({\it{j\/}}, {\it{q\/}})\index{itimes})\index{iplus}) \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\rm{ileq}}\,({\tt{0}}, {\it{i\/}})\index{ileq}$\;\;${\bf then }{\rm{ileq}}\,({\tt{0}}, {\it{r\/}})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\it{r\/}}, {\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ilessp} \\ 
{\bf else }{\rm{ileq}}\,({\it{r\/}}, {\tt{0}})\index{ileq} $\wedge$ {\rm{ilessp}}\,({\rm{ineg}}\,({\rm{iabs}}\,({\it{j\/}})\index{iabs})\index{ineg}, {\it{r\/}})\index{ilessp}$\;${\bf  endif}\-)\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{r\/}} $=$ {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}) $\wedge$ ({\it{q\/}} $=$ {\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-iquotient \\ \index{integerp-iquotient}
{\rm{integerp}}\,({\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-iremainder \\ \index{integerp-iremainder}
{\rm{integerp}}\,({\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-idiv \\ \index{integerp-idiv}
{\rm{integerp}}\,({\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-imod \\ \index{integerp-imod}
{\rm{integerp}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-iquo \\ \index{integerp-iquo}
{\rm{integerp}}\,({\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-irem \\ \index{integerp-irem}
{\rm{integerp}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iquotient-fix-int1 \\ \index{iquotient-fix-int1}
{\rm{iquotient}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\it{j\/}})\index{iquotient} $=$ {\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iquotient-fix-int2 \\ \index{iquotient-fix-int2}
{\rm{iquotient}}\,({\it{i\/}}, {\rm{fix-int}}\,({\it{j\/}})\index{fix-int})\index{iquotient} $=$ {\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iremainder-fix-int1 \\ \index{iremainder-fix-int1}
{\rm{iremainder}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\it{j\/}})\index{iremainder} $=$ {\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iremainder-fix-int2 \\ \index{iremainder-fix-int2}
{\rm{iremainder}}\,({\it{i\/}}, {\rm{fix-int}}\,({\it{j\/}})\index{fix-int})\index{iremainder} $=$ {\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idiv-fix-int1 \\ \index{idiv-fix-int1}
{\rm{idiv}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\it{j\/}})\index{idiv} $=$ {\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  idiv-fix-int2 \\ \index{idiv-fix-int2}
{\rm{idiv}}\,({\it{i\/}}, {\rm{fix-int}}\,({\it{j\/}})\index{fix-int})\index{idiv} $=$ {\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  imod-fix-int1 \\ \index{imod-fix-int1}
{\rm{imod}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\it{j\/}})\index{imod} $=$ {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  imod-fix-int2 \\ \index{imod-fix-int2}
{\rm{imod}}\,({\it{i\/}}, {\rm{fix-int}}\,({\it{j\/}})\index{fix-int})\index{imod} $=$ {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iquo-fix-int1 \\ \index{iquo-fix-int1}
{\rm{iquo}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\it{j\/}})\index{iquo} $=$ {\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iquo-fix-int2 \\ \index{iquo-fix-int2}
{\rm{iquo}}\,({\it{i\/}}, {\rm{fix-int}}\,({\it{j\/}})\index{fix-int})\index{iquo} $=$ {\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  irem-fix-int1 \\ \index{irem-fix-int1}
{\rm{irem}}\,({\rm{fix-int}}\,({\it{i\/}})\index{fix-int}, {\it{j\/}})\index{irem} $=$ {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  irem-fix-int2 \\ \index{irem-fix-int2}
{\rm{irem}}\,({\it{i\/}}, {\rm{fix-int}}\,({\it{j\/}})\index{fix-int})\index{irem} $=$ {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-iquotient \\ \index{fix-int-iquotient}
{\rm{fix-int}}\,({\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient})\index{fix-int} $=$ {\rm{iquotient}}\,({\it{i\/}}, {\it{j\/}})\index{iquotient}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-iremainder \\ \index{fix-int-iremainder}
{\rm{fix-int}}\,({\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder})\index{fix-int} $=$ {\rm{iremainder}}\,({\it{i\/}}, {\it{j\/}})\index{iremainder}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-idiv \\ \index{fix-int-idiv}
{\rm{fix-int}}\,({\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv})\index{fix-int} $=$ {\rm{idiv}}\,({\it{i\/}}, {\it{j\/}})\index{idiv}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-imod \\ \index{fix-int-imod}
{\rm{fix-int}}\,({\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod})\index{fix-int} $=$ {\rm{imod}}\,({\it{i\/}}, {\it{j\/}})\index{imod}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-iquo \\ \index{fix-int-iquo}
{\rm{fix-int}}\,({\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo})\index{fix-int} $=$ {\rm{iquo}}\,({\it{i\/}}, {\it{j\/}})\index{iquo}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-irem \\ \index{fix-int-irem}
{\rm{fix-int}}\,({\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem})\index{fix-int} $=$ {\rm{irem}}\,({\it{i\/}}, {\it{j\/}})\index{irem}
\end{tabbing}


\noindent{\sc Event}:   Enable irem; name this event `irem-off'.\index{irem-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iquo; name this event `iquo-off'.\index{iquo-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable imod; name this event `imod-off'.\index{imod-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable idiv; name this event `idiv-off'.\index{idiv-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable quotient-difference-lessp-arg2; name this event `quotient-difference-lessp-arg2-off'.\index{quotient-difference-lessp-arg2-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iremainder; name this event `iremainder-off'.\index{iremainder-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iquotient; name this event `iquotient-off'.\index{iquotient-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-idifference; name this event `cancel-idifference-off'.\index{cancel-idifference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable not-integerp-implies-not-equal-iplus; name this event `not-integerp-implies-not-equal-iplus-off'.\index{not-integerp-implies-not-equal-ip!lus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iplus-tree-bagdiff; name this event `iplus-tree-bagdiff-off'.\index{iplus-tree-bagdiff-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iplus-tree-delete; name this event `iplus-tree-delete-off'.\index{iplus-tree-delete-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iplus-tree-iplus-fringe; name this event `iplus-tree-iplus-fringe-off'.\index{iplus-tree-iplus-fringe-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-iplus-tree-append; name this event `eval\$-iplus-tree-append-off'.\index{eval\$-iplus-tree-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable integerp-eval\$-bridge; name this event `integerp-eval\$-bridge-off'.\index{integerp-eval\$-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable integerp-eval\$-iplus-tree; name this event `integerp-eval\$-iplus-tree-off'.\index{integerp-eval\$-iplus-tree-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable integerp-eval\$-iplus; name this event `integerp-eval\$-iplus-off'.\index{integerp-eval\$-iplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-iplus; name this event `cancel-iplus-off'.\index{cancel-iplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable itimes; name this event `itimes-off'.\index{itimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iabs; name this event `iabs-off'.\index{iabs-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable idifference; name this event `idifference-off'.\index{idifference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable ineg; name this event `ineg-off'.\index{ineg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iplus; name this event `iplus-off'.\index{iplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable ileq; name this event `ileq-off'.\index{ileq-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable ilessp; name this event `ilessp-off'.\index{ilessp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable izerop; name this event `izerop-off'.\index{izerop-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-int; name this event `fix-int-off'.\index{fix-int-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable integerp; name this event `integerp-off'.\index{integerp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{integers}} to consist of the following events: fix-int-irem,
fix-int-iquo,
fix-int-imod,
fix-int-idiv,
fix-int-iremainder,
fix-int-iquotient,
irem-fix-int2,
irem-fix-int1,
iquo-fix-int2,
iquo-fix-int1,
imod-fix-int2,
imod-fix-int1,
idiv-fix-int2,
idiv-fix-int1,
iremainder-fix-int2,
iremainder-fix-int1,
iquotient-fix-int2,
iquotient-fix-int1,
integerp-irem,
integerp-iquo,
integerp-imod,
integerp-idiv,
integerp-iremainder,
integerp-iquotient,
itimes-1-arg1,
equal-itimes-minus-1,
equal-itimes-1,
equal-itimes-0,
itimes-distributes-over-idifference,
itimes-distributes-over-idifference-proof,
associativity-of-itimes,
commutativity2-of-itimes,
itimes-distributes-over-iplus,
commutativity-of-itimes,
itimes-distributes-over-iplus-proof,
itimes-fix-int2,
itimes-fix-int1,
itimes-zero2,
itimes-zero1,
correctness-of-cancel-idifference,
iplus-idifference-idifference,
correctness-of-cancel-iplus,
equal-idifference-0,
idifference-cancellation-1,
idifference-0,
idifference-fix-int,
idifference-idifference,
idifference-right-id,
idifference-iplus,
idifference-iplus-canonicalizer1,
idifference-x-x,
iplus-idifference-arg2,
iplus-idifference-arg1,
iplus-fix-int2,
iplus-fix-int1,
iplus-ineg2,
iplus-ineg1,
iplus-cancellation,
associativity-of-iplus,
commutativity-of-iplus,
commutativity2-of-iplus,
iplus-0,
iplus-right-id,
iplus-left-id,
ineg-fix-int,
ineg-idifference,
ineg-ineg,
ineg-iplus,
ineg-id,
fix-int-itimes,
fix-int-iabs,
fix-int-ineg,
fix-int-idifference,
fix-int-iplus,
fix-int-fix-int,
integerp-itimes,
integerp-iabs,
integerp-ineg,
integerp-idifference,
integerp-iplus,
integerp-fix-int.\index{integers}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{times-tree} \\  
\=\+{\rm{times-tree}}\,({\it{x\/}})\index{times-tree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\tt{'}}{\tt{'}}{\tt{1}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{fix}}, {\rm{car}}\,({\it{x\/}})) \\ 
{\bf elseif }{\rm{cddr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{times}}, {\rm{car}}\,({\it{x\/}}), {\rm{cadr}}\,({\it{x\/}})) \\ 
{\bf else }{\rm{list}}\,({\tt{'}}{\tt{times}}, {\rm{car}}\,({\it{x\/}}), {\rm{times-tree}}\,({\rm{cdr}}\,({\it{x\/}}))\index{times-tree})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{times-fringe} \\  
\=\+{\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
{\bf then }{\rm{append}}\,({\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, {\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe}) \\ 
{\bf else }{\rm{list}}\,({\it{x\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{or-zerop-tree} \\  
\=\+{\rm{or-zerop-tree}}\,({\it{x\/}})\index{or-zerop-tree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\tt{'}}{\tt{(}}{\tt{false}}{\tt{)}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{zerop}}, {\rm{car}}\,({\it{x\/}})) \\ 
{\bf elseif }{\rm{cddr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$ \\ 
{\bf then }{\rm{list}}\,({\tt{'}}{\tt{or}}, {\rm{list}}\,({\tt{'}}{\tt{zerop}}, {\rm{car}}\,({\it{x\/}})), {\rm{list}}\,({\tt{'}}{\tt{zerop}}, {\rm{cadr}}\,({\it{x\/}}))) \\ 
{\bf else }{\rm{list}}\,({\tt{'}}{\tt{or}}, {\rm{list}}\,({\tt{'}}{\tt{zerop}}, {\rm{car}}\,({\it{x\/}})), {\rm{or-zerop-tree}}\,({\rm{cdr}}\,({\it{x\/}}))\index{or-zerop-tree})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{and-not-zerop-tree} \\  
\=\+{\rm{and-not-zerop-tree}}\,({\it{x\/}})\index{and-not-zerop-tree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\tt{'}}{\tt{(}}{\tt{true}}{\tt{)}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{not}}, {\rm{list}}\,({\tt{'}}{\tt{zerop}}, {\rm{car}}\,({\it{x\/}}))) \\ 
{\bf else }{\rm{list}}\,(\=\+{\tt{'}}{\tt{and}}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{not}}, {\rm{list}}\,({\tt{'}}{\tt{zerop}}, {\rm{car}}\,({\it{x\/}}))), \\ 
{\rm{and-not-zerop-tree}}\,({\rm{cdr}}\,({\it{x\/}}))\index{and-not-zerop-tree})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-eval\$-times \\ \index{numberp-eval\$-times}
({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) $\rightarrow$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $\in\;${\bf{N}}${}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-times \\ \index{eval\$-times}
{\rm{eval\$}}\,({\bf{t}}, {\rm{list}}\,({\tt{'}}{\tt{times}}, {\it{x\/}}, {\it{y\/}}), {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\it{y\/}}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-times2 \\ \index{eval\$-times2}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-or \\ \index{eval\$-or}
{\rm{eval\$}}\,({\bf{t}}, {\rm{list}}\,({\tt{'}}{\tt{or}}, {\it{x\/}}, {\it{y\/}}), {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $\vee$ {\rm{eval\$}}\,({\bf{t}}, {\it{y\/}}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-or2 \\ \index{eval\$-or2}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{or}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $\vee$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-equal \\ \index{eval\$-equal}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{equal}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-lessp \\ \index{eval\$-lessp}
{\rm{eval\$}}\,({\bf{t}}, {\rm{list}}\,({\tt{'}}{\tt{lessp}}, {\it{x\/}}, {\it{y\/}}), {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $<$ {\rm{eval\$}}\,({\bf{t}}, {\it{y\/}}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-lessp2 \\ \index{eval\$-lessp2}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{lessp}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $<$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-quotient \\ \index{eval\$-quotient}
{\rm{eval\$}}\,({\bf{t}}, {\rm{list}}\,({\tt{'}}{\tt{quotient}}, {\it{x\/}}, {\it{y\/}}), {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $\div$ {\rm{eval\$}}\,({\bf{t}}, {\it{y\/}}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-quotient2 \\ \index{eval\$-quotient2}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{quotient}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $\div$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-if \\ \index{eval\$-if}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{list}}\,({\tt{'}}{\tt{if}}, {\it{x\/}}, {\it{y\/}}, {\it{z\/}}), {\it{a\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}})$\;\;${\bf then }{\rm{eval\$}}\,({\bf{t}}, {\it{y\/}}, {\it{a\/}}) \\ 
{\bf else }{\rm{eval\$}}\,({\bf{t}}, {\it{z\/}}, {\it{a\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-if2 \\ \index{eval\$-if2}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{if}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}})$\;\;${\bf then }{\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}}) \\ 
{\bf else }{\rm{eval\$}}\,({\bf{t}}, {\rm{cadddr}}\,({\it{x\/}}), {\it{a\/}})$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-eval\$-times-tree \\ \index{numberp-eval\$-times-tree}
{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{x\/}})\index{times-tree}, {\it{a\/}}) $\in\;${\bf{N}}${}$
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagdiff-delete \\ \index{bagdiff-delete}
{\rm{bagdiff}}\,({\rm{delete}}\,({\it{e\/}}, {\it{x\/}})\index{delete}, {\it{y\/}})\index{bagdiff} $=$ {\rm{delete}}\,({\it{e\/}}, {\rm{bagdiff}}\,({\it{x\/}}, {\it{y\/}})\index{bagdiff})\index{delete}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times-arg1 \\ \index{lessp-times-arg1}
({\it{a\/}} $\not\simeq {\tt{0}}$) $\rightarrow$ ((({\it{a\/}} $*$ {\it{x\/}}) $\not<$ ({\it{a\/}} $*$ {\it{y\/}})) $=$ ({\it{x\/}} $\not<$ {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  stupid-hack \\ \index{stupid-hack}
(({\it{a\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{b\/}} $\in\;${\bf{N}}${}$)) $\rightarrow$ ((({\it{a\/}} $\not<$ {\it{b\/}}) $\wedge$ ({\it{b\/}} $\not<$ {\it{a\/}})) $=$ ({\it{a\/}} $=$ {\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-arg1 \\ \index{equal-times-arg1}
({\it{a\/}} $\not\simeq {\tt{0}}$) $\rightarrow$ ((({\it{a\/}} $*$ {\it{x\/}}) $=$ ({\it{a\/}} $*$ {\it{y\/}})) $=$ ({\rm{fix}}\,({\it{x\/}}) $=$ {\rm{fix}}\,({\it{y\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-bridge \\ \index{equal-times-bridge}
(({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{a\/}} $*$ {\it{d\/}})) $=$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\rm{fix}}\,({\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-times-member \\ \index{eval\$-times-member}
\=\+({\it{e\/}} $\in$ {\it{x\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{x\/}})\index{times-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{e\/}}, {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{delete}}\,({\it{e\/}}, {\it{x\/}})\index{delete})\index{times-tree}, {\it{a\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  zerop-makes-times-tree-zero \\ \index{zerop-makes-times-tree-zero}
\=\+(($\neg$ {\rm{eval\$}}\,({\bf{t}}, {\rm{and-not-zerop-tree}}\,({\it{x\/}})\index{and-not-zerop-tree}, {\it{a\/}})) $\wedge$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{y\/}})\index{times-tree}, {\it{a\/}}) $=$ {\tt{0}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  or-zerop-tree-is-not-zerop-tree \\ \index{or-zerop-tree-is-not-zerop-tree}
{\rm{eval\$}}\,({\bf{t}}, {\rm{or-zerop-tree}}\,({\it{x\/}})\index{or-zerop-tree}, {\it{a\/}}) $=$ ($\neg$ {\rm{eval\$}}\,({\bf{t}}, {\rm{and-not-zerop-tree}}\,({\it{x\/}})\index{and-not-zerop-tree}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  zerop-makes-times-tree-zero2 \\ \index{zerop-makes-times-tree-zero2}
\=\+({\rm{eval\$}}\,({\bf{t}}, {\rm{or-zerop-tree}}\,({\it{x\/}})\index{or-zerop-tree}, {\it{a\/}}) $\wedge$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{y\/}})\index{times-tree}, {\it{a\/}}) $=$ {\tt{0}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-tree-append \\ \index{times-tree-append}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{times-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{x\/}})\index{times-tree}, {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{y\/}})\index{times-tree}, {\it{a\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-tree-of-times-fringe \\ \index{times-tree-of-times-fringe}
{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe})\index{times-tree}, {\it{a\/}}) $=$ {\rm{fix}}\,({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-lessp-times} \\  
\=\+{\rm{cancel-lessp-times}}\,({\it{x\/}})\index{cancel-lessp-times} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{lessp}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}})\- \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{bagint}}\,({\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, {\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\index{bagint}) \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{and}}, \\ 
{\rm{and-not-zerop-tree}}\,({\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\index{and-not-zerop-tree}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{lessp}}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\-\index{bagdiff})\index{times-tree}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\-\index{bagdiff})\index{times-tree})\-)\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-lessp-times-tree-bagdiff \\ \index{eval\$-lessp-times-tree-bagdiff}
\=\+({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{x\/}}, {\it{z\/}})\index{subbagp} $\wedge$ {\rm{eval\$}}\,({\bf{t}}, {\rm{and-not-zerop-tree}}\,({\it{x\/}})\index{and-not-zerop-tree}, {\it{a\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{y\/}}, {\it{x\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}) \\ 
$<$$\;\;\;\;${\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{z\/}}, {\it{x\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}))\- \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{y\/}})\index{times-tree}, {\it{a\/}}) $<$ {\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{z\/}})\index{times-tree}, {\it{a\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  zerop-makes-lessp-false-bridge \\ \index{zerop-makes-lessp-false-bridge}
\=\+(\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{y\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$($\neg$ {\rm{eval\$}}\,(\=\+{\bf{t}}, \\ 
{\rm{and-not-zerop-tree}}\,({\rm{bagint}}\,({\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe}, {\rm{times-fringe}}\,({\it{y\/}})\index{times-fringe})\index{bagint})\index{and-not-zerop-tree}, \\ 
{\it{a\/}})\-))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})) \\ 
$<$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{y\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{y\/}}), {\it{a\/}})))\- \\ 
$=$$\;\;\;\;${\bf{f}})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-lessp-times \\ \index{correctness-of-cancel-lessp-time!s}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-lessp-times}}\,({\it{x\/}})\index{cancel-lessp-times}, {\it{a\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-quotient-times} \\  
\=\+{\rm{cancel-quotient-times}}\,({\it{x\/}})\index{cancel-quotient-times} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{quotient}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}})\- \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{bagint}}\,({\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, {\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\index{bagint}) \\ 
{\bf then }{\rm{cons}}\,(\=\+{\tt{'}}{\tt{if}}, \\ 
{\rm{cons}}\,(\=\+{\rm{and-not-zerop-tree}}\,({\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\index{and-not-zerop-tree}, \\ 
{\rm{cons}}\,(\=\+{\rm{list}}\,(\=\+{\tt{'}}{\tt{quotient}}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\-\index{bagdiff})\index{times-tree}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\-\index{bagdiff})\index{times-tree})\-, \\ 
{\tt{'}}{\tt{(}}{\tt{(}}{\tt{zero}}{\tt{)}}{\tt{)}})\-)\-)\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  zerop-makes-quotient-zero-bridge \\ \index{zerop-makes-quotient-zero-bridge}
\=\+(\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{y\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$($\neg$ {\rm{eval\$}}\,(\=\+{\bf{t}}, \\ 
{\rm{and-not-zerop-tree}}\,({\rm{bagint}}\,({\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe}, {\rm{times-fringe}}\,({\it{y\/}})\index{times-fringe})\index{bagint})\index{and-not-zerop-tree}, \\ 
{\it{a\/}})\-))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})) \\ 
$\div$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{y\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{y\/}}), {\it{a\/}})))\- \\ 
$=$$\;\;\;\;${\tt{0}})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-quotient-times-tree-bagdiff \\ \index{eval\$-quotient-times-tree-bagdi!ff}
\=\+({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{x\/}}, {\it{z\/}})\index{subbagp} $\wedge$ {\rm{eval\$}}\,({\bf{t}}, {\rm{and-not-zerop-tree}}\,({\it{x\/}})\index{and-not-zerop-tree}, {\it{a\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{y\/}}, {\it{x\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}) \\ 
$\div$$\;\;\;\;${\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{z\/}}, {\it{x\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}))\- \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{y\/}})\index{times-tree}, {\it{a\/}}) $\div$ {\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{z\/}})\index{times-tree}, {\it{a\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-quotient-times \\ \index{correctness-of-cancel-quotient-ti!mes}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-quotient-times}}\,({\it{x\/}})\index{cancel-quotient-times}, {\it{a\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cancel-equal-times} \\  
\=\+{\rm{cancel-equal-times}}\,({\it{x\/}})\index{cancel-equal-times} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{equal}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caadr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caaddr}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}})\- \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{bagint}}\,({\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, {\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\index{bagint}) \\ 
{\bf then }{\rm{list}}\,(\=\+{\tt{'}}{\tt{or}}, \\ 
{\rm{or-zerop-tree}}\,({\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\index{or-zerop-tree}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{equal}}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\-\index{bagdiff})\index{times-tree}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{times-fringe})\-\index{bagint})\-\index{bagdiff})\index{times-tree})\-)\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  zerop-makes-equal-true-bridge \\ \index{zerop-makes-equal-true-bridge}
\=\+(\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{y\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;${\rm{eval\$}}\,({\bf{t}}, {\rm{or-zerop-tree}}\,({\rm{bagint}}\,({\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe}, {\rm{times-fringe}}\,({\it{y\/}})\index{times-fringe})\index{bagint})\index{or-zerop-tree}, {\it{a\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})) \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{y\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{y\/}}), {\it{a\/}})))\- \\ 
$=$$\;\;\;\;${\bf{t}})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-equal-times-tree-bagdiff \\ \index{eval\$-equal-times-tree-bagdiff}
\=\+({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{x\/}}, {\it{z\/}})\index{subbagp} $\wedge$ ($\neg$ {\rm{eval\$}}\,({\bf{t}}, {\rm{or-zerop-tree}}\,({\it{x\/}})\index{or-zerop-tree}, {\it{a\/}}))) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{y\/}}, {\it{x\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;${\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{z\/}}, {\it{x\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}))\- \\ 
$=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{y\/}})\index{times-tree}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{z\/}})\index{times-tree}, {\it{a\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cancel-equal-times-preserves-inequality \\ \index{cancel-equal-times-preserves-ineq!uality}
\=\+(\=\+{\rm{subbagp}}\,({\it{z\/}}, {\it{x\/}})\index{subbagp} \\ 
$\wedge$$\;\;\;\;${\rm{subbagp}}\,({\it{z\/}}, {\it{y\/}})\index{subbagp} \\ 
$\wedge$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{x\/}})\index{times-tree}, {\it{a\/}}) $\not=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\it{y\/}})\index{times-tree}, {\it{a\/}})))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{x\/}}, {\it{z\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}) \\ 
$\not=$$\;\;\;\;${\rm{eval\$}}\,({\bf{t}}, {\rm{times-tree}}\,({\rm{bagdiff}}\,({\it{y\/}}, {\it{z\/}})\index{bagdiff})\index{times-tree}, {\it{a\/}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cancel-equal-times-preserves-inequality-bridge \\ \index{cancel-equal-times-preserves-ineq!uality-bridge}
\=\+(\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{y\/}}) $=$ {\tt{'}}{\tt{times}}) \\ 
$\wedge$$\;\;\;\;$(\=\+({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}})) \\ 
$\not=$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{y\/}}), {\it{a\/}}) $*$ {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{y\/}}), {\it{a\/}})))\-)\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{eval\$}}\,(\=\+{\bf{t}}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe}, \\ 
{\rm{bagint}}\,({\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe}, {\rm{times-fringe}}\,({\it{y\/}})\index{times-fringe})\index{bagint})\-\index{bagdiff})\index{times-tree}, \\ 
{\it{a\/}})\- \\ 
$\not=$$\;\;\;\;${\rm{eval\$}}\,(\=\+{\bf{t}}, \\ 
{\rm{times-tree}}\,({\rm{bagdiff}}\,(\=\+{\rm{times-fringe}}\,({\it{y\/}})\index{times-fringe}, \\ 
{\rm{bagint}}\,(\=\+{\rm{times-fringe}}\,({\it{x\/}})\index{times-fringe}, \\ 
{\rm{times-fringe}}\,({\it{y\/}})\index{times-fringe})\-\index{bagint})\-\index{bagdiff})\index{times-tree}, \\ 
{\it{a\/}})\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-equal-times \\ \index{correctness-of-cancel-equal-time!s}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-equal-times}}\,({\it{x\/}})\index{cancel-equal-times}, {\it{a\/}})
\end{tabbing}


\noindent{\sc Event}:   Enable numberp-eval\$-times; name this event `numberp-eval\$-times-off'.\index{numberp-eval\$-times-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-times; name this event `eval\$-times-off'.\index{eval\$-times-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-times2; name this event `eval\$-times2-off'.\index{eval\$-times2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-or; name this event `eval\$-or-off'.\index{eval\$-or-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-or2; name this event `eval\$-or2-off'.\index{eval\$-or2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-equal; name this event `eval\$-equal-off'.\index{eval\$-equal-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-lessp; name this event `eval\$-lessp-off'.\index{eval\$-lessp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-lessp2; name this event `eval\$-lessp2-off'.\index{eval\$-lessp2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-if; name this event `eval\$-if-off'.\index{eval\$-if-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-if2; name this event `eval\$-if2-off'.\index{eval\$-if2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-quotient; name this event `eval\$-quotient-off'.\index{eval\$-quotient-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-quotient2; name this event `eval\$-quotient2-off'.\index{eval\$-quotient2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numberp-eval\$-times-tree; name this event `numberp-eval\$-times-tree-off'.\index{numberp-eval\$-times-tree-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagdiff-delete; name this event `bagdiff-delete-off'.\index{bagdiff-delete-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable lessp-times-arg1; name this event `lessp-times-arg1-off'.\index{lessp-times-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable stupid-hack; name this event `stupid-hack-off'.\index{stupid-hack-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-arg1; name this event `equal-times-arg1-off'.\index{equal-times-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-bridge; name this event `equal-times-bridge-off'.\index{equal-times-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-times-member; name this event `eval\$-times-member-off'.\index{eval\$-times-member-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable zerop-makes-times-tree-zero; name this event `zerop-makes-times-tree-zero-off'.\index{zerop-makes-times-tree-zero-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable or-zerop-tree-is-not-zerop-tree; name this event `or-zerop-tree-is-not-zerop-tree-off'.\index{or-zerop-tree-is-not-zerop-tree!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable zerop-makes-times-tree-zero2; name this event `zerop-makes-times-tree-zero2-off'.\index{zerop-makes-times-tree-zero2-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable times-tree-append; name this event `times-tree-append-off'.\index{times-tree-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable times-tree-of-times-fringe; name this event `times-tree-of-times-fringe-off'.\index{times-tree-of-times-fringe-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-lessp-times-tree-bagdiff; name this event `eval\$-lessp-times-tree-bagdiff-off'.\index{eval\$-lessp-times-tree-bagdiff!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable zerop-makes-lessp-false-bridge; name this event `zerop-makes-lessp-false-bridge-off'.\index{zerop-makes-lessp-false-bridge-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable zerop-makes-quotient-zero-bridge; name this event `zerop-makes-quotient-zero-bridge-off'.\index{zerop-makes-quotient-zero-bridge!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-quotient-times-tree-bagdiff; name this event `eval\$-quotient-times-tree-bagdiff-off'.\index{eval\$-quotient-times-tree-bagdi!ff-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable zerop-makes-equal-true-bridge; name this event `zerop-makes-equal-true-bridge-off'.\index{zerop-makes-equal-true-bridge-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-equal-times-tree-bagdiff; name this event `eval\$-equal-times-tree-bagdiff-off'.\index{eval\$-equal-times-tree-bagdiff!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-equal-times-preserves-inequality; name this event `cancel-equal-times-preserves-inequality-off'.\index{cancel-equal-times-preserves-ineq!uality-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-equal-times-preserves-inequality-bridge; name this event `cancel-equal-times-preserves-inequality-bridge-off'.\index{cancel-equal-times-preserves-ineq!uality-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Add the shell {\it{rational\/}}\index{rational}, with recognizer function symbol {\it{rational-formp\/}} and 2 accessors: {\it{numerator\/}}, with type restriction (one-of numberp negativep) and default value zero; {\it{denominator\/}}, with type restriction (one-of numberp) and default value zero.

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{rational-defns}} to consist of the following events: count-rational,
numerator-denominator-elim,
rational-numerator-denominator,
rational-equal,
denominator-lesseqp,
denominator-lessp,
denominator-type-restriction,
denominator-nrational-formp,
denominator-rational,
numerator-lesseqp,
numerator-lessp,
numerator-type-restriction,
numerator-nrational-formp,
numerator-rational,
denominator,
numerator,
*1*rational-formp,
rational-formp.\index{rational-defns}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{rationalp} \\  
\=\+{\rm{rationalp}}\,({\it{x\/}})\index{rationalp} \\ 
$=$$\;\;\;\;$(\=\+{\rm{rational-formp}}\,({\it{x\/}})\index{rational-formp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\rm{numerator}}\,({\it{x\/}})\index{numerator})\index{integerp} \\ 
$\wedge$$\;\;\;\;$({\rm{denominator}}\,({\it{x\/}})\index{denominator} $\not\simeq {\tt{0}}$))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{fix-rational} \\  
\=\+{\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rationalp}}\,({\it{x\/}})\index{rationalp}$\;\;${\bf then }{\it{x\/}} \\ 
{\bf else }{\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{reduce} \\  
\=\+{\rm{reduce}}\,({\it{r\/}})\index{reduce} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rationalp}}\,({\it{r\/}})\index{rationalp} \\ 
{\bf then }\=\+{\bf if }{\rm{negativep}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator}) \\ 
{\bf then }{\rm{rational}}\,(\=\+$-$ (\=\+{\rm{negative-guts}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator}) \\ 
$\div$$\;\;\;\;${\rm{gcd}}\,(\=\+{\rm{negative-guts}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator}), \\ 
{\rm{denominator}}\,({\it{r\/}})\index{denominator})\-\index{gcd})\-, \\ 
\=\+{\rm{denominator}}\,({\it{r\/}})\index{denominator} \\ 
$\div$$\;\;\;\;${\rm{gcd}}\,(\=\+{\rm{negative-guts}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator}), \\ 
{\rm{denominator}}\,({\it{r\/}})\index{denominator})\-\index{gcd}\-)\-\index{rational} \\ 
{\bf else }{\rm{rational}}\,(\=\+\=\+{\rm{numerator}}\,({\it{r\/}})\index{numerator} \\ 
$\div$$\;\;\;\;${\rm{gcd}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator}, {\rm{denominator}}\,({\it{r\/}})\index{denominator})\index{gcd}\-, \\ 
\=\+{\rm{denominator}}\,({\it{r\/}})\index{denominator} \\ 
$\div$$\;\;\;\;${\rm{gcd}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator}, {\rm{denominator}}\,({\it{r\/}})\index{denominator})\index{gcd}\-)\-\index{rational}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple-rplus} \\  
\=\+{\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus} \\ 
$=$$\;\;\;\;${\rm{rational}}\,(\=\+{\rm{iplus}}\,(\=\+{\rm{itimes}}\,(\=\+{\rm{numerator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{numerator}, \\ 
{\rm{denominator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{denominator})\-\index{itimes}, \\ 
{\rm{itimes}}\,(\=\+{\rm{numerator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{numerator}, \\ 
{\rm{denominator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{denominator})\-\index{itimes})\-\index{iplus}, \\ 
{\rm{itimes}}\,(\=\+{\rm{denominator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{denominator}, \\ 
{\rm{denominator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{denominator})\-\index{itimes})\-\index{rational}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rplus}$\;\;$
{\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus} $=$ {\rm{reduce}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple-rneg} \\  
\=\+{\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg} \\ 
$=$$\;\;\;\;${\rm{rational}}\,(\=\+{\rm{ineg}}\,({\rm{numerator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{numerator})\index{ineg}, \\ 
{\rm{denominator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{denominator})\-\index{rational}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rneg}$\;\;$
{\rm{rneg}}\,({\it{x\/}})\index{rneg} $=$ {\rm{reduce}}\,({\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rdifference}$\;\;$
{\rm{rdifference}}\,({\it{a\/}}, {\it{b\/}})\index{rdifference} $=$ {\rm{rplus}}\,({\it{a\/}}, {\rm{rneg}}\,({\it{b\/}})\index{rneg})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple-rtimes} \\  
\=\+{\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes} \\ 
$=$$\;\;\;\;${\rm{rational}}\,(\=\+{\rm{itimes}}\,({\rm{numerator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{numerator}, {\rm{numerator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{numerator})\index{itimes}, \\ 
\=\+{\rm{denominator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{denominator} \\ 
$*$$\;\;\;\;${\rm{denominator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{denominator}\-)\-\index{rational}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rtimes}$\;\;$
{\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes} $=$ {\rm{reduce}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rzerop} \\  
{\rm{rzerop}}\,({\it{x\/}})\index{rzerop} $=$ (($\neg$ {\rm{rationalp}}\,({\it{x\/}})\index{rationalp}) $\vee$ ({\rm{numerator}}\,({\it{x\/}})\index{numerator} $=$ {\tt{0}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple-rinverse} \\  
\=\+{\rm{simple-rinverse}}\,({\it{r\/}})\index{simple-rinverse} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rzerop}}\,({\it{r\/}})\index{rzerop}$\;\;${\bf then }{\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational} \\ 
{\bf elseif }{\rm{negativep}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator}) \\ 
{\bf then }{\rm{rational}}\,({\rm{ineg}}\,({\rm{denominator}}\,({\it{r\/}})\index{denominator})\index{ineg}, {\rm{ineg}}\,({\rm{numerator}}\,({\it{r\/}})\index{numerator})\index{ineg})\index{rational} \\ 
{\bf else }{\rm{rational}}\,({\rm{denominator}}\,({\it{r\/}})\index{denominator}, {\rm{numerator}}\,({\it{r\/}})\index{numerator})\index{rational}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rinverse}$\;\;$
{\rm{rinverse}}\,({\it{r\/}})\index{rinverse} $=$ {\rm{reduce}}\,({\rm{simple-rinverse}}\,({\it{r\/}})\index{simple-rinverse})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rquotient}$\;\;$
{\rm{rquotient}}\,({\it{x\/}}, {\it{y\/}})\index{rquotient} $=$ {\rm{rtimes}}\,({\it{x\/}}, {\rm{rinverse}}\,({\it{y\/}})\index{rinverse})\index{rtimes}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple-rmagnitude} \\  
\=\+{\rm{simple-rmagnitude}}\,({\it{x\/}})\index{simple-rmagnitude} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{negativep}}\,({\rm{numerator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{numerator})$\;\;${\bf then }{\rm{rneg}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{rneg} \\ 
{\bf else }{\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rmagnitude}$\;\;$
{\rm{rmagnitude}}\,({\it{x\/}})\index{rmagnitude} $=$ {\rm{reduce}}\,({\rm{simple-rmagnitude}}\,({\it{x\/}})\index{simple-rmagnitude})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rlessp} \\  
\=\+{\rm{rlessp}}\,({\it{x\/}}, {\it{y\/}})\index{rlessp} \\ 
$=$$\;\;\;\;${\rm{ilessp}}\,(\=\+{\rm{itimes}}\,({\rm{numerator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{numerator}, {\rm{denominator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{denominator})\index{itimes}, \\ 
{\rm{itimes}}\,({\rm{numerator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{numerator}, {\rm{denominator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{denominator})\index{itimes})\-\index{ilessp}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{requal} \\  
\=\+{\rm{requal}}\,({\it{x\/}}, {\it{y\/}})\index{requal} \\ 
$=$$\;\;\;\;$(\=\+{\rm{itimes}}\,({\rm{numerator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{numerator}, {\rm{denominator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{denominator})\index{itimes} \\ 
$=$$\;\;\;\;${\rm{itimes}}\,(\=\+{\rm{numerator}}\,({\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{numerator}, \\ 
{\rm{denominator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{denominator})\-\index{itimes})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-minus \\ \index{integerp-minus}
{\rm{integerp}}\,($-$ {\it{x\/}})\index{integerp} $=$ ({\tt{0}} $<$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-int-on-integers \\ \index{fix-int-on-integers}
{\rm{integerp}}\,({\it{x\/}})\index{integerp} $\rightarrow$ ({\rm{fix-int}}\,({\it{x\/}})\index{fix-int} $=$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-ineg-arg1 \\ \index{itimes-ineg-arg1}
{\rm{itimes}}\,({\rm{ineg}}\,({\it{x\/}})\index{ineg}, {\it{y\/}})\index{itimes} $=$ {\rm{ineg}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes})\index{ineg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-ineg-arg2 \\ \index{itimes-ineg-arg2}
{\rm{itimes}}\,({\it{x\/}}, {\rm{ineg}}\,({\it{y\/}})\index{ineg})\index{itimes} $=$ {\rm{ineg}}\,({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes})\index{ineg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-if-negativep-non-zero \\ \index{integerp-if-negativep-non-zero}
({\rm{negativep}}\,({\it{x\/}}) $\wedge$ ({\it{x\/}} $\not=$ ($-$ {\tt{0}}))) $\rightarrow$ {\rm{integerp}}\,({\it{x\/}})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  integerp-if-numberp \\ \index{integerp-if-numberp}
({\it{x\/}} $\in\;${\bf{N}}${}$) $\rightarrow$ {\rm{integerp}}\,({\it{x\/}})\index{integerp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-negativep-arg1 \\ \index{itimes-negativep-arg1}
{\rm{negativep}}\,({\it{x\/}}) $\rightarrow$ ({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes} $=$ {\rm{ineg}}\,({\rm{itimes}}\,({\rm{negative-guts}}\,({\it{x\/}}), {\it{y\/}})\index{itimes})\index{ineg})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-negativep-arg2 \\ \index{itimes-negativep-arg2}
{\rm{negativep}}\,({\it{y\/}}) $\rightarrow$ ({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes} $=$ {\rm{ineg}}\,({\rm{itimes}}\,({\it{x\/}}, {\rm{negative-guts}}\,({\it{y\/}}))\index{itimes})\index{ineg})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-ineg-ineg \\ \index{equal-ineg-ineg}
({\rm{integerp}}\,({\it{x\/}})\index{integerp} $\wedge$ {\rm{integerp}}\,({\it{y\/}})\index{integerp}) $\rightarrow$ (({\rm{ineg}}\,({\it{x\/}})\index{ineg} $=$ {\rm{ineg}}\,({\it{y\/}})\index{ineg}) $=$ ({\it{x\/}} $=$ {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  itimes-is-times \\ \index{itimes-is-times}
(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{y\/}} $\in\;${\bf{N}}${}$)) $\rightarrow$ ({\rm{itimes}}\,({\it{x\/}}, {\it{y\/}})\index{itimes} $=$ ({\it{x\/}} $*$ {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  iplus-is-plus \\ \index{iplus-is-plus}
(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{y\/}} $\in\;${\bf{N}}${}$)) $\rightarrow$ ({\rm{iplus}}\,({\it{x\/}}, {\it{y\/}})\index{iplus} $=$ ({\it{x\/}} $+$ {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-reduce \\ \index{rationalp-reduce}
{\rm{rationalp}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-rplus \\ \index{rationalp-rplus}
{\rm{rationalp}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-fix-rational \\ \index{rationalp-fix-rational}
{\rm{rationalp}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-rtimes \\ \index{rationalp-rtimes}
{\rm{rationalp}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-rneg \\ \index{rationalp-rneg}
{\rm{rationalp}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-rdifference \\ \index{rationalp-rdifference}
{\rm{rationalp}}\,({\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-rquotient \\ \index{rationalp-rquotient}
{\rm{rationalp}}\,({\rm{rquotient}}\,({\it{x\/}}, {\it{y\/}})\index{rquotient})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-rmagnitude \\ \index{rationalp-rmagnitude}
{\rm{rationalp}}\,({\rm{rmagnitude}}\,({\it{x\/}})\index{rmagnitude})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-reduce \\ \index{fix-rational-reduce}
{\rm{fix-rational}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{fix-rational} $=$ {\rm{reduce}}\,({\it{x\/}})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-rplus \\ \index{fix-rational-rplus}
{\rm{fix-rational}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus})\index{fix-rational} $=$ {\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-fix-rational \\ \index{fix-rational-fix-rational}
{\rm{fix-rational}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{fix-rational} $=$ {\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-rtimes \\ \index{fix-rational-rtimes}
{\rm{fix-rational}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes})\index{fix-rational} $=$ {\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-rneg \\ \index{fix-rational-rneg}
{\rm{fix-rational}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg})\index{fix-rational} $=$ {\rm{rneg}}\,({\it{x\/}})\index{rneg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-rdifference \\ \index{fix-rational-rdifference}
{\rm{fix-rational}}\,({\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference})\index{fix-rational} $=$ {\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-rquotient \\ \index{fix-rational-rquotient}
{\rm{fix-rational}}\,({\rm{rquotient}}\,({\it{x\/}}, {\it{y\/}})\index{rquotient})\index{fix-rational} $=$ {\rm{rquotient}}\,({\it{x\/}}, {\it{y\/}})\index{rquotient}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-rmagnitude \\ \index{fix-rational-rmagnitude}
{\rm{fix-rational}}\,({\rm{rmagnitude}}\,({\it{x\/}})\index{rmagnitude})\index{fix-rational} $=$ {\rm{rmagnitude}}\,({\it{x\/}})\index{rmagnitude}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rational-generalization \\ \index{rational-generalization}
\=\+({\rm{rationalp}}\,({\it{x\/}})\index{rationalp} $\rightarrow$ {\rm{integerp}}\,({\rm{numerator}}\,({\it{x\/}})\index{numerator})\index{integerp}) \\ 
$\wedge$$\;\;\;\;$({\rm{rationalp}}\,({\it{x\/}})\index{rationalp} $\rightarrow$ ({\rm{denominator}}\,({\it{x\/}})\index{denominator} $\in\;${\bf{N}}${}$)) \\ 
$\wedge$$\;\;\;\;$({\rm{rationalp}}\,({\it{x\/}})\index{rationalp} $\rightarrow$ ({\rm{denominator}}\,({\it{x\/}})\index{denominator} $\not\simeq {\tt{0}}$))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-remainder-fact1 \\ \index{gcd-remainder-fact1}
(({\tt{1}} $<$ {\it{b\/}}) $\wedge$ ({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd} $=$ {\tt{1}})) $\rightarrow$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $\not=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-remainder-fact2 \\ \index{gcd-remainder-fact2}
(({\tt{1}} $<$ {\it{b\/}}) $\wedge$ ({\rm{gcd}}\,({\it{b\/}}, {\it{a\/}})\index{gcd} $=$ {\tt{1}})) $\rightarrow$ (({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $\not=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gcd-times1-induct} \\  
\=\+{\rm{gcd-times1-induct}}\,({\it{x\/}}, {\it{y\/}})\index{gcd-times1-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{gcd-times1-induct}}\,({\it{x\/}}, {\it{y\/}} $-\;1$)\index{gcd-times1-induct}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-times1 \\ \index{gcd-times1}
{\rm{gcd}}\,({\it{x\/}}, {\it{x\/}} $*$ {\it{y\/}})\index{gcd} $=$ {\rm{fix}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-times2 \\ \index{gcd-times2}
{\rm{gcd}}\,({\it{y\/}}, {\it{x\/}} $*$ {\it{y\/}})\index{gcd} $=$ {\rm{fix}}\,({\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-quotient-quotient \\ \index{gcd-quotient-quotient}
(({\tt{0}} $<$ {\it{a\/}}) $\wedge$ ({\tt{0}} $<$ {\it{b\/}})) $\rightarrow$ ({\rm{gcd}}\,({\it{a\/}} $\div$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd}, {\it{b\/}} $\div$ {\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd})\index{gcd} $=$ {\tt{1}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  divides-each-equality \\ \index{divides-each-equality}
((({\it{a\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{b\/}} ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ {\tt{0}})) $=$ ({\rm{fix}}\,({\it{a\/}}) $=$ {\rm{fix}}\,({\it{b\/}}))
\end{tabbing}


\noindent{\sc Event}:   Enable idifference-iplus-canonicalizer1; name this event `idifference-iplus-canonicalizer1-off'.\index{idifference-iplus-canonicalizer!1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Disable ilessp; name this event `ilessp-on'.\index{ilessp-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable idifference; name this event `idifference-on'.\index{idifference-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable iplus; name this event `iplus-on'.\index{iplus-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable itimes; name this event `itimes-on'.\index{itimes-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable ineg; name this event `ineg-on'.\index{ineg-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable integerp; name this event `integerp-on'.\index{integerp-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable fix-int; name this event `fix-int-on'.\index{fix-int-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable izerop; name this event `izerop-on'.\index{izerop-on}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{gcd-factors} \\  
\=\+{\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}})\index{gcd-factors} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{'}}{\tt{(}}{\tt{0}}{\tt{ .\ }}{\tt{1}}{\tt{)}} \\ 
{\bf elseif }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{'}}{\tt{(}}{\tt{1}}{\tt{ .\ }}{\tt{0}}{\tt{)}} \\ 
{\bf elseif }{\it{x\/}} $<$ {\it{y\/}} \\ 
{\bf then }{\rm{cons}}\,(\=\+{\rm{idifference}}\,(\=\+{\rm{car}}\,({\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}} $-$ {\it{x\/}})\index{gcd-factors}), \\ 
{\rm{cdr}}\,({\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}} $-$ {\it{x\/}})\index{gcd-factors}))\-\index{idifference}, \\ 
{\rm{cdr}}\,({\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}} $-$ {\it{x\/}})\index{gcd-factors}))\- \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{car}}\,({\rm{gcd-factors}}\,({\it{x\/}} $-$ {\it{y\/}}, {\it{y\/}})\index{gcd-factors}), \\ 
{\rm{idifference}}\,(\=\+{\rm{cdr}}\,({\rm{gcd-factors}}\,({\it{x\/}} $-$ {\it{y\/}}, {\it{y\/}})\index{gcd-factors}), \\ 
{\rm{car}}\,({\rm{gcd-factors}}\,({\it{x\/}} $-$ {\it{y\/}}, {\it{y\/}})\index{gcd-factors}))\-\index{idifference})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  gcd-factors-gives-linear-combination \\ \index{gcd-factors-gives-linear-combin!ation}
\=\+(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{y\/}} $\in\;${\bf{N}}${}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{iplus}}\,(\=\+{\rm{itimes}}\,({\rm{car}}\,({\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}})\index{gcd-factors}), {\it{x\/}})\index{itimes}, \\ 
{\rm{itimes}}\,({\rm{cdr}}\,({\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}})\index{gcd-factors}), {\it{y\/}})\index{itimes})\-\index{iplus} \\ 
$=$$\;\;\;\;${\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd})\-\-
\end{tabbing}


\noindent{\sc Event}:   Disable iremainder; name this event `iremainder-on'.\index{iremainder-on}

\addvspace{18pt}


\noindent{\sc Event}:   Disable iquotient; name this event `iquotient-on'.\index{iquotient-on}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  gcd-factors-gives-linear-combination-rewrite \\ \index{gcd-factors-gives-linear-combin!ation-rewrite}
\=\+(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{y\/}} $\in\;${\bf{N}}${}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd} \\ 
$=$$\;\;\;\;${\rm{iplus}}\,(\=\+{\rm{itimes}}\,({\rm{car}}\,({\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}})\index{gcd-factors}), {\it{x\/}})\index{itimes}, \\ 
{\rm{itimes}}\,({\rm{cdr}}\,({\rm{gcd-factors}}\,({\it{x\/}}, {\it{y\/}})\index{gcd-factors}), {\it{y\/}})\index{itimes})\-\index{iplus})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  dpr-hack1 \\ \index{dpr-hack1}
\=\+{\rm{itimes}}\,({\it{x\/}}, {\rm{iplus}}\,({\rm{itimes}}\,({\it{c\/}}, {\it{a\/}})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\it{q\/}})\index{itimes})\index{iplus})\index{itimes} \\ 
$=$$\;\;\;\;${\rm{iplus}}\,({\rm{itimes}}\,({\it{c\/}}, {\rm{itimes}}\,({\it{a\/}}, {\it{x\/}})\index{itimes})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\rm{itimes}}\,({\it{q\/}}, {\it{x\/}})\index{itimes})\index{itimes})\index{iplus}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  dpr-hack2 \\ \index{dpr-hack2}
\=\+(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{y\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{c\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\rm{iremainder}}\,({\rm{itimes}}\,({\it{c\/}}, {\it{y\/}})\index{itimes}, {\it{x\/}})\index{iremainder} $=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{itimes}}\,({\rm{iquotient}}\,({\rm{itimes}}\,({\it{c\/}}, {\it{y\/}})\index{itimes}, {\it{x\/}})\index{iquotient}, {\it{x\/}})\index{itimes} $=$ {\rm{itimes}}\,({\it{c\/}}, {\it{y\/}})\index{itimes})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  dpr-hack3 \\ \index{dpr-hack3}
\=\+{\rm{iplus}}\,({\rm{itimes}}\,({\it{c\/}}, {\rm{itimes}}\,({\it{a\/}}, {\it{x\/}})\index{itimes})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\rm{itimes}}\,({\it{c\/}}, {\it{y\/}})\index{itimes})\index{itimes})\index{iplus} \\ 
$=$$\;\;\;\;${\rm{iplus}}\,({\rm{itimes}}\,({\it{c\/}}, {\rm{itimes}}\,({\it{a\/}}, {\it{x\/}})\index{itimes})\index{itimes}, {\rm{itimes}}\,({\it{c\/}}, {\rm{itimes}}\,({\it{b\/}}, {\it{y\/}})\index{itimes})\index{itimes})\index{iplus}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  dpr-hack4 \\ \index{dpr-hack4}
\=\+{\rm{iplus}}\,({\rm{itimes}}\,({\it{c\/}}, {\rm{itimes}}\,({\it{a\/}}, {\it{x\/}})\index{itimes})\index{itimes}, {\rm{itimes}}\,({\it{c\/}}, {\rm{itimes}}\,({\it{b\/}}, {\it{y\/}})\index{itimes})\index{itimes})\index{iplus} \\ 
$=$$\;\;\;\;${\rm{itimes}}\,({\it{c\/}}, {\rm{iplus}}\,({\rm{itimes}}\,({\it{a\/}}, {\it{x\/}})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\it{y\/}})\index{itimes})\index{iplus})\index{itimes}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  dpr-hack5 \\ \index{dpr-hack5}
\=\+(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{y\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{c\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\rm{iremainder}}\,({\rm{itimes}}\,({\it{c\/}}, {\it{y\/}})\index{itimes}, {\it{x\/}})\index{iremainder} $=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{itimes}}\,({\it{x\/}}, {\rm{iplus}}\,({\rm{itimes}}\,({\it{c\/}}, {\it{a\/}})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\rm{iquotient}}\,({\rm{itimes}}\,({\it{c\/}}, {\it{y\/}})\index{itimes}, {\it{x\/}})\index{iquotient})\index{itimes})\index{iplus})\index{itimes} \\ 
$=$$\;\;\;\;${\rm{itimes}}\,({\it{c\/}}, {\rm{iplus}}\,({\rm{itimes}}\,({\it{a\/}}, {\it{x\/}})\index{itimes}, {\rm{itimes}}\,({\it{b\/}}, {\it{y\/}})\index{itimes})\index{iplus})\index{itimes})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-0-sufficiency \\ \index{remainder-0-sufficiency}
\=\+(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{c\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\rm{itimes}}\,({\it{x\/}}, {\it{p\/}})\index{itimes} $=$ {\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{c\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  divides-product-reduction \\ \index{divides-product-reduction}
\=\+(\=\+({\it{x\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$({\it{y\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$({\it{c\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$({\rm{gcd}}\,({\it{x\/}}, {\it{y\/}})\index{gcd} $=$ {\tt{1}}) \\ 
$\wedge$$\;\;\;\;$((({\it{c\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{c\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}})\-
\end{tabbing}


\noindent{\sc Event}:   Enable remainder-0-sufficiency; name this event `remainder-0-sufficiency-off'.\index{remainder-0-sufficiency-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack1; name this event `dpr-hack1-off'.\index{dpr-hack1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack2; name this event `dpr-hack2-off'.\index{dpr-hack2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack3; name this event `dpr-hack3-off'.\index{dpr-hack3-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack4; name this event `dpr-hack4-off'.\index{dpr-hack4-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack5; name this event `dpr-hack5-off'.\index{dpr-hack5-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-factors-gives-linear-combination-rewrite; name this event `gcd-factors-gives-linear-combination-rewrite-off'.\index{gcd-factors-gives-linear-combin!ation-rewrite-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-factors-gives-linear-combination; name this event `gcd-factors-gives-linear-combination-off'.\index{gcd-factors-gives-linear-combin!ation-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-factors; name this event `gcd-factors-off'.\index{gcd-factors-off}

\addvspace{18pt}


\noindent{\sc Event}:   Disable idifference-iplus-canonicalizer1; name this event `idifference-iplus-canonicalizer1-on'.\index{idifference-iplus-canonicalizer!1-on}

\addvspace{18pt}


\noindent{\sc Event}:   Enable ilessp; name this event `ilessp-off1'.\index{ilessp-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable idifference; name this event `idifference-off1'.\index{idifference-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iplus; name this event `iplus-off1'.\index{iplus-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable itimes; name this event `itimes-off1'.\index{itimes-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable ineg; name this event `ineg-off1'.\index{ineg-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-int; name this event `fix-int-off1'.\index{fix-int-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable izerop; name this event `izerop-off1'.\index{izerop-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iremainder; name this event `iremainder-off1'.\index{iremainder-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iquotient; name this event `iquotient-off1'.\index{iquotient-off1}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  gcd-remainder-times-fact1-proof \\ \index{gcd-remainder-times-fact1-proof}
({\rm{gcd}}\,({\it{a\/}}, {\it{b\/}})\index{gcd} $=$ {\tt{1}}) $\rightarrow$ (((({\it{b\/}} $*$ {\it{c\/}}) ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ {\tt{0}}) $=$ (({\it{c\/}} ${}${\bf{mod}}${}$ {\it{a\/}}) $=$ {\tt{0}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-gcd-fact \\ \index{times-gcd-fact}
\=\+(({\rm{gcd}}\,({\it{a\/}}, {\it{c\/}})\index{gcd} $=$ {\tt{1}}) $\wedge$ ({\rm{gcd}}\,({\it{b\/}}, {\it{d\/}})\index{gcd} $=$ {\tt{1}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$(({\rm{fix}}\,({\it{a\/}}) $=$ {\rm{fix}}\,({\it{d\/}})) $\wedge$ ({\rm{fix}}\,({\it{b\/}}) $=$ {\rm{fix}}\,({\it{c\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-times-quotient-arg2 \\ \index{equal-times-times-quotient-arg2}
\=\+((({\it{b\/}} ${}${\bf{mod}}${}$ {\it{e\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{d\/}} ${}${\bf{mod}}${}$ {\it{e\/}}) $=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+(({\it{a\/}} $*$ ({\it{b\/}} $\div$ {\it{e\/}})) $=$ ({\it{c\/}} $*$ ({\it{d\/}} $\div$ {\it{e\/}}))) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})))\- \\ 
$\wedge$$\;\;\;\;$(\=\+((({\it{b\/}} $\div$ {\it{e\/}}) $*$ {\it{a\/}}) $=$ ({\it{c\/}} $*$ ({\it{d\/}} $\div$ {\it{e\/}}))) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})))\- \\ 
$\wedge$$\;\;\;\;$(\=\+((({\it{b\/}} $\div$ {\it{e\/}}) $*$ {\it{a\/}}) $=$ (({\it{d\/}} $\div$ {\it{e\/}}) $*$ {\it{c\/}})) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-gcd-times-fact \\ \index{quotient-gcd-times-fact}
\=\+((({\it{v\/}} $*$ {\it{z\/}}) $=$ ({\it{w\/}} $*$ {\it{x\/}})) $\wedge$ ({\tt{0}} $<$ {\it{w\/}}) $\wedge$ ({\tt{0}} $<$ {\it{z\/}})) \\ 
$\rightarrow$$\;\;\;\;$(({\it{v\/}} $\div$ {\rm{gcd}}\,({\it{v\/}}, {\it{w\/}})\index{gcd}) $=$ ({\it{x\/}} $\div$ {\rm{gcd}}\,({\it{x\/}}, {\it{z\/}})\index{gcd}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-gcd-times-fact1 \\ \index{quotient-gcd-times-fact1}
\=\+((({\it{v\/}} $*$ {\it{z\/}}) $=$ ({\it{w\/}} $*$ {\it{x\/}})) $\wedge$ ({\tt{0}} $<$ {\it{w\/}}) $\wedge$ ({\tt{0}} $<$ {\it{z\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{v\/}} $\div$ {\rm{gcd}}\,({\it{v\/}}, {\it{w\/}})\index{gcd}) $=$ ({\it{x\/}} $\div$ {\rm{gcd}}\,({\it{x\/}}, {\it{z\/}})\index{gcd})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-gcd-times-fact2 \\ \index{quotient-gcd-times-fact2}
\=\+((({\it{v\/}} $*$ {\it{z\/}}) $=$ ({\it{w\/}} $*$ {\it{x\/}})) $\wedge$ ({\tt{0}} $<$ {\it{w\/}}) $\wedge$ ({\tt{0}} $<$ {\it{z\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{v\/}} $\div$ {\rm{gcd}}\,({\it{w\/}}, {\it{v\/}})\index{gcd}) $=$ ({\it{x\/}} $\div$ {\rm{gcd}}\,({\it{x\/}}, {\it{z\/}})\index{gcd})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-gcd-times-fact3 \\ \index{quotient-gcd-times-fact3}
\=\+((({\it{v\/}} $*$ {\it{z\/}}) $=$ ({\it{w\/}} $*$ {\it{x\/}})) $\wedge$ ({\tt{0}} $<$ {\it{w\/}}) $\wedge$ ({\tt{0}} $<$ {\it{z\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{v\/}} $\div$ {\rm{gcd}}\,({\it{v\/}}, {\it{w\/}})\index{gcd}) $=$ ({\it{x\/}} $\div$ {\rm{gcd}}\,({\it{z\/}}, {\it{x\/}})\index{gcd})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-gcd-times-fact4 \\ \index{quotient-gcd-times-fact4}
\=\+((({\it{v\/}} $*$ {\it{z\/}}) $=$ ({\it{w\/}} $*$ {\it{x\/}})) $\wedge$ ({\tt{0}} $<$ {\it{w\/}}) $\wedge$ ({\tt{0}} $<$ {\it{z\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{v\/}} $\div$ {\rm{gcd}}\,({\it{w\/}}, {\it{v\/}})\index{gcd}) $=$ ({\it{x\/}} $\div$ {\rm{gcd}}\,({\it{z\/}}, {\it{x\/}})\index{gcd})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-gcd-times-fact5 \\ \index{quotient-gcd-times-fact5}
\=\+((({\it{v\/}} $*$ {\it{z\/}}) $=$ ({\it{w\/}} $*$ {\it{x\/}})) $\wedge$ ({\tt{0}} $<$ {\it{v\/}}) $\wedge$ ({\tt{0}} $<$ {\it{x\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{v\/}} $\div$ {\rm{gcd}}\,({\it{v\/}}, {\it{w\/}})\index{gcd}) $=$ ({\it{x\/}} $\div$ {\rm{gcd}}\,({\it{x\/}}, {\it{z\/}})\index{gcd})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-gcd-bridge1 \\ \index{equal-times-gcd-bridge1}
\=\+(\=\+(({\it{b\/}} $\div$ {\rm{gcd}}\,({\it{c\/}}, {\it{b\/}})\index{gcd}) $=$ ({\it{d\/}} $\div$ {\rm{gcd}}\,({\it{a\/}}, {\it{d\/}})\index{gcd})) \\ 
$\wedge$$\;\;\;\;$(({\it{c\/}} $\div$ {\rm{gcd}}\,({\it{c\/}}, {\it{b\/}})\index{gcd}) $=$ ({\it{a\/}} $\div$ {\rm{gcd}}\,({\it{a\/}}, {\it{d\/}})\index{gcd})))\- \\ 
$\rightarrow$$\;\;\;\;$((({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-if-integerp-and-not-negativep \\ \index{numberp-if-integerp-and-not-neg!ativep}
({\rm{integerp}}\,({\it{x\/}})\index{integerp} $\wedge$ ($\neg$ {\rm{negativep}}\,({\it{x\/}}))) $\rightarrow$ ({\it{x\/}} $\in\;${\bf{N}}${}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  negativep-if-integerp-and-not-numberp \\ \index{negativep-if-integerp-and-not-n!umberp}
({\rm{integerp}}\,({\it{x\/}})\index{integerp} $\wedge$ ({\it{x\/}} $\not\in\;${\bf{N}}${}$)) $\rightarrow$ {\rm{negativep}}\,({\it{x\/}})
\end{tabbing}


\noindent{\sc Event}:   Enable numberp-if-integerp-and-not-negativep; name this event `numberp-if-integerp-and-not-negativep-off'.\index{numberp-if-integerp-and-not-neg!ativep-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable negativep-if-integerp-and-not-numberp; name this event `negativep-if-integerp-and-not-numberp-off'.\index{negativep-if-integerp-and-not-n!umberp-off}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  requal-reduce-reduce-equal \\ \index{requal-reduce-reduce-equal}
{\rm{requal}}\,({\it{a\/}}, {\it{b\/}})\index{requal} $=$ ({\rm{reduce}}\,({\it{a\/}})\index{reduce} $=$ {\rm{reduce}}\,({\it{b\/}})\index{reduce})
\end{tabbing}


\noindent{\sc Event}:   Enable requal-reduce-reduce-equal; name this event `requal-reduce-reduce-equal-off'.\index{requal-reduce-reduce-equal-off}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  commutativity-of-requal \\ \index{commutativity-of-requal}
{\rm{requal}}\,({\it{x\/}}, {\it{y\/}})\index{requal} $=$ {\rm{requal}}\,({\it{y\/}}, {\it{x\/}})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-reduce1 \\ \index{requal-reduce1}
{\rm{requal}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{requal} $=$ {\rm{requal}}\,({\it{x\/}}, {\it{y\/}})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-reduce2 \\ \index{requal-reduce2}
{\rm{requal}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{requal} $=$ {\rm{requal}}\,({\it{x\/}}, {\it{y\/}})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-reduce \\ \index{reduce-reduce}
{\rm{reduce}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{reduce} $=$ {\rm{reduce}}\,({\it{x\/}})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-open-up \\ \index{rplus-open-up}
\=\+{\rm{rplus}}\,({\it{a\/}}, {\it{b\/}})\index{rplus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rationalp}}\,({\it{a\/}})\index{rationalp} \\ 
{\bf then }\=\+{\bf if }{\rm{rationalp}}\,({\it{b\/}})\index{rationalp} \\ 
{\bf then }{\rm{reduce}}\,({\rm{rational}}\,(\=\+{\rm{iplus}}\,(\=\+{\rm{itimes}}\,({\rm{numerator}}\,({\it{a\/}})\index{numerator}, {\rm{denominator}}\,({\it{b\/}})\index{denominator})\index{itimes}, \\ 
{\rm{itimes}}\,({\rm{numerator}}\,({\it{b\/}})\index{numerator}, {\rm{denominator}}\,({\it{a\/}})\index{denominator})\index{itimes})\-\index{iplus}, \\ 
{\rm{itimes}}\,({\rm{denominator}}\,({\it{a\/}})\index{denominator}, {\rm{denominator}}\,({\it{b\/}})\index{denominator})\index{itimes})\-\index{rational})\index{reduce} \\ 
{\bf else }{\rm{reduce}}\,({\rm{fix-rational}}\,({\it{a\/}})\index{fix-rational})\index{reduce}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{reduce}}\,({\rm{fix-rational}}\,({\it{b\/}})\index{fix-rational})\index{reduce}$\;${\bf  endif}\-\-
\end{tabbing}


\noindent{\sc Event}:   Enable rplus-open-up; name this event `rplus-open-up-off'.\index{rplus-open-up-off}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  commutativity-of-rplus \\ \index{commutativity-of-rplus}
{\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus} $=$ {\rm{rplus}}\,({\it{y\/}}, {\it{x\/}})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-requal-arg1 \\ \index{rplus-requal-arg1}
{\rm{requal}}\,({\it{a\/}}, {\it{b\/}})\index{requal} $\rightarrow$ {\rm{requal}}\,({\rm{rplus}}\,({\it{a\/}}, {\it{x\/}})\index{rplus}, {\rm{rplus}}\,({\it{b\/}}, {\it{x\/}})\index{rplus})\index{requal}
\end{tabbing}


\noindent{\sc Event}:   Enable rplus-requal-arg1; name this event `rplus-requal-arg1-off'.\index{rplus-requal-arg1-off}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  requal-x-x \\ \index{requal-x-x}
{\rm{requal}}\,({\it{x\/}}, {\it{x\/}})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-reduce-arg1 \\ \index{rplus-reduce-arg1}
{\rm{requal}}\,({\rm{rplus}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{rplus}, {\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-reduce-arg2 \\ \index{rplus-reduce-arg2}
{\rm{requal}}\,({\rm{rplus}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{rplus}, {\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rplus-reduce-arg1 \\ \index{requal-simple-rplus-reduce-arg1}
{\rm{requal}}\,({\rm{simple-rplus}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{simple-rplus}, {\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rplus-reduce-arg2 \\ \index{requal-simple-rplus-reduce-arg2}
{\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{simple-rplus}, {\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-nrationalp \\ \index{reduce-nrationalp}
($\neg$ {\rm{rationalp}}\,({\it{x\/}})\index{rationalp}) $\rightarrow$ ({\rm{reduce}}\,({\it{x\/}})\index{reduce} $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-numerator-reduce \\ \index{numberp-numerator-reduce}
({\rm{numerator}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{numerator} $\in\;${\bf{N}}${}$) $=$ ({\rm{numerator}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational})\index{numerator} $\in\;${\bf{N}}${}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  negativep-ineg \\ \index{negativep-ineg}
{\rm{negativep}}\,({\rm{ineg}}\,({\it{x\/}})\index{ineg}) $=$ ({\tt{0}} $<$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-ineg \\ \index{numberp-ineg}
({\rm{ineg}}\,({\it{x\/}})\index{ineg} $\in\;${\bf{N}}${}$) $=$ ({\tt{0}} $\not<$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rational-ineg-numerator-reduce-bridge \\ \index{rational-ineg-numerator-reduce-!bridge}
\=\+{\rm{rational}}\,({\rm{ineg}}\,({\rm{numerator}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{numerator})\index{ineg}, {\rm{denominator}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{denominator})\index{rational} \\ 
$=$$\;\;\;\;${\rm{reduce}}\,({\rm{rational}}\,({\rm{ineg}}\,({\rm{numerator}}\,({\it{x\/}})\index{numerator})\index{ineg}, {\rm{denominator}}\,({\it{x\/}})\index{denominator})\index{rational})\index{reduce}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-0 \\ \index{reduce-0}
{\rm{reduce}}\,({\rm{rational}}\,({\tt{0}}, {\it{x\/}})\index{rational})\index{reduce} $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  simple-rneg-reduce \\ \index{simple-rneg-reduce}
{\rm{simple-rneg}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{simple-rneg} $=$ {\rm{reduce}}\,({\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rneg-reduce \\ \index{rneg-reduce}
{\rm{rneg}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce})\index{rneg} $=$ {\rm{rneg}}\,({\it{x\/}})\index{rneg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  simple-rneg-simple-rneg \\ \index{simple-rneg-simple-rneg}
{\rm{requal}}\,({\rm{simple-rneg}}\,({\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg})\index{simple-rneg}, {\it{x\/}})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-rneg-rneg \\ \index{requal-rneg-rneg}
{\rm{requal}}\,({\rm{rneg}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg})\index{rneg}, {\it{x\/}})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rneg-rneg \\ \index{rneg-rneg}
{\rm{rneg}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg})\index{rneg} $=$ {\rm{reduce}}\,({\it{x\/}})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-means \\ \index{rationalp-means}
\=\+{\rm{rationalp}}\,({\it{x\/}})\index{rationalp} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{rational-formp}}\,({\it{x\/}})\index{rational-formp} \\ 
$\wedge$$\;\;\;\;${\rm{integerp}}\,({\rm{numerator}}\,({\it{x\/}})\index{numerator})\index{integerp} \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\rm{denominator}}\,({\it{x\/}})\index{denominator}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  means-rationalp \\ \index{means-rationalp}
({\rm{integerp}}\,({\it{n\/}})\index{integerp} $\wedge$ ({\tt{0}} $<$ {\it{d\/}})) $\rightarrow$ {\rm{rationalp}}\,({\rm{rational}}\,({\it{n\/}}, {\it{d\/}})\index{rational})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nrational-rplus-arg1 \\ \index{nrational-rplus-arg1}
($\neg$ {\rm{rationalp}}\,({\it{x\/}})\index{rationalp}) $\rightarrow$ ({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus} $=$ {\rm{reduce}}\,({\it{y\/}})\index{reduce})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nrational-rplus-arg2 \\ \index{nrational-rplus-arg2}
($\neg$ {\rm{rationalp}}\,({\it{x\/}})\index{rationalp}) $\rightarrow$ ({\rm{rplus}}\,({\it{y\/}}, {\it{x\/}})\index{rplus} $=$ {\rm{reduce}}\,({\it{y\/}})\index{reduce})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nrational-simple-rplus-arg1 \\ \index{nrational-simple-rplus-arg1}
($\neg$ {\rm{rationalp}}\,({\it{x\/}})\index{rationalp}) $\rightarrow$ ({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus} $=$ {\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nrational-simple-rplus-arg2 \\ \index{nrational-simple-rplus-arg2}
($\neg$ {\rm{rationalp}}\,({\it{x\/}})\index{rationalp}) $\rightarrow$ ({\rm{simple-rplus}}\,({\it{y\/}}, {\it{x\/}})\index{simple-rplus} $=$ {\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  simple-rplus-fix-rational-arg1 \\ \index{simple-rplus-fix-rational-arg1}
{\rm{simple-rplus}}\,({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational}, {\it{y\/}})\index{simple-rplus} $=$ {\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  simple-rplus-fix-rational-arg2 \\ \index{simple-rplus-fix-rational-arg2}
{\rm{simple-rplus}}\,({\it{x\/}}, {\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{simple-rplus} $=$ {\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-of-rationalp \\ \index{fix-rational-of-rationalp}
{\rm{rationalp}}\,({\it{x\/}})\index{rationalp} $\rightarrow$ ({\rm{fix-rational}}\,({\it{x\/}})\index{fix-rational} $=$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  negative-guts-ineg \\ \index{negative-guts-ineg}
\=\+{\rm{negative-guts}}\,({\rm{ineg}}\,({\it{x\/}})\index{ineg}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\tt{0}} $<$ {\it{x\/}}$\;\;${\bf then }{\it{x\/}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-simple-rplus \\ \index{rationalp-simple-rplus}
{\rm{rationalp}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-simple-rplus \\ \index{fix-rational-simple-rplus}
{\rm{fix-rational}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{fix-rational} $=$ {\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-associativity-of-simple-rplus \\ \index{requal-associativity-of-simple-!rplus}
{\rm{requal}}\,({\rm{simple-rplus}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\it{z\/}})\index{simple-rplus}, {\rm{simple-rplus}}\,({\it{x\/}}, {\rm{simple-rplus}}\,({\it{y\/}}, {\it{z\/}})\index{simple-rplus})\index{simple-rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-bridge1 \\ \index{equal-times-bridge1}
\=\+((({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) $\wedge$ (({\it{a\/}} $*$ {\it{x\/}}) $=$ ({\it{c\/}} $*$ {\it{y\/}})) $\wedge$ ({\it{a\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$((({\it{b\/}} $*$ {\it{y\/}}) $=$ ({\it{d\/}} $*$ {\it{x\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-bridge2 \\ \index{equal-times-bridge2}
\=\+((({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) $\wedge$ (({\it{a\/}} $*$ {\it{x\/}}) $=$ ({\it{c\/}} $*$ {\it{y\/}})) $\wedge$ ({\it{a\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$((({\it{y\/}} $*$ {\it{b\/}}) $=$ ({\it{d\/}} $*$ {\it{x\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-bridge3 \\ \index{equal-times-bridge3}
\=\+((({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) $\wedge$ (({\it{a\/}} $*$ {\it{x\/}}) $=$ ({\it{c\/}} $*$ {\it{y\/}})) $\wedge$ ({\it{a\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$((({\it{b\/}} $*$ {\it{y\/}}) $=$ ({\it{x\/}} $*$ {\it{d\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-bridge4 \\ \index{equal-times-bridge4}
\=\+((({\it{a\/}} $*$ {\it{b\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) $\wedge$ (({\it{a\/}} $*$ {\it{x\/}}) $=$ ({\it{c\/}} $*$ {\it{y\/}})) $\wedge$ ({\it{a\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$((({\it{y\/}} $*$ {\it{b\/}}) $=$ ({\it{x\/}} $*$ {\it{d\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  transitivity-of-requal-bridge \\ \index{transitivity-of-requal-bridge}
({\rm{requal}}\,({\it{a\/}}, {\it{b\/}})\index{requal} $\wedge$ {\rm{requal}}\,({\it{b\/}}, {\it{c\/}})\index{requal}) $\rightarrow$ {\rm{requal}}\,({\it{a\/}}, {\it{c\/}})\index{requal}
\end{tabbing}


\noindent{\sc Event}:   Enable transitivity-of-requal-bridge; name this event `transitivity-of-requal-bridge-off'.\index{transitivity-of-requal-bridge-o!ff}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  transitivity-of-requal \\ \index{transitivity-of-requal}
\=\+(({\rm{requal}}\,({\it{a\/}}, {\it{b\/}})\index{requal} $\wedge$ {\rm{requal}}\,({\it{b\/}}, {\it{c\/}})\index{requal}) $\rightarrow$ {\rm{requal}}\,({\it{a\/}}, {\it{c\/}})\index{requal}) \\ 
$\wedge$$\;\;\;\;$(({\rm{requal}}\,({\it{a\/}}, {\it{b\/}})\index{requal} $\wedge$ {\rm{requal}}\,({\it{c\/}}, {\it{b\/}})\index{requal}) $\rightarrow$ {\rm{requal}}\,({\it{a\/}}, {\it{c\/}})\index{requal}) \\ 
$\wedge$$\;\;\;\;$(({\rm{requal}}\,({\it{b\/}}, {\it{a\/}})\index{requal} $\wedge$ {\rm{requal}}\,({\it{b\/}}, {\it{c\/}})\index{requal}) $\rightarrow$ {\rm{requal}}\,({\it{a\/}}, {\it{c\/}})\index{requal}) \\ 
$\wedge$$\;\;\;\;$(({\rm{requal}}\,({\it{b\/}}, {\it{a\/}})\index{requal} $\wedge$ {\rm{requal}}\,({\it{c\/}}, {\it{b\/}})\index{requal}) $\rightarrow$ {\rm{requal}}\,({\it{a\/}}, {\it{c\/}})\index{requal})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-requal-rewrite \\ \index{equal-requal-rewrite}
\=\+({\rm{requal}}\,({\it{b\/}}, {\it{c\/}})\index{requal} $\rightarrow$ ({\rm{requal}}\,({\it{a\/}}, {\it{b\/}})\index{requal} $=$ {\rm{requal}}\,({\it{a\/}}, {\it{c\/}})\index{requal})) \\ 
$\wedge$$\;\;\;\;$({\rm{requal}}\,({\it{b\/}}, {\it{c\/}})\index{requal} $\rightarrow$ ({\rm{requal}}\,({\it{a\/}}, {\it{b\/}})\index{requal} $=$ {\rm{requal}}\,({\it{c\/}}, {\it{a\/}})\index{requal})) \\ 
$\wedge$$\;\;\;\;$({\rm{requal}}\,({\it{b\/}}, {\it{c\/}})\index{requal} $\rightarrow$ ({\rm{requal}}\,({\it{b\/}}, {\it{a\/}})\index{requal} $=$ {\rm{requal}}\,({\it{c\/}}, {\it{a\/}})\index{requal}))\-
\end{tabbing}


\noindent{\sc Event}:   Enable equal-requal-rewrite; name this event `equal-requal-rewrite-off'.\index{equal-requal-rewrite-off}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  requal-simple-rplus-bridge \\ \index{requal-simple-rplus-bridge}
\=\+({\rm{requal}}\,({\rm{simple-rplus}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{simple-rplus}, {\it{z\/}})\index{requal} $=$ {\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\it{z\/}})\index{requal}) \\ 
$\wedge$$\;\;\;\;$({\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{simple-rplus}, {\it{z\/}})\index{requal} $=$ {\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\it{z\/}})\index{requal}) \\ 
$\wedge$$\;\;\;\;$({\rm{requal}}\,({\it{z\/}}, {\rm{simple-rplus}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{simple-rplus})\index{requal} $=$ {\rm{requal}}\,({\it{z\/}}, {\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{requal}) \\ 
$\wedge$$\;\;\;\;$({\rm{requal}}\,({\it{z\/}}, {\rm{simple-rplus}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{simple-rplus})\index{requal} $=$ {\rm{requal}}\,({\it{z\/}}, {\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{requal})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-associativity-of-rplus \\ \index{requal-associativity-of-rplus}
{\rm{requal}}\,({\rm{rplus}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}, {\it{z\/}})\index{rplus}, {\rm{rplus}}\,({\it{x\/}}, {\rm{rplus}}\,({\it{y\/}}, {\it{z\/}})\index{rplus})\index{rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-rplus \\ \index{associativity-of-rplus}
{\rm{rplus}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}, {\it{z\/}})\index{rplus} $=$ {\rm{rplus}}\,({\it{x\/}}, {\rm{rplus}}\,({\it{y\/}}, {\it{z\/}})\index{rplus})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-rplus \\ \index{commutativity2-of-rplus}
{\rm{rplus}}\,({\it{x\/}}, {\rm{rplus}}\,({\it{y\/}}, {\it{z\/}})\index{rplus})\index{rplus} $=$ {\rm{rplus}}\,({\it{y\/}}, {\rm{rplus}}\,({\it{x\/}}, {\it{z\/}})\index{rplus})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rdifference-arg1 \\ \index{rplus-rdifference-arg1}
{\rm{rplus}}\,({\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference}, {\it{z\/}})\index{rplus} $=$ {\rm{rdifference}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{z\/}})\index{rplus}, {\it{y\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rdifference-arg2 \\ \index{rplus-rdifference-arg2}
{\rm{rplus}}\,({\it{x\/}}, {\rm{rdifference}}\,({\it{y\/}}, {\it{z\/}})\index{rdifference})\index{rplus} $=$ {\rm{rdifference}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}, {\it{z\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-rplus \\ \index{reduce-rplus}
{\rm{reduce}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus})\index{reduce} $=$ {\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-rtimes \\ \index{reduce-rtimes}
{\rm{reduce}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes})\index{reduce} $=$ {\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-difference \\ \index{reduce-difference}
{\rm{reduce}}\,({\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference})\index{reduce} $=$ {\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-rquotient \\ \index{reduce-rquotient}
{\rm{reduce}}\,({\rm{rquotient}}\,({\it{x\/}}, {\it{y\/}})\index{rquotient})\index{reduce} $=$ {\rm{rquotient}}\,({\it{x\/}}, {\it{y\/}})\index{rquotient}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-rmagnitude \\ \index{reduce-rmagnitude}
{\rm{reduce}}\,({\rm{rmagnitude}}\,({\it{x\/}})\index{rmagnitude})\index{reduce} $=$ {\rm{rmagnitude}}\,({\it{x\/}})\index{rmagnitude}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-rneg \\ \index{reduce-rneg}
{\rm{reduce}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg})\index{reduce} $=$ {\rm{rneg}}\,({\it{x\/}})\index{rneg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-reduce-arg1-rewrite \\ \index{rplus-reduce-arg1-rewrite}
{\rm{rplus}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{rplus} $=$ {\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-reduce-arg2-rewrite \\ \index{rplus-reduce-arg2-rewrite}
{\rm{rplus}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{rplus} $=$ {\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-rneg-simple-rplus \\ \index{requal-rneg-simple-rplus}
{\rm{requal}}\,(\=\+{\rm{simple-rplus}}\,({\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg}, {\rm{simple-rneg}}\,({\it{y\/}})\index{simple-rneg})\index{simple-rplus}, \\ 
{\rm{simple-rneg}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus})\index{simple-rneg})\-\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-rplus-rneg \\ \index{requal-rplus-rneg}
{\rm{requal}}\,({\rm{rneg}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus})\index{rneg}, {\rm{rplus}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg}, {\rm{rneg}}\,({\it{y\/}})\index{rneg})\index{rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rneg-rplus \\ \index{rneg-rplus}
{\rm{rneg}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus})\index{rneg} $=$ {\rm{rplus}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg}, {\rm{rneg}}\,({\it{y\/}})\index{rneg})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rdifference-rdifference-arg1 \\ \index{rdifference-rdifference-arg1}
{\rm{rdifference}}\,({\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference}, {\it{z\/}})\index{rdifference} $=$ {\rm{rdifference}}\,({\it{x\/}}, {\rm{rplus}}\,({\it{y\/}}, {\it{z\/}})\index{rplus})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rdifference-rdifference-arg2 \\ \index{rdifference-rdifference-arg2}
{\rm{rdifference}}\,({\it{x\/}}, {\rm{rdifference}}\,({\it{y\/}}, {\it{z\/}})\index{rdifference})\index{rdifference} $=$ {\rm{rdifference}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{z\/}})\index{rplus}, {\it{y\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rneg-arg1 \\ \index{rplus-rneg-arg1}
{\rm{rplus}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg}, {\it{y\/}})\index{rplus} $=$ {\rm{rdifference}}\,({\it{y\/}}, {\it{x\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rneg-arg2 \\ \index{rplus-rneg-arg2}
{\rm{rplus}}\,({\it{x\/}}, {\rm{rneg}}\,({\it{y\/}})\index{rneg})\index{rplus} $=$ {\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-simple-rtimes \\ \index{commutativity-of-simple-rtimes}
{\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes} $=$ {\rm{simple-rtimes}}\,({\it{y\/}}, {\it{x\/}})\index{simple-rtimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-rtimes \\ \index{commutativity-of-rtimes}
{\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes} $=$ {\rm{rtimes}}\,({\it{y\/}}, {\it{x\/}})\index{rtimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  simple-rtimes-rzerop \\ \index{simple-rtimes-rzerop}
\=\+{\rm{rzerop}}\,({\it{x\/}})\index{rzerop} \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{numerator}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{numerator} $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\rm{numerator}}\,({\rm{simple-rtimes}}\,({\it{y\/}}, {\it{x\/}})\index{simple-rtimes})\index{numerator} $=$ {\tt{0}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-simple-rtimes-when-not-rzerop \\ \index{associativity-of-simple-rtimes-!when-not-rzerop}
\=\+(($\neg$ {\rm{rzerop}}\,({\it{x\/}})\index{rzerop}) $\wedge$ ($\neg$ {\rm{rzerop}}\,({\it{y\/}})\index{rzerop}) $\wedge$ ($\neg$ {\rm{rzerop}}\,({\it{z\/}})\index{rzerop})) \\ 
$\rightarrow$$\;\;\;\;${\rm{requal}}\,(\=\+{\rm{simple-rtimes}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes}, {\it{z\/}})\index{simple-rtimes}, \\ 
{\rm{simple-rtimes}}\,({\it{x\/}}, {\rm{simple-rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{simple-rtimes})\index{simple-rtimes})\-\index{requal}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numerator-zero-rzerop-bridge \\ \index{numerator-zero-rzerop-bridge}
({\rm{numerator}}\,({\it{x\/}})\index{numerator} $=$ {\tt{0}}) $\rightarrow$ {\rm{rzerop}}\,({\it{x\/}})\index{rzerop}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-simple-rtimes \\ \index{associativity-of-simple-rtimes}
{\rm{requal}}\,(\=\+{\rm{simple-rtimes}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes}, {\it{z\/}})\index{simple-rtimes}, \\ 
{\rm{simple-rtimes}}\,({\it{x\/}}, {\rm{simple-rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{simple-rtimes})\index{simple-rtimes})\-\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-requal-arg1 \\ \index{requal-simple-rtimes-requal-arg!1}
{\rm{requal}}\,({\it{x\/}}, {\it{y\/}})\index{requal} $\rightarrow$ {\rm{requal}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{simple-rtimes}, {\rm{simple-rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{simple-rtimes})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-requal-arg2 \\ \index{requal-simple-rtimes-requal-arg!2}
{\rm{requal}}\,({\it{x\/}}, {\it{y\/}})\index{requal} $\rightarrow$ {\rm{requal}}\,({\rm{simple-rtimes}}\,({\it{z\/}}, {\it{x\/}})\index{simple-rtimes}, {\rm{simple-rtimes}}\,({\it{z\/}}, {\it{y\/}})\index{simple-rtimes})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-reduce-arg1 \\ \index{requal-simple-rtimes-reduce-arg!1}
{\rm{requal}}\,({\rm{simple-rtimes}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{simple-rtimes}, {\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-reduce-arg2 \\ \index{requal-simple-rtimes-reduce-arg!2}
{\rm{requal}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{simple-rtimes}, {\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-bridge \\ \index{requal-simple-rtimes-bridge}
\=\+({\rm{requal}}\,({\rm{simple-rtimes}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{simple-rtimes}, {\it{z\/}})\index{requal} $=$ {\rm{requal}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes}, {\it{z\/}})\index{requal}) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{requal}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{simple-rtimes}, {\it{z\/}})\index{requal} \\ 
$=$$\;\;\;\;${\rm{requal}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes}, {\it{z\/}})\index{requal})\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{requal}}\,({\it{z\/}}, {\rm{simple-rtimes}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{simple-rtimes})\index{requal} \\ 
$=$$\;\;\;\;${\rm{requal}}\,({\it{z\/}}, {\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{requal})\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{requal}}\,({\it{z\/}}, {\rm{simple-rtimes}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{simple-rtimes})\index{requal} \\ 
$=$$\;\;\;\;${\rm{requal}}\,({\it{z\/}}, {\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{requal})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-associativity-of-rtimes \\ \index{requal-associativity-of-rtimes}
{\rm{requal}}\,({\rm{rtimes}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes}, {\it{z\/}})\index{rtimes}, {\rm{rtimes}}\,({\it{x\/}}, {\rm{rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{rtimes})\index{rtimes})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  associativity-of-rtimes \\ \index{associativity-of-rtimes}
{\rm{rtimes}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes}, {\it{z\/}})\index{rtimes} $=$ {\rm{rtimes}}\,({\it{x\/}}, {\rm{rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{rtimes})\index{rtimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  simple-rplus-rzerop \\ \index{simple-rplus-rzerop}
{\rm{rzerop}}\,({\it{x\/}})\index{rzerop} $\rightarrow$ ({\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\it{y\/}})\index{requal} $\wedge$ {\rm{requal}}\,({\rm{simple-rplus}}\,({\it{y\/}}, {\it{x\/}})\index{simple-rplus}, {\it{y\/}})\index{requal})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numerator-type \\ \index{numerator-type}
({\rm{numerator}}\,({\it{x\/}})\index{numerator} $\in\;${\bf{N}}${}$) $\vee$ {\rm{negativep}}\,({\rm{numerator}}\,({\it{x\/}})\index{numerator})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rationalp-simple-rtimes \\ \index{rationalp-simple-rtimes}
{\rm{rationalp}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{rationalp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  fix-rational-simple-rtimes \\ \index{fix-rational-simple-rtimes}
{\rm{fix-rational}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{fix-rational} $=$ {\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-simple-rplus-when-not-rzerop \\ \index{requal-simple-rtimes-simple-rpl!us-when-not-rzerop}
\=\+(($\neg$ {\rm{rzerop}}\,({\it{x\/}})\index{rzerop}) $\wedge$ ($\neg$ {\rm{rzerop}}\,({\it{y\/}})\index{rzerop}) $\wedge$ ($\neg$ {\rm{rzerop}}\,({\it{z\/}})\index{rzerop})) \\ 
$\rightarrow$$\;\;\;\;${\rm{requal}}\,(\=\+{\rm{simple-rtimes}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\it{z\/}})\index{simple-rtimes}, \\ 
{\rm{simple-rplus}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{simple-rtimes}, {\rm{simple-rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{simple-rtimes})\index{simple-rplus})\-\index{requal}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-rzerop-simple-rplus \\ \index{requal-rzerop-simple-rplus}
\=\+{\rm{rzerop}}\,({\it{x\/}})\index{rzerop} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{requal} \\ 
$\wedge$$\;\;\;\;${\rm{requal}}\,({\rm{simple-rplus}}\,({\it{y\/}}, {\it{x\/}})\index{simple-rplus}, {\rm{fix-rational}}\,({\it{y\/}})\index{fix-rational})\index{requal})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity-of-simple-rplus \\ \index{commutativity-of-simple-rplus}
{\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus} $=$ {\rm{simple-rplus}}\,({\it{y\/}}, {\it{x\/}})\index{simple-rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  simple-rplus-bridge \\ \index{simple-rplus-bridge}
\=\+({\rm{rzerop}}\,({\it{x\/}})\index{rzerop} $\vee$ {\rm{rzerop}}\,({\it{y\/}})\index{rzerop} $\vee$ {\rm{rzerop}}\,({\it{z\/}})\index{rzerop}) \\ 
$\rightarrow$$\;\;\;\;${\rm{requal}}\,(\=\+{\rm{simple-rtimes}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\it{z\/}})\index{simple-rtimes}, \\ 
{\rm{simple-rplus}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{simple-rtimes}, {\rm{simple-rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{simple-rtimes})\index{simple-rplus})\-\index{requal}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-simple-rplus-arg1 \\ \index{requal-simple-rtimes-simple-rpl!us-arg1}
{\rm{requal}}\,(\=\+{\rm{simple-rtimes}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\it{z\/}})\index{simple-rtimes}, \\ 
{\rm{simple-rplus}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{simple-rtimes}, {\rm{simple-rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{simple-rtimes})\index{simple-rplus})\-\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-rtimes-rplus-bridge \\ \index{requal-rtimes-rplus-bridge}
{\rm{requal}}\,({\rm{rtimes}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}, {\it{z\/}})\index{rtimes}, {\rm{rplus}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{rtimes}, {\rm{rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{rtimes})\index{rplus})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rtimes-rplus-arg1 \\ \index{rtimes-rplus-arg1}
{\rm{rtimes}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}, {\it{z\/}})\index{rtimes} $=$ {\rm{rplus}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{rtimes}, {\rm{rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{rtimes})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rtimes-rplus-arg2 \\ \index{rtimes-rplus-arg2}
{\rm{rtimes}}\,({\it{x\/}}, {\rm{rplus}}\,({\it{y\/}}, {\it{z\/}})\index{rplus})\index{rtimes} $=$ {\rm{rplus}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes}, {\rm{rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{rtimes})\index{rplus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rtimes-simple-rneg \\ \index{requal-simple-rtimes-simple-rne!g}
{\rm{requal}}\,({\rm{simple-rtimes}}\,({\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg}, {\it{y\/}})\index{simple-rtimes}, {\rm{simple-rneg}}\,({\rm{simple-rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rtimes})\index{simple-rneg})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-rtimes-rneg \\ \index{requal-rtimes-rneg}
{\rm{requal}}\,({\rm{rtimes}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg}, {\it{y\/}})\index{rtimes}, {\rm{rneg}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes})\index{rneg})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rtimes-rneg-arg1 \\ \index{rtimes-rneg-arg1}
{\rm{rtimes}}\,({\rm{rneg}}\,({\it{x\/}})\index{rneg}, {\it{y\/}})\index{rtimes} $=$ {\rm{rneg}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes})\index{rneg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rtimes-rneg-arg2 \\ \index{rtimes-rneg-arg2}
{\rm{rtimes}}\,({\it{x\/}}, {\rm{rneg}}\,({\it{y\/}})\index{rneg})\index{rtimes} $=$ {\rm{rneg}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes})\index{rneg}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rtimes-rdifference-arg1 \\ \index{rtimes-rdifference-arg1}
{\rm{rtimes}}\,({\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference}, {\it{z\/}})\index{rtimes} $=$ {\rm{rdifference}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{rtimes}, {\rm{rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{rtimes})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rtimes-rdifference-arg2 \\ \index{rtimes-rdifference-arg2}
{\rm{rtimes}}\,({\it{x\/}}, {\rm{rdifference}}\,({\it{y\/}}, {\it{z\/}})\index{rdifference})\index{rtimes} $=$ {\rm{rdifference}}\,({\rm{rtimes}}\,({\it{x\/}}, {\it{y\/}})\index{rtimes}, {\rm{rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{rtimes})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rneg-rdifference \\ \index{rneg-rdifference}
{\rm{rneg}}\,({\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference})\index{rneg} $=$ {\rm{rdifference}}\,({\it{y\/}}, {\it{x\/}})\index{rdifference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rdifference-rneg-arg2 \\ \index{rdifference-rneg-arg2}
{\rm{rdifference}}\,({\it{x\/}}, {\rm{rneg}}\,({\it{y\/}})\index{rneg})\index{rdifference} $=$ {\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus}
\end{tabbing}


\noindent{\sc Event}:   Enable rdifference-rneg-arg2; name this event `rdifference-rneg-arg2-off'.\index{rdifference-rneg-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rneg-rdifference; name this event `rneg-rdifference-off'.\index{rneg-rdifference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rtimes-rdifference-arg2; name this event `rtimes-rdifference-arg2-off'.\index{rtimes-rdifference-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rtimes-rdifference-arg1; name this event `rtimes-rdifference-arg1-off'.\index{rtimes-rdifference-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rtimes-rneg-arg2; name this event `rtimes-rneg-arg2-off'.\index{rtimes-rneg-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rtimes-rneg-arg1; name this event `rtimes-rneg-arg1-off'.\index{rtimes-rneg-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-rtimes-rneg; name this event `requal-rtimes-rneg-off'.\index{requal-rtimes-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-simple-rneg; name this event `requal-simple-rtimes-simple-rneg-off'.\index{requal-simple-rtimes-simple-rne!g-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rtimes-rplus-arg2; name this event `rtimes-rplus-arg2-off'.\index{rtimes-rplus-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rtimes-rplus-arg1; name this event `rtimes-rplus-arg1-off'.\index{rtimes-rplus-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-rtimes-rplus-bridge; name this event `requal-rtimes-rplus-bridge-off'.\index{requal-rtimes-rplus-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-simple-rplus-arg1; name this event `requal-simple-rtimes-simple-rplus-arg1-off'.\index{requal-simple-rtimes-simple-rpl!us-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rplus-bridge; name this event `simple-rplus-bridge-off'.\index{simple-rplus-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable commutativity-of-simple-rplus; name this event `commutativity-of-simple-rplus-off'.\index{commutativity-of-simple-rplus-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-rzerop-simple-rplus; name this event `requal-rzerop-simple-rplus-off'.\index{requal-rzerop-simple-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-simple-rplus-when-not-rzerop; name this event `requal-simple-rtimes-simple-rplus-when-not-rzerop-off'.\index{requal-simple-rtimes-simple-rpl!us-when-not-rzerop-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-simple-rtimes; name this event `fix-rational-simple-rtimes-off'.\index{fix-rational-simple-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-simple-rtimes; name this event `rationalp-simple-rtimes-off'.\index{rationalp-simple-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numerator-type; name this event `numerator-type-off'.\index{numerator-type-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rplus-rzerop; name this event `simple-rplus-rzerop-off'.\index{simple-rplus-rzerop-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable associativity-of-rtimes; name this event `associativity-of-rtimes-off'.\index{associativity-of-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-associativity-of-rtimes; name this event `requal-associativity-of-rtimes-off'.\index{requal-associativity-of-rtimes-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-bridge; name this event `requal-simple-rtimes-bridge-off'.\index{requal-simple-rtimes-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-reduce-arg2; name this event `requal-simple-rtimes-reduce-arg2-off'.\index{requal-simple-rtimes-reduce-arg!2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-reduce-arg1; name this event `requal-simple-rtimes-reduce-arg1-off'.\index{requal-simple-rtimes-reduce-arg!1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-requal-arg2; name this event `requal-simple-rtimes-requal-arg2-off'.\index{requal-simple-rtimes-requal-arg!2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rtimes-requal-arg1; name this event `requal-simple-rtimes-requal-arg1-off'.\index{requal-simple-rtimes-requal-arg!1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable associativity-of-simple-rtimes; name this event `associativity-of-simple-rtimes-off'.\index{associativity-of-simple-rtimes-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numerator-zero-rzerop-bridge; name this event `numerator-zero-rzerop-bridge-off'.\index{numerator-zero-rzerop-bridge-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable associativity-of-simple-rtimes-when-not-rzerop; name this event `associativity-of-simple-rtimes-when-not-rzerop-off'.\index{associativity-of-simple-rtimes-!when-not-rzerop-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rtimes-rzerop; name this event `simple-rtimes-rzerop-off'.\index{simple-rtimes-rzerop-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rzerop; name this event `rzerop-off'.\index{rzerop-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable commutativity-of-rtimes; name this event `commutativity-of-rtimes-off'.\index{commutativity-of-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable commutativity-of-simple-rtimes; name this event `commutativity-of-simple-rtimes-off'.\index{commutativity-of-simple-rtimes-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rneg-arg2; name this event `rplus-rneg-arg2-off'.\index{rplus-rneg-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rneg-arg1; name this event `rplus-rneg-arg1-off'.\index{rplus-rneg-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rdifference-rdifference-arg2; name this event `rdifference-rdifference-arg2-off'.\index{rdifference-rdifference-arg2-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rdifference-rdifference-arg1; name this event `rdifference-rdifference-arg1-off'.\index{rdifference-rdifference-arg1-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rneg-rplus; name this event `rneg-rplus-off'.\index{rneg-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-rplus-rneg; name this event `requal-rplus-rneg-off'.\index{requal-rplus-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-rneg-simple-rplus; name this event `requal-rneg-simple-rplus-off'.\index{requal-rneg-simple-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-reduce-arg2-rewrite; name this event `rplus-reduce-arg2-rewrite-off'.\index{rplus-reduce-arg2-rewrite-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-reduce-arg1-rewrite; name this event `rplus-reduce-arg1-rewrite-off'.\index{rplus-reduce-arg1-rewrite-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-rneg; name this event `reduce-rneg-off'.\index{reduce-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-rmagnitude; name this event `reduce-rmagnitude-off'.\index{reduce-rmagnitude-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-rquotient; name this event `reduce-rquotient-off'.\index{reduce-rquotient-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-difference; name this event `reduce-difference-off'.\index{reduce-difference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-rtimes; name this event `reduce-rtimes-off'.\index{reduce-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-rplus; name this event `reduce-rplus-off'.\index{reduce-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rdifference-arg2; name this event `rplus-rdifference-arg2-off'.\index{rplus-rdifference-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rdifference-arg1; name this event `rplus-rdifference-arg1-off'.\index{rplus-rdifference-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable commutativity2-of-rplus; name this event `commutativity2-of-rplus-off'.\index{commutativity2-of-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable associativity-of-rplus; name this event `associativity-of-rplus-off'.\index{associativity-of-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-associativity-of-rplus; name this event `requal-associativity-of-rplus-off'.\index{requal-associativity-of-rplus-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rplus-bridge; name this event `requal-simple-rplus-bridge-off'.\index{requal-simple-rplus-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-requal-rewrite; name this event `equal-requal-rewrite-off1'.\index{equal-requal-rewrite-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable transitivity-of-requal; name this event `transitivity-of-requal-off'.\index{transitivity-of-requal-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable transitivity-of-requal-bridge; name this event `transitivity-of-requal-bridge-off1'.\index{transitivity-of-requal-bridge-o!ff1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-bridge4; name this event `equal-times-bridge4-off'.\index{equal-times-bridge4-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-bridge3; name this event `equal-times-bridge3-off'.\index{equal-times-bridge3-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-bridge2; name this event `equal-times-bridge2-off'.\index{equal-times-bridge2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-bridge1; name this event `equal-times-bridge1-off'.\index{equal-times-bridge1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-associativity-of-simple-rplus; name this event `requal-associativity-of-simple-rplus-off'.\index{requal-associativity-of-simple-!rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-simple-rplus; name this event `fix-rational-simple-rplus-off'.\index{fix-rational-simple-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-simple-rplus; name this event `rationalp-simple-rplus-off'.\index{rationalp-simple-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable negative-guts-ineg; name this event `negative-guts-ineg-off'.\index{negative-guts-ineg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-of-rationalp; name this event `fix-rational-of-rationalp-off'.\index{fix-rational-of-rationalp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rplus-fix-rational-arg2; name this event `simple-rplus-fix-rational-arg2-off'.\index{simple-rplus-fix-rational-arg2-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rplus-fix-rational-arg1; name this event `simple-rplus-fix-rational-arg1-off'.\index{simple-rplus-fix-rational-arg1-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable nrational-simple-rplus-arg2; name this event `nrational-simple-rplus-arg2-off'.\index{nrational-simple-rplus-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable nrational-simple-rplus-arg1; name this event `nrational-simple-rplus-arg1-off'.\index{nrational-simple-rplus-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable nrational-rplus-arg2; name this event `nrational-rplus-arg2-off'.\index{nrational-rplus-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable nrational-rplus-arg1; name this event `nrational-rplus-arg1-off'.\index{nrational-rplus-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable means-rationalp; name this event `means-rationalp-off'.\index{means-rationalp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-means; name this event `rationalp-means-off'.\index{rationalp-means-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rneg-rneg; name this event `rneg-rneg-off'.\index{rneg-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-rneg-rneg; name this event `requal-rneg-rneg-off'.\index{requal-rneg-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rneg-simple-rneg; name this event `simple-rneg-simple-rneg-off'.\index{simple-rneg-simple-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rneg-reduce; name this event `rneg-reduce-off'.\index{rneg-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rneg-reduce; name this event `simple-rneg-reduce-off'.\index{simple-rneg-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-0; name this event `reduce-0-off'.\index{reduce-0-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rational-ineg-numerator-reduce-bridge; name this event `rational-ineg-numerator-reduce-bridge-off'.\index{rational-ineg-numerator-reduce-!bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numberp-ineg; name this event `numberp-ineg-off'.\index{numberp-ineg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable negativep-ineg; name this event `negativep-ineg-off'.\index{negativep-ineg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numberp-numerator-reduce; name this event `numberp-numerator-reduce-off'.\index{numberp-numerator-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-nrationalp; name this event `reduce-nrationalp-off'.\index{reduce-nrationalp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rplus-reduce-arg2; name this event `requal-simple-rplus-reduce-arg2-off'.\index{requal-simple-rplus-reduce-arg2!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rplus-reduce-arg1; name this event `requal-simple-rplus-reduce-arg1-off'.\index{requal-simple-rplus-reduce-arg1!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-reduce-arg2; name this event `rplus-reduce-arg2-off'.\index{rplus-reduce-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-reduce-arg1; name this event `rplus-reduce-arg1-off'.\index{rplus-reduce-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-x-x; name this event `requal-x-x-off'.\index{requal-x-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-requal-arg1; name this event `rplus-requal-arg1-off1'.\index{rplus-requal-arg1-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable commutativity-of-rplus; name this event `commutativity-of-rplus-off'.\index{commutativity-of-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-open-up; name this event `rplus-open-up-off1'.\index{rplus-open-up-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-reduce; name this event `reduce-reduce-off'.\index{reduce-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-reduce2; name this event `requal-reduce2-off'.\index{requal-reduce2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-reduce1; name this event `requal-reduce1-off'.\index{requal-reduce1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable commutativity-of-requal; name this event `commutativity-of-requal-off'.\index{commutativity-of-requal-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-reduce-reduce-equal; name this event `requal-reduce-reduce-equal-off1'.\index{requal-reduce-reduce-equal-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable negativep-if-integerp-and-not-numberp; name this event `negativep-if-integerp-and-not-numberp-off1'.\index{negativep-if-integerp-and-not-n!umberp-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable numberp-if-integerp-and-not-negativep; name this event `numberp-if-integerp-and-not-negativep-off1'.\index{numberp-if-integerp-and-not-neg!ativep-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-gcd-bridge1; name this event `equal-times-gcd-bridge1-off'.\index{equal-times-gcd-bridge1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable quotient-gcd-times-fact5; name this event `quotient-gcd-times-fact5-off'.\index{quotient-gcd-times-fact5-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable quotient-gcd-times-fact4; name this event `quotient-gcd-times-fact4-off'.\index{quotient-gcd-times-fact4-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable quotient-gcd-times-fact3; name this event `quotient-gcd-times-fact3-off'.\index{quotient-gcd-times-fact3-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable quotient-gcd-times-fact2; name this event `quotient-gcd-times-fact2-off'.\index{quotient-gcd-times-fact2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable quotient-gcd-times-fact1; name this event `quotient-gcd-times-fact1-off'.\index{quotient-gcd-times-fact1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable quotient-gcd-times-fact; name this event `quotient-gcd-times-fact-off'.\index{quotient-gcd-times-fact-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-times-quotient-arg2; name this event `equal-times-times-quotient-arg2-off'.\index{equal-times-times-quotient-arg2!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable times-gcd-fact; name this event `times-gcd-fact-off'.\index{times-gcd-fact-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-remainder-times-fact1-proof; name this event `gcd-remainder-times-fact1-proof-off'.\index{gcd-remainder-times-fact1-proof!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable divides-product-reduction; name this event `divides-product-reduction-off'.\index{divides-product-reduction-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable remainder-0-sufficiency; name this event `remainder-0-sufficiency-off1'.\index{remainder-0-sufficiency-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack5; name this event `dpr-hack5-off1'.\index{dpr-hack5-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack4; name this event `dpr-hack4-off1'.\index{dpr-hack4-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack3; name this event `dpr-hack3-off1'.\index{dpr-hack3-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack2; name this event `dpr-hack2-off1'.\index{dpr-hack2-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable dpr-hack1; name this event `dpr-hack1-off1'.\index{dpr-hack1-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-factors-gives-linear-combination-rewrite; name this event `gcd-factors-gives-linear-combination-rewrite-off1'.\index{gcd-factors-gives-linear-combin!ation-rewrite-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-factors-gives-linear-combination; name this event `gcd-factors-gives-linear-combination-off1'.\index{gcd-factors-gives-linear-combin!ation-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-factors; name this event `gcd-factors-off1'.\index{gcd-factors-off1}

\addvspace{18pt}


\noindent{\sc Event}:   Enable divides-each-equality; name this event `divides-each-equality-off'.\index{divides-each-equality-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-quotient-quotient; name this event `gcd-quotient-quotient-off'.\index{gcd-quotient-quotient-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-times2; name this event `gcd-times2-off'.\index{gcd-times2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-times1; name this event `gcd-times1-off'.\index{gcd-times1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-times1-induct; name this event `gcd-times1-induct-off'.\index{gcd-times1-induct-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-remainder-fact2; name this event `gcd-remainder-fact2-off'.\index{gcd-remainder-fact2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable gcd-remainder-fact1; name this event `gcd-remainder-fact1-off'.\index{gcd-remainder-fact1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rational-generalization; name this event `rational-generalization-off'.\index{rational-generalization-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-rmagnitude; name this event `fix-rational-rmagnitude-off'.\index{fix-rational-rmagnitude-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-rquotient; name this event `fix-rational-rquotient-off'.\index{fix-rational-rquotient-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-rdifference; name this event `fix-rational-rdifference-off'.\index{fix-rational-rdifference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-rneg; name this event `fix-rational-rneg-off'.\index{fix-rational-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-rtimes; name this event `fix-rational-rtimes-off'.\index{fix-rational-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-fix-rational; name this event `fix-rational-fix-rational-off'.\index{fix-rational-fix-rational-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-rplus; name this event `fix-rational-rplus-off'.\index{fix-rational-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational-reduce; name this event `fix-rational-reduce-off'.\index{fix-rational-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-rmagnitude; name this event `rationalp-rmagnitude-off'.\index{rationalp-rmagnitude-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-rquotient; name this event `rationalp-rquotient-off'.\index{rationalp-rquotient-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-rdifference; name this event `rationalp-rdifference-off'.\index{rationalp-rdifference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-rneg; name this event `rationalp-rneg-off'.\index{rationalp-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-rtimes; name this event `rationalp-rtimes-off'.\index{rationalp-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-fix-rational; name this event `rationalp-fix-rational-off'.\index{rationalp-fix-rational-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-rplus; name this event `rationalp-rplus-off'.\index{rationalp-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp-reduce; name this event `rationalp-reduce-off'.\index{rationalp-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable iplus-is-plus; name this event `iplus-is-plus-off'.\index{iplus-is-plus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable itimes-is-times; name this event `itimes-is-times-off'.\index{itimes-is-times-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-ineg-ineg; name this event `equal-ineg-ineg-off'.\index{equal-ineg-ineg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable itimes-negativep-arg2; name this event `itimes-negativep-arg2-off'.\index{itimes-negativep-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable itimes-negativep-arg1; name this event `itimes-negativep-arg1-off'.\index{itimes-negativep-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable integerp-if-numberp; name this event `integerp-if-numberp-off'.\index{integerp-if-numberp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable integerp-if-negativep-non-zero; name this event `integerp-if-negativep-non-zero-off'.\index{integerp-if-negativep-non-zero-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable itimes-ineg-arg2; name this event `itimes-ineg-arg2-off'.\index{itimes-ineg-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable itimes-ineg-arg1; name this event `itimes-ineg-arg1-off'.\index{itimes-ineg-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-int-on-integers; name this event `fix-int-on-integers-off'.\index{fix-int-on-integers-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable integerp-minus; name this event `integerp-minus-off'.\index{integerp-minus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal; name this event `requal-off'.\index{requal-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rlessp; name this event `rlessp-off'.\index{rlessp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rmagnitude; name this event `rmagnitude-off'.\index{rmagnitude-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rmagnitude; name this event `simple-rmagnitude-off'.\index{simple-rmagnitude-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rquotient; name this event `rquotient-off'.\index{rquotient-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rtimes; name this event `rtimes-off'.\index{rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rtimes; name this event `simple-rtimes-off'.\index{simple-rtimes-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rdifference; name this event `rdifference-off'.\index{rdifference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rneg; name this event `rneg-off'.\index{rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rneg; name this event `simple-rneg-off'.\index{simple-rneg-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus; name this event `rplus-off'.\index{rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable simple-rplus; name this event `simple-rplus-off'.\index{simple-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce; name this event `reduce-off'.\index{reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable fix-rational; name this event `fix-rational-off'.\index{fix-rational-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rationalp; name this event `rationalp-off'.\index{rationalp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{r1}} to consist of the following events: rdifference-rneg-arg2,
rneg-rdifference,
rtimes-rdifference-arg2,
rtimes-rdifference-arg1,
rtimes-rneg-arg2,
rtimes-rneg-arg1,
rtimes-rplus-arg2,
rtimes-rplus-arg1,
associativity-of-rtimes,
rzerop,
commutativity-of-rtimes,
rplus-rneg-arg2,
rplus-rneg-arg1,
rdifference-rdifference-arg2,
rdifference-rdifference-arg1,
rneg-rplus,
rplus-reduce-arg2-rewrite,
rplus-reduce-arg1-rewrite,
reduce-rneg,
reduce-rmagnitude,
reduce-rquotient,
reduce-difference,
reduce-rtimes,
reduce-rplus,
rplus-rdifference-arg2,
rplus-rdifference-arg1,
commutativity2-of-rplus,
associativity-of-rplus,
equal-requal-rewrite,
transitivity-of-requal,
fix-rational-of-rationalp,
nrational-rplus-arg2,
nrational-rplus-arg1,
rationalp-means,
means-rationalp,
rneg-rneg,
rneg-reduce,
reduce-0,
numberp-numerator-reduce,
reduce-nrationalp,
rplus-reduce-arg2,
rplus-reduce-arg1,
requal-x-x,
rplus-requal-arg1,
commutativity-of-rplus,
reduce-reduce,
requal-reduce2,
requal-reduce1,
commutativity-of-requal,
rational-generalization,
fix-rational-rmagnitude,
fix-rational-rquotient,
fix-rational-rdifference,
fix-rational-rneg,
fix-rational-rtimes,
fix-rational-fix-rational,
fix-rational-rplus,
fix-rational-reduce,
rationalp-rmagnitude,
rationalp-rquotient,
rationalp-rdifference,
rationalp-rneg,
rationalp-rtimes,
rationalp-fix-rational,
rationalp-rplus,
rationalp-reduce.\index{r1}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{rplus-tree} \\  
\=\+{\rm{rplus-tree}}\,({\it{x\/}})\index{rplus-tree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\tt{'}}{\tt{(}}{\tt{rational}}{\tt{ }}{\tt{'}}{\tt{0}}{\tt{ }}{\tt{'}}{\tt{1}}{\tt{)}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{reduce}}, {\rm{car}}\,({\it{x\/}})) \\ 
{\bf elseif }{\rm{cddr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\tt{'}}{\tt{rplus}}, {\rm{car}}\,({\it{x\/}}), {\rm{cadr}}\,({\it{x\/}})) \\ 
{\bf else }{\rm{list}}\,({\tt{'}}{\tt{rplus}}, {\rm{car}}\,({\it{x\/}}), {\rm{rplus-tree}}\,({\rm{cdr}}\,({\it{x\/}}))\index{rplus-tree})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rplus-fringe} \\  
\=\+{\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{rplus}}) \\ 
{\bf then }{\rm{append}}\,({\rm{rplus-fringe}}\,({\rm{cadr}}\,({\it{x\/}}))\index{rplus-fringe}, {\rm{rplus-fringe}}\,({\rm{caddr}}\,({\it{x\/}}))\index{rplus-fringe}) \\ 
{\bf else }{\rm{list}}\,({\it{x\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{split-by-parity} \\  
\=\+{\rm{split-by-parity}}\,({\it{x\/}})\index{split-by-parity} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) \\ 
{\bf then }\=\+{\bf if }\=\+({\rm{caar}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{rneg}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caadar}}\,({\it{x\/}}) $\not=$ {\tt{'}}{\tt{rneg}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cddar}}\,({\it{x\/}}) $=$ {\bf{nil}})\- \\ 
{\bf then }{\rm{cons}}\,(\=\+{\rm{car}}\,({\rm{split-by-parity}}\,({\rm{cdr}}\,({\it{x\/}}))\index{split-by-parity}), \\ 
{\rm{cons}}\,({\rm{cadar}}\,({\it{x\/}}), {\rm{cdr}}\,({\rm{split-by-parity}}\,({\rm{cdr}}\,({\it{x\/}}))\index{split-by-parity})))\- \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{cons}}\,({\rm{car}}\,({\it{x\/}}), {\rm{car}}\,({\rm{split-by-parity}}\,({\rm{cdr}}\,({\it{x\/}}))\index{split-by-parity})), \\ 
{\rm{cdr}}\,({\rm{split-by-parity}}\,({\rm{cdr}}\,({\it{x\/}}))\index{split-by-parity}))\-$\;${\bf  endif}\- \\ 
{\bf else }{\tt{'}}{\tt{(}}{\tt{nil}}{\tt{)}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{make-negs} \\  
\=\+{\rm{make-negs}}\,({\it{x\/}})\index{make-negs} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}})$\;\;${\bf then }{\rm{cons}}\,({\rm{list}}\,({\tt{'}}{\tt{rneg}}, {\rm{car}}\,({\it{x\/}})), {\rm{make-negs}}\,({\rm{cdr}}\,({\it{x\/}}))\index{make-negs}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rzerop-bridge \\ \index{rplus-rzerop-bridge}
\=\+(({\it{v\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{z\/}} $\in\;${\bf{N}}${}$)) \\ 
$\rightarrow$$\;\;\;\;$({\rm{reduce}}\,({\rm{rational}}\,({\it{v\/}} $*$ {\it{z\/}}, {\it{v\/}} $*$ {\it{w\/}})\index{rational})\index{reduce} $=$ {\rm{reduce}}\,({\rm{rational}}\,({\it{z\/}}, {\it{w\/}})\index{rational})\index{reduce})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rzerop-bridge2 \\ \index{rplus-rzerop-bridge2}
\=\+({\it{v\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{reduce}}\,({\rm{rational}}\,($-$ ({\it{d\/}} $*$ {\it{v\/}}), {\it{v\/}} $*$ {\it{w\/}})\index{rational})\index{reduce} \\ 
$=$$\;\;\;\;${\rm{reduce}}\,({\rm{rational}}\,($-$ {\it{d\/}}, {\it{w\/}})\index{rational})\index{reduce})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rzerop \\ \index{rplus-rzerop}
{\rm{rzerop}}\,({\it{x\/}})\index{rzerop} $\rightarrow$ (({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus} $=$ {\rm{reduce}}\,({\it{y\/}})\index{reduce}) $\wedge$ ({\rm{rplus}}\,({\it{y\/}}, {\it{x\/}})\index{rplus} $=$ {\rm{reduce}}\,({\it{y\/}})\index{reduce}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-rplus \\ \index{eval\$-rplus}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{rplus}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{rplus}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}), {\rm{eval\$}}\,({\bf{t}}, {\rm{caddr}}\,({\it{x\/}}), {\it{a\/}}))\index{rplus})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-reduce \\ \index{eval\$-reduce}
({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{reduce}}) $\rightarrow$ ({\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{reduce}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{cadr}}\,({\it{x\/}}), {\it{a\/}}))\index{reduce})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  reduce-eval\$-rplus-tree \\ \index{reduce-eval\$-rplus-tree}
{\rm{reduce}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{y\/}})\index{rplus-tree}, {\it{a\/}}))\index{reduce} $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{y\/}})\index{rplus-tree}, {\it{a\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-eval\$-rplus-tree \\ \index{rplus-eval\$-rplus-tree}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{rplus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;${\rm{rplus}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{x\/}})\index{rplus-tree}, {\it{a\/}}), {\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{y\/}})\index{rplus-tree}, {\it{a\/}}))\index{rplus}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-append \\ \index{member-append}
({\it{a\/}} $\in$ {\rm{append}}\,({\it{x\/}}, {\it{y\/}})) $=$ (({\it{a\/}} $\in$ {\it{x\/}}) $\vee$ ({\it{a\/}} $\in$ {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  delete-append \\ \index{delete-append}
\=\+{\rm{delete}}\,({\it{x\/}}, {\rm{append}}\,({\it{a\/}}, {\it{b\/}}))\index{delete} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in$ {\it{a\/}}$\;\;${\bf then }{\rm{append}}\,({\rm{delete}}\,({\it{x\/}}, {\it{a\/}})\index{delete}, {\it{b\/}}) \\ 
{\bf else }{\rm{append}}\,({\it{a\/}}, {\rm{delete}}\,({\it{x\/}}, {\it{b\/}})\index{delete})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-subbagp \\ \index{member-subbagp}
(({\it{a\/}} $\in$ {\it{x\/}}) $\wedge$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}) $\rightarrow$ ({\it{a\/}} $\in$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{badguy} \\  
\=\+{\rm{badguy}}\,({\it{x\/}}, {\it{y\/}})\index{badguy} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{car}}\,({\it{x\/}}) $\in$ {\it{y\/}}$\;\;${\bf then }{\rm{badguy}}\,({\rm{cdr}}\,({\it{x\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{x\/}}), {\it{y\/}})\index{delete})\index{badguy} \\ 
{\bf else }{\rm{car}}\,({\it{x\/}})$\;${\bf  endif}\- \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-occur \\ \index{member-occur}
({\it{a\/}} $\in$ {\it{x\/}}) $=$ ({\tt{0}} $<$ {\rm{occurrences}}\,({\it{a\/}}, {\it{x\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-delete2 \\ \index{occurrences-delete2}
\=\+{\rm{occurrences}}\,({\it{a\/}}, {\rm{delete}}\,({\it{b\/}}, {\it{x\/}})\index{delete})\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{a\/}} $=$ {\it{b\/}}$\;\;${\bf then }{\rm{occurrences}}\,({\it{a\/}}, {\it{x\/}})\index{occurrences} $-\;1$ \\ 
{\bf else }{\rm{occurrences}}\,({\it{a\/}}, {\it{x\/}})\index{occurrences}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-wit-lemma \\ \index{subbagp-wit-lemma}
\=\+{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} \\ 
$=$$\;\;\;\;$({\rm{occurrences}}\,({\rm{badguy}}\,({\it{x\/}}, {\it{y\/}})\index{badguy}, {\it{y\/}})\index{occurrences} $\not<$ {\rm{occurrences}}\,({\rm{badguy}}\,({\it{x\/}}, {\it{y\/}})\index{badguy}, {\it{x\/}})\index{occurrences})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-append \\ \index{occurrences-append}
{\rm{occurrences}}\,({\it{a\/}}, {\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{occurrences} $=$ ({\rm{occurrences}}\,({\it{a\/}}, {\it{x\/}})\index{occurrences} $+$ {\rm{occurrences}}\,({\it{a\/}}, {\it{y\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-append \\ \index{subbagp-append}
{\rm{subbagp}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}), {\rm{append}}\,({\it{y\/}}, {\it{x\/}}))\index{subbagp}
\end{tabbing}


\noindent{\sc Event}:   Enable member-occur; name this event `member-occur-off'.\index{member-occur-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-wit-lemma; name this event `subbagp-wit-lemma-off'.\index{subbagp-wit-lemma-off}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  subbagp-delete-same \\ \index{subbagp-delete-same}
{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\rm{delete}}\,({\it{a\/}}, {\it{x\/}})\index{delete}, {\rm{delete}}\,({\it{a\/}}, {\it{y\/}})\index{delete})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-delete-same-means \\ \index{subbagp-delete-same-means}
(({\it{a\/}} $\in$ {\it{y\/}}) $\wedge$ {\rm{subbagp}}\,({\rm{delete}}\,({\it{a\/}}, {\it{x\/}})\index{delete}, {\rm{delete}}\,({\it{a\/}}, {\it{y\/}})\index{delete})\index{subbagp}) $\rightarrow$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-delete-car \\ \index{subbagp-delete-car}
{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\rm{delete}}\,({\rm{car}}\,({\it{y\/}}), {\it{x\/}})\index{delete}, {\rm{cdr}}\,({\it{y\/}}))\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-delete-car2 \\ \index{subbagp-delete-car2}
{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\rm{cdr}}\,({\it{x\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{x\/}}), {\it{y\/}})\index{delete})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-permutation \\ \index{subbagp-permutation}
({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{y\/}}, {\it{x\/}})\index{subbagp}) $\rightarrow$ {\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-a-b \\ \index{permutation-a-b}
{\rm{permutation}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\rm{append}}\,({\it{b\/}}, {\it{a\/}}))\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-subbagp-not-permutation \\ \index{not-subbagp-not-permutation}
($\neg$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}) $\rightarrow$ (($\neg$ {\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation}) $\wedge$ ($\neg$ {\rm{permutation}}\,({\it{y\/}}, {\it{x\/}})\index{permutation}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-as-subbagp-helper \\ \index{permutation-as-subbagp-helper}
{\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation} $\leftrightarrow$ ({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{y\/}}, {\it{x\/}})\index{subbagp})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-as-subbagp \\ \index{permutation-as-subbagp}
{\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation} $=$ ({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{y\/}}, {\it{x\/}})\index{subbagp})
\end{tabbing}


\noindent{\sc Event}:   Enable permutation-as-subbagp-helper; name this event `permutation-as-subbagp-helper-off'.\index{permutation-as-subbagp-helper-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-as-subbagp; name this event `permutation-as-subbagp-off'.\index{permutation-as-subbagp-off}

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  subbagp-necc \\ \index{subbagp-necc}
{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\rightarrow$ ({\rm{occurrences}}\,({\it{a\/}}, {\it{y\/}})\index{occurrences} $\not<$ {\rm{occurrences}}\,({\it{a\/}}, {\it{x\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-transitive \\ \index{subbagp-transitive}
({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{y\/}}, {\it{z\/}})\index{subbagp}) $\rightarrow$ {\rm{subbagp}}\,({\it{x\/}}, {\it{z\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-member-make-negs-fact \\ \index{not-member-make-negs-fact}
({\it{x\/}} $\not\in$ {\it{y\/}}) $\rightarrow$ ({\rm{delete}}\,({\rm{list}}\,({\tt{'}}{\tt{rneg}}, {\it{x\/}}), {\rm{make-negs}}\,({\it{y\/}})\index{make-negs})\index{delete} $=$ {\rm{make-negs}}\,({\it{y\/}})\index{make-negs})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  make-negs-delete \\ \index{make-negs-delete}
{\rm{make-negs}}\,({\rm{delete}}\,({\it{a\/}}, {\it{x\/}})\index{delete})\index{make-negs} $=$ {\rm{delete}}\,({\rm{list}}\,({\tt{'}}{\tt{rneg}}, {\it{a\/}}), {\rm{make-negs}}\,({\it{x\/}})\index{make-negs})\index{delete}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  make-negs-bagdiff \\ \index{make-negs-bagdiff}
{\rm{make-negs}}\,({\rm{bagdiff}}\,({\it{x\/}}, {\it{y\/}})\index{bagdiff})\index{make-negs} $=$ {\rm{bagdiff}}\,({\rm{make-negs}}\,({\it{x\/}})\index{make-negs}, {\rm{make-negs}}\,({\it{y\/}})\index{make-negs})\index{bagdiff}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  append-bagdiff-arg1 \\ \index{append-bagdiff-arg1}
{\rm{subbagp}}\,({\it{a\/}}, {\it{b\/}})\index{subbagp} $\rightarrow$ ({\rm{append}}\,({\rm{bagdiff}}\,({\it{b\/}}, {\it{a\/}})\index{bagdiff}, {\it{c\/}}) $=$ {\rm{bagdiff}}\,({\rm{append}}\,({\it{b\/}}, {\it{c\/}}), {\it{a\/}})\index{bagdiff})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  append-bagdiff-arg2 \\ \index{append-bagdiff-arg2}
\=\+({\rm{bagint}}\,({\it{a\/}}, {\it{c\/}})\index{bagint} $=$ {\bf{nil}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{append}}\,({\it{c\/}}, {\rm{bagdiff}}\,({\it{b\/}}, {\it{a\/}})\index{bagdiff}) $=$ {\rm{bagdiff}}\,({\rm{append}}\,({\it{c\/}}, {\it{b\/}}), {\it{a\/}})\index{bagdiff})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagdiff-bagdiff \\ \index{bagdiff-bagdiff}
{\rm{bagdiff}}\,({\rm{bagdiff}}\,({\it{a\/}}, {\it{b\/}})\index{bagdiff}, {\it{c\/}})\index{bagdiff} $=$ {\rm{bagdiff}}\,({\it{a\/}}, {\rm{append}}\,({\it{b\/}}, {\it{c\/}}))\index{bagdiff}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-rneg-make-negs \\ \index{member-rneg-make-negs}
({\rm{list}}\,({\tt{'}}{\tt{rneg}}, {\it{x\/}}) $\in$ {\rm{make-negs}}\,({\it{y\/}})\index{make-negs}) $=$ ({\it{x\/}} $\in$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-make-negs \\ \index{subbagp-make-negs}
{\rm{subbagp}}\,({\rm{make-negs}}\,({\it{x\/}})\index{make-negs}, {\rm{make-negs}}\,({\it{y\/}})\index{make-negs})\index{subbagp} $=$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rdifference-reduce \\ \index{rdifference-reduce}
\=\+({\rm{rdifference}}\,({\rm{reduce}}\,({\it{x\/}})\index{reduce}, {\it{y\/}})\index{rdifference} $=$ {\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference}) \\ 
$\wedge$$\;\;\;\;$({\rm{rdifference}}\,({\it{x\/}}, {\rm{reduce}}\,({\it{y\/}})\index{reduce})\index{rdifference} $=$ {\rm{rdifference}}\,({\it{x\/}}, {\it{y\/}})\index{rdifference})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rplus-x-simple-rneg-x \\ \index{requal-simple-rplus-x-simple-rne!g-x}
{\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg})\index{simple-rplus}, {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-rplus-x-simple-rneg-x \\ \index{requal-rplus-x-simple-rneg-x}
{\rm{requal}}\,({\rm{rplus}}\,({\it{x\/}}, {\rm{simple-rneg}}\,({\it{x\/}})\index{simple-rneg})\index{rplus}, {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-x-rneg-x \\ \index{rplus-x-rneg-x}
{\rm{rplus}}\,({\it{x\/}}, {\rm{rneg}}\,({\it{x\/}})\index{rneg})\index{rplus} $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rdifference-x-x \\ \index{rdifference-x-x}
{\rm{rdifference}}\,({\it{x\/}}, {\it{x\/}})\index{rdifference} $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rdifference-rplus-hack \\ \index{rdifference-rplus-hack}
{\rm{rdifference}}\,({\rm{rplus}}\,({\it{a\/}}, {\it{b\/}})\index{rplus}, {\it{a\/}})\index{rdifference} $=$ {\rm{reduce}}\,({\it{b\/}})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rdifference-rplus-hack2 \\ \index{rdifference-rplus-hack2}
{\rm{rdifference}}\,({\rm{rplus}}\,({\it{b\/}}, {\it{a\/}})\index{rplus}, {\it{a\/}})\index{rdifference} $=$ {\rm{reduce}}\,({\it{b\/}})\index{reduce}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rplus-rdifference-hack \\ \index{rplus-rdifference-hack}
\=\+({\rm{rplus}}\,({\it{a\/}}, {\rm{rdifference}}\,({\it{b\/}}, {\it{a\/}})\index{rdifference})\index{rplus} $=$ {\rm{reduce}}\,({\it{b\/}})\index{reduce}) \\ 
$\wedge$$\;\;\;\;$({\rm{rplus}}\,({\rm{rdifference}}\,({\it{b\/}}, {\it{a\/}})\index{rdifference}, {\it{a\/}})\index{rplus} $=$ {\rm{reduce}}\,({\it{b\/}})\index{reduce})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-difference-hack1 \\ \index{equal-difference-hack1}
({\it{a\/}} $=$ {\rm{rdifference}}\,({\it{b\/}}, {\it{c\/}})\index{rdifference}) $\rightarrow$ ({\rm{rplus}}\,({\it{c\/}}, {\it{a\/}})\index{rplus} $=$ {\rm{reduce}}\,({\it{b\/}})\index{reduce})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-difference-hack2 \\ \index{equal-difference-hack2}
({\rm{reduce}}\,({\it{a\/}})\index{reduce} $=$ {\rm{rdifference}}\,({\it{b\/}}, {\it{c\/}})\index{rdifference}) $\rightarrow$ ({\rm{rplus}}\,({\it{c\/}}, {\it{a\/}})\index{rplus} $=$ {\rm{reduce}}\,({\it{b\/}})\index{reduce})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-difference-rewrite \\ \index{equal-difference-rewrite}
\=\+({\rm{fix}}\,({\it{b\/}}) $=$ {\rm{fix}}\,({\it{d\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-$ {\it{b\/}}) $=$ ({\it{c\/}} $-$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$((({\it{b\/}} $\not<$ {\it{a\/}}) $\wedge$ ({\it{b\/}} $\not<$ {\it{c\/}})) $\vee$ ({\it{a\/}} $=$ {\it{c\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-difference-rewrite2 \\ \index{equal-difference-rewrite2}
\=\+({\rm{fix}}\,({\it{a\/}}) $=$ {\rm{fix}}\,({\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{a\/}} $-$ {\it{b\/}}) $=$ ({\it{c\/}} $-$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$((({\it{b\/}} $\not<$ {\it{a\/}}) $\wedge$ ({\it{d\/}} $\not<$ {\it{c\/}})) $\vee$ ({\rm{fix}}\,({\it{b\/}}) $=$ {\rm{fix}}\,({\it{d\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-bridge5 \\ \index{equal-times-bridge5}
\=\+((({\it{b\/}} $*$ {\it{a\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) $\wedge$ (({\it{x\/}} $*$ {\it{a\/}}) $=$ ({\it{c\/}} $*$ {\it{y\/}})) $\wedge$ ({\it{a\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$((({\it{b\/}} $*$ {\it{y\/}}) $=$ ({\it{x\/}} $*$ {\it{d\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-plus-difference-rewrite \\ \index{equal-plus-difference-rewrite}
\=\+({\rm{fix}}\,({\it{a\/}}) $=$ {\rm{fix}}\,({\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{a\/}} $+$ {\it{b\/}}) $=$ ({\it{c\/}} $-$ {\it{d\/}})) $=$ (({\it{b\/}} $\simeq {\tt{0}}$) $\wedge$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{d\/}} $\simeq {\tt{0}}$)))) \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{b\/}} $+$ {\it{a\/}}) $=$ ({\it{c\/}} $-$ {\it{d\/}})) \\ 
$=$$\;\;\;\;$(({\it{b\/}} $\simeq {\tt{0}}$) $\wedge$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{d\/}} $\simeq {\tt{0}}$))))\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{c\/}} $-$ {\it{d\/}}) $=$ ({\it{a\/}} $+$ {\it{b\/}})) \\ 
$=$$\;\;\;\;$(({\it{b\/}} $\simeq {\tt{0}}$) $\wedge$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{d\/}} $\simeq {\tt{0}}$))))\- \\ 
$\wedge$$\;\;\;\;$(\=\+(({\it{c\/}} $-$ {\it{d\/}}) $=$ ({\it{b\/}} $+$ {\it{a\/}})) \\ 
$=$$\;\;\;\;$(({\it{b\/}} $\simeq {\tt{0}}$) $\wedge$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{d\/}} $\simeq {\tt{0}}$))))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times-bridge1 \\ \index{lessp-times-bridge1}
\=\+(\=\+(({\it{c\/}} $*$ {\it{v\/}}) $<$ ({\it{x1\/}} $*$ {\it{z1\/}})) \\ 
$\wedge$$\;\;\;\;$(({\it{w\/}} $*$ {\it{x1\/}}) $=$ ({\it{c\/}} $*$ {\it{d\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{c\/}} $\not\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$({\it{d\/}} $\not\simeq {\tt{0}}$))\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{v\/}} $*$ {\it{w\/}}) $<$ ({\it{d\/}} $*$ {\it{z1\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-difference \\ \index{equal-difference}
\=\+(({\it{a\/}} $=$ ({\it{a\/}} $-$ {\it{b\/}})) $=$ (({\it{a\/}} $\in\;${\bf{N}}${}$) $\wedge$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{b\/}} $\simeq {\tt{0}}$)))) \\ 
$\wedge$$\;\;\;\;$((({\it{a\/}} $-$ {\it{b\/}}) $=$ {\it{a\/}}) $=$ (({\it{a\/}} $\in\;${\bf{N}}${}$) $\wedge$ (({\it{a\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{b\/}} $\simeq {\tt{0}}$))))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requal-simple-rplus-x-x-rewrite \\ \index{requal-simple-rplus-x-x-rewrite}
{\rm{requal}}\,({\rm{simple-rplus}}\,({\it{x\/}}, {\it{y\/}})\index{simple-rplus}, {\rm{simple-rplus}}\,({\it{x\/}}, {\it{z\/}})\index{simple-rplus})\index{requal} $=$ {\rm{requal}}\,({\it{y\/}}, {\it{z\/}})\index{requal}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-rplus-x-x-rewrite \\ \index{equal-rplus-x-x-rewrite}
({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus} $=$ {\rm{rplus}}\,({\it{x\/}}, {\it{z\/}})\index{rplus}) $=$ ({\rm{reduce}}\,({\it{y\/}})\index{reduce} $=$ {\rm{reduce}}\,({\it{z\/}})\index{reduce})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-rplus-rdifference-hack \\ \index{equal-rplus-rdifference-hack}
\=\+({\rm{rplus}}\,({\it{x\/}}, {\it{y\/}})\index{rplus} $=$ {\rm{rdifference}}\,({\rm{rplus}}\,({\it{x\/}}, {\it{z\/}})\index{rplus}, {\it{v\/}})\index{rdifference}) \\ 
$=$$\;\;\;\;$({\rm{reduce}}\,({\it{y\/}})\index{reduce} $=$ {\rm{rdifference}}\,({\it{z\/}}, {\it{v\/}})\index{rdifference})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-rplus-tree-delete \\ \index{eval\$-rplus-tree-delete}
\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{delete}}\,({\it{m\/}}, {\it{x\/}})\index{delete})\index{rplus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{m\/}} $\in$ {\it{x\/}}$\;\;${\bf then }{\rm{rdifference}}\,({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{x\/}})\index{rplus-tree}, {\it{a\/}}), {\rm{eval\$}}\,({\bf{t}}, {\it{m\/}}, {\it{a\/}}))\index{rdifference} \\ 
{\bf else }{\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{x\/}})\index{rplus-tree}, {\it{a\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-does-not-effect-rplus \\ \index{permutation-does-not-effect-rpl!us}
\=\+{\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation} \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{x\/}})\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{y\/}})\index{rplus-tree}, {\it{a\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-rplus-tree-zero \\ \index{eval\$-rplus-tree-zero}
{\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{append}}\,({\rm{make-negs}}\,({\it{x\/}})\index{make-negs}, {\it{x\/}}))\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cancel-zero-fact \\ \index{cancel-zero-fact}
\=\+({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{z\/}})\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{append}}\,({\it{x\/}}, {\it{z\/}}))\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{x\/}})\index{rplus-tree}, {\it{a\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-car-x-x \\ \index{member-car-x-x}
({\rm{car}}\,({\it{x\/}}) $\in$ {\it{x\/}}) $=$ {\rm{listp}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-bagdiff-append \\ \index{member-bagdiff-append}
({\it{e\/}} $\in$ {\rm{bagdiff}}\,({\rm{append}}\,({\it{x\/}}, {\it{z\/}}), {\it{z\/}})\index{bagdiff}) $=$ ({\it{e\/}} $\in$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-transitive \\ \index{permutation-transitive}
({\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation} $\wedge$ {\rm{permutation}}\,({\it{y\/}}, {\it{z\/}})\index{permutation}) $\rightarrow$ {\rm{permutation}}\,({\it{x\/}}, {\it{z\/}})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{last-cdr} \\  
\=\+{\rm{last-cdr}}\,({\it{x\/}})\index{last-cdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}})$\;\;${\bf then }{\rm{last-cdr}}\,({\rm{cdr}}\,({\it{x\/}}))\index{last-cdr} \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagdiff-x-x \\ \index{bagdiff-x-x}
{\rm{bagdiff}}\,({\it{x\/}}, {\it{x\/}})\index{bagdiff} $=$ {\rm{last-cdr}}\,({\it{x\/}})\index{last-cdr}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagdiff-append-arg1 \\ \index{bagdiff-append-arg1}
{\rm{bagdiff}}\,({\rm{append}}\,({\it{z\/}}, {\it{x\/}}), {\it{z\/}})\index{bagdiff} $=$ {\it{x\/}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagdiff-cons-z-z \\ \index{bagdiff-cons-z-z}
{\rm{bagdiff}}\,({\rm{cons}}\,({\it{x\/}}, {\it{z\/}}), {\it{z\/}})\index{bagdiff} $=$ {\rm{cons}}\,({\it{x\/}}, {\rm{last-cdr}}\,({\it{z\/}})\index{last-cdr})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagdiff-not-listp \\ \index{bagdiff-not-listp}
($\neg$ {\rm{listp}}\,({\it{x\/}})) $\rightarrow$ ({\rm{bagdiff}}\,({\it{x\/}}, {\it{z\/}})\index{bagdiff} $=$ {\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagdiff-car-in \\ \index{bagdiff-car-in}
\=\+({\rm{listp}}\,({\it{x\/}}) $\wedge$ ({\rm{car}}\,({\it{x\/}}) $\in$ {\it{z\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{bagdiff}}\,({\it{x\/}}, {\it{z\/}})\index{bagdiff} $=$ {\rm{bagdiff}}\,({\rm{cdr}}\,({\it{x\/}}), {\rm{delete}}\,({\rm{car}}\,({\it{x\/}}), {\it{z\/}})\index{delete})\index{bagdiff})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  last-cdr-delete \\ \index{last-cdr-delete}
{\rm{last-cdr}}\,({\rm{delete}}\,({\it{e\/}}, {\it{x\/}})\index{delete})\index{last-cdr} $=$ {\rm{last-cdr}}\,({\it{x\/}})\index{last-cdr}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-subbagp2 \\ \index{member-subbagp2}
({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\wedge$ ({\it{e\/}} $\in$ {\it{x\/}})) $\rightarrow$ ({\it{e\/}} $\in$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-subbagp-delete \\ \index{member-subbagp-delete}
({\it{e\/}} $\not\in$ {\it{x\/}}) $\rightarrow$ ({\rm{subbagp}}\,({\it{x\/}}, {\rm{delete}}\,({\it{e\/}}, {\it{y\/}})\index{delete})\index{subbagp} $=$ {\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-bagdiff \\ \index{subbagp-bagdiff}
{\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\rm{bagdiff}}\,({\it{x\/}}, {\it{z\/}})\index{bagdiff}, {\rm{bagdiff}}\,({\it{y\/}}, {\it{z\/}})\index{bagdiff})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-bagdiff \\ \index{permutation-bagdiff}
{\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation} $\rightarrow$ {\rm{permutation}}\,({\rm{bagdiff}}\,({\it{x\/}}, {\it{z\/}})\index{bagdiff}, {\rm{bagdiff}}\,({\it{y\/}}, {\it{z\/}})\index{bagdiff})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-append-arg1-arg2-bridge \\ \index{permutation-append-arg1-arg2-bri!dge}
{\rm{permutation}}\,({\rm{bagdiff}}\,({\rm{append}}\,({\it{x\/}}, {\it{z\/}}), {\it{z\/}})\index{bagdiff}, {\rm{bagdiff}}\,({\rm{append}}\,({\it{z\/}}, {\it{x\/}}), {\it{z\/}})\index{bagdiff})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-transitive-bridge-helper \\ \index{subbagp-transitive-bridge-helpe!r}
\=\+({\rm{subbagp}}\,({\it{y\/}}, {\it{z\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{z\/}}, {\it{y\/}})\index{subbagp}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\rm{subbagp}}\,({\it{y\/}}, {\it{x\/}})\index{subbagp} $\leftrightarrow$ {\rm{subbagp}}\,({\it{z\/}}, {\it{x\/}})\index{subbagp}) $=$ {\bf{t}}) \\ 
$\wedge$$\;\;\;\;$(({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $\leftrightarrow$ {\rm{subbagp}}\,({\it{x\/}}, {\it{z\/}})\index{subbagp}) $=$ {\bf{t}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-transitive-bridge \\ \index{subbagp-transitive-bridge}
\=\+({\rm{subbagp}}\,({\it{y\/}}, {\it{z\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{z\/}}, {\it{y\/}})\index{subbagp}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\rm{subbagp}}\,({\it{y\/}}, {\it{x\/}})\index{subbagp} $=$ {\rm{subbagp}}\,({\it{z\/}}, {\it{x\/}})\index{subbagp}) $=$ {\bf{t}}) \\ 
$\wedge$$\;\;\;\;$(({\rm{subbagp}}\,({\it{x\/}}, {\it{y\/}})\index{subbagp} $=$ {\rm{subbagp}}\,({\it{x\/}}, {\it{z\/}})\index{subbagp}) $=$ {\bf{t}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-permutation \\ \index{equal-permutation}
\=\+({\rm{permutation}}\,({\it{y\/}}, {\it{z\/}})\index{permutation} $\rightarrow$ (({\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation} $=$ {\rm{permutation}}\,({\it{x\/}}, {\it{z\/}})\index{permutation}) $=$ {\bf{t}})) \\ 
$\wedge$$\;\;\;\;$({\rm{permutation}}\,({\it{y\/}}, {\it{z\/}})\index{permutation} $\rightarrow$ (({\rm{permutation}}\,({\it{y\/}}, {\it{x\/}})\index{permutation} $=$ {\rm{permutation}}\,({\it{z\/}}, {\it{x\/}})\index{permutation}) $=$ {\bf{t}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-bagdiff-append-helper \\ \index{permutation-bagdiff-append-helpe!r}
\=\+(\=\+{\rm{permutation}}\,({\rm{bagdiff}}\,({\rm{append}}\,({\it{z\/}}, {\it{x\/}}), {\it{x\/}})\index{bagdiff}, {\it{y\/}})\index{permutation} \\ 
$=$$\;\;\;\;${\rm{permutation}}\,({\rm{bagdiff}}\,({\rm{append}}\,({\it{x\/}}, {\it{z\/}}), {\it{x\/}})\index{bagdiff}, {\it{y\/}})\index{permutation})\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{permutation}}\,({\it{y\/}}, {\rm{bagdiff}}\,({\rm{append}}\,({\it{z\/}}, {\it{x\/}}), {\it{x\/}})\index{bagdiff})\index{permutation} \\ 
$=$$\;\;\;\;${\rm{permutation}}\,({\it{y\/}}, {\rm{bagdiff}}\,({\rm{append}}\,({\it{x\/}}, {\it{z\/}}), {\it{x\/}})\index{bagdiff})\index{permutation})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-bagdiff-append \\ \index{permutation-bagdiff-append}
{\rm{permutation}}\,({\it{x\/}}, {\rm{bagdiff}}\,({\rm{append}}\,({\it{x\/}}, {\it{z\/}}), {\it{z\/}})\index{bagdiff})\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cancel-zero-fact-bridge \\ \index{cancel-zero-fact-bridge}
\=\+({\rm{subbagp}}\,({\it{z\/}}, {\it{x\/}})\index{subbagp} $\wedge$ ({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{z\/}})\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{bagdiff}}\,({\it{x\/}}, {\it{z\/}})\index{bagdiff})\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\it{x\/}})\index{rplus-tree}, {\it{a\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rnegs-cancel-list \\ \index{rnegs-cancel-list}
{\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{append}}\,({\it{x\/}}, {\rm{make-negs}}\,({\it{x\/}})\index{make-negs}))\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-append-simplify1 \\ \index{subbagp-append-simplify1}
{\rm{subbagp}}\,({\it{a\/}}, {\it{x\/}})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\it{a\/}}, {\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-permutation-equiv \\ \index{subbagp-permutation-equiv}
({\rm{permutation}}\,({\it{x\/}}, {\it{y\/}})\index{permutation} $\wedge$ {\rm{subbagp}}\,({\it{a\/}}, {\it{x\/}})\index{subbagp}) $\rightarrow$ {\rm{subbagp}}\,({\it{a\/}}, {\it{y\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-append-simplify2 \\ \index{subbagp-append-simplify2}
{\rm{subbagp}}\,({\it{a\/}}, {\it{x\/}})\index{subbagp} $\rightarrow$ {\rm{subbagp}}\,({\it{a\/}}, {\rm{append}}\,({\it{y\/}}, {\it{x\/}}))\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-append-bridge \\ \index{subbagp-append-bridge}
({\rm{subbagp}}\,({\it{x\/}}, {\it{b\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{y\/}}, {\it{a\/}})\index{subbagp}) $\rightarrow$ {\rm{subbagp}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}), {\rm{append}}\,({\it{b\/}}, {\it{a\/}}))\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-append-bridge2 \\ \index{subbagp-append-bridge2}
({\rm{subbagp}}\,({\it{x\/}}, {\it{b\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{y\/}}, {\it{a\/}})\index{subbagp}) $\rightarrow$ {\rm{subbagp}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}), {\rm{append}}\,({\it{a\/}}, {\it{b\/}}))\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cancelling-from-rplus \\ \index{cancelling-from-rplus}
\=\+({\rm{subbagp}}\,({\it{z\/}}, {\it{x\/}})\index{subbagp} $\wedge$ {\rm{subbagp}}\,({\it{z\/}}, {\it{y\/}})\index{subbagp} $\wedge$ ({\rm{bagint}}\,({\rm{make-negs}}\,({\it{z\/}})\index{make-negs}, {\it{x\/}})\index{bagint} $=$ {\bf{nil}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{append}}\,({\rm{bagdiff}}\,({\it{x\/}}, {\it{z\/}})\index{bagdiff}, {\rm{make-negs}}\,({\rm{bagdiff}}\,({\it{y\/}}, {\it{z\/}})\index{bagdiff})\index{make-negs}))\index{rplus-tree}, {\it{a\/}}) \\ 
$=$$\;\;\;\;${\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{append}}\,({\it{x\/}}, {\rm{make-negs}}\,({\it{y\/}})\index{make-negs}))\index{rplus-tree}, {\it{a\/}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  eval\$-rplus-tree-rplus-fringe \\ \index{eval\$-rplus-tree-rplus-fringe}
\=\+({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{rplus}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{eval\$}}\,({\bf{t}}, {\rm{rplus-tree}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{rplus-tree}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  subbagp-x-x \\ \index{subbagp-x-x}
{\rm{subbagp}}\,({\it{x\/}}, {\it{x\/}})\index{subbagp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rnegs-not-car-split-by-parity \\ \index{rnegs-not-car-split-by-parity}
\=\+(({\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{rneg}}) $\wedge$ ({\rm{caadr}}\,({\it{x\/}}) $\not=$ {\tt{'}}{\tt{rneg}}) $\wedge$ ({\rm{cddr}}\,({\it{x\/}}) $=$ {\bf{nil}})) \\ 
$\rightarrow$$\;\;\;\;$({\it{x\/}} $\not\in$ {\rm{car}}\,({\rm{split-by-parity}}\,({\it{y\/}})\index{split-by-parity}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  permutation-append-split-by-parity-bridge \\ \index{permutation-append-split-by-parit!y-bridge}
{\rm{permutation}}\,(\=\+{\rm{append}}\,(\=\+{\rm{car}}\,({\rm{split-by-parity}}\,({\it{x\/}})\index{split-by-parity}), \\ 
{\rm{make-negs}}\,({\rm{cdr}}\,({\rm{split-by-parity}}\,({\it{x\/}})\index{split-by-parity}))\index{make-negs})\-, \\ 
{\it{x\/}})\-\index{permutation}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-cdr-split-by-parity \\ \index{member-cdr-split-by-parity}
({\it{e\/}} $\in$ {\rm{cdr}}\,({\rm{split-by-parity}}\,({\it{x\/}})\index{split-by-parity})) $\rightarrow$ ({\rm{car}}\,({\it{e\/}}) $\not=$ {\tt{'}}{\tt{rneg}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all-rnegs} \\  
\=\+{\rm{all-rnegs}}\,({\it{x\/}})\index{all-rnegs} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) \\ 
{\bf then }\=\+({\rm{caar}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{rneg}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caadar}}\,({\it{x\/}}) $\not=$ {\tt{'}}{\tt{rneg}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cddar}}\,({\it{x\/}}) $=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;${\rm{all-rnegs}}\,({\rm{cdr}}\,({\it{x\/}}))\index{all-rnegs}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-rnegs-make-negs-bagint-fact \\ \index{all-rnegs-make-negs-bagint-fact}
\=\+({\rm{all-rnegs}}\,({\rm{make-negs}}\,({\rm{bagint}}\,({\it{z\/}}, {\it{w\/}})\index{bagint})\index{make-negs})\index{all-rnegs} $\wedge$ ({\it{v\/}} $\in$ {\it{w\/}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{all-rnegs}}\,({\rm{make-negs}}\,({\rm{bagint}}\,({\it{z\/}}, {\rm{delete}}\,({\it{v\/}}, {\it{w\/}})\index{delete})\index{bagint})\index{make-negs})\index{all-rnegs}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-rnegs-make-negs-bagint \\ \index{all-rnegs-make-negs-bagint}
{\rm{all-rnegs}}\,({\rm{make-negs}}\,({\rm{bagint}}\,({\rm{car}}\,({\rm{split-by-parity}}\,({\it{x\/}})\index{split-by-parity}), {\rm{cdr}}\,({\rm{split-by-parity}}\,({\it{y\/}})\index{split-by-parity}))\index{bagint})\index{make-negs})\index{all-rnegs}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagint-all-rnegs-car-split-by-parity \\ \index{bagint-all-rnegs-car-split-by-p!arity}
{\rm{all-rnegs}}\,({\it{x\/}})\index{all-rnegs} $\rightarrow$ ({\rm{bagint}}\,({\it{x\/}}, {\rm{car}}\,({\rm{split-by-parity}}\,({\it{y\/}})\index{split-by-parity}))\index{bagint} $=$ {\bf{nil}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagint-make-negs-split-by-parity \\ \index{bagint-make-negs-split-by-parit!y}
\=\+{\rm{bagint}}\,(\=\+{\rm{make-negs}}\,({\rm{bagint}}\,({\rm{car}}\,({\rm{split-by-parity}}\,({\it{y\/}})\index{split-by-parity}), {\rm{cdr}}\,({\rm{split-by-parity}}\,({\it{y\/}})\index{split-by-parity}))\index{bagint})\index{make-negs}, \\ 
{\rm{car}}\,({\rm{split-by-parity}}\,({\it{y\/}})\index{split-by-parity}))\-\index{bagint} \\ 
$=$$\;\;\;\;${\bf{nil}}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  commutativity2-of-rtimes \\ \index{commutativity2-of-rtimes}
{\rm{rtimes}}\,({\it{x\/}}, {\rm{rtimes}}\,({\it{y\/}}, {\it{z\/}})\index{rtimes})\index{rtimes} $=$ {\rm{rtimes}}\,({\it{y\/}}, {\rm{rtimes}}\,({\it{x\/}}, {\it{z\/}})\index{rtimes})\index{rtimes}
\end{tabbing}


\noindent{\sc Event}:   Enable eval\$-rplus-tree-rplus-fringe; name this event `eval\$-rplus-tree-rplus-fringe-off'.\index{eval\$-rplus-tree-rplus-fringe-!off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancelling-from-rplus; name this event `cancelling-from-rplus-off'.\index{cancelling-from-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rnegs-cancel-list; name this event `rnegs-cancel-list-off'.\index{rnegs-cancel-list-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-zero-fact-bridge; name this event `cancel-zero-fact-bridge-off'.\index{cancel-zero-fact-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-zero-fact; name this event `cancel-zero-fact-off'.\index{cancel-zero-fact-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-rplus-tree-zero; name this event `eval\$-rplus-tree-zero-off'.\index{eval\$-rplus-tree-zero-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-does-not-effect-rplus; name this event `permutation-does-not-effect-rplus-off'.\index{permutation-does-not-effect-rpl!us-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-rplus-tree-delete; name this event `eval\$-rplus-tree-delete-off'.\index{eval\$-rplus-tree-delete-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-eval\$-rplus-tree; name this event `rplus-eval\$-rplus-tree-off'.\index{rplus-eval\$-rplus-tree-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable reduce-eval\$-rplus-tree; name this event `reduce-eval\$-rplus-tree-off'.\index{reduce-eval\$-rplus-tree-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagint-make-negs-split-by-parity; name this event `bagint-make-negs-split-by-parity-off'.\index{bagint-make-negs-split-by-parit!y-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagint-all-rnegs-car-split-by-parity; name this event `bagint-all-rnegs-car-split-by-parity-off'.\index{bagint-all-rnegs-car-split-by-p!arity-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable all-rnegs-make-negs-bagint; name this event `all-rnegs-make-negs-bagint-off'.\index{all-rnegs-make-negs-bagint-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable all-rnegs-make-negs-bagint-fact; name this event `all-rnegs-make-negs-bagint-fact-off'.\index{all-rnegs-make-negs-bagint-fact!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-cdr-split-by-parity; name this event `member-cdr-split-by-parity-off'.\index{member-cdr-split-by-parity-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-append-split-by-parity-bridge; name this event `permutation-append-split-by-parity-bridge-off'.\index{permutation-append-split-by-parit!y-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rnegs-not-car-split-by-parity; name this event `rnegs-not-car-split-by-parity-off'.\index{rnegs-not-car-split-by-parity-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-x-x; name this event `subbagp-x-x-off'.\index{subbagp-x-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-append-bridge2; name this event `subbagp-append-bridge2-off'.\index{subbagp-append-bridge2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-append-bridge; name this event `subbagp-append-bridge-off'.\index{subbagp-append-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-append-simplify2; name this event `subbagp-append-simplify2-off'.\index{subbagp-append-simplify2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-permutation-equiv; name this event `subbagp-permutation-equiv-off'.\index{subbagp-permutation-equiv-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-append-simplify1; name this event `subbagp-append-simplify1-off'.\index{subbagp-append-simplify1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-bagdiff-append; name this event `permutation-bagdiff-append-off'.\index{permutation-bagdiff-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-bagdiff-append-helper; name this event `permutation-bagdiff-append-helper-off'.\index{permutation-bagdiff-append-helpe!r-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-permutation; name this event `equal-permutation-off'.\index{equal-permutation-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-transitive-bridge; name this event `subbagp-transitive-bridge-off'.\index{subbagp-transitive-bridge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-transitive-bridge-helper; name this event `subbagp-transitive-bridge-helper-off'.\index{subbagp-transitive-bridge-helpe!r-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-append-arg1-arg2-bridge; name this event `permutation-append-arg1-arg2-bridge-off'.\index{permutation-append-arg1-arg2-bri!dge-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-bagdiff; name this event `permutation-bagdiff-off'.\index{permutation-bagdiff-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-bagdiff; name this event `subbagp-bagdiff-off'.\index{subbagp-bagdiff-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-subbagp-delete; name this event `member-subbagp-delete-off'.\index{member-subbagp-delete-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-subbagp2; name this event `member-subbagp2-off'.\index{member-subbagp2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable last-cdr-delete; name this event `last-cdr-delete-off'.\index{last-cdr-delete-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagdiff-car-in; name this event `bagdiff-car-in-off'.\index{bagdiff-car-in-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagdiff-not-listp; name this event `bagdiff-not-listp-off'.\index{bagdiff-not-listp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagdiff-cons-z-z; name this event `bagdiff-cons-z-z-off'.\index{bagdiff-cons-z-z-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagdiff-append-arg1; name this event `bagdiff-append-arg1-off'.\index{bagdiff-append-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagdiff-x-x; name this event `bagdiff-x-x-off'.\index{bagdiff-x-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-transitive; name this event `permutation-transitive-off'.\index{permutation-transitive-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-bagdiff-append; name this event `member-bagdiff-append-off'.\index{member-bagdiff-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-car-x-x; name this event `member-car-x-x-off'.\index{member-car-x-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-rplus-rdifference-hack; name this event `equal-rplus-rdifference-hack-off'.\index{equal-rplus-rdifference-hack-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-rplus-x-x-rewrite; name this event `equal-rplus-x-x-rewrite-off'.\index{equal-rplus-x-x-rewrite-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rplus-x-x-rewrite; name this event `requal-simple-rplus-x-x-rewrite-off'.\index{requal-simple-rplus-x-x-rewrite!-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-difference; name this event `equal-difference-off'.\index{equal-difference-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable lessp-times-bridge1; name this event `lessp-times-bridge1-off'.\index{lessp-times-bridge1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-plus-difference-rewrite; name this event `equal-plus-difference-rewrite-off'.\index{equal-plus-difference-rewrite-o!ff}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-times-bridge5; name this event `equal-times-bridge5-off'.\index{equal-times-bridge5-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-difference-rewrite2; name this event `equal-difference-rewrite2-off'.\index{equal-difference-rewrite2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-difference-rewrite; name this event `equal-difference-rewrite-off'.\index{equal-difference-rewrite-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-difference-hack2; name this event `equal-difference-hack2-off'.\index{equal-difference-hack2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable equal-difference-hack1; name this event `equal-difference-hack1-off'.\index{equal-difference-hack1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rdifference-hack; name this event `rplus-rdifference-hack-off'.\index{rplus-rdifference-hack-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rdifference-rplus-hack2; name this event `rdifference-rplus-hack2-off'.\index{rdifference-rplus-hack2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rdifference-rplus-hack; name this event `rdifference-rplus-hack-off'.\index{rdifference-rplus-hack-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rdifference-x-x; name this event `rdifference-x-x-off'.\index{rdifference-x-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-x-rneg-x; name this event `rplus-x-rneg-x-off'.\index{rplus-x-rneg-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-rplus-x-simple-rneg-x; name this event `requal-rplus-x-simple-rneg-x-off'.\index{requal-rplus-x-simple-rneg-x-of!f}

\addvspace{18pt}


\noindent{\sc Event}:   Enable requal-simple-rplus-x-simple-rneg-x; name this event `requal-simple-rplus-x-simple-rneg-x-off'.\index{requal-simple-rplus-x-simple-rne!g-x-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rdifference-reduce; name this event `rdifference-reduce-off'.\index{rdifference-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-make-negs; name this event `subbagp-make-negs-off'.\index{subbagp-make-negs-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-rneg-make-negs; name this event `member-rneg-make-negs-off'.\index{member-rneg-make-negs-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable bagdiff-bagdiff; name this event `bagdiff-bagdiff-off'.\index{bagdiff-bagdiff-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable append-bagdiff-arg2; name this event `append-bagdiff-arg2-off'.\index{append-bagdiff-arg2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable append-bagdiff-arg1; name this event `append-bagdiff-arg1-off'.\index{append-bagdiff-arg1-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable make-negs-bagdiff; name this event `make-negs-bagdiff-off'.\index{make-negs-bagdiff-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable make-negs-delete; name this event `make-negs-delete-off'.\index{make-negs-delete-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable not-member-make-negs-fact; name this event `not-member-make-negs-fact-off'.\index{not-member-make-negs-fact-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-transitive; name this event `subbagp-transitive-off'.\index{subbagp-transitive-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-necc; name this event `subbagp-necc-off'.\index{subbagp-necc-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable not-subbagp-not-permutation; name this event `not-subbagp-not-permutation-off'.\index{not-subbagp-not-permutation-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable permutation-a-b; name this event `permutation-a-b-off'.\index{permutation-a-b-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-permutation; name this event `subbagp-permutation-off'.\index{subbagp-permutation-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-delete-car2; name this event `subbagp-delete-car2-off'.\index{subbagp-delete-car2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-delete-car; name this event `subbagp-delete-car-off'.\index{subbagp-delete-car-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-delete-same-means; name this event `subbagp-delete-same-means-off'.\index{subbagp-delete-same-means-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-delete-same; name this event `subbagp-delete-same-off'.\index{subbagp-delete-same-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable subbagp-append; name this event `subbagp-append-off'.\index{subbagp-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable occurrences-append; name this event `occurrences-append-off'.\index{occurrences-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable occurrences-delete2; name this event `occurrences-delete2-off'.\index{occurrences-delete2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-subbagp; name this event `member-subbagp-off'.\index{member-subbagp-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable delete-append; name this event `delete-append-off'.\index{delete-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable member-append; name this event `member-append-off'.\index{member-append-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-reduce; name this event `eval\$-reduce-off'.\index{eval\$-reduce-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable eval\$-rplus; name this event `eval\$-rplus-off'.\index{eval\$-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rzerop; name this event `rplus-rzerop-off'.\index{rplus-rzerop-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rzerop-bridge2; name this event `rplus-rzerop-bridge2-off'.\index{rplus-rzerop-bridge2-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable rplus-rzerop-bridge; name this event `rplus-rzerop-bridge-off'.\index{rplus-rzerop-bridge-off}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{cancel-rplus} \\  
\=\+{\rm{cancel-rplus}}\,({\it{x\/}})\index{cancel-rplus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{car}}\,({\it{x\/}}) $=$ {\tt{'}}{\tt{rplus}} \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{bagint}}\,(\=\+{\rm{car}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}), \\ 
{\rm{cdr}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}))\-\index{bagint}) \\ 
{\bf then }{\rm{rplus-tree}}\,({\rm{append}}\,(\=\+{\rm{bagdiff}}\,(\=\+{\rm{car}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}), \\ 
{\rm{bagint}}\,(\=\+{\rm{car}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}), \\ 
{\rm{cdr}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}))\-\index{bagint})\-\index{bagdiff}, \\ 
{\rm{make-negs}}\,({\rm{bagdiff}}\,(\=\+{\rm{cdr}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}), \\ 
{\rm{bagint}}\,(\=\+{\rm{car}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}), \\ 
{\rm{cdr}}\,({\rm{split-by-parity}}\,({\rm{rplus-fringe}}\,({\it{x\/}})\index{rplus-fringe})\index{split-by-parity}))\-\index{bagint})\-\index{bagdiff})\index{make-negs})\-)\index{rplus-tree} \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  correctness-of-cancel-rplus \\ \index{correctness-of-cancel-rplus}
{\rm{eval\$}}\,({\bf{t}}, {\it{x\/}}, {\it{a\/}}) $=$ {\rm{eval\$}}\,({\bf{t}}, {\rm{cancel-rplus}}\,({\it{x\/}})\index{cancel-rplus}, {\it{a\/}})
\end{tabbing}


\noindent{\sc Event}:   Enable correctness-of-cancel-rplus; name this event `correctness-of-cancel-rplus-off'.\index{correctness-of-cancel-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Enable cancel-rplus; name this event `cancel-rplus-off'.\index{cancel-rplus-off}

\addvspace{18pt}


\noindent{\sc Event}:   Let us define the theory {\it{r2}} to consist of the following events: rtimes-rneg-arg2,
rtimes-rneg-arg1,
rtimes-rplus-arg2,
rtimes-rplus-arg1,
associativity-of-rtimes,
rzerop,
commutativity-of-rtimes,
rdifference-rdifference-arg2,
rdifference-rdifference-arg1,
rneg-rplus,
rplus-reduce-arg2-rewrite,
rplus-reduce-arg1-rewrite,
reduce-rneg,
reduce-rmagnitude,
reduce-rquotient,
reduce-difference,
reduce-rtimes,
reduce-rplus,
commutativity2-of-rplus,
associativity-of-rplus,
equal-requal-rewrite,
transitivity-of-requal,
fix-rational-of-rationalp,
nrational-rplus-arg2,
nrational-rplus-arg1,
rationalp-means,
means-rationalp,
rneg-rneg,
rneg-reduce,
reduce-0,
numberp-numerator-reduce,
reduce-nrationalp,
rplus-reduce-arg2,
rplus-reduce-arg1,
requal-x-x,
rplus-requal-arg1,
commutativity-of-rplus,
reduce-reduce,
requal-reduce2,
requal-reduce1,
commutativity-of-requal,
rational-generalization,
fix-rational-rmagnitude,
fix-rational-rquotient,
fix-rational-rdifference,
fix-rational-rneg,
fix-rational-rtimes,
fix-rational-fix-rational,
fix-rational-rplus,
fix-rational-reduce,
rationalp-rmagnitude,
rationalp-rquotient,
rationalp-rdifference,
rationalp-rneg,
rationalp-rtimes,
rationalp-fix-rational,
rationalp-rplus,
rationalp-reduce,
commutativity2-of-rtimes,
rdifference,
correctness-of-cancel-rplus.\index{r2}

\addvspace{18pt}


\noindent{\sc Event}:   Make the library {\tt{"r2"}}.

\addvspace{18pt}

%\end{list}
\printindex
\end{document}
