\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[]

\begin{verbatim}#|

 Copyright (C) 1994 by Alex Bronstein and Carolyn Talcott.  All Rights
 Reserved.

 You may copy and distribute verbatim copies of this Nqthm-1992 event script as
 you receive it, in any medium, including embedding it verbatim in derivative
 works, provided that you conspicuously and appropriately publish on each copy
 a valid copyright notice "Copyright (C) 1994 by Alex Bronstein and Carolyn
 Talcott.  All Rights Reserved."

 NO WARRANTY

 Alex Bronstein and Carolyn Talcott PROVIDE ABSOLUTELY NO WARRANTY.  THE EVENT
 SCRIPT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
 IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO
 THE QUALITY AND PERFORMANCE OF THE SCRIPT IS WITH YOU.  SHOULD THE SCRIPT
 PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
 CORRECTION.

 IN NO EVENT WILL Alex Bronstein or Carolyn Talcott BE LIABLE TO YOU FOR ANY
 DAMAGES, ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS SCRIPT
 (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE
 OR LOSSES SUSTAINED BY THIRD PARTIES), EVEN IF YOU HAVE ADVISED US OF THE
 POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.

|#

\end{verbatim}
\noindent{\sc Event}:   Start with the library {\tt{"mlp"}} using the compiled version.

\addvspace{18pt}

\begin{verbatim}; corr_CIXA00.bm
;   . definition of circuits:
;	w/ stringadd: OK
;	w/ stringins: 
;   . proof of equivalence:
;	w/ stringadd: OK! get: LP theorems, IC theorems, and then Rewrite!
;	w/ stringins:
; NOTE: one of the original experiments, NOT sugar generated. 

;;; DEFINITION OF CIRCUITS:

; Register: NOT NEEDED in expanded version
;(defn R (u x)
;  (if (empty x) (e) (I u (p x))))

