\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};;;                          bibo_exp.bm
;;;
;;; Experiments with type conversions, standard commutative squares, to
;;; get a feel for these issues.  Some of these theorems may turn out
;;; useful in the future, in which case they should end up in Brain,
;;; probably in th_types.
;;;
;;; Clearly, no sugar involved.
;;;
;;; Name convention: "isa" means "is almost", i.e. up to type conversion.

; (setq bibo_exp '(

; comb_bor.bm: Binary Or combinational element
; U7-DONE

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{bor} \\  
\=\+{\rm{bor}}\,({\it{u\/}}, {\it{v\/}})\index{bor} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\it{u\/}} $=$ {\tt{0}}) $\wedge$ ({\it{v\/}} $=$ {\tt{0}})$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\tt{1}}$\;${\bf  endif}\-\-
\end{tabbing}
	   
\begin{verbatim}; Everything below generated by: (bmcomb 'bor '() '(x y))

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

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

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

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

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

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

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

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

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

\begin{tabbing}{\sc Theorem}:  a2-hc-s-bor \\ \index{a2-hc-s-bor}
\=\+(($\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-bor}}\,({\it{x\/}}, {\it{y\/}})\index{s-bor})\index{h} $=$ {\rm{bor}}\,({\rm{h}}\,({\it{x\/}})\index{h}, {\rm{h}}\,({\it{y\/}})\index{h})\index{bor})\-
\end{tabbing}

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

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

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

; eof:comb_bor.bm


; BOR-ISA-OR is trivially proved (straight rewrites) and useless because
; it refers to non-recursive head: bibo ; and in fact it does not trigger
; in the next theorem.

\end{verbatim}\begin{tabbing}{\sc Theorem}:  bor-isa-or \\ \index{bor-isa-or}
{\rm{bibo}}\,({\rm{bor}}\,({\rm{bobi}}\,({\it{u\/}})\index{bobi}, {\rm{bobi}}\,({\it{v\/}})\index{bobi})\index{bor})\index{bibo} $=$ ({\it{u\/}} $\vee$ {\it{v\/}})
\end{tabbing}

\begin{verbatim}; SBOR-ISA-SOR requires induction, and difficulty depends on hypothesis:
;   - when no eqlen hyp is given, requires 16 cases, and non-trivial rewriting
;     for the non-eqlen cases. Time: 41s
;   - with: (equal (len x) (len y)), reduces to 5 cases and 7s, same induction.
;   - with: (eqlen x y), gets better induction scheme, 4 cases and 8s.
; of course, we keep the theorem in its most general form.

\end{verbatim}\begin{tabbing}{\sc Theorem}:  sbor-isa-sor \\ \index{sbor-isa-sor}
{\rm{s-bibo}}\,({\rm{s-bor}}\,({\rm{s-bobi}}\,({\it{x\/}})\index{s-bobi}, {\rm{s-bobi}}\,({\it{y\/}})\index{s-bobi})\index{s-bor})\index{s-bibo} $=$ {\rm{s-or}}\,({\it{x\/}}, {\it{y\/}})\index{s-or}
\end{tabbing}

\begin{verbatim}; some trivial type-checking experiments:

\end{verbatim}\begin{tabbing}{\sc Theorem}:  bor-0 \\ \index{bor-0}
{\rm{bitp}}\,({\it{v\/}})\index{bitp} $\rightarrow$ ({\rm{bor}}\,({\tt{0}}, {\it{v\/}})\index{bor} $=$ {\it{v\/}})
\end{tabbing}

\begin{verbatim}; eof: bibo_exp.bm
;))

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