doc-src/isac/jrocnik/bakkarbeit_jrocnik.tex
author Walther Neuper <neuper@ist.tugraz.at>
Fri, 28 Oct 2011 19:11:05 +0200
branchdecompose-isar
changeset 42328 2b717e93bed2
parent 42327 4493e57565fd
child 42329 c11c61d1a8c4
permissions -rwxr-xr-x
suggestion for sect 1,2
jan@42322
     1
%   Title:  bakkarbeit_jrocnik.tex
jan@42322
     2
%   Author: Jan Rocnik
jan@42322
     3
%   (c) copyright due to lincense terms.
jan@42322
     4
%2345678901234567890123456789012345678901234567890123456789012345678901234567890
jan@42322
     5
%       10        20        30        40        50        60        70        80
jan@42322
     6
jan@42322
     7
%TODO:
jan@42322
     8
%%\cite{proakis2004contemporary}
jan@42326
     9
%%
jan@42326
    10
%%patch:
jan@42326
    11
%%structur:    theory part                     ersetzt   project undamentals
jan@42326
    12
%%						 "mechanization of math in isac" ersetzt   introduction
jan@42326
    13
%%             authoring math in isac          ersetzt   mechanization
jan@42322
    14
jan@42322
    15
%define document class
jan@42307
    16
\documentclass[a4paper, 12pt]{article}
jan@42235
    17
jan@42322
    18
%packages for language and input
jan@42307
    19
\usepackage[english]{babel} 
jan@42235
    20
\usepackage[T1]{fontenc}
jan@42235
    21
\usepackage[latin1]{inputenc}
jan@42235
    22
jan@42322
    23
%generel packages
jan@42307
    24
\usepackage{url}
jan@42246
    25
\usepackage{endnotes}
jan@42246
    26
\usepackage{trfsigns}
jan@42246
    27
\usepackage{setspace}
jan@42307
    28
\usepackage[pdfpagelabels]{hyperref}
jan@42316
    29
\usepackage{longtable}
jan@42326
    30
jan@42324
    31
\usepackage{float} %For restylefloat
jan@42326
    32
\newfloat{example}{h}{} %self made floats
jan@42326
    33
\floatname{example}{Example} %name for float
jan@42326
    34
\restylefloat{table} %float tables
jan@42326
    35
\floatstyle{ruled} %boxes around floats
jan@42326
    36
\restylefloat{example} %float examples --> boxes
jan@42322
    37
jan@42327
    38
%colors and graphics
jan@42327
    39
\usepackage{graphicx}
jan@42327
    40
\usepackage{color}
jan@42327
    41
\definecolor{lgray}{RGB}{238,238,238}
jan@42327
    42
jan@42322
    43
%isabelle relevant packages
jan@42316
    44
\usepackage{isabelle,isabellesym}
jan@42235
    45
jan@42322
    46
%define isac logos
neuper@42073
    47
\def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
neuper@42073
    48
