doc-isac/dmeindl/proposal.tex
author wneuper <Walther.Neuper@jku.at>
Sun, 31 Dec 2023 09:42:27 +0100
changeset 60787 26037efefd61
parent 52107 f8845fc8f38d
permissions -rwxr-xr-x
Doc/Specify_Phase 2: copy finished
neuper@42331
     1
%WN mit diesen 3 Zeichen beginnen meine Kommentare
neuper@42331
     2
%WN111107: bitte spellchecker dr"uberlaufen lassen !!!
neuper@42272
     3
meindl_diana@42263
     4
\documentclass[12pt,a4paper]{article}
neuper@42272
     5
\bibliographystyle{alpha}
neuper@42272
     6
\def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
neuper@42272
     7
\def\sisac{{\footnotesize${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}}
neuper@42272
     8
%\usepackage{a4}
neuper@42272
     9
%\usepackage[naustrian]{babel}
neuper@42272
    10
%\usepackage[latin1]{inputenc}
neuper@42272
    11
%\usepackage{calc}
neuper@42272
    12
%\usepackage{amsmath}   
neuper@42272
    13
%\usepackage{epsfig}
neuper@42272
    14
%\usepackage{graphicx}
neuper@42272
    15
%\usepackage{xcolor}
neuper@42272
    16
%\usepackage{amsfonts}
neuper@42272
    17
%
neuper@42272
    18
%WN BITTE DIESE DEFINITIONEN WEGLASSEN ...
neuper@42273
    19
%% Seitenräder einstellen und Höhe der Seitenzahlen
neuper@42272
    20
%\usepackage{geometry}
neuper@42272
    21
%\geometry{a4paper, left=2.5cm, right=2cm, top=3cm, bottom=2.8cm}
neuper@42272
    22
%\setlength{\footskip}{2cm}
neuper@42272
    23
%
neuper@42272
    24
%
neuper@42273
    25
%%Zähler definieren und Starwert setzen:
neuper@42272
    26
%\newcommand{\R}{\mathbb R}
neuper@42272
    27
%%\newcommand{\N}{\mathbb N}
neuper@42272
    28
%%\newcommand{\Q}{\mathbb Q}
neuper@42272
    29
%%\newcommand{\C}{\mathbb C}
neuper@42272
    30
%
neuper@42272
    31
%
neuper@42272
    32
%\newcounter{ctr}
neuper@42272
    33
%\setcounter{ctr}{0}
neuper@42272
    34
%
neuper@42272
    35
%\newcounter{Teubner}
neuper@42272
    36
%\newcounter{Klingenberg}
neuper@42272
    37
%\newcounter{T}
neuper@42272
    38
%\newcounter{Vo}
neuper@42272
    39
%\newcounter{Se}
neuper@42272
    40
%\newcounter{E}
neuper@42272
    41
%\newcounter{Bwl}
neuper@42272
    42
%\newcounter{Int}
neuper@42272
    43
%\newcounter{Prim}
neuper@42272
    44
%\newcounter{Z}
neuper@42272
    45
%\setcounter{Z}{0}
neuper@42272
    46
%\setcounter{Teubner}{1}
neuper@42272
    47
%\setcounter{Klingenberg}{2}
neuper@42272
    48
%\setcounter{T}{1}
neuper@42272
    49
%\setcounter{Vo}{7}
neuper@42272
    50
%\setcounter{Se}{2}
neuper@42272
    51
%\setcounter{E}{3}
neuper@42272
    52
%\setcounter{Bwl}{4}
neuper@42272
    53
%\setcounter{Int}{5}
neuper@42272
    54
%\setcounter{Prim}{6}
neuper@42272
    55
%%BSP
neuper@42272
    56
%\newenvironment{myBsp}{
neuper@42272
    57
%  \begin{list}{\textbf{\textsc{Bsp:}}}{
neuper@42272
    58
%    \setlength{\labelwidth}{8Pc}
neuper@42272
    59
%    \setlength{\labelsep}{0.5Pc}    
neuper@42272
    60
%    \setlength{\rightmargin}{0Pc}
neuper@42272
    61
%    \setlength{\leftmargin}{2Pc}
neuper@42272
    62
%    \setlength{\parsep}{0ex plus 0.5ex}
neuper@42272
    63
%    \setlength{\listparindent}{1em}
neuper@42272
    64
%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
neuper@42272
    65
%    \setlength{\topsep}{0.5Pc}
neuper@42272
    66
%  }}
neuper@42272
    67
%  {\end{list}
neuper@42272
    68
%}
neuper@42272
    69
%
neuper@42272
    70
%
neuper@42272
    71
%%Lemma
neuper@42272
    72
%\newenvironment{myLemma}{
neuper@42272
    73
%  \begin{list}{\textsc{\textbf{Lemma:\ \ \ }}}{
neuper@42272
    74
%   \setlength{\labelsep}{-0.5Pc}    
neuper@42272
    75
%    \setlength{\leftmargin}{1Pc}
neuper@42272
    76
%    \setlength{\parsep}{0ex plus 0.5ex}
neuper@42272
    77
%    \setlength{\listparindent}{1em}
neuper@42272
    78
%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
neuper@42272
    79
%    \setlength{\topsep}{0.5Pc}
neuper@42272
    80
%  }}
neuper@42272
    81
%  {\end{list}
neuper@42272
    82
%}
neuper@42272
    83
%%Korollar
neuper@42272
    84
%\newenvironment{myKorollar}{
neuper@42272
    85
%  \begin{list}{\textsc{\textbf{Korollar: }}}{
neuper@42272
    86
%    \setlength{\labelwidth}{8Pc}
neuper@42272
    87
%    \setlength{\labelsep}{0.5Pc}    
neuper@42272
    88
%    \setlength{\rightmargin}{0Pc}
neuper@42272
    89
%    \setlength{\leftmargin}{4Pc}
neuper@42272
    90
%    \setlength{\parsep}{0ex plus 0.5ex}
neuper@42272
    91
%    \setlength{\listparindent}{1em}
neuper@42272
    92
%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
neuper@42272
    93
%    \setlength{\topsep}{0.5Pc}
neuper@42272
    94
%  }}
neuper@42272
    95
%  {\end{list}
neuper@42272
    96
%}
neuper@42272
    97
%
neuper@42272
    98
%%Theorem
neuper@42272
    99
%\newenvironment{myTheorem}{
neuper@42272
   100
%  \begin{list}{\textsc{\textbf{Theorem: }}}{
neuper@42272
   101
%    \setlength{\labelwidth}{8Pc}
neuper@42272
   102
%    \setlength{\labelsep}{0.5Pc}    
neuper@42272
   103
%    \setlength{\rightmargin}{0Pc}
neuper@42272
   104
%    \setlength{\leftmargin}{5Pc}
neuper@42272
   105
%    \setlength{\parsep}{0ex plus 0.5ex}
neuper@42272
   106
%    \setlength{\listparindent}{1em}
neuper@42272
   107
%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
neuper@42272
   108
%    \setlength{\topsep}{0.5Pc}
neuper@42272
   109
%  }}
neuper@42272
   110
%  {\end{list}
neuper@42272
   111
%}
neuper@42272
   112
%
neuper@42272
   113
%
neuper@42272
   114
%%Proportion
neuper@42272
   115
%\newenvironment{myProp}{
neuper@42272
   116
%  \begin{list}{\textsc{\textbf{Proportion: }}}{
neuper@42272
   117
%    \setlength{\labelwidth}{8Pc}
neuper@42272
   118
%    \setlength{\labelsep}{0.5Pc}    
neuper@42272
   119
%    \setlength{\rightmargin}{0Pc}
neuper@42272
   120
%    \setlength{\leftmargin}{4Pc}
neuper@42272
   121
%    \setlength{\parsep}{0ex plus 0.5ex}
neuper@42272
   122
%    \setlength{\listparindent}{1em}
neuper@42272
   123
%    \setlength{\itemsep}{1ex plus 0.5ex minus 0.2ex}
neuper@42272
   124
%    \setlength{\topsep}{0.5Pc}
neuper@42272
   125
%  }}
neuper@42272
   126
%  {\end{list}
neuper@42272
   127
%}
neuper@42272
   128
%
neuper@42272
   129
%%Farben
neuper@42272
   130
%
neuper@42272
   131
%\newcommand{\red}[1]{\textcolor[rgb]{0.7,0,0}{\bf #1}}
neuper@42272
   132
%\newcommand{\rd}[1]{\color{red}{#1}}
neuper@42272
   133
%\newcommand{\white}[1]{\textcolor[rgb]{1,0,0}{\bf #1}}
neuper@42272
   134
%\newcommand{\w}[1]{\color{white}{#1}}
neuper@42272
   135
%\newcommand{\g}[1]{\color{myColor}{#1}}
neuper@42272
   136
%
neuper@42272
   137
%\usepackage{color}
neuper@42272
   138
%\definecolor{myColor}{rgb}{0.9,0.9,0.9}% Wir definieren im RGB-Farbraum
neuper@42272
   139
%
neuper@42272
   140
%
neuper@42272
   141
%\newcommand{\myDef}[1]{\parbox{\columnwidth}{\addtocounter{ctr}{1}{\w .}\\[-0.2cm]\textbf{Definition\ \Nummer:}\\#1}}
neuper@42272
   142
%\newcommand{\mySatz}[2]{\colorbox{myColor}{\parbox{\columnwidth}{\addtocounter{ctr}{1}{\g .}\\[-0.2cm]\textbf{Satz\ \Nummer:}\ #1\\ #2}}}
neuper@42272
   143
%\newcommand{\myBeweis}[1]{\textit{\textbf{Beweis:}\\ #1}}
neuper@42272
   144
%\newcommand{\myAlg}[2]{\parbox{\columnwidth}{\addtocounter{ctr}{1}\textbf{Algorithmus\ \Nummer:}\ \ #1\\#2}}
neuper@42272
   145
%\newcommand{\myProg}[1]{\fbox{\parbox{\columnwidth}{#1}}}
neuper@42272
   146
%
neuper@42272
   147
%\newcommand{\add}[1]{\addtocounter{#1}{1}}
neuper@42272
   148
%\newcommand{\zahl}[1]{\setcounter{#1}{Z}}
neuper@42272
   149
%\newcommand{\Q}[2]{\parbox{\columnwidth}{$^{[\arabic{#1}/#2]}$ }}
neuper@42272
   150
%
neuper@42272
   151
%\newcommand{\Nummer}{\thesection.\arabic{ctr}}
neuper@42272
   152
%
meindl_diana@42265
   153
%---------- --------------------------------------------------- Beginn -----------------------------------------------------------------------
meindl_diana@42263
   154
neuper@42272
   155
\title{Greatest Common Divisor \\ for Multivariate Polynomials}
neuper@42272
   156
\author{Diana Meindl\\meindl\_diana@yahoo.com}
neuper@42272
   157
\date{\today}
meindl_diana@42263
   158
meindl_diana@42263
   159
\begin{document}
meindl_diana@42263
   160
\maketitle
neuper@42272
   161
%{\w .}\\[12cm]
neuper@42272
   162
%\begin{center}
neuper@42272
   163
%Presented to \\
neuper@42272
   164
%A.Univ.Prof. Dipl.-Ing. Dr. Wolfgang Schreiner (RISC Insitute)\\
neuper@42272
   165
%and\\
neuper@42273
   166
%Dr. techn. Walther Neuper (Institut für Softwaretechnologie, TU Graz)
neuper@42272
   167
%\end{center}
neuper@42272
   168
%\newpage
neuper@42272
   169
%{\w .}\hspace{6.5cm}\textbf{Abstact}\\[0.5cm]
neuper@42272
   170
neuper@42272
   171
\abstract{
neuper@42272
   172
This is a proposal for a Masters Thesis at RISC, the Research Institute for Symbolic Computation at Linz University.\\
neuper@42272
   173
neuper@42272
   174
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.
neuper@42272
   175
neuper@42331
   176
This proposal claims for novelty with respect to the context of implementation, an implementation as a CAS-feature 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. Thus the proposed implementation of GCD and cancellation follows an actual demand.
neuper@42272
   177
neuper@42331
   178
If the implementation is successful, it is planned to be included into the distribution of Isabelle, one of the two dominating CTPs in Europe. As part of the Isabelle distribution it will also serve the {\sisac} project aiming at an educational math assistant under development at RISC Linz and Graz University of Technology.
neuper@42272
   179
}
neuper@42272
   180
meindl_diana@42263
   181
\newpage
neuper@42272
   182
%WN vorerst zu Zwecken der "Ubersicht lassen ...
neuper@42272
   183
\tableofcontents
neuper@42272
   184
meindl_diana@42234
   185
\section{Background}
neuper@42331
   186
The \sisac-project is a research and development project launched at the Institute for Software Technology of the Graz University of Technology (TUG) and now continued at the Research Institute for Symbolic Computation (RISC) of University of Linz and at the Institute for Information Systems and Computer Media (IICM) of TUG. The resulting \sisac{} prototype is a ``transparent single-stepping system for applied mathematics'' based on the computer theorem prover Isabelle. The prototype has been proven useful in field tests at Austrain schools \cite{imst-htl06-SH,imst-htl07-SH,imst-hpts08-SH} and is now extended for wider use.
neuper@42331
   187
neuper@42331
   188
Authoring knowledge in \sisac{} provides a strict separation of concerns between authoring math knowledge and authoring dialogues. The latter is pursued at IICM, the former is concern of this thesis. Math authoring is done by use of a CTP-based programming language \cite{plmms10} or by use of SML \cite{pl:milner97} as the meta language and implementation language of Isabelle. Since the code resulting from this thesis shall serve Isabelle, it will be written in SML. Via Isabelle distribution this thesis shall also serve \sisac; a re-implementation in \sisac's CTP-based language is planned as a subsequent project -- this will make cancellation transparent for singe-stepping.
neuper@42331
   189
neuper@42331
   190
%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).
neuper@42331
   191
%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.
neuper@42331
   192
%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.
neuper@42272
   193
neuper@42331
   194
TODO.WN111107 bitte googeln und je einen Absatz kopieren + zitieren woher (PLAGIATsgefahr):\\
neuper@42272
   195
European provers: Isabelle \cite{Nipkow-Paulson-Wenzel:2002}, Coq \cite{Huet_all:94}\\
neuper@42272
   196
American provers: PVS~\cite{pvs}, ACL2~\footnote{http://userweb.cs.utexas.edu/~moore/acl2/}\\
neuper@42272
   197
meindl_diana@42234
   198
\section{Goal of the thesis}
meindl_diana@42234
   199
\subsection{Current situation}
neuper@42331
   200
At the presetn time there is no implimentation for the problem of canceling fractions in Isabelle, and a deficient one in \sisac. But because canceling is important for calculating with fractions a new implimentation is necessary.
neuper@42331
   201
meindl_diana@42234
   202
\subsection{Problem} 
neuper@42331
   203
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, where it will be used by \sisac{} as well.
neuper@42272
   204
neuper@42272
   205
%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) ...
neuper@42272
   206
\bigskip
neuper@42331
   207
A 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 describes the problem as follows:
neuper@42272
   208
\begin{verbatim}
neuper@42272
   209
Eine erste Idee, wie die Integration der Diplomarbeit f"ur
neuper@42272
   210
einen Benutzer von Isabelle aussehen k"onnte, w"are zum 
neuper@42272
   211
Beispiel im
neuper@42272
   212
neuper@42272
   213
   lemma cancel:
neuper@42272
   214
     assumes asm3: "x2 - x*y \<noteq> 0" and asm4: "x \<noteq> 0"
neuper@42272
   215
     shows "(x2 - y2) / (x2 - x*y) = (x + y) / (x::real)"
neuper@42272
   216
     apply (insert asm3 asm4)
neuper@42272
   217
     apply simp
neuper@42272
   218
   sorry
neuper@42272
   219
neuper@42272
   220
die Assumptions
neuper@42272
   221
neuper@42272
   222
   asm1: "(x2 - y2) = (x + y) * (x - y)" and asm2: "x2 - x*y = x * (x - y)"
neuper@42272
   223
neuper@42272
   224
im Hintergrund automatisch zu erzeugen (mit der Garantie, 
neuper@42272
   225
dass "(x - y)" der GCD ist) und sie dem Simplifier (f"ur die 
neuper@42272
   226
Rule nonzero_mult_divide_mult_cancel_right) zur Verf"ugung zu 
neuper@42272
   227
stellen, sodass anstelle von "sorry" einfach "done" stehen kann.
neuper@42272
   228
Und weiters w"are eventuell asm3 zu "x - y \<noteq> 0" zu vereinfachen, 
neuper@42272
   229
eine Rewriteorder zum Herstellen einer Normalform festzulegen, etc.
neuper@42272
   230
\end{verbatim}
neuper@42272
   231
%WN und eine bessere Motivation f"ur eine Master Thesis kann ich mir auch nicht vorstellen ...
neuper@42272
   232
Response of Prof. Nipkow:
neuper@42272
   233
neuper@42272
   234
\begin{verbatim}
neuper@42272
   235
Unser Spezialist fuer die mathematischen Theorien ist Johannes H"olzl. 
neuper@42272
   236
Etwas allgemeinere Fragen sollten auf jeden Fall an isabelle-dev@ 
neuper@42272
   237
gestellt werden.
neuper@42272
   238
neuper@42272
   239
Viel Erfolg bei der Arbeit!
neuper@42272
   240
Tobias Nipkow
neuper@42272
   241
\end{verbatim}
neuper@42272
   242
neuper@42272
   243
meindl_diana@42234
   244
\subsection{Expected results}
neuper@42331
   245
Implementation of algorithms for the different problems, and find out which one will be the best for the specific requirements in Isabelle.\\
neuper@42331
   246
The program should accomplish:
meindl_diana@42266
   247
\begin{itemize}
neuper@42331
   248
\item Real and rational coefficients. Maybe also imaginary coefficients.
neuper@42331
   249
\item Canceling and adding multivariate polynomials, when they are in normal form.
meindl_diana@42266
   250
\end{itemize}
neuper@42331
   251
The program will be written in the functional programming language SML with appropriate comments. The resulting code shall meet the coding standards of Isabelle \cite{isar-impl} p.3-10. The integration of the code into the Isabelle distribution will be done by the Isabelle developer team.
neuper@42331
   252
meindl_diana@42234
   253
\section{State of the art}
neuper@42272
   254
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.
meindl_diana@42234
   255
neuper@42272
   256
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.
neuper@42272
   257
neuper@42272
   258
\subsection{Computer Algebra and Proof Assistants}
neuper@42272
   259
%WN achtung: diese subsection is fast w"ortlich kopiert aus \cite{plmms10} -- also in der Endfassung bitte "uberarbeiten !!!
neuper@42272
   260
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.)
neuper@42272
   261
neuper@42272
   262
First, many CTPs already have CAS-like functionality,
neuper@42272
   263
especially for domains like arithmetic. They provide the user
neuper@42272
   264
with conversions, tactics or decision procedures that solve
neuper@42272
   265
problems in a particular domain. Such decision procedures present
neuper@42272
   266
in the standard library of HOL Light~\footnote{http://www.cl.cam.ac.uk/~jrh13/hol-light/} are used inside the
neuper@42272
   267
prototype described in Sect.\ref{cas-funct} on p.\pageref{part-cond} for arithmetic's,
neuper@42272
   268
symbolic differentiation and others.
neuper@42272
   269
neuper@42272
   270
Similarly some CAS systems provide environments that allow
neuper@42272
   271
logical reasoning and proving properties within the system. Such
neuper@42272
   272
environments are provided either as logical
neuper@42272
   273
extensions (e.g.~\cite{logicalaxiom}) or are implemented within a
neuper@42272
   274
CAS using its language~\cite{theorema00}.
neuper@42272
   275
neuper@42272
   276
There are numerous architectures for information exchange between
neuper@42272
   277
CAS and CTP with different levels of \emph{degree of trust}
neuper@42272
   278
between the prover and the CAS. In principle, there are several approaches. 
neuper@42272
   279
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:
neuper@42272
   280
\begin{enumerate}
neuper@42272
   281
\item Just adopt the CAS result without any check. Isabelle internally marks such results.
neuper@42272
   282
\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.
neuper@42272
   283
\item Generate a derivation of the result within CTP; in Isabelle this is called ``proof reconstruction''.
neuper@42272
   284
\end{enumerate}
neuper@42272
   285
A longer list of frameworks for
neuper@42272
   286
information exchange and bridges between systems can be found
neuper@42272
   287
in~\cite{casproto}.
neuper@42272
   288
neuper@42272
   289
There are many approaches to defining partial functions in proof
neuper@42272
   290
assistants. Since we would like the user to define functions
neuper@42272
   291
without being exposed to the underlying logic of the proof
neuper@42272
   292
assistant we only mention some automated mechanisms for defining
neuper@42272
   293
partial functions in the logic of a CTP.
neuper@42272
   294
Krauss~\cite{krauss} has developed a framework for defining
neuper@42272
   295
partial recursive functions in Isabelle/HOL, which formally
neuper@42272
   296
proves termination by searching for lexicographic combinations of
neuper@42272
   297
size measures. Farmer~\cite{farmer} implements a scheme for
neuper@42272
   298
defining partial recursive functions in \textrm{IMPS}.
neuper@42272
   299
neuper@42272
   300
\subsection{Motivation for CAS-functionality in CTP}
neuper@42272
   301
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}.
neuper@42272
   302
neuper@42272
   303
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}.
neuper@42272
   304
neuper@42331
   305
Harrison also says that ``CAS are ill-defined'' and gives, among others, an example relevant for this thesis on cancellation: TODO.WN111104 search for ... meromorphic functions in http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-428.ps.gz
neuper@42272
   306
neuper@42272
   307
\medskip
neuper@42272
   308
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.
neuper@42272
   309
neuper@42272
   310
\subsection{Simplification within CTP}
neuper@42272
   311
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.
neuper@42272
   312
%WN: bitte mit Anfragen an die Mailing-Listen nachpr"ufen: Coq, HOL, ACL2, PVS
neuper@42272
   313
neuper@42272
   314
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}.
neuper@42272
   315
neuper@42272
   316
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.
neuper@42272
   317
neuper@42272
   318
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
neuper@42272
   319
{%\footnotesize --- HILFT NICHTS
neuper@42272
   320
\begin{verbatim}
neuper@42272
   321
Hi everyone,
neuper@42272
   322
neuper@42272
   323
in the following snippet, applying the simplifier causes an error:
neuper@42272
   324
neuper@42272
   325
------------------------------------------
neuper@42272
   326
theory Scratch
neuper@42272
   327
  imports Complex_Main
neuper@42272
   328
begin
neuper@42272
   329
neuper@42272
   330
lemma
neuper@42272
   331
  shows "(3 / 2) * ln n = ((6 * k * ln n) / n) * ((1 / 2 * n / k) / 2)"
neuper@42272
   332
apply simp
neuper@42272
   333
------------------------------------------
neuper@42272
   334
neuper@42272
   335
outputs
neuper@42272
   336
neuper@42272
   337
------------------------------------------
neuper@42272
   338
Proof failed.
neuper@42272
   339
(if n = 0 then 0 else 6 * (k * ln n) / 1) * 2 / (4 * k) =
neuper@42272
   340
2 * (Numeral1 * (if n = 0 then 0 else 6 * (k * ln n) / 1)) / (2 * (2 * k))
neuper@42272
   341
 1. n \not= Numeral0 \rightarrow k * (ln n * (2 * 6)) / (k * 4) = k * (ln n * 12) / (k * 4)
neuper@42272
   342
1 unsolved goal(s)!
neuper@42272
   343
The error(s) above occurred for the goal statement:
neuper@42272
   344
(if n = 0 then 0 else 6 * (k * ln n) / 1) * 2 / (4 * k) =
neuper@42272
   345
2 * (Numeral1 * (if n = 0 then 0 else 6 * (k * ln n) / 1)) / (2 * (2 * k))
neuper@42272
   346
------------------------------------------
neuper@42272
   347
\end{verbatim}
neuper@42272
   348
}
neuper@42272
   349
Mail ``Re: simproc divide\_cancel\_factor produces error'' on Fri, 16 Sep 2011 22:33:36 +0200
neuper@42272
   350
\begin{verbatim}
neuper@42272
   351
> > After the release, I'll have to think about doing a complete overhaul
neuper@42272
   352
> > of all of the cancellation simprocs.
neuper@42272
   353
You are very welcome to do so.  Before you start, call on me and I will
neuper@42272
   354
write down some ideas I had long ago (other may want to join, too).
neuper@42272
   355
\end{verbatim}
neuper@42272
   356
%WN: bist du schon angemeldet in den Mailing-Listen isabelle-users@ und isabelle-dev@ ? WENN NICHT, DANN WIRD ES H"OCHSTE ZEIT !!!
neuper@42272
   357
neuper@42272
   358
\subsection{Open Issues with CAS-functionality in CTP}\label{cas-funct}
neuper@42272
   359
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) !!!
neuper@42331
   360
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{}.
neuper@42272
   361
neuper@42272
   362
\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}. 
neuper@42272
   363
\cite{cezary-phd} gives an introductory example (floated to p.\pageref{fig:casproto}) which will be referred to in the sequel.
neuper@42272
   364
\input{thol.tex}
neuper@42272
   365
%WN das nachfolgende Format-Problem l"osen wir sp"ater ...
neuper@42272
   366
\begin{figure}[hbt]
neuper@42272
   367
\begin{center}
neuper@42272
   368
\begin{holnb}
neuper@42272
   369
  In1 := vector [\&2; \&2] - vector [\&1; \&0] + vec 1
neuper@42272
   370
 Out1 := vector [\&2; \&3]
neuper@42272
   371
  In2 := diff (diff (\Lam{}x. \&3 * sin (\&2 * x) +
neuper@42272
   372
         \&7 + exp (exp x)))
neuper@42272
   373
 Out2 := \Lam{}x. exp x pow 2 * exp (exp x) +
neuper@42272
   374
         exp x * exp (exp x) + -- \&12 * sin (\&2 * x)
neuper@42272
   375
  In3 := N (exp (\&1)) 10
neuper@42272
   376
 Out3 := #2.7182818284 + ... (exp (\&1)) 10 F
neuper@42272
   377
  In4 := x + \&1 - x / \&1 + \&7 * (y + x) pow 2
neuper@42272
   378
 Out4 := \&7 * x pow 2 + \&14 * x * y + \&7 * y pow 2 + \&1
neuper@42272
   379
  In5 := sum (0,5) (\Lam{}x. \&x * \&x)
neuper@42272
   380
 Out5 := \&30
neuper@42272
   381
  In6 := sqrt (x * x) assuming x > &1
neuper@42272
   382
 Out6 := x
neuper@42272
   383
\end{holnb}
neuper@42272
   384
\end{center}
neuper@42272
   385
\caption{\label{fig:casproto}Example interaction with the prototype
neuper@42272
   386
  CAS-like input-response loop. For the user input given in the
neuper@42272
   387
  \texttt{In} lines, the system produces the output in \texttt{Out}
neuper@42272
   388
  lines together with HOL Light theorems that state the equality
neuper@42272
   389
  between the input and the output.}
neuper@42272
   390
\end{figure}
neuper@42331
   391
In lines {\tt In6, Out6} this examples shows how to reliably simplify $\sqrt{x}$. \cite{caspartial} gives more details on handling side conditions in formalized partial functions.
neuper@42272
   392
neuper@42272
   393
Analoguous to this example, cancellations (this thesis is concerned with) like
neuper@42272
   394
$$\frac{x^2-y^2}{x^2-x\cdot y}=\frac{x+y}{x}\;\;\;\;{\it assuming}\;x-y\not=0\land x\not=0$$
neuper@42331
   395
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.
neuper@42272
   396
neuper@42272
   397
\paragraph{Multi-valued functions:}\label{multi-valued}
neuper@42272
   398
\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 ...
neuper@42331
   399
%TODO.WN111104 ... zur Erkl"arung ein paar Beispiele von http://en.wikipedia.org/wiki/Multivalued_function
neuper@42272
   400
neuper@42272
   401
\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.
neuper@42272
   402
neuper@42272
   403
\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,
neuper@42272
   404
\begin{eqnarray}
neuper@42272
   405
   \exists x_s.\;x_s\in S &\Rightarrow& f(x_s) = 0 \\\label{is-solut}
neuper@42272
   406
  x_s\in S &\Leftarrow& \exists x_s.\;f(x_s) = 0    \label{all-solut}
neuper@42272
   407
\end{eqnarray}
neuper@42331
   408
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}.
neuper@42272
   409
neuper@42331
   410
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.
neuper@42331
   411
neuper@42331
   412
\subsection{Algorithms for cancellation of multivariate polynomials}
neuper@42331
   413
The most appropriate book for implementing the required algorithms in this thesis is \cite{Winkler:96}. TODO.WN111104 welche noch ?
neuper@42331
   414
meindl_diana@42234
   415
\section{Thesis structure}
meindl_diana@42266
   416
The proposed table of contents of the thesis on the chapter level is as follows:
meindl_diana@42234
   417
\begin{enumerate}
meindl_diana@42263
   418
	\item Introduction (2-3 pages)
meindl_diana@42266
   419
	\item Computer Algebra Systems (CAS) (5 - 7 pages)\\
meindl_diana@42270
   420
	Which different CAS exists and whats the focus of them.
neuper@42331
   421
	\item The \sisac{}-Project (5 - 7 pages)\\
neuper@42331
   422
	This chapter will describe the \sisac{}-Project and the goals of the project.
meindl_diana@42234
   423
	\item Univariate Polynomials (15-20 pages)\\
meindl_diana@42263
   424
	This chapter will describe different Algorithms for univariate polynomials, with different coefficients.
meindl_diana@42234
   425
	\item Multivariate Polynomials (20-25 pages)\\
meindl_diana@42263
   426
	This chapter will describe different Algorithms for multivariate polynomials,  with different coefficients
meindl_diana@42263
   427
	\item Functional programming and SML(2-5 pages)\\
meindl_diana@42263
   428
	The basic idea of this programming languages.
neuper@42331
   429
	\item Implimentation in \sisac{}-Project (15-20 pages)
meindl_diana@42263
   430
	\item Conclusion (2-3 pages)
meindl_diana@42234
   431
\end{enumerate}
meindl_diana@42234
   432
%\newpage
meindl_diana@42234
   433
meindl_diana@42234
   434
\section{Timeline}
meindl_diana@42234
   435
%Werd nie fertig.\\
meindl_diana@42234
   436
\begin{center}
meindl_diana@42234
   437
		\begin{tabular}{|l|l|l|}
meindl_diana@42234
   438
		\hline
meindl_diana@42234
   439
			 \textbf{Time}&\textbf{Thesis}&\textbf{Project}\\
meindl_diana@42263
   440
			 \hline
meindl_diana@42266
   441
			 & Functional programming & Learning the basics and the idea\\
meindl_diana@42266
   442
			 & & of funcional programming\\
meindl_diana@42263
   443
			 \hline
meindl_diana@42266
   444
			 & Different CAS & Can they handle the problem \\
meindl_diana@42266
   445
			 & &and which algorithm do they use?\\ \hline
meindl_diana@42270
   446
			 & Univariate Polynomials & Implementation of the Algorithm\\
meindl_diana@42263
   447
			 & & for univariate Polynomials \\ \hline
meindl_diana@42270
   448
		   & Multivariate Polynomials &  Implementation of the Algorithm\\
meindl_diana@42266
   449
			 & & for multivariate Polynomials \\ \hline 
neuper@42272
   450
		   & The \sisac-Project &\\ \hline
meindl_diana@42266
   451
		   & Conclusion and Introduction & Find good examples for testing\\
meindl_diana@42234
   452
			\hline
meindl_diana@42234
   453
		\end{tabular}
meindl_diana@42234
   454
	\end{center}
meindl_diana@42266
   455
neuper@42273
   456
%WN oben an passender stelle einf"ugen
neuper@42331
   457
\cite{einf-funct-progr}
meindl_diana@42234
   458
		
neuper@42273
   459
		
neuper@42331
   460
\bibliography{bib/math-eng,bib/didact,bib/bk,bib/RISC_2,bib/isac,bib/pl,bib/math,references}
neuper@42272
   461
%\section{Bibliography}
neuper@42272
   462
%%mindestens 10
neuper@42272
   463
%\begin{enumerate}
neuper@42273
   464
% \item Bird/Wadler, \textit{Einführung in die funktionale Programmierung}, Carl Hanser and Prentice-Hall International, 1992
neuper@42272
   465
% \item Franz Winkler, \textit{Polynomial Algorithms in Computer Algebra}, Springer,1996
neuper@42272
   466
% \item %M. Mignotte, \textit{An inequality about factors of polynomial}
neuper@42272
   467
% \item %M. Mignotte, \textit{Some useful bounds}
neuper@42272
   468
% \item %W. S. Brown and J. F. Traub. \textit{On euclid's algorithm and the theory of subresultans}, Journal of the ACM (JACM), 1971
neuper@42272
   469
% \item %Bruno Buchberger, \textit{Algorhimic mathematics: Problem types, data types, algorithm types}, Lecture notes, RISC Jku A-4040 Linz, 1982
neuper@42272
   470
% 
neuper@42272
   471
% \item %Tateaki Sasaki and Masayuki Suzuki, \textit{Thre new algorithms for multivariate polynomial GCD}, J. Symbolic Combutation, 1992
neuper@42272
   472
% \item
neuper@42272
   473
% \item
neuper@42272
   474
% \item
neuper@42272
   475
%\end{enumerate} 
meindl_diana@42263
   476
neuper@42272
   477
\end{document}
neuper@42272
   478
neuper@42274
   479
ALLES UNTERHALB \end{document} WIRD VON LATEX NICHT BERUECKSICHTIGT
neuper@42272
   480
WN110916 grep-ing through Isabelle code:
neuper@42272
   481
neuper@42272
   482
neuper@neuper:/usr/local/isabisac/src$ find -name "*umeral*"
neuper@42272
   483
./HOL/ex/Numeral.thy
neuper@42272
   484
./HOL/Tools/nat_numeral_simprocs.ML
neuper@42272
   485
./HOL/Tools/numeral_syntax.ML
neuper@42272
   486
./HOL/Tools/numeral.ML
neuper@42272
   487
./HOL/Tools/numeral_simprocs.ML
neuper@42272
   488
./HOL/Matrix/ComputeNumeral.thy
neuper@42272
   489
./HOL/Library/Numeral_Type.thy
neuper@42272
   490
./HOL/Numeral_Simprocs.thy
neuper@42272
   491
./HOL/Import/HOL/numeral.imp
neuper@42272
   492
./HOL/Code_Numeral.thy
neuper@42272
   493
./HOL/Nat_Numeral.thy
neuper@42272
   494
./ZF/Tools/numeral_syntax.ML
neuper@42272
   495
./Provers/Arith/cancel_numeral_factor.ML
neuper@42272
   496
./Provers/Arith/cancel_numerals.ML
neuper@42272
   497
./Provers/Arith/combine_numerals.ML
neuper@42272
   498
neuper@42272
   499
neuper@neuper:/usr/local/isabisac/src$ find -name "*ancel*"
neuper@42272
   500
./HOL/Tools/abel_cancel.ML                 
neuper@42272
   501
./Provers/Arith/cancel_div_mod.ML
neuper@42272
   502
./Provers/Arith/cancel_numeral_factor.ML  Paulson 2000 !!!
neuper@42272
   503
./Provers/Arith/cancel_sums.ML            
neuper@42272
   504
./Provers/Arith/cancel_numerals.ML        Paulson 2000