; combinationals (defs & thms) needed for circuits:
; comb_del.bm: Delta combinational element, parametrized.
; U7-DONE

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{del} \\  
\=\+{\rm{del}}\,({\it{val\/}}, {\it{u\/}})\index{del} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{val\/}} $=$ {\it{u\/}}$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim}; Everything below generated by SUGAR with:    (bmcomb 'del '(val) '(x))

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{s-del} \\  
\=\+{\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{empty}}\,({\it{x\/}})\index{empty}$\;\;${\bf then }{\sc{e}}\index{e} \\ 
{\bf else }{\rm{a}}\,({\rm{s-del}}\,({\it{val\/}}, {\rm{p}}\,({\it{x\/}})\index{p})\index{s-del}, {\rm{del}}\,({\it{val\/}}, {\rm{l}}\,({\it{x\/}})\index{l})\index{del})\index{a}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; A2-Begin-S-DEL

\end{verbatim}\begin{tabbing}{\sc Theorem}:  a2-empty-s-del \\ \index{a2-empty-s-del}
{\rm{empty}}\,({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{empty} $=$ {\rm{empty}}\,({\it{x\/}})\index{empty}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-e-s-del \\ \index{a2-e-s-del}
({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del} $=$ {\sc{e}}\index{e}) $=$ {\rm{empty}}\,({\it{x\/}})\index{empty}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-lp-s-del \\ \index{a2-lp-s-del}
{\rm{len}}\,({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{len} $=$ {\rm{len}}\,({\it{x\/}})\index{len}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-lpe-s-del \\ \index{a2-lpe-s-del}
{\rm{eqlen}}\,({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del}, {\it{x\/}})\index{eqlen}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-ic-s-del \\ \index{a2-ic-s-del}
{\rm{s-del}}\,({\it{val\/}}, {\rm{i}}\,({\it{c\_x\/}}, {\it{x\/}})\index{i})\index{s-del} $=$ {\rm{i}}\,({\rm{del}}\,({\it{val\/}}, {\it{c\_x\/}})\index{del}, {\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{i}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-lc-s-del \\ \index{a2-lc-s-del}
($\neg$ {\rm{empty}}\,({\it{x\/}})\index{empty}) $\rightarrow$ ({\rm{l}}\,({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{l} $=$ {\rm{del}}\,({\it{val\/}}, {\rm{l}}\,({\it{x\/}})\index{l})\index{del})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-pc-s-del \\ \index{a2-pc-s-del}
{\rm{p}}\,({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{p} $=$ {\rm{s-del}}\,({\it{val\/}}, {\rm{p}}\,({\it{x\/}})\index{p})\index{s-del}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-hc-s-del \\ \index{a2-hc-s-del}
($\neg$ {\rm{empty}}\,({\it{x\/}})\index{empty}) $\rightarrow$ ({\rm{h}}\,({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{h} $=$ {\rm{del}}\,({\it{val\/}}, {\rm{h}}\,({\it{x\/}})\index{h})\index{del})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-bc-s-del \\ \index{a2-bc-s-del}
{\rm{b}}\,({\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{b} $=$ {\rm{s-del}}\,({\it{val\/}}, {\rm{b}}\,({\it{x\/}})\index{b})\index{s-del}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-bnc-s-del \\ \index{a2-bnc-s-del}
{\rm{bn}}\,({\it{n\/}}, {\rm{s-del}}\,({\it{val\/}}, {\it{x\/}})\index{s-del})\index{bn} $=$ {\rm{s-del}}\,({\it{val\/}}, {\rm{bn}}\,({\it{n\/}}, {\it{x\/}})\index{bn})\index{s-del}
\end{tabbing}

\begin{verbatim};; A2-End-S-DEL

; eof:comb_del.bm


; comb_plus.bm: Plus combinational element.
; U7-DONE

;   no character function definition since BM already knows about Plus..

; Everything below generated by:     (bmcomb 'plus '() '(x y))

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{s-plus} \\  
\=\+{\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{empty}}\,({\it{x\/}})\index{empty}$\;\;${\bf then }{\sc{e}}\index{e} \\ 
{\bf else }{\rm{a}}\,({\rm{s-plus}}\,({\rm{p}}\,({\it{x\/}})\index{p}, {\rm{p}}\,({\it{y\/}})\index{p})\index{s-plus}, {\rm{l}}\,({\it{x\/}})\index{l} $+$ {\rm{l}}\,({\it{y\/}})\index{l})\index{a}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; A2-Begin-S-PLUS

\end{verbatim}\begin{tabbing}{\sc Theorem}:  a2-empty-s-plus \\ \index{a2-empty-s-plus}
{\rm{empty}}\,({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{empty} $=$ {\rm{empty}}\,({\it{x\/}})\index{empty}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-e-s-plus \\ \index{a2-e-s-plus}
({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus} $=$ {\sc{e}}\index{e}) $=$ {\rm{empty}}\,({\it{x\/}})\index{empty}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-lp-s-plus \\ \index{a2-lp-s-plus}
{\rm{len}}\,({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{len} $=$ {\rm{len}}\,({\it{x\/}})\index{len}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-lpe-s-plus \\ \index{a2-lpe-s-plus}
{\rm{eqlen}}\,({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus}, {\it{x\/}})\index{eqlen}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-ic-s-plus \\ \index{a2-ic-s-plus}
\=\+({\rm{len}}\,({\it{x\/}})\index{len} $=$ {\rm{len}}\,({\it{y\/}})\index{len}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{s-plus}}\,({\rm{i}}\,({\it{c\_x\/}}, {\it{x\/}})\index{i}, {\rm{i}}\,({\it{c\_y\/}}, {\it{y\/}})\index{i})\index{s-plus} $=$ {\rm{i}}\,({\it{c\_x\/}} $+$ {\it{c\_y\/}}, {\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{i})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-lc-s-plus \\ \index{a2-lc-s-plus}
($\neg$ {\rm{empty}}\,({\it{x\/}})\index{empty}) $\rightarrow$ ({\rm{l}}\,({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{l} $=$ ({\rm{l}}\,({\it{x\/}})\index{l} $+$ {\rm{l}}\,({\it{y\/}})\index{l}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-pc-s-plus \\ \index{a2-pc-s-plus}
{\rm{p}}\,({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{p} $=$ {\rm{s-plus}}\,({\rm{p}}\,({\it{x\/}})\index{p}, {\rm{p}}\,({\it{y\/}})\index{p})\index{s-plus}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-hc-s-plus \\ \index{a2-hc-s-plus}
\=\+(($\neg$ {\rm{empty}}\,({\it{x\/}})\index{empty}) $\wedge$ ({\rm{len}}\,({\it{x\/}})\index{len} $=$ {\rm{len}}\,({\it{y\/}})\index{len})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{h}}\,({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{h} $=$ ({\rm{h}}\,({\it{x\/}})\index{h} $+$ {\rm{h}}\,({\it{y\/}})\index{h}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-bc-s-plus \\ \index{a2-bc-s-plus}
({\rm{len}}\,({\it{x\/}})\index{len} $=$ {\rm{len}}\,({\it{y\/}})\index{len}) $\rightarrow$ ({\rm{b}}\,({\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{b} $=$ {\rm{s-plus}}\,({\rm{b}}\,({\it{x\/}})\index{b}, {\rm{b}}\,({\it{y\/}})\index{b})\index{s-plus})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  a2-bnc-s-plus \\ \index{a2-bnc-s-plus}
({\rm{len}}\,({\it{x\/}})\index{len} $=$ {\rm{len}}\,({\it{y\/}})\index{len}) $\rightarrow$ ({\rm{bn}}\,({\it{n\/}}, {\rm{s-plus}}\,({\it{x\/}}, {\it{y\/}})\index{s-plus})\index{bn} $=$ {\rm{s-plus}}\,({\rm{bn}}\,({\it{n\/}}, {\it{x\/}})\index{bn}, {\rm{bn}}\,({\it{n\/}}, {\it{y\/}})\index{bn})\index{s-plus})
\end{tabbing}

\begin{verbatim};; A2-End-S-PLUS

; eof:comb_plus.bm


; 1st circuit:

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{y1} \\  
\=\+{\rm{y1}}\,({\it{x\/}})\index{y1} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{empty}}\,({\it{x\/}})\index{empty}$\;\;${\bf then }{\sc{e}}\index{e} \\ 
{\bf else }{\rm{i}}\,({\tt{'}}{\tt{a1}}, {\rm{p}}\,({\it{x\/}})\index{p})\index{i}$\;${\bf  endif}\-\-
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{y2}$\;\;$
{\rm{y2}}\,({\it{x\/}})\index{y2} $=$ {\rm{s-del}}\,({\tt{'}}{\tt{a1}}, {\rm{y1}}\,({\it{x\/}})\index{y1})\index{s-del}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{y3}$\;\;$
{\rm{y3}}\,({\it{x\/}})\index{y3} $=$ {\rm{y1}}\,({\it{x\/}})\index{y1}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{y4} \\  
\=\+{\rm{y4}}\,({\it{x\/}})\index{y4} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{empty}}\,({\it{x\/}})\index{empty}$\;\;${\bf then }{\sc{e}}\index{e} \\ 
{\bf else }{\rm{i}}\,({\tt{'}}{\tt{a2}}, {\rm{y3}}\,({\rm{p}}\,({\it{x\/}})\index{p})\index{y3})\index{i}$\;${\bf  endif}\-\-
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{y5}$\;\;$
{\rm{y5}}\,({\it{x\/}})\index{y5} $=$ {\rm{s-del}}\,({\tt{'}}{\tt{a2}}, {\rm{y4}}\,({\it{x\/}})\index{y4})\index{s-del}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{w1}$\;\;$
{\rm{w1}}\,({\it{x\/}})\index{w1} $=$ {\rm{s-plus}}\,({\rm{y2}}\,({\it{x\/}})\index{y2}, {\rm{y5}}\,({\it{x\/}})\index{y5})\index{s-plus}
\end{tabbing}

\begin{verbatim}; 2nd circuit:

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{z1}$\;\;$
{\rm{z1}}\,({\it{x\/}})\index{z1} $=$ {\rm{s-del}}\,({\tt{'}}{\tt{a1}}, {\it{x\/}})\index{s-del}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{z2}$\;\;$
{\rm{z2}}\,({\it{x\/}})\index{z2} $=$ {\it{x\/}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{z3} \\  
\=\+{\rm{z3}}\,({\it{x\/}})\index{z3} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{empty}}\,({\it{x\/}})\index{empty}$\;\;${\bf then }{\sc{e}}\index{e} \\ 
{\bf else }{\rm{i}}\,({\tt{'}}{\tt{a1}}, {\rm{z2}}\,({\rm{p}}\,({\it{x\/}})\index{p})\index{z2})\index{i}$\;${\bf  endif}\-\-
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{z4}$\;\;$
{\rm{z4}}\,({\it{x\/}})\index{z4} $=$ {\rm{s-del}}\,({\tt{'}}{\tt{a2}}, {\rm{z3}}\,({\it{x\/}})\index{z3})\index{s-del}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{z5}$\;\;$
{\rm{z5}}\,({\it{x\/}})\index{z5} $=$ {\rm{s-plus}}\,({\rm{z1}}\,({\it{x\/}})\index{z1}, {\rm{z4}}\,({\it{x\/}})\index{z4})\index{s-plus}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{w2} \\  
\=\+{\rm{w2}}\,({\it{x\/}})\index{w2} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{empty}}\,({\it{x\/}})\index{empty}$\;\;${\bf then }{\sc{e}}\index{e} \\ 
{\bf else }{\rm{i}}\,({\tt{2}}, {\rm{z5}}\,({\rm{p}}\,({\it{x\/}})\index{p})\index{z5})\index{i}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};;; PROOF:

;;; no 2nd order for sysd lines, because we are not in CSX..

;;; Correctness (equivalence):
 
\end{verbatim}\begin{tabbing}{\sc Theorem}:  lw1w2 \\ \index{lw1w2}
{\rm{stringp}}\,({\it{x\/}})\index{stringp} $\rightarrow$ ({\rm{w1}}\,({\it{x\/}})\index{w1} $=$ {\rm{w2}}\,({\it{x\/}})\index{w2})
\end{tabbing}

\begin{verbatim}; eof: corr_CIXA00.bm

\end{verbatim}
%\end{list}
\printindex
\end{document}