\def\sisac{\footnotesize${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
neuper@42073
    49
jan@42326
    50
\newcommand{\HRule}{\rule{\linewidth}{0.2mm}}
jan@42326
    51
jan@42322
    52
%----------// BEGIN DOCUMENT \\----------%
jan@42322
    53
neuper@42073
    54
\begin{document}
neuper@42073
    55
jan@42316
    56
%----------// TITLE PAGE \\----------%
jan@42316
    57
jan@42326
    58
\input{./bakkarbeit_titlepage.tex}
jan@42326
    59
\cleardoublepage
jan@42326
    60
jan@42326
    61
%----------// EMPTY PAGE \\----------%
jan@42326
    62
jan@42326
    63
%todo
jan@42307
    64
jan@42316
    65
%----------// THANKS \\----------%
jan@42316
    66
jan@42307
    67
\setcounter{page}{2}
jan@42307
    68
\begin{center}
jan@42326
    69
	Special Thanks to\\
jan@42326
    70
	\hfill \\
jan@42326
    71
	\emph{Dr.techn. Walther Neuper}\\
jan@42326
    72
	\emph{Dipl.-Ing. Bernhard Geiger}
jan@42307
    73
\end{center}
jan@42307
    74
\thispagestyle{empty}
jan@42326
    75
\cleardoublepage
jan@42326
    76
jan@42326
    77
%----------// EMPTY PAGE \\----------%
jan@42326
    78
jan@42326
    79
%todo
jan@42307
    80
jan@42316
    81
%----------// ABSTRACT \\----------%
jan@42307
    82
jan@42307
    83
\begin{abstract}
neuper@42328
    84
The Baccalaureate Thesis creates interactive course material for Signal Processing (SP) based on the experimental educational math assistant Isabelle/{\sisac} ({\em Isa}belle for Transparent {\em C}alculations in Applied Mathematics).
jan@42323
    85
\par The content of the course material is defined together with the Signal Processing and Speech Communication Laboratory (SPSC Lab) of Graz University of Technology (TUG). The content is planned to be used in specific lectures and labs of the SPSC and thus is thoroughly concerned with underlying mathematical and physical theory.
neuper@42328
    86
One challenge of this thesis is, that much theory required for SPSC is not yet mechanized in Computer Theorem Provers (CTP); so this thesis will provide preliminary definitions  and theorems (without proofs~!) implemented in Isabelle \emph{theories}.
jan@42323
    87
\par Another callenge is the implementation of interactive courses: this is done within the educational math assistant Isabelle/{\sisac}, which is under development at TU Graz. The present state of {\sisac{}} happens to provide the {\em first} occasion for authoring by a non-member of the {\sisac}-developer team. So this challenge involves  alpha-testing of the underlying \emph{CTP-based programming language}, because error messages are still not user-friendly and need frequent contact with {\sisac}-developers.
jan@42307
    88
So the practical outcome of this thesis is twofold:
jan@42323
    89
\begin{enumerate}
jan@42323
    90
\item Interactive course material hopefully useful in education within the SPSC Lab and within STEOP, the introductory orientation phase at TUG, as a preview for students in Telematics on later application of math knowledge introduced in the first semester and
jan@42323
    91
\item A detailed description of technicalities in programming implemented as an interactive Isabelle/Isar theory, providing future programmers with guidelines and {\sisac}-developers with feedback in usability of the CTP-based program language. 
jan@42323
    92
\end{enumerate}
jan@42326
    93
\end{abstract}
jan@42326
    94
\clearpage
jan@42307
    95
jan@42323
    96
%----------// T O C \\----------%
jan@42307
    97
jan@42307
    98
\pagenumbering{Roman}
neuper@42328
    99
%This thesis is structured into a fundamental part introducing the motivation, the basic notions concerning the thesis aswell as the {\sisac{}} project and describing the mathematic base. Further a automatically generated practical part representing the work on {\sisac{}} which can be extended.
neuper@42073
   100
\tableofcontents
neuper@42073
   101
\clearpage
jan@42307
   102
\pagenumbering{arabic}
jan@42323
   103
\setcounter{page}{6}
jan@42316
   104
jan@42316
   105
%----------// PART-1 \\----------%
jan@42316
   106
jan@42316
   107
\part{Project Fundamentals}
neuper@42304
   108
neuper@42328
   109
%The goals of the thesis are finally defined in section \ref{sec:goals} which seems to be very late. The reason for this fact is that there has a lot of research to be done prior and a lot of this research has to be described in this thesis before we are able to define the proper goals. All this is neccessary for understanding the effort on this work. 
jan@42326
   110
jan@42322
   111
\section{Introduction}
neuper@42328
   112
%The motivation to this thesis mainly takes it source from the feeling of understanding difficult signal processing tasks and the will to help others to get this feeling to.
neuper@42328
   113
%\par Signal Processing (SP) requieres a huge range of mathematic knowledge as well as a feeling for simplification and number tricks but even though this fact, the operations themself are no higher ones. The main task is to understand. Aside this description we think of the classic math ideas and techniques, consisting of predefined formulas, notations and forumularsations we learn.
neuper@42328
   114
%
neuper@42328
   115
Didactics of mathematics faces a specific issue, a gap between (1) introduction of math concepts and skills and (2) application of these concepts and skills, which ususally are separated into different units in curricula (for good reasons). For instance, (1) teaching partial fraction decomposition is separated from (2) application for inverse Z-transform in signal processing.
neuper@42304
   116
neuper@42328
   117
This gap is an obstacle for applying math as an foundamental thinking technology in engineering: In (1) motivation is lacking because the question ``What is this stuff good for~?'' cannot be treated sufficiently, and in (2) the ``stuff'' is not available to students in higher semesters as widespread experience shows.
neuper@42240
   118
neuper@42328
   119
\medskip
neuper@42328
   120
Motivated by this didactical issue on the one hand, and ongoing R\&D on a novel kind of educational mathematics assistant at Graz University of Technology~\footnote{http://www.ist.tugraz.at/isac/} promising to cope with this issue on the other hand, several institutes are planning to join their expertise: the Institutes for Institute for Information Systems and Computer Media (IICM), the Institute for Software Technology (IST), the Institutes for Mathematics, the Signal Processing and Speech Communication Laboratory (SPSC Lab), the Institute for Structural Analysis and the Institute of Electrical Measurement and Measurement Signal Processing.
neuper@42328
   121
neuper@42328
   122
This thesis is the first attempt to tackle the above mentioned issue, it focuses on Telematics, because these specific studies focus on mathematics in STEOP, the introductory orientation phase. STEOP is considered an opportunity to investigate the impact of {\sisac}'s prototype on the issue and others.
neuper@42328
   123
neuper@42328
   124
\medskip
neuper@42328
   125
The thesis is structured as follows: Part I concerns theory, part II the implementation work, where the latter is the main part.
neuper@42328
   126
neuper@42328
   127
In part I, \S\ref{isabisac} gives a brief description of the state-of-the-art for educational math assistants (\S\ref{emas}) and introduces the notions required for the implementation work (\S\ref{math-auth}). In particular, \S\ref{user-guid} explains, why math authoring in \sisac{} is {\em not} concerned with interaction (and thus not with user guidance etc at all~!). So a concise description of the thesis' goals needs to be postponed to \S\ref{sec:goals}.
neuper@42328
   128
neuper@42328
   129
\S\ref{sp} analyzes ten (TODO: exact no?) problems defined by the SPSC Lab for the knowledge already provided (\S\ref{know-isab}, \S\ref{know-isac}), discusses the selection of problems for implementation (\S\ref{know-missing}) TODO: further structure ?
neuper@42328
   130
%(\S\ref{})
neuper@42328
   131
neuper@42328
   132
\section{Mechanization of Math in Isabelle/{\isac}}\label{isabisac}
neuper@42328
   133
%A problem behind is the mechanization of mathematic theories in CTP-bases languages. There is still a hugh gap between these theories and this what we call an applications - in Example Signal Processing. 
neuper@42328
   134
%\begin{example}
neuper@42328
   135
%	\[
neuper@42328
   136
%		X\cdot(a+b)+Y\cdot(c+d)=aX+bX+cY+dY
neuper@42328
   137
%  \]
neuper@42328
   138
%	{\small\textit{
neuper@42328
   139
%		\noindent A very simple example on this what we call gap is the simplification above. It is needles to say that it is correct and also isabell forfills it correct - \emph{always}. But sometimes we don't want do simplificate these things, sometimes it is easyer for handling and understanding if we keep terms together. Think of a problem were we now would need only the coefficients of $X$ and $Y$. This is what we call the gap between applications and theorem proofment.
neuper@42328
   140
%	}}
neuper@42328
   141
%	\caption{Correct but not usefull}\label{eg:gap}
neuper@42328
   142
%\end{example}
neuper@42328
   143
%Until we are not able to fill this gap we have to live with it but first have a look on the meaning of this statement:
neuper@42328
   144
%\par Mechanized math starts from mathematical models and \emph{hopefully} proceeds to match physics. Academic engineering starts from physics (experimentation, measurement) and then proceeds to mathematical modelling and formalization. The process from a physical observance to a mathematical theory is unavoidable bound of setting up a big collection of standards, rules, definition but also exceptions. These are the things making mechanization that difficult.
neuper@42328
   145
%\begin{example}
neuper@42328
   146
%	\[
neuper@42328
   147
%		m,\ kg,\ s,\ldots
neuper@42328
   148
%  \]
neuper@42328
   149
%	{\small\textit{
neuper@42328
   150
%		\noindent Think about some units like that one's above. Behind each unit there is a discerning and very accurate definition: One Meter is the distance the light travels, in a vacuum, through the time of 1 / 299.792.458 second; one kilogramm is the weight of a platinum-iridium cylindar in paris; and so on. But are these definitions useable in a computer mechanized world?!
neuper@42328
   151
%	}}
neuper@42328
   152
%	\caption{Units in measurement}\label{eg:units}
neuper@42328
   153
%\end{example}
neuper@42328
   154
%\par A computer or a CTP-System builds on programms witth predefined logical ruels and does not know any mathematical trick (follow up example \ref{eg:trick}) or recipe to walk around difficult expressions. 
neuper@42328
   155
%\begin{example}
neuper@42328
   156
%\[ \frac{1}{j\omega}\cdot\left(e^{-j\omega}-e^{j3\omega}\right)= \]
neuper@42328
   157
%\[ \frac{1}{j\omega}\cdot e^{-j2\omega}\cdot\left(e^{j\omega}-e^{-j\omega}\right)=
neuper@42328
   158
%	 \frac{1}{\omega}\, e^{-j2\omega}\cdot\colorbox{lgray}{$\frac{1}{j}\,\left(e^{j\omega}-e^{-j\omega}\right)$}= \]
neuper@42328
   159
%\[ \frac{1}{\omega}\, e^{-j2\omega}\cdot\colorbox{lgray}{$2\, sin(\omega)$} \]
neuper@42328
   160
%	{\small\textit{
neuper@42328
   161
%		\noindent Sometimes it is also usefull to be able to apply some \emph{tricks} to get a beautiful and particulary meaningful result, which we are able to interpret. But as seen in this example it can be hard to find out what operations have to be done to transform a result into a meaningful one.
neuper@42328
   162
%	}}
neuper@42328
   163
%	\caption{Mathematic tricks}\label{eg:trick}
neuper@42328
   164
%\end{example}
neuper@42328
   165
%For such a system the only possibility is to work through its known definitions and stops if none of these fits. Specified on Signal Processing or any other application it is often possible to walk through by doing simple creases. This creases are in generell based on simple math operatiopms but the challange is to teach the machine \emph{all}\footnote{Its pride to call it \emph{all}.} of them. Unfortunataly the goal of CTP Isabelle is to reach a high level of \emph{all} but it in real it will still be a survey of knowledge which links to other knowledge and {\sisac{}} a trainer and helper but no human compensating calulator. 
neuper@42328
   166
%\par {\sisac{}} itselfs aims to adds an \emph{application} axis (formal specifications of problems outof topics from Signal Processing, etc.) and an \emph{algorithmic} axis to the \emph{deductive} axis of physical knowledge. The result is a three-dimensional universe of mathematics.
neuper@42328
   167
%
neuper@42328
   168
%\subsubsection*{Notes on Mechanization of Mathematics}
neuper@42328
   169
%This thesis tries to \emph{connect} these two worlds and is one of the first guidelines to implement problem classes in {\sisac}. As we are still in a eary part of development, this is the first thesis dealing within this topic and there is \emph{no} related work to guid through. A more detailed description about this fact can be found in Section \ref{sec:related}.
neuper@42328
   170
%The major challenge of the practical part, of this thesis, is, that "connecting the two worlds" involves programming in a CTP-based programming language which is in a very early state of prototyping. There is no concrete experience data ready to grep.
neuper@42328
   171
%
neuper@42328
   172
As mentioned in the introduction, a prototype of an educational math assistant called \sisac\footnote{\sisac=\textbf{Isa}belle \cite{Nipkow-Paulson-Wenzel:2002} for \textbf{C}alculations, see http://www.ist.tugraz.at/isac/.} bridges the gap between (1) introducation and (2) application of mathematics: {\sisac} is based on Computer Theorem Proving (CTP), a technology which requires each fact and each action justified by formal logic, so \sisac{} makes justifications transparent to students in interactive step-wise problem solving. By that way {\sisac} already can serve both:
neuper@42328
   173
\begin{enumerate}
neuper@42328
   174
\item Introduction of math stuff (e.g. partial fraction decomposition) by stepwise explaining and exercising respective symbolic calculations with ``next step guidance (NSG)'' and rigorously checking steps freely input by students  --- this also in context with advanced applications (where the stuff to be taught in higher semesters can be skimmed through by NSG), and
neuper@42328
   175
\item Application of math stuff in advanced engineering courses (e.g. problems to be solved by inverse Z-transform in a Signal Processing Lab) --- and now without much ado about basic math techniques (like partical fraction decomposition): ``next step guidance'' supports students in independenly (re-)adopting such techniques.
neuper@42328
   176
\end{enumerate}
neuper@42328
   177
Before the question is answers, how {\sisac} accoplishes this task from a technical point of view, some remarks on the state-of-the-art is given:
neuper@42328
   178
neuper@42328
   179
\subsection{Educational Mathematics Assistants (EMAs)}\label{emas}
neuper@42328
   180
Educational software in mathematics is, if at all, based on Computer Algebra Systems (CAS, for instance \cite{progr-mathematica,prog-maple06}), Dynamic Geometry Systems (DGS, for instance \footnote{GeoGebra http://www.geogebra.org, Cinderella http://www.cinderella.de/, GCLC http://poincare.matf.bg.ac.rs/~janicic/gclc/}) or spread-sheets. These base technologies are used to program math lessons and sometimes even exercises. The latter are cumbersome: the steps towards a solution of such an interactive exercise need to be provided with feedback, where at each step a wide variety of possible input has to be foreseen by the programmer --- so such interactive exercises either require high development efforts or the exercises constrain possible inputs.
neuper@42328
   181
neuper@42328
   182
A new generation of educational math assistants (EMAs) is emerging presently, which is based on Computer Theorem Proving (CTP). CTP, for instance Isabelle \cite{Nipkow-Paulson-Wenzel:2002} and Coq \cite{Huet_all:94}, is a technology which requires each fact and each action justified by formal logic. Pushed by demands for \textit{proven} correctness of safety-critical software CTP advances into software engineering; from these advancements computer mathematics benefits in general, and math education in particular. Two features of CTP are immediately beneficial for learning:
neuper@42328
   183
neuper@42328
   184
\paragraph{CTP have knowledge in human readable format,} that is in standard predicate calculus. CTP following the LCF-tradition have that knowledge down to the basic definitions of set, equality, etc~\footnote{http://isabelle.in.tum.de/dist/library/HOL/HOL.html}; following the typical deductive development of math, natural numbers are defined and their properties proven~\footnote{http://isabelle.in.tum.de/dist/library/HOL/Number_Theory/Primes.html}, etc. Present knowledge mechanized in CTP exceeds high-school mathematics by far, however by knowledge required in software technology, and not in other engineering sciences.
neuper@42328
   185
neuper@42328
   186
\paragraph{CTP can model the whole problem solving process} in mathematical problem solving {\em within} a coherent logical framework. This is already being done by three projects, by Ralph-Johan Back \cite{Back-SD09}, by ActiveMath \cite{ActiveMath-MAIN11} and by Carnegie Mellon Tutor \cite{mat-tutor-cmu-MAIN11}.
neuper@42328
   187
neuper@42328
   188
Having the whole problem solving process within a logical coherent system, such a design guarantees correctness of intermediate steps and of the result (which seems essential for math software); and the second advantage is that CTP provides a wealth of theories which can be exploited for mechanizing other features essential for educational software.
neuper@42328
   189
neuper@42328
   190
\subsection{Generation of User Guidance in EMAs}\label{user-guid}
neuper@42328
   191
One essential feature for educational software is feedback to user input and assistance in coming to a solution.
neuper@42328
   192
neuper@42328
   193
\paragraph{Checking user input} by ATP during stepwise problem solving is being accomplished by the three projects mentioned above \cite{Back-SD09,ActiveMath-MAIN11,mat-tutor-cmu-MAIN11} exclusively. They model the whole problem solving process as mentioned above, so all what happens between formalized assumptions (or formal specification) and goal (or fulfilled postcondition) can be mechanized. Such mechanization promises to greatly extend the scope of educational software in stepwise problem solving.
neuper@42328
   194
neuper@42328
   195
\paragraph{Next step guidance (NSG)} comprises the system's ability to propose a next step; this is a challenge for CTP: either a radical restriction of the search space by restriction to very specific problem classes is required, or much care and effort is required in designing possible variants in the process of problem solving \cite{proof-strategies-11}.
neuper@42328
   196
neuper@42328
   197
Another approach is restricted to problem solving in engineering domains, where a problem is specified by input, precondition, output and postcondition, and where the postcondition is proven by ATP behind the scenes \cite{wn:lucas-interp-12}: Here the possible variants in the process of problem solving are provided with feedback {\em automatically}, if the problem is described in a CTP-based programming language~\cite{plmms10}: the programmer only describes the math algorithm without caring about interaction (the respective program is functional and even has no in/output statements~!); interaction is generated as a side-effect by the interpreter --- an efficient separation of concern between math programmers and dialog designers promising application all over engineering disciplines.
neuper@42328
   198
neuper@42328
   199
neuper@42328
   200
\subsection{Math Authoring in Isabelle/\isac}\label{math-auth}
neuper@42328
   201
Authoring new mathematics knowledge in {\sisac} can be compared with ``application programming'' of engineering problems; most of such programming uses CAS-based programming languages (CAS = Computer Algebra Systems; e.g. Mathematica's \cite{progr-mathematica} or Maple's programming language \cite{prog-maple06}).
neuper@42328
   202
neuper@42328
   203
{\sisac}, however, uses a novel type of CTP-based language \cite{plmms10} for describing how to constuct a solution to an engineering problem and for calling equation solvers, integration, etc~\footnote{Implementation of CAS-like functionality in CTP is not primarily concerned with efficiency, but with a didactic question: What to decide for: for high-brow algorithms at the state-of-the-art or for elementary algorithms comprehensible for students~?} within CTP; CTP can ensure ``systems that never make a mistake'' \cite{casproto} --- are impossible for CAS which have no logics underlying.
neuper@42328
   204
neuper@42328
   205
With writing such CTP-based programs authoring is perfect, the application programmer is not concerned with interaction or with user guidance: this is concern of a novel kind of program interpreter called Lucas-Interpreter \cite{wn:lucas-interp-12}. This interpreter hands over control to a dialog component at each step of calculation (like a debugger at breakpoints) and calls automated CTP to check user input following personalized strategies according to a feedback module.
neuper@42328
   206
neuper@42328
   207
\medskip
neuper@42328
   208
However ``application programming with CTP'' is not done with writing a program: according to the principles of CTP, each step must be justified. Such justifications are given by theorems. So all steps must be related to some theorem, if there is no such theorem it must be added to the existing knowledge, which is organized in so-called \textbf{theories} in  Isabelle. A theorem must be proven; fortunately Isabelle comprises a mechanism (called ``axiomatization''), which allows to omit proofs. Such a theorem is, for instance %TODO: take your example !
neuper@42328
   209
{\small\begin{tabbing}
neuper@42328
   210
123\=123\=123\=123\=\kill
neuper@42328
   211
\>axiomatization where \\
neuper@42328
   212
\>\>  rule1: "1 = $\delta$ [n]" and\\
neuper@42328
   213
\>\>  rule2: "|| z || > 1 ==> z / (z - 1) = u [n]" and\\
neuper@42328
   214
\>\>  rule3: "|| z || < 1 ==> z / (z - 1) = -u [-n - 1]" and \\
neuper@42328
   215
\>\>  rule4: "|| z || > || $\alpha$ || ==> z / (z - $\alpha$) = $\alpha^n$ * u [n]" and\\
neuper@42328
   216
\>\>  rule5: "|| z || < || $\alpha$ || ==> z / (z - $\alpha$) = -($\alpha^n$) * u [-n - 1]" and\\
neuper@42328
   217
\>\>  rule6: "|| z || > 1 ==> z/(z - 1)$^2$ = n $\cdot$ u [n]"\\
neuper@42328
   218
\end{tabbing}
neuper@42328
   219
}
neuper@42328
   220
neuper@42328
   221
In order to provide CTP with logical facts for checking user input, the Lucas-Interpreter requires a \textbf{specification}. Such a specification is for instance
neuper@42328
   222
{\small\begin{tabbing}
neuper@42328
   223
123,\=postcond \=: \= $\forall \,A^\prime\, u^\prime \,v^\prime.\,$\=\kill
neuper@42328
   224
Specification no.1:\\
neuper@42328
   225
%\>input\>: $\{\;r={\it arbitraryFix}\;\}$  \\
neuper@42328
   226
\>input    \>: $\{\;r\;\}$  \\
neuper@42328
   227
\>precond  \>: $0 < r$   \\
neuper@42328
   228
\>output   \>: $\{\;A,\; u,v\;\}$ \\
neuper@42328
   229
\>postcond \>:{\small  $\;A=2uv-u^2 \;\land\; (\frac{u}{2})^2+(\frac{v}{2})^2=r^2 \;\land$}\\
neuper@42328
   230
\>     \>\>{\small $\;\forall \;A^\prime\; u^\prime \;v^\prime.\;(A^\prime=2u^\prime v^\prime-(u^\prime)^2 \land
neuper@42328
   231
(\frac{u^\prime}{2})^2+(\frac{v^\prime}{2})^2=r^2) \Longrightarrow A^\prime \leq A$} \\
neuper@42328
   232
\>props\>: $\{\;A=2uv-u^2,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2\;\}$
neuper@42328
   233
\end{tabbing}
neuper@42328
   234
}
neuper@42328
   235
Such a specification is checked before the execution of a program is started, the same applies for sub-programs. In the following example program the sub-programs are designated by {\tt SubProblem}: TODO one example.
neuper@42328
   236
jan@42327
   237
jan@42326
   238
\subsection{Goals of the Thesis}\label{sec:goals}
neuper@42328
   239
%Imagine a piece of software would be able to support you by understanding every problem class, upcoming in the first years attending university - wouldn't it be great?
neuper@42328
   240
%\par {\sisac{}} tries to do that, but the current state of the art is miles away from this goal and a single implementation of a problem is not enough to cahnge this circumstamce. Through this fact it is all the more essential to try, test, research and document the implementation of problem classes from "`real world"' applications. Responding to the abstract at the begin of this document the thesis has two folds; on the one hand certainly to provide interactiv course material for Signal Processing (which means to implement a single problem provided by the Institute of Signal Processing and Speech Communication (SPSC); follow up Calulcations), and to extract experience data respectively help the {\sisac{}}-team by setting up a detailed description of technicalities hacking {\sisac{}} on the other hand.
neuper@42328
   241
%\par Another goal is to demonstrate the power and attractivity of {\sisac}.
neuper@42328
   242
Now all the notions are in place to describe the task ``Interactive Course Material for Signal Processing based on Isabelle/\sisac'' appropriately by the following points:
neuper@42328
   243
\begin{enumerate}
neuper@42328
   244
\item Analyze the problems given by the SPSC Lab for mathematics \textbf{knowledge required}, search the knowledge already available in Isabelle/\sisac, estimate efforts required to fill the gap between knowledge required and knowledge available, and finally select problems for implementation accordingly.
neuper@42328
   245
\item Implement the selected problems in Isabelle/\sisac, which means, in appropriate Isabelle theories \textbf{for each problem} implement:
neuper@42328
   246
  \begin{enumerate}
neuper@42328
   247
  \item \textbf{Definitions and theorems} required within the specification (including ``descriptions'' for input variables and output variables) and the program (proofs omitted via ``axiomaization'')
neuper@42328
   248
  \item \textbf{A specification} which describes the input variables, the preconditions on the input (a challenge for rigorously exact mathematics~!), the output variables and the postcondition, which relates input to output such that the problem is characterized formally (another challenge for rigorously exact mathematics~!)
neuper@42328
   249
  \item \textbf{A program} describing the algorithm which solves the problem, i.e. which constructs output meeting the postcondition. Programming involves identifying the steps (tactics~!) which create the calculation and calling CAS-functions (simplification, equation solvers, etc) appropriately. Modularization of programs into {\tt SubProblems} has to prepare for re-use of code.
neuper@42328
   250
  \end{enumerate}
neuper@42328
   251
\item Add \textbf{multimedia explanations} to each problem (i.e. to specific definitions, theorems, the specification and the program) such that non-expert students (e.g. within STEOP, the introductory orientation phase at TUG) get an idea the problem is about.
neuper@42328
   252
\item \textbf{Document the implementation} such that
neuper@42328
   253
  \begin{enumerate}
neuper@42328
   254
%  \item Interactive course material hopefully useful in education within the SPSC Lab and within STEOP, the introductory orientation phase at TUG, as a preview for students in Telematics on later application of math knowledge introduced in the first semester and
neuper@42328
   255
%  \item A detailed description of technicalities in programming implemented as an interactive Isabelle/Isar theory, providing future programmers with guidelines and {\sisac}-developers with feedback in usability of the CTP-based program language. 
neuper@42328
   256
  \item subsequent application programmers have guidelines for further implementation of interactive course material in SPSC and other engineering sciences
neuper@42328
   257
  \item \sisac{} developers get feedback for ongoing improvement of the CTP-based programming language, the respective development environment and the respective program interpreter (called Lucas-Interpreter)
neuper@42328
   258
  \item development of knowledge for engineering sciences is being motivated in the Isabelle community.
neuper@42328
   259
  \end{enumerate}
neuper@42328
   260
\end{enumerate}
neuper@42240
   261
neuper@42328
   262
neuper@42328
   263
\section{Mechanization of Signal Processing Problems}\label{sp}
neuper@42328
   264
\subsection{Relevant Knowledge available in Isabelle}\label{know-isab}
jan@42324
   265
Isabelle is developed now for a long time and so we are able to access a huge range of theories and usefull snipsets. The main problem according this snipsets is that isabelle still is a theorem proofer and not an algebra system. But due the work of the {\sisac}-development team there are already also many calculation examples provided.
jan@42324
   266
\par The SPSC provided a list of problems which are often done wrong or are missunderstood by studentsin term of the problem classes. Out of these tasks we tried to extract the core operations and looked up which parts are already implemented or usefull. The provided problems are:
jan@42324
   267
\begin{itemize}
jan@42324
   268
\item Fourier-Transformation
jan@42324
   269
\item Convolution
jan@42324
   270
\item Inverse z-Transformation and partial fraction decomposition
jan@42324
   271
\item Indextransformation
jan@42324
   272
\end{itemize}
jan@42324
   273
Following the collection and evaluation of core operations collated with isabelle:
neuper@42240
   274
neuper@42240
   275
\paragraph{example FFT}, describe in detail !!!! 
neuper@42240
   276
neuper@42240
   277
? different meaning: FFT in Maple
neuper@42240
   278
neuper@42240
   279
gap between what is available and what is required (@)!
neuper@42240
   280
neuper@42240
   281
traditional notation ?
neuper@42240
   282
neuper@42328
   283
\subsection{Relevant Knowledge available in isac}\label{know-isac}
neuper@42240
   284
todo
neuper@42240
   285
neuper@42240
   286
specifications (``application axis'') and methods (``algorithmic axis'')
neuper@42240
   287
neuper@42240
   288
partial fractions, cancellation of multivariate rational terms, ...
neuper@42240
   289
neuper@42328
   290
\subsection{Survey: Requiered Knowledge and Selected Problem(s)}\label{know-missing}
jan@42324
   291
Following tables are showing the expected development effort for speciefic problems. The values are only very inaccurately approximations of the real work, but needed as a basis for descieding with which problem to start:
neuper@42240
   292
jan@42324
   293
\begin{table}[!H]
jan@42324
   294
\begin{centering}
jan@42324
   295
\begin{tabular}{p{4cm}|p{5cm}|rp{2.5cm}}
jan@42324
   296
requirements            & comments             &effort\\ \hline\hline
jan@42324
   297
solving Intrgrals		    & simple via propertie table     &     20\\
jan@42324
   298
                        & \emph{real}          &    MT\\ \hline
jan@42324
   299
transformation table    & simple transform     &    20\\ \hline
jan@42324
   300
visualisation						& backend							 &    10\\ \hline
jan@42324
   301
example collection      & with explanations    &    20\\ \hline\hline
jan@42324
   302
\multicolumn{2}{c|}{}                      & 70-80\\
jan@42324
   303
\end{tabular}
jan@42324
   304
\par\end{centering}
jan@42324
   305
\caption{Fourier-Transformation development effort}
jan@42324
   306
\end{table}
neuper@42240
   307
jan@42324
   308
\begin{table}[H]
jan@42324
   309
\begin{centering}
jan@42324
   310
\begin{tabular}{p{4cm}|p{5cm}|rp{2.5cm}}
jan@42324
   311
requirements            & comments             &effort\\ \hline\hline
jan@42324
   312
simplify rationals      & \sisac               &     0\\ \hline
jan@42324
   313
define $\sum\limits_{i=0}^{n}i$ & partly \sisac  &    10\\ \hline
jan@42324
   314
simplify sum			      & termorder            &    10\\
jan@42324
   315
                        & simplify rules       &    20\\
jan@42324
   316
                        & use simplify rationals&     0\\ \hline
jan@42324
   317
index adjustments       & with unit step       &      10\\ \hline
jan@42324
   318
example collection      & with explanations    &    20\\ \hline\hline
jan@42324
   319
\multicolumn{2}{c|}{}                      & 70-90\\
jan@42324
   320
\end{tabular}
jan@42324
   321
\par\end{centering}
jan@42324
   322
\caption{Convolution Operations development effort}
jan@42324
   323
\end{table}
jan@42324
   324
jan@42324
   325
\begin{table}[H]
jan@42324
   326
\begin{centering}
jan@42324
   327
\begin{tabular}{p{4cm}|p{5cm}|rp{2.5cm}}
jan@42324
   328
requirements            & comments             &effort\\ \hline\hline
jan@42324
   329
solve for part.fract.   & \sisac: degree 2     &     0\\
jan@42324
   330
                        & complex nomminators  &    30\\
jan@42324
   331
                        & degree > 2           &    MT\\ \hline
jan@42324
   332
simplify polynomial     & \sisac               &     0\\
jan@42324
   333
simplify rational       & \sisac               &     0\\ \hline
jan@42324
   334
partial fraction        & degree 2,            &    20\\
jan@42324
   335
decomposition           & specification, method&    30\\ \hline
jan@42324
   336
${\cal Z}^{-1}$ table   & explanations, figures&    20\\ \hline
jan@42324
   337
example collection      & with explanations    &    20\\ \hline\hline
jan@42324
   338
\multicolumn{2}{c|}{}                      & 90-120\\
jan@42324
   339
%                        &                      & 1 MT
jan@42324
   340
\end{tabular}
jan@42324
   341
\par\end{centering}
jan@42324
   342
\caption{Z-Transformation development effort}
jan@42324
   343
\end{table}
jan@42324
   344
jan@42324
   345
As conclusion of the summerized efforts it is evident that only one topic can be tried to realized as a baccalaureate thesis. In accord with Dr. Neuper we decided after some practical tests to start with the implementation of the (Inverse) Z-Transformation. The Reason is that this topic can mostly be done with knowledge which was already tried to be mechanized in {\sisac}.
neuper@42240
   346
neuper@42240
   347
\subsection{Formalization of missing knowledge in Isabelle}
neuper@42240
   348
todo
neuper@42240
   349
neuper@42240
   350
axiomatization ... where ... and
neuper@42240
   351
neuper@42240
   352
\subsection{Notes on Problems with Traditional Notation}
jan@42327
   353
{\footnotesize
jan@42327
   354
\textbf{TODO}
jan@42322
   355
Due the thesis work we discorvers severell problems of traditional notations.
neuper@42240
   356
neuper@42240
   357
u[n] !!
neuper@42240
   358
neuper@42240
   359
f x =  why not f(x) ?!?!
neuper@42240
   360
neuper@42240
   361
...
neuper@42240
   362
jan@42276
   363
terms are not full simplified in traditional notations, in isac we have to simplify them complete to check weather results are compatible or not. in e.g. the solutions of an second order linear equation is an rational in isac but in tradition we keep fractions as long as possible and as long as they are 'beautiful' (1/8, 5/16,...)
jan@42327
   364
}\\
jan@42327
   365
The math which should be mechanized in Computer Theorem Provers (\emph{CTP}) has (almost) a problem with traditional notations (predicate calculus) for axioms, definitions, lemmas, theorems as a computer programm or script is not able to interpret every greek or latin letter and every greek, latin or whatever calculations symbol. Also if we would be able to handle thehse symbols we still have a problem to interpret them at all. (Follow up \hbox{Example \ref{eg:symbint1}})
jan@42327
   366
jan@42327
   367
\begin{example}
jan@42327
   368
	\[
jan@42327
   369
		u\left[n\right] \ \ldots \ unitstep
jan@42327
   370
	\]
jan@42327
   371
	{\small\textit{
jan@42327
   372
		\noindent The unitstep is something we need to solve Signal Processing problem classes. But in {\sisac{}} the 	rectangular breakets have a different meaning. So we abuse them for our requirements. We get something which is not defined, but useable. The Result is syntax only without semantic.
jan@42327
   373
	}}
jan@42327
   374
	\caption{Expression Interpretation}\label{eg:symbint1}
jan@42327
   375
\end{example}
jan@42327
   376
jan@42327
   377
\noindent In different problems, symbols and letters have different meanings and ask for different ways to get through. (Follow up \hbox{Example \ref{eg:symbint2}}) 
jan@42327
   378
\begin{example}
jan@42327
   379
	\[
jan@42327
   380
		\widehat{\ }\ \widehat{\ }\ \widehat{\ } \  \ldots \  exponent
jan@42327
   381
	\]
jan@42327
   382
	{\small\textit{
jan@42327
   383
	\noindent For using exponents the three widehat symbols are required. The reason for that is due the development of {\sisac{}} the single widehat and also the double were already in use for different operations.
jan@42327
   384
	}}
jan@42327
   385
	\caption{Symbol Interpretation}\label{eg:symbint2}
jan@42327
   386
\end{example}
jan@42327
   387
Exclusive from the input, also the output can be a problem. We are familar with a specified notations and style taught in university but a computer programm has no knowledge of the form probved by a professor and the maschines themselve also have not yet the possibilities to print every symbol (correct) Recent developments provide proofs in a humand readable format but according to the fact that there is no mony for good working formel editors yet, the style is one thing we have to live with.
jan@42276
   388
jan@42326
   389
\section{Milestones for the Thesis}
jan@42326
   390
The thesis was splitted into six iterations
jan@42326
   391
\begin{description}
jan@42326
   392
\item[(29.06. -- 27.07.)] Collection of detailed informations about different STEOP topics \ref{ssec:infcol}
jan@42326
   393
\item[(27.07.)] First Prsentation - Decition on which Problems will be implemented \ref{ssec:pres1}
jan@42326
   394
\item[(01.09. -- 11.11.)] Implementing the Problem Class in {\sisac{}} \ref{ssec:impl}
jan@42326
   395
\item[(14.11. -- 02.12.)] Documentation of the Implementation \ref{ssec:doc}
jan@42326
   396
\item[(05.12. -- todo)] Writting on the thesis \ref{ssec:thes}
jan@42326
   397
\item[todo] Second Prsentation - Work review \ref{ssec:pres2}
jan@42326
   398
\end{description}
jan@42323
   399
jan@42326
   400
\section{Detailed Milestone Description}
jan@42326
   401
\subsection{Collection of detailed informations about different STEOP topics}\label{ssec:infcol}
jan@42326
   402
identify problems relevant for certain SP lectures
jan@42326
   403
estimate chances to realized them within the scope of this thesis
jan@42326
   404
order for implementing the problems negotiated with lecturers
jan@42326
   405
\subsection{First Prsentation - Decition on which Problems will be implemented}\label{ssec:pres1}
jan@42326
   406
\subsection{Implementing the Problem Class in {\sisac}}\label{ssec:impl}
jan@42326
   407
\subsection{Documentation of the Implementation}\label{ssec:doc}
jan@42326
   408
\subsection{Writting on the thesis}\label{ssec:thes}
jan@42326
   409
\subsection{Second Prsentation - Work review}\label{ssec:pres2}
jan@42316
   410
jan@42327
   411
\section{Related Work}\label{sec:related}
jan@42327
   412
Unusual for a Baccalaureate Thesis, there is {\em no} related work; this requires explanation.
jan@42327
   413
Of course, this thesis relies on front-of-the wave computer mathematics, on CTP. But {\sisac{}} uses CTP in a very specific way, which is too weakly related to other work: programming in the CTP-based language and rigorous formal specification of problems in Signal Processing where the main tasks in the practical part of this thesis. The major challenge for the practical work was given by the fact, that the work concerned alpha-testing of the CTP-based programming environment.
jan@42327
   414
\par Another  area of work could be considered as related work: authoring of e-learning content. However, {\sisac{}} provides division of concern such that the practical part of this thesis could focus on computer mathematics; this work was not concerned with interaction (the CTP-based programming language has neither input statements nor output statements), nor with dialog guidance nor with any kind of learning theory.
jan@42327
   415
\par These two reasons are given for the unusual statement, that there is no related work to be discussed in this thesis. 
jan@42327
   416
jan@42326
   417
\section{Review}
neuper@42240
   418
todo
jan@42327
   419
\section{Open Questions}
jan@42327
   420
todo
jan@42326
   421
\section{Conclusions}
jan@42235
   422
todo
neuper@42073
   423
neuper@42328
   424
\bibliographystyle{alpha}
neuper@42328
   425
\bibliography{references}
neuper@42328
   426
%\bibliography{bib/math-eng,bib/didact,bib/bk,bib/RISC_2,bib/isac,bib/pl,bib/math}
neuper@42328
   427
neuper@42328
   428
jan@42324
   429
\clearpage
jan@42316
   430
jan@42326
   431
%----------// PART 2 \\----------%
jan@42326
   432
jan@42326
   433
\part{Implementation}
jan@42326
   434
jan@42326
   435
\input{./preambleForGeneratedDocuments.tex}
jan@42326
   436
\HRule
jan@42326
   437
%\input{../../../test/Tools/isac/ADDTESTS/course/SignalProcess/document/Build_Inverse_Z_Transform}
jan@42326
   438
jan@42326
   439
\clearpage
jan@42326
   440
jan@42326
   441
jan@42326
   442
%----------// APPENDIX \\-----------%
jan@42326
   443
jan@42326
   444
\appendix
jan@42326
   445
jan@42324
   446
%----------// BIB \\-----------%
jan@42324
   447
jan@42309
   448
\renewcommand{\refname}{\section{Sources}} % Using "Sources" as the title of the section
jan@42309
   449
\bibliographystyle{alpha}
jan@42309
   450
\bibliography{references}
neuper@42073
   451
\clearpage
neuper@42073
   452
jan@42324
   453
%----------// WORK TIME \\-----------%
neuper@42073
   454
neuper@42073
   455
\section{Stundenliste}
jan@42316
   456
\begin{footnotesize}
jan@42316
   457
\begin{longtable}[h]{l p{6.5cm} c c r}
jan@42316
   458
{\bf Date} & {\bf Description} & {\bf Begin} & {\bf End} & {\bf Dur.}\\
jan@42316
   459
\hline \hline
jan@42316
   460
\endhead
jan@42316
   461
29.06.2011 & Treffen mit Geiger und Neuper & 15:00 & 17:30 & 2,50\\ 
jan@42316
   462
02.07.2011 & Beispielaufbereitung (Bsp. Geiger Mail) & 20:00 & 21:30 & 1,50\\ 
jan@42316
   463
03.07.2011 & Beispielaufbereitung, Vorraussetzungsausw. & 21:00 & 22:45 & 1,75\\ 
jan@42316
   464
05.07.2011 & Treffen mit Neuper, Informationsaustausch & 10:00 & 13:00 & 3,00\\ 
jan@42316
   465
06.07.2011 & Isabelle Installation & 20:00 & 22:30 & 2,50\\ 
jan@42316
   466
07.07.2011 & Treffen mit Neuper, Präsentationsvorbereitung & 14:45 & 16:15 & 1,50\\ 
jan@42316
   467
18.07.2011 & Präsentationsvorbereitung - Struktur & 14:15 & 16:00 & 1,75\\ 
jan@42316
   468
19.07.2011 & Präsentationsvorbereitung - Inhalt & 07:20 & 09:20 & 2,00\\ 
jan@42316
   469
19.07.2011 & Treffen mit Neuper & 10:00 & 12:00 & 2,00\\ 
jan@42316
   470
21.07.2011 & HG Fehlersuche, Latex Ausarbeitung & 11:10 & 14:00 & 2,83\\ 
jan@42316
   471
22.07.2011 & Treffen mit Neuper & 10:00 & 12:00 & 2,00\\ 
jan@42316
   472
23.07.2011 & Berechnungen in Latex fertigstellen & 13:45 & 16:30 & 2,75\\ 
jan@42316
   473
24.07.2011 & Präsentation fertigstellen & 20:10 & 20:40 & 0,50\\ 
jan@42316
   474
25.07.2011 & Treffen mit Neuper, Präsentation \& erste Tests & 15:15 & 17:55 & 2,67\\ 
jan@42316
   475
26.07.2011 & Test\_Complex.thy erarbeiten & 10:45 & 12:10 & 1,42\\ 
jan@42316
   476
27.07.2011 & present-1 mit Neuper, Geiger & 10:00 & 12:00 & 2,00\\
jan@42316
   477
\hline 
jan@42316
   478
02.09.2011 & Treffen mit Neuper, Vorlage Bakk-Arbeit & 08:30 & 10:20 & 1,83\\ 
jan@42316
   479
05.09.2011 & Treffen mit Neuper, Beginn Partialbruchzerlegung & 09:30 & 12:45 & 3,25\\ 
jan@42316
   480
05.09.2011 & Partialbruchzerlegung & 17:10 & 18:30 & 1,33\\ 
jan@42316
   481
06.09.2011 & Dokumentation Partialbruchzerlegung & 10:00 & 13:15 & 3,25\\ 
jan@42316
   482
07.09.2011 & Treffen mit Neuper, Einführung Programmierung & 10:00 & 12:50 & 2,83\\ 
jan@42316
   483
08.09.2011 & Latex Umgebung einrichten - Theory export & 19:00 & 22:45 & 3,75\\ 
jan@42316
   484
09.09.2011 & Latex Umgebung einrichten - Makefile & 11:40 & 15:00 & 3,33\\ 
jan@42316
   485
10.09.2011 & Treffen mit Neuper, HG Fehler, Skript Inv.-Z-Transf. & 10:00 & 12:00 & 2,00\\ 
jan@42316
   486
14.09.2011 & Skript Inv.-Z-Transf Prgrammierung & 09:10 & 12:25 & 3,25\\ 
jan@42316
   487
16.09.2011 & Informationssammlung Summen & 13:15 & 16:00 & 2,75\\ 
jan@42316
   488
19.09.2011 & Programmierübung & 10:00 & 13:10 & 3,17\\ 
jan@42316
   489
20.09.2011 & Trefffen mit Neuper, Unterstützung bei Program. & 15:30 & 18:10 & 2,67\\ 
jan@42316
   490
23.09.2011 & Neukonfiguration IsaMakefile & 13:00 & 14:30 & 1,50\\ 
jan@42316
   491
23.09.2011 & Treffen Neuper, Programmierung Build\_Inverse\_Z & 14:30 & 17:30 & 3,00\\ 
jan@42316
   492
26.09.2011 & Skript Partialbruchzerlegung - getArgument & 13:30 & 16:15 & 2,75\\ 
jan@42316
   493
27.09.2011 & Treffen mit Neuper, HG Fehler & 09:00 & 12:20 & 3,33\\ 
jan@42316
   494
28.09.2011 & Treffen mit Neuper, Dateiumstrukturierung & 10:00 & 12:30 & 2,50\\ 
jan@42316
   495
01.10.2011 & Testen & 10:00 & 11:00 & 1,00\\ 
jan@42316
   496
02.10.2011 & Fehlersuche & 15:00 & 16:10 & 1,17\\ 
jan@42316
   497
06.10.2011 & Treffen mit Neuper & 15:00 & 17:50 & 2,83\\ 
jan@42316
   498
07.10.2011 & Treffen mit Neuper, Programmbesprechung & 15:00 & 16:50 & 1,83\\ 
jan@42316
   499
09.10.2011 & Bakk. Arbeit & 16:30 & 18:45 & 2,25\\ 
jan@42316
   500
11.10.2011 & Treffen mit Neuper, Programmbespr., Abstract & 14:10 & 17:10 & 3,00
jan@42316
   501
\end{longtable}
jan@42316
   502
\end{footnotesize}
neuper@42073
   503
jan@42246
   504
\section{Calculations}
jan@42251
   505
\input{calulations}
neuper@42073
   506
\end{document}
neuper@42328
   507