
diff -r 492e87175698 -r 3be1e95c4fbe doc-src/isac/dmeindl/proposal.tex
--- a/doc-src/isac/dmeindl/proposal.tex	Thu Sep 15 13:03:39 2011 +0200
+++ b/doc-src/isac/dmeindl/proposal.tex	Sun Sep 18 15:34:24 2011 +0200
@@ -1,177 +1,241 @@
+%WN mit diesen 3 Zeichen beginnen meine Kommentare
+
 \documentclass[12pt,a4paper]{article}
-\usepackage{a4}
-\usepackage[naustrian]{babel}
-\usepackage[latin1]{inputenc}
-\usepackage{calc}
-\usepackage{amsmath}   
-\usepackage{epsfig}
-\usepackage{graphicx}
-\usepackage{xcolor}
-\usepackage{amsfonts}
-
-% Seitenräder einstellen und Höhe der Seitenzahlen
-\usepackage{geometry}
-\geometry{a4paper, left=2.5cm, right=2cm, top=3cm, bottom=2.8cm}
-\setlength{\footskip}{2cm}
-
-
-%Zähler definieren und Starwert setzen:
-\newcommand{\R}{\mathbb R}
-%\newcommand{\N}{\mathbb N}
-%\newcommand{\Q}{\mathbb Q}
-%\newcommand{\C}{\mathbb C}
-
-
-\newcounter{ctr}
-\setcounter{ctr}{0}
-
-\newcounter{Teubner}
-\newcounter{Klingenberg}
-\newcounter{T}
-\newcounter{Vo}
-\newcounter{Se}
-\newcounter{E}
-\newcounter{Bwl}
-\newcounter{Int}
-\newcounter{Prim}
-\newcounter{Z}
-\setcounter{Z}{0}
-\setcounter{Teubner}{1}
-\setcounter{Klingenberg}{2}
-\setcounter{T}{1}
-\setcounter{Vo}{7}
-\setcounter{Se}{2}
-\setcounter{E}{3}
-\setcounter{Bwl}{4}
-\setcounter{Int}{5}
-\setcounter{Prim}{6}
-%BSP
-\newenvironment{myBsp}{
-  \begin{list}{\textbf{\textsc{Bsp:}}}{
-    \setlength{\labelwidth}{8Pc}
-    \setlength{\labelsep}{0.5Pc}    
-    \setlength{\rightmargin}{0Pc}
-    \setlength{\leftmargin}{2Pc}
-    \setlength{\parsep}{0ex plus 0.5ex}
-    \setlength{\listparindent}{1em}
-    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
-    \setlength{\topsep}{0.5Pc}
-  }}
-  {\end{list}
-}
-
-
-%Lemma
-\newenvironment{myLemma}{
-  \begin{list}{\textsc{\textbf{Lemma:\ \ \ }}}{
-   \setlength{\labelsep}{-0.5Pc}    
-    \setlength{\leftmargin}{1Pc}
-    \setlength{\parsep}{0ex plus 0.5ex}
-    \setlength{\listparindent}{1em}
-    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
-    \setlength{\topsep}{0.5Pc}
-  }}
-  {\end{list}
-}
-%Korollar
-\newenvironment{myKorollar}{
-  \begin{list}{\textsc{\textbf{Korollar: }}}{
-    \setlength{\labelwidth}{8Pc}
-    \setlength{\labelsep}{0.5Pc}    
-    \setlength{\rightmargin}{0Pc}
-    \setlength{\leftmargin}{4Pc}
-    \setlength{\parsep}{0ex plus 0.5ex}
-    \setlength{\listparindent}{1em}
-    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
-    \setlength{\topsep}{0.5Pc}
-  }}
-  {\end{list}
-}
-
-%Theorem
-\newenvironment{myTheorem}{
-  \begin{list}{\textsc{\textbf{Theorem: }}}{
-    \setlength{\labelwidth}{8Pc}
-    \setlength{\labelsep}{0.5Pc}    
-    \setlength{\rightmargin}{0Pc}
-    \setlength{\leftmargin}{5Pc}
-    \setlength{\parsep}{0ex plus 0.5ex}
-    \setlength{\listparindent}{1em}
-    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
-    \setlength{\topsep}{0.5Pc}
-  }}
-  {\end{list}
-}
-
-
-%Proportion
-\newenvironment{myProp}{
-  \begin{list}{\textsc{\textbf{Proportion: }}}{
-    \setlength{\labelwidth}{8Pc}
-    \setlength{\labelsep}{0.5Pc}    
-    \setlength{\rightmargin}{0Pc}
-    \setlength{\leftmargin}{4Pc}
-    \setlength{\parsep}{0ex plus 0.5ex}
-    \setlength{\listparindent}{1em}
-    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
-    \setlength{\topsep}{0.5Pc}
-  }}
-  {\end{list}
-}
-
-%Farben
-
-\newcommand{\red}[1]{\textcolor[rgb]{0.7,0,0}{\bf #1}}
-\newcommand{\rd}[1]{\color{red}{#1}}
-\newcommand{\white}[1]{\textcolor[rgb]{1,0,0}{\bf #1}}
-\newcommand{\w}[1]{\color{white}{#1}}
-\newcommand{\g}[1]{\color{myColor}{#1}}
-
-\usepackage{color}
-\definecolor{myColor}{rgb}{0.9,0.9,0.9}% Wir definieren im RGB-Farbraum
-
-
-\newcommand{\myDef}[1]{\parbox{\columnwidth}{\addtocounter{ctr}{1}{\w .}\\[-0.2cm]\textbf{Definition\ \Nummer:}\\#1}}
-\newcommand{\mySatz}[2]{\colorbox{myColor}{\parbox{\columnwidth}{\addtocounter{ctr}{1}{\g .}\\[-0.2cm]\textbf{Satz\ \Nummer:}\ #1\\ #2}}}
-\newcommand{\myBeweis}[1]{\textit{\textbf{Beweis:}\\ #1}}
-\newcommand{\myAlg}[2]{\parbox{\columnwidth}{\addtocounter{ctr}{1}\textbf{Algorithmus\ \Nummer:}\ \ #1\\#2}}
-\newcommand{\myProg}[1]{\fbox{\parbox{\columnwidth}{#1}}}
-
-\newcommand{\add}[1]{\addtocounter{#1}{1}}
-\newcommand{\zahl}[1]{\setcounter{#1}{Z}}
-\newcommand{\Q}[2]{\parbox{\columnwidth}{$^{[\arabic{#1}/#2]}$ }}
-
-\newcommand{\Nummer}{\thesection.\arabic{ctr}}
-
+\bibliographystyle{alpha}
+\def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
+\def\sisac{{\footnotesize${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}}
+%\usepackage{a4}
+%\usepackage[naustrian]{babel}
+%\usepackage[latin1]{inputenc}
+%\usepackage{calc}
+%\usepackage{amsmath}   
+%\usepackage{epsfig}
+%\usepackage{graphicx}
+%\usepackage{xcolor}
+%\usepackage{amsfonts}
+%
+%WN BITTE DIESE DEFINITIONEN WEGLASSEN ...
+%% Seitenräder einstellen und Höhe der Seitenzahlen
+%\usepackage{geometry}
+%\geometry{a4paper, left=2.5cm, right=2cm, top=3cm, bottom=2.8cm}
+%\setlength{\footskip}{2cm}
+%
+%
+%%Zähler definieren und Starwert setzen:
+%\newcommand{\R}{\mathbb R}
+%%\newcommand{\N}{\mathbb N}
+%%\newcommand{\Q}{\mathbb Q}
+%%\newcommand{\C}{\mathbb C}
+%
+%
+%\newcounter{ctr}
+%\setcounter{ctr}{0}
+%
+%\newcounter{Teubner}
+%\newcounter{Klingenberg}
+%\newcounter{T}
+%\newcounter{Vo}
+%\newcounter{Se}
+%\newcounter{E}
+%\newcounter{Bwl}
+%\newcounter{Int}
+%\newcounter{Prim}
+%\newcounter{Z}
+%\setcounter{Z}{0}
+%\setcounter{Teubner}{1}
+%\setcounter{Klingenberg}{2}
+%\setcounter{T}{1}
+%\setcounter{Vo}{7}
+%\setcounter{Se}{2}
+%\setcounter{E}{3}
+%\setcounter{Bwl}{4}
+%\setcounter{Int}{5}
+%\setcounter{Prim}{6}
+%%BSP
+%\newenvironment{myBsp}{
+%  \begin{list}{\textbf{\textsc{Bsp:}}}{
+%    \setlength{\labelwidth}{8Pc}
+%    \setlength{\labelsep}{0.5Pc}    
+%    \setlength{\rightmargin}{0Pc}
+%    \setlength{\leftmargin}{2Pc}
+%    \setlength{\parsep}{0ex plus 0.5ex}
+%    \setlength{\listparindent}{1em}
+%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
+%    \setlength{\topsep}{0.5Pc}
+%  }}
+%  {\end{list}
+%}
+%
+%
+%%Lemma
+%\newenvironment{myLemma}{
+%  \begin{list}{\textsc{\textbf{Lemma:\ \ \ }}}{
+%   \setlength{\labelsep}{-0.5Pc}    
+%    \setlength{\leftmargin}{1Pc}
+%    \setlength{\parsep}{0ex plus 0.5ex}
+%    \setlength{\listparindent}{1em}
+%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
+%    \setlength{\topsep}{0.5Pc}
+%  }}
+%  {\end{list}
+%}
+%%Korollar
+%\newenvironment{myKorollar}{
+%  \begin{list}{\textsc{\textbf{Korollar: }}}{
+%    \setlength{\labelwidth}{8Pc}
+%    \setlength{\labelsep}{0.5Pc}    
+%    \setlength{\rightmargin}{0Pc}
+%    \setlength{\leftmargin}{4Pc}
+%    \setlength{\parsep}{0ex plus 0.5ex}
+%    \setlength{\listparindent}{1em}
+%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
+%    \setlength{\topsep}{0.5Pc}
+%  }}
+%  {\end{list}
+%}
+%
+%%Theorem
+%\newenvironment{myTheorem}{
+%  \begin{list}{\textsc{\textbf{Theorem: }}}{
+%    \setlength{\labelwidth}{8Pc}
+%    \setlength{\labelsep}{0.5Pc}    
+%    \setlength{\rightmargin}{0Pc}
+%    \setlength{\leftmargin}{5Pc}
+%    \setlength{\parsep}{0ex plus 0.5ex}
+%    \setlength{\listparindent}{1em}
+%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
+%    \setlength{\topsep}{0.5Pc}
+%  }}
+%  {\end{list}
+%}
+%
+%
+%%Proportion
+%\newenvironment{myProp}{
+%  \begin{list}{\textsc{\textbf{Proportion: }}}{
+%    \setlength{\labelwidth}{8Pc}
+%    \setlength{\labelsep}{0.5Pc}    
+%    \setlength{\rightmargin}{0Pc}
+%    \setlength{\leftmargin}{4Pc}
+%    \setlength{\parsep}{0ex plus 0.5ex}
+%    \setlength{\listparindent}{1em}
+%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
+%    \setlength{\topsep}{0.5Pc}
+%  }}
+%  {\end{list}
+%}
+%
+%%Farben
+%
+%\newcommand{\red}[1]{\textcolor[rgb]{0.7,0,0}{\bf #1}}
+%\newcommand{\rd}[1]{\color{red}{#1}}
+%\newcommand{\white}[1]{\textcolor[rgb]{1,0,0}{\bf #1}}
+%\newcommand{\w}[1]{\color{white}{#1}}
+%\newcommand{\g}[1]{\color{myColor}{#1}}
+%
+%\usepackage{color}
+%\definecolor{myColor}{rgb}{0.9,0.9,0.9}% Wir definieren im RGB-Farbraum
+%
+%
+%\newcommand{\myDef}[1]{\parbox{\columnwidth}{\addtocounter{ctr}{1}{\w .}\\[-0.2cm]\textbf{Definition\ \Nummer:}\\#1}}
+%\newcommand{\mySatz}[2]{\colorbox{myColor}{\parbox{\columnwidth}{\addtocounter{ctr}{1}{\g .}\\[-0.2cm]\textbf{Satz\ \Nummer:}\ #1\\ #2}}}
+%\newcommand{\myBeweis}[1]{\textit{\textbf{Beweis:}\\ #1}}
+%\newcommand{\myAlg}[2]{\parbox{\columnwidth}{\addtocounter{ctr}{1}\textbf{Algorithmus\ \Nummer:}\ \ #1\\#2}}
+%\newcommand{\myProg}[1]{\fbox{\parbox{\columnwidth}{#1}}}
+%
+%\newcommand{\add}[1]{\addtocounter{#1}{1}}
+%\newcommand{\zahl}[1]{\setcounter{#1}{Z}}
+%\newcommand{\Q}[2]{\parbox{\columnwidth}{$^{[\arabic{#1}/#2]}$ }}
+%
+%\newcommand{\Nummer}{\thesection.\arabic{ctr}}
+%
 %---------- --------------------------------------------------- Beginn -----------------------------------------------------------------------
 
-\title{Greatest common divisor \\ for multi variable Polynomials}
-\author{By\\Diana Meindl\\meindl$_-$diana@yahoo.com}
-\date{}
+\title{Greatest Common Divisor \\ for Multivariate Polynomials}
+\author{Diana Meindl\\meindl\_diana@yahoo.com}
+\date{\today}
 
 \begin{document}
 \maketitle
-{\w .}\\[12cm]
-\begin{center}
-Presented to \\
-A.Univ.Prof. Dipl.-Ing. Dr. Wolfgang Schreiner (RISC Insitute)\\
-and\\
-Dr. techn. Walther Neuper (Institut für Softwaretechnologie, TU Graz)
-\end{center}
+%{\w .}\\[12cm]
+%\begin{center}
+%Presented to \\
+%A.Univ.Prof. Dipl.-Ing. Dr. Wolfgang Schreiner (RISC Insitute)\\
+%and\\
+%Dr. techn. Walther Neuper (Institut für Softwaretechnologie, TU Graz)
+%\end{center}
+%\newpage
+%{\w .}\hspace{6.5cm}\textbf{Abstact}\\[0.5cm]
+
+\abstract{
+This is a proposal for a Masters Thesis at RISC, the Research Institute for Symbolic Computation at Linz University.\\
+
+Calculation with fractions is an important part of Computer Algebra Systems (CAS). This proposal aims at a specific part of such calculations, the greatest common divisor (GCD) used for cancellation, but in the very general context of multivariate polynomials. Cancellation of multivariate polynomials is a settled topic in Computer Algebra, respective algorithms well documented and implementations available in all CASs.
+
+This proposal claims for novelty with respect to the context of implementation in Computer Theorem Proving (CTP). On CTP's present development towards industrial use in software and systems verification, specific domain models involve demand on more and more mathematics, and within mathematics involve demand for more and more features. The proposed implementation of GCD and cancellation follows an actual demand.
+
+If the implementation is successful, it might be included into the distribution of Isabelle, one of the two dominating CTPs in Europe.
+}
+
 \newpage
-{\w .}\hspace{6.5cm}\textbf{Abstract}\\[0.5cm]
-Calculation with fractions is an important part of Computer-Algebra-Systems (CAS). Therefor you need algorithms for canceling fractions, respectively for the greatest common divisor (GCD).
+%WN vorerst zu Zwecken der "Ubersicht lassen ...
+\tableofcontents
+
 \section{Background}
-The ISAC-project is a research and development project at the Institute for Software Technology of the Graz University of Technology. It is an educational mathematics assistant, a single-stepping system for applied mathematics based on the computer theorem prover Isabelle. The special is an easy readable knowledge base including Isabelles HOL-theories and a transparently working knowledge interpreter (a generalization of 'single stepping' algebra systems).
-The background to both, development and research, is given by actual needs in math education as well as by fundamental questions about 'the mechanization of thinking' as an essential aspect in mathematics and in technology.
-The ISAC-system under construction comprises a tutoring-system and an authoring-system. The latter provides for adaption to various needs of individual users and educational institutions and for extensions to arbitrary fields of applied mathematics.
- 
+The \sisac-project is a research and development project at the Institute for Software Technology of the Graz University of Technology. It is an educational mathematics assistant, a single-stepping system for applied mathematics based on the computer theorem prover Isabelle. The special is an easy readable knowledge base including Isabelles HOL-theories and a transparently working knowledge interpreter (a generalization of 'single stepping' algebra systems).
+The background to both, development and research, is given by actual needs in math education as well as by foundamental questions about 'the mechanization of thinking' as an essential aspect in mathematics and in technology.
+The \sisac-system under construction comprises a tutoring-system and an authoring-system. The latter provides for adaption to various needs of individual users and educational institutions and for extensions to arbitrary fields of applied mathematics.
+
+TODO:\\
+European provers: Isabelle \cite{Nipkow-Paulson-Wenzel:2002}, Coq \cite{Huet_all:94}\\
+American provers: PVS~\cite{pvs}, ACL2~\footnote{http://userweb.cs.utexas.edu/~moore/acl2/}\\
+
 \section{Goal of the thesis}
 \subsection{Current situation}
-At the time there is no good implementation for the problem of canceling fractions in Isac and or in Isabelle. But because canceling is important for calculating with fractions a new implementation is necessary.
+At the time there is no good implimentation for the problem of canceling fractions in \sisac and or in Isabelle. But because canceling is important for calculating with fractions a new implimentation is necessary.
 
 \subsection{Problem} 
-The wish is to handle fractions in Isac not only in one variable also in more. So the goal of this thesis is to find, assess and evaluate the existing algorithms and methods for finding the GCD. This will be an functional program with the possibility to include it into Isabelle.
+The wish is to handle fractions in \sisac not only in one variable also in more. So the goal of this thesis ist to find, assess and evaluate the existing algorithms and methods for finding the GCD. This will be an functional programm with the posibility to include it into Isabelle.
+
+%WN eine pr"azisere Beschreibung des Problems kann ich mir nicht vorstellen (englische Version der Mail haben wir auch, aber sie passt nicht zur deutschen Antwort von Prof.Nipkow) ...
+\bigskip
+TODO Mail to Prof. Nipkow, leader of the development of Isabelle \cite{Nipkow-Paulson-Wenzel:2002} at TU M\"unchen, Mon, 23 May 2011 08:58:14 +0200:
+\begin{verbatim}
+Eine erste Idee, wie die Integration der Diplomarbeit f"ur
+einen Benutzer von Isabelle aussehen k"onnte, w"are zum 
+Beispiel im
+
+   lemma cancel:
+     assumes asm3: "x2 - x*y \<noteq> 0" and asm4: "x \<noteq> 0"
+     shows "(x2 - y2) / (x2 - x*y) = (x + y) / (x::real)"
+     apply (insert asm3 asm4)
+     apply simp
+   sorry
+
+die Assumptions
+
+   asm1: "(x2 - y2) = (x + y) * (x - y)" and asm2: "x2 - x*y = x * (x - y)"
+
+im Hintergrund automatisch zu erzeugen (mit der Garantie, 
+dass "(x - y)" der GCD ist) und sie dem Simplifier (f"ur die 
+Rule nonzero_mult_divide_mult_cancel_right) zur Verf"ugung zu 
+stellen, sodass anstelle von "sorry" einfach "done" stehen kann.
+Und weiters w"are eventuell asm3 zu "x - y \<noteq> 0" zu vereinfachen, 
+eine Rewriteorder zum Herstellen einer Normalform festzulegen, etc.
+\end{verbatim}
+%WN und eine bessere Motivation f"ur eine Master Thesis kann ich mir auch nicht vorstellen ...
+Response of Prof. Nipkow:
+
+\begin{verbatim}
+Unser Spezialist fuer die mathematischen Theorien ist Johannes H"olzl. 
+Etwas allgemeinere Fragen sollten auf jeden Fall an isabelle-dev@ 
+gestellt werden.
+
+Viel Erfolg bei der Arbeit!
+Tobias Nipkow
+\end{verbatim}
+
+
 \subsection{Expected results}
 Find good algorithms for the different problems, and find out which one will be the best for the special problem.\\
 The program should handling:
@@ -179,42 +243,197 @@
 \item[]real and rational coefficients. Maybe also imaginary coefficients.
 \item[]Multi variable polynomials canceling and adding, when they are in normal form.
 \end{itemize}
-For the program should be used a functional programing language with good commentaries. And it should be based on Isabelle and works correctly in Isac.
-\newpage
+For the program should be used a functional programming language with good commentaries. And it should be based on Isabelle and works correctly in \sisac.
 
 \section{State of the art}
-Was ist vorhanden, was kann ich aus welchen Büchern für meine Arbeit verwenden
-Es gibt verschiedene CAS die bereits einen Algrotihmus implimentiert haben, wie haben die das gemacht, und welcher ist für mich am besten.
+In a broad view the context of this thesis can be seen as ``computation and deduction'': simplification and in particular cancellation of rational terms is concern of \textbf{computation} implemented in Computer Algebra Systems (CAS) --- whereas the novelty within the thesis is given by an implementation of cancellation in a computer theorem prover (CTP), i.e. in the domain of \textbf{deduction} with respective logical rigor not addressed in the realm of CAS.
 
-\newpage
+Below, after a general survey on computation, represented by CAS, and on deduction, represented by CTP, a more narrow view on ``CAS-functionality in CTP'' is pursued.
+
+\subsection{Computer Algebra and Proof Assistants}
+%WN achtung: diese subsection is fast w"ortlich kopiert aus \cite{plmms10} -- also in der Endfassung bitte "uberarbeiten !!!
+Computer Algebra and Proof Assistants have coexisted for a many years so there is much research trying to bridge the gap between these approaches from both sides. We shall continue to abbreviate Computer Algebra (Systems) by ``CAS'', and in analogy we shall abbreviate proof assistants by CTP, computer theorem provig (comprising both, interactive theorem proving (ITP) and automated theorem proving (ATP), since in CTP there are ATP-tools included today.)
+
+First, many CTPs already have CAS-like functionality,
+especially for domains like arithmetic. They provide the user
+with conversions, tactics or decision procedures that solve
+problems in a particular domain. Such decision procedures present
+in the standard library of HOL Light~\footnote{http://www.cl.cam.ac.uk/~jrh13/hol-light/} are used inside the
+prototype described in Sect.\ref{cas-funct} on p.\pageref{part-cond} for arithmetic's,
+symbolic differentiation and others.
+
+Similarly some CAS systems provide environments that allow
+logical reasoning and proving properties within the system. Such
+environments are provided either as logical
+extensions (e.g.~\cite{logicalaxiom}) or are implemented within a
+CAS using its language~\cite{theorema00}.
+
+There are numerous architectures for information exchange between
+CAS and CTP with different levels of \emph{degree of trust}
+between the prover and the CAS. In principle, there are several approaches. 
+If CAS-functionality is not fully embedded in CTP, CAS can be called as ``oracles'' nevertheless (for efficiency reasons, in general) --- their results are regarded like prophecies of Pythia in Delphi. There are three kinds of checking oracles, however:
+\begin{enumerate}
+\item Just adopt the CAS result without any check. Isabelle internally marks such results.
+\item Check the result inside CTP. There are many cases, where such checks are straight forward, for instance, checking the result of factorization by multiplication of the factors, or checking integrals by differentiation.
+\item Generate a derivation of the result within CTP; in Isabelle this is called ``proof reconstruction''.
+\end{enumerate}
+A longer list of frameworks for
+information exchange and bridges between systems can be found
+in~\cite{casproto}.
+
+There are many approaches to defining partial functions in proof
+assistants. Since we would like the user to define functions
+without being exposed to the underlying logic of the proof
+assistant we only mention some automated mechanisms for defining
+partial functions in the logic of a CTP.
+Krauss~\cite{krauss} has developed a framework for defining
+partial recursive functions in Isabelle/HOL, which formally
+proves termination by searching for lexicographic combinations of
+size measures. Farmer~\cite{farmer} implements a scheme for
+defining partial recursive functions in \textrm{IMPS}.
+
+\subsection{Motivation for CAS-functionality in CTP}
+In the realm of CTP formuas are dominated by quantifiers $\forall$, $\exists$ and $\epsilon$ (such) and by operations like $\Rightarrow$, $\land$ and $\lor$. Numbers were strangers initially; numerals have been introduced to Isabelle not much before the year 2000~\footnote{In directory src/Provers/Arith/ see the files cancel\_numerals.ML and cancel\_numeral\_factor.ML in the Isabelle distribution 2011. They still use the notation $\#1,\#2,\#3,\dots$ from before 2000~!}. However, then numerals have been implemented with {\em polymorphic type} such that $2\cdot r\cdot\pi$ ($2$ is type \textit{real}) and $\pi_{\it approx}=3.14\,\land\, 2\cdot r\cdot\pi_{\it approx}$ can be written as well as $\sum_i^n i=\frac{n\cdot(n+1)}{2}$ ($2$ is type \textit{nat}). The different types are inferred by Hindle-Milner type inference \cite{damas-milner-82,Milner-78,Hindley-69}.
+
+1994 was an important year for CTP: the Pentium Bug caused excitement in the IT community all around the world and motivated INTEL to invest greatly into formal verification of circuits (which carried over to verification of software). Not much later John Harrison mechanized real numbers as Dedekind Cuts in HOL Light \footnote{http://www.cl.cam.ac.uk/~jrh13/hol-light/} and derived calculus, derivative and integral from that definition \cite{harr:thesis}, an implementation which has been transferred to Isabelle very soon after that~\footnote{In the directory src/HOL/Multivariate\_Analysis/ see the files Gauge\_Measure.thy, Integration.thy, Derivative.thy, Real\_Integration.thy, Brouwer\_Fixpoint.thy, Fashoda.thy}.
+
+Harrison also says that ``CAS are ill-defined'' and gives, among others, an example relevant for this thesis on cancellation: TODO ... meromorphic functions ...
+
+\medskip
+The main motivation for further introduction of CAS-functionality to CTP is also technology-driven: In this decade domain engineering is becoming an academic discipline with industrial relevance \cite{db:dom-eng}: vigorous efforts extend the scope of formal specifications even beyond software technology, and thus respective domains of mathematical knowledge are being mechanized in CTP. The Archive of Formal Proofs~\footnote{http://afp.sourceforge.net/} is Isabelle's repository for such work.
+
+\subsection{Simplification within CTP}
+Cancellation, the topic of this thesis, is a specific part of simplification of rationals. In the realm of CAS cancellation is {\em not} an interesting part of the state of the art, because cancellation has been implemented in the prevailing CAS more than thirty years ago --- however, cancellation of multivariate polynomials is {\em not} yet implemted in any of the dominating CTPs.
+%WN: bitte mit Anfragen an die Mailing-Listen nachpr"ufen: Coq, HOL, ACL2, PVS
+
+As in other CTPs, in Isabelle the simplifier is a powerful software component; the sets of rewrite rules, called \textit{simpsets}, contain several hundreds of elements. Rewriting is still very efficient, because the simpsets are transformed to term nets \cite{term-nets}.
+
+Rational terms of multivariate polynomials still have a normal form \cite{bb-loos} and thus equivalence of respective terms is decidable. This is not the case, however, with terms containing roots or transcedent functions. Thus, CAS are unreliable by design in these cases.
+
+In CTP, simplification of non-decidable domains is already an issue, as can be seem in the mail with subject ``simproc divide\_cancel\_factor produces error'' in the mailing-list \textit{isabelle-dev@mailbroy.informatik.tu-muenchen.de} from Thu, 15 Sep 2011 16:34:12 +0200
+{%\footnotesize --- HILFT NICHTS
+\begin{verbatim}
+Hi everyone,
+
+in the following snippet, applying the simplifier causes an error:
+
+------------------------------------------
+theory Scratch
+  imports Complex_Main
+begin
+
+lemma
+  shows "(3 / 2) * ln n = ((6 * k * ln n) / n) * ((1 / 2 * n / k) / 2)"
+apply simp
+------------------------------------------
+
+outputs
+
+------------------------------------------
+Proof failed.
+(if n = 0 then 0 else 6 * (k * ln n) / 1) * 2 / (4 * k) =
+2 * (Numeral1 * (if n = 0 then 0 else 6 * (k * ln n) / 1)) / (2 * (2 * k))
+ 1. n \not= Numeral0 \rightarrow k * (ln n * (2 * 6)) / (k * 4) = k * (ln n * 12) / (k * 4)
+1 unsolved goal(s)!
+The error(s) above occurred for the goal statement:
+(if n = 0 then 0 else 6 * (k * ln n) / 1) * 2 / (4 * k) =
+2 * (Numeral1 * (if n = 0 then 0 else 6 * (k * ln n) / 1)) / (2 * (2 * k))
+------------------------------------------
+\end{verbatim}
+}
+Mail ``Re: simproc divide\_cancel\_factor produces error'' on Fri, 16 Sep 2011 22:33:36 +0200
+\begin{verbatim}
+> > After the release, I'll have to think about doing a complete overhaul
+> > of all of the cancellation simprocs.
+You are very welcome to do so.  Before you start, call on me and I will
+write down some ideas I had long ago (other may want to join, too).
+\end{verbatim}
+%WN: bist du schon angemeldet in den Mailing-Listen isabelle-users@ und isabelle-dev@ ? WENN NICHT, DANN WIRD ES H"OCHSTE ZEIT !!!
+
+\subsection{Open Issues with CAS-functionality in CTP}\label{cas-funct}
+There is at least one effort explicitly dedicated to implement CAS-functionality in CTP \cite{cezary-phd}. %WN bitte unbedingt lesen (kann von mir in Papierform ausgeborgt werden) !!!
+In this work three issues has been identified: partiality conditions, multi-valued functions and real numbers. These issues are addressed in the subsequent paragraphs, followed by a forth issue raised by \sisac.
+
+\paragraph{Partiality conditions}\label{part-cond} are introduced by partial functions or by conditional rewriting. An example of how the CAS-functionality \cite{cezary-phd} looks like is given on p.\pageref{fig:casproto}. 
+\cite{cezary-phd} gives an introductory example (floated to p.\pageref{fig:casproto}) which will be referred to in the sequel.
+\input{thol.tex}
+%WN das nachfolgende Format-Problem l"osen wir sp"ater ...
+\begin{figure}[hbt]
+\begin{center}
+\begin{holnb}
+  In1 := vector [\&2; \&2] - vector [\&1; \&0] + vec 1
+ Out1 := vector [\&2; \&3]
+  In2 := diff (diff (\Lam{}x. \&3 * sin (\&2 * x) +
+         \&7 + exp (exp x)))
+ Out2 := \Lam{}x. exp x pow 2 * exp (exp x) +
+         exp x * exp (exp x) + -- \&12 * sin (\&2 * x)
+  In3 := N (exp (\&1)) 10
+ Out3 := #2.7182818284 + ... (exp (\&1)) 10 F
+  In4 := x + \&1 - x / \&1 + \&7 * (y + x) pow 2
+ Out4 := \&7 * x pow 2 + \&14 * x * y + \&7 * y pow 2 + \&1
+  In5 := sum (0,5) (\Lam{}x. \&x * \&x)
+ Out5 := \&30
+  In6 := sqrt (x * x) assuming x > &1
+ Out6 := x
+\end{holnb}
+\end{center}
+\caption{\label{fig:casproto}Example interaction with the prototype
+  CAS-like input-response loop. For the user input given in the
+  \texttt{In} lines, the system produces the output in \texttt{Out}
+  lines together with HOL Light theorems that state the equality
+  between the input and the output.}
+\end{figure}
+In lines {\tt In6, Out6} this examples shows how to reliably simplify $\sqrt{x}$. \cite{caspartial} %TODO
+gives more details on handling side conditions in formalized partial functions.
+
+Analoguous to this example, cancellations (this thesis is concerned with) like
+$$\frac{x^2-y^2}{x^2-x\cdot y}=\frac{x+y}{x}\;\;\;\;{\it assuming}\;x-y\not=0\land x\not=0$$
+produce assumptions, $x-y\not=0, x\not=0$ here. Since the code produced in the framework of this thesis will be implemented in Isabelle's simplifier (outside this thesis), the presentation to the user will be determined by Isabelle and \sisac{} using the respective component of Isabelle. Also reliable handling of assumptions like $x-y\not=0, x\not=0$ is up to these systems.
+
+\paragraph{Multi-valued functions:}\label{multi-valued}
+\cite{seeingroots,davenp-multival-10} discuss cases where CAS are error prone when dropping a branch of a multi-valued function~\footnote{``Multivalued \textit{function}'' is a misnomer, since the value of a function applied to a certain argument is unique by definition of function.}. Familiar examples are ...
+%WN ... zur Erkl"arung ein paar Beispiele von http://en.wikipedia.org/wiki/Multivalued_function
+
+\paragraph{Real numbers} cannot be represented by numerals. In engineering applications, however, approximation by floating-point numbers are frequently useful. In CTP floating-point numbers must be handled rigorously as approximations. Already \cite{harr:thesis} introduced operations on real numerals accompanied by rigorous calculation of precision. \cite{russellphd} describes efficient implementation of infinite precision real numbers in Coq.
+
+\paragraph{All solutions for equations} must be guaranted, if equation solving is embedded within CTP. So, given an equation $f(x)=0$ and the set of solutions $S$ of this equation, we want to have both,
+\begin{eqnarray}
+   \exists x_s.\;x_s\in S &\Rightarrow& f(x_s) = 0 \\\label{is-solut}
+  x_s\in S &\Leftarrow& \exists x_s.\;f(x_s) = 0    \label{all-solut}
+\end{eqnarray}
+\end{eqnarray}
+where (\ref{all-solut}) ensures that $S$ contains {\em all} solutions of the equation. The \sisac-project has implemented a prototype of an equation solver~\footnote{See \textit{equations} in the hierarchy of specifications at http://www.ist.tugraz.at/projects/isac/www/kbase/pbl/index\_pbl.html}.
+
+There is demand for fullfledged equation solving in CTP, including equational systems and differential equations, because \sisac{} has a prototype of a CTP-based programming language calling CAS functions; and Lucas-Interpretation \cite{wn:lucas-interp-12} makes these functions accessible by single-stepping and ``next step guidance'', which would automatically generate a learning system for equation solving.
+
 \section{Thesis structure}
 The proposed table of contents of the thesis on the chapter level is as follows:
 \begin{enumerate}
 	\item Introduction (2-3 pages)
 	\item Computer Algebra Systems (CAS) (5 - 7 pages)\\
 	Which different CAS exists and whats the focus of them.
-	\item The \textit{ISAC}-Project (5 - 7 pages)\\
-	This chapter will describe the \textit{ISAC}-Project and the goals of the project.
+	\item The \sisac-Project (5 - 7 pages)\\
+	This chapter will describe the \sisac-Project and the goals of the project.
 	\item Univariate Polynomials (15-20 pages)\\
 	This chapter will describe different Algorithms for univariate polynomials, with different coefficients.
 	\item Multivariate Polynomials (20-25 pages)\\
 	This chapter will describe different Algorithms for multivariate polynomials,  with different coefficients
-	\item Functional programing and SML(2-5 pages)\\
-	The basic idea of this programing languages.
-	\item Implementation in \textit{ISAC}-Project (15-20 pages)
+	\item Functional programming and SML(2-5 pages)\\
+	The basic idea of this programming languages.
+	\item Implimentation in \sisac-Project (15-20 pages)
 	\item Conclusion (2-3 pages)
 \end{enumerate}
 %\newpage
 
-\section{Time line}
+\section{Timeline}
 %Werd nie fertig.\\
 \begin{center}
 		\begin{tabular}{|l|l|l|}
 		\hline
 			 \textbf{Time}&\textbf{Thesis}&\textbf{Project}\\
 			 \hline
-			 & Functional programing & Learning the basics and the idea\\
-			 & & of functional programing\\
+			 & Functional programming & Learning the basics and the idea\\
+			 & & of funcional programming\\
 			 \hline
 			 & Different CAS & Can they handle the problem \\
 			 & &and which algorithm do they use?\\ \hline
@@ -222,28 +441,57 @@
 			 & & for univariate Polynomials \\ \hline
 		   & Multivariate Polynomials &  Implementation of the Algorithm\\
 			 & & for multivariate Polynomials \\ \hline 
-		   & The Isac-Project &\\ \hline
+		   & The \sisac-Project &\\ \hline
 		   & Conclusion and Introduction & Find good examples for testing\\
 			\hline
 		\end{tabular}
 	\end{center}
 
-\newpage
+%WN oben an passender stelle einf"ugen
+\cite{einf-funct-progr} \cite{Winkler:96}
 		
-\section{Bibliography}
-%mindestens 10
-\begin{enumerate}
- \item Bird/Wadler, \textit{Einführung in die funktionale Programmierung}, Carl Hanser and Prentice-Hall International, 1992
- \item Franz Winkler, \textit{Polynomial Algorithms in Computer Algebra}, Springer,1996
- \item %M. Mignotte, \textit{An inequality about factors of polynomial}
- \item %M. Mignotte, \textit{Some useful bounds}
- \item %W. S. Brown and J. F. Traub. \textit{On euclid's algorithm and the theory of subresultans}, Journal of the ACM (JACM), 1971
- \item %Bruno Buchberger, \textit{Algorhimic mathematics: Problem types, data types, algorithm types}, Lecture notes, RISC Jku A-4040 Linz, 1982
- 
- \item %Tateaki Sasaki and Masayuki Suzuki, \textit{Thre new algorithms for multivariate polynomial GCD}, J. Symbolic Combutation, 1992
- \item
- \item
- \item
-\end{enumerate} 
+		
+\bibliography{references}
+%\section{Bibliography}
+%%mindestens 10
+%\begin{enumerate}
+% \item Bird/Wadler, \textit{Einführung in die funktionale Programmierung}, Carl Hanser and Prentice-Hall International, 1992
+% \item Franz Winkler, \textit{Polynomial Algorithms in Computer Algebra}, Springer,1996
+% \item %M. Mignotte, \textit{An inequality about factors of polynomial}
+% \item %M. Mignotte, \textit{Some useful bounds}
+% \item %W. S. Brown and J. F. Traub. \textit{On euclid's algorithm and the theory of subresultans}, Journal of the ACM (JACM), 1971
+% \item %Bruno Buchberger, \textit{Algorhimic mathematics: Problem types, data types, algorithm types}, Lecture notes, RISC Jku A-4040 Linz, 1982
+% 
+% \item %Tateaki Sasaki and Masayuki Suzuki, \textit{Thre new algorithms for multivariate polynomial GCD}, J. Symbolic Combutation, 1992
+% \item
+% \item
+% \item
+%\end{enumerate} 
 
-\end{document}
\ No newline at end of file
+\end{document}
+
+WN110916 grep-ing through Isabelle code:
+
+neuper@neuper:/usr/local/isabisac/src$ find -name "*umeral*"
+./HOL/ex/Numeral.thy
+./HOL/Tools/nat_numeral_simprocs.ML
+./HOL/Tools/numeral_syntax.ML
+./HOL/Tools/numeral.ML
+./HOL/Tools/numeral_simprocs.ML
+./HOL/Matrix/ComputeNumeral.thy
+./HOL/Library/Numeral_Type.thy
+./HOL/Numeral_Simprocs.thy
+./HOL/Import/HOL/numeral.imp
+./HOL/Code_Numeral.thy
+./HOL/Nat_Numeral.thy
+./ZF/Tools/numeral_syntax.ML
+./Provers/Arith/cancel_numeral_factor.ML
+./Provers/Arith/cancel_numerals.ML
+./Provers/Arith/combine_numerals.ML
+
+neuper@neuper:/usr/local/isabisac/src$ find -name "*ancel*"
+./HOL/Tools/abel_cancel.ML                 
+./Provers/Arith/cancel_div_mod.ML
+./Provers/Arith/cancel_numeral_factor.ML  Paulson 2000 !!!
+./Provers/Arith/cancel_sums.ML            
+./Provers/Arith/cancel_numerals.ML        Paulson 2000




