249 calculus, etc.~\footnote{The programs existing in the {\sisac} |
249 calculus, etc.~\footnote{The programs existing in the {\sisac} |
250 prototype are found at |
250 prototype are found at |
251 http://www.ist.tugraz.at/projects/isac/www/kbase/met/index\_met.html}) |
251 http://www.ist.tugraz.at/projects/isac/www/kbase/met/index\_met.html}) |
252 |
252 |
253 \paragraph{The mathematical background of the running example} is the |
253 \paragraph{The mathematical background of the running example} is the |
254 following: In Signal Processing, ``the ${\cal Z}$-Transform for |
254 following: In Signal Processing, ``the ${\cal Z}$-transform for |
255 discrete-time signals is the counterpart of the Laplace transform for |
255 discrete-time signals is the counterpart of the Laplace transform for |
256 continuous-time signals, and they each have a similar relationship to |
256 continuous-time signals, and they each have a similar relationship to |
257 the corresponding Fourier transform. One motivation for introducing |
257 the corresponding Fourier transform. One motivation for introducing |
258 this generalization is that the Fourier transform does not converge |
258 this generalization is that the Fourier transform does not converge |
259 for all sequences, and it is useful to have a generalization of the |
259 for all sequences, and it is useful to have a generalization of the |
260 Fourier transform that encompasses a broader class of signals. A |
260 Fourier transform that encompasses a broader class of signals. A |
261 second advantage is that in analytic problems, the $z$-transform |
261 second advantage is that in analytic problems, the ${\cal Z}$-transform |
262 notation is often more convenient than the Fourier transform |
262 notation is often more convenient than the Fourier transform |
263 notation.'' ~\cite[p. 128]{oppenheim2010discrete}. The $z$-transform |
263 notation.'' ~\cite[p. 128]{oppenheim2010discrete}. The ${\cal Z}$-transform |
264 is defined as |
264 is defined as |
265 \begin{equation*} |
265 \begin{equation*} |
266 X(z)=\sum_{n=-\infty }^{\infty }x[n]z^{-n} |
266 X(z)=\sum_{n=-\infty }^{\infty }x[n]z^{-n} |
267 \end{equation*} |
267 \end{equation*} |
268 where a discrete time sequence $x[n]$ is transformed into the function |
268 where a discrete time sequence $x[n]$ is transformed into the function |
271 the integral |
271 the integral |
272 \begin{equation*} |
272 \begin{equation*} |
273 x[n]=\frac{1}{2\pi j} \oint_{C} X(z)\cdot z^{n-1} dz |
273 x[n]=\frac{1}{2\pi j} \oint_{C} X(z)\cdot z^{n-1} dz |
274 \end{equation*} |
274 \end{equation*} |
275 where the letter $C$ represents a contour within the range of |
275 where the letter $C$ represents a contour within the range of |
276 convergence of the $z$- transform. The unit circle can be a special |
276 convergence of the ${\cal Z}$-transform. The unit circle can be a special |
277 case of this contour. Remember that $j$ is the complex number in the |
277 case of this contour. Remember that $j$ is the complex number in the |
278 domain of engineering. As this transformation requires high effort to |
278 domain of engineering. As this transform requires high effort to |
279 be solved, tables of commonly used transform pairs are used in |
279 be solved, tables of commonly used transform pairs are used in |
280 education as well as in engineering practice; such tables can be found |
280 education as well as in engineering practice; such tables can be found |
281 at~\cite{wiki:1} or~\cite[Table~3.1]{oppenheim2010discrete} as well. |
281 at~\cite{wiki:1} or~\cite[Table~3.1]{oppenheim2010discrete} as well. |
282 A completely solved and more detailed example can be found at |
282 A completely solved and more detailed example can be found at |
283 ~\cite[p. 149f]{oppenheim2010discrete}. |
283 ~\cite[p. 149f]{oppenheim2010discrete}. |
703 % \textbf{theories} in Isabelle. A theorem must be proven; fortunately |
703 % \textbf{theories} in Isabelle. A theorem must be proven; fortunately |
704 % Isabelle comprises a mechanism (called ``axiomatization''), which |
704 % Isabelle comprises a mechanism (called ``axiomatization''), which |
705 % allows to omit proofs. Such a theorem is shown in |
705 % allows to omit proofs. Such a theorem is shown in |
706 % Example~\ref{eg:neuper1}. |
706 % Example~\ref{eg:neuper1}. |
707 |
707 |
708 The running example requires to determine the inverse $\cal |
708 The running example requires to determine the inverse ${\cal Z}$-transform |
709 Z$-transform for a class of functions. The domain of Signal Processing |
709 for a class of functions. The domain of Signal Processing |
710 is accustomed to specific notation for the resulting functions, which |
710 is accustomed to specific notation for the resulting functions, which |
711 are absolutely capable of being totalled and are called step-response: $u[n]$, where $u$ is the |
711 are absolutely capable of being totalled and are called step-response: $u[n]$, where $u$ is the |
712 function, $n$ is the argument and the brackets indicate that the |
712 function, $n$ is the argument and the brackets indicate that the |
713 arguments are discrete. Surprisingly, Isabelle accepts the rules for |
713 arguments are discrete. Surprisingly, Isabelle accepts the rules for |
714 $z^{-1}$ in this traditional notation~\footnote{Isabelle |
714 $z^{-1}$ in this traditional notation~\footnote{Isabelle |
729 07\>\> rule6: ``$\vert\vert z \vert\vert > 1 \Rightarrow z/(z - 1)^2 = n \cdot u [n]$'' |
729 07\>\> rule6: ``$\vert\vert z \vert\vert > 1 \Rightarrow z/(z - 1)^2 = n \cdot u [n]$'' |
730 \end{tabbing}} |
730 \end{tabbing}} |
731 % \end{example} |
731 % \end{example} |
732 %} |
732 %} |
733 These 6 rules can be used as conditional rewrite rules, depending on |
733 These 6 rules can be used as conditional rewrite rules, depending on |
734 the respective convergence radius. Satisfaction from accordance with traditional notation |
734 the respective convergence radius. Satisfaction from accordance with traditional |
735 contrasts with the above word {\em axiomatization}: As TP-based, the |
735 notation contrasts with the above word {\em axiomatization}: As TP-based, the |
736 programming language expects these rules as {\em proved} theorems, and |
736 programming language expects these rules as {\em proved} theorems, and |
737 not as axioms implemented in the above brute force manner; otherwise |
737 not as axioms implemented in the above brute force manner; otherwise |
738 all the verification efforts envisaged (like proof of the |
738 all the verification efforts envisaged (like proof of the |
739 post-condition, see below) would be meaningless. |
739 post-condition, see below) would be meaningless. |
740 |
740 |
741 Isabelle provides a large body of knowledge, rigorously proved from |
741 Isabelle provides a large body of knowledge, rigorously proved from |
742 the basic axioms of mathematics~\footnote{This way of rigorously |
742 the basic axioms of mathematics~\footnote{This way of rigorously |
743 deriving all knowledge from first principles is called the |
743 deriving all knowledge from first principles is called the |
744 LCF-paradigm in TP.}. In the case of the ${\cal Z}$-Transform the most advanced |
744 LCF-paradigm in TP.}. In the case of the ${\cal Z}$-transform the most advanced |
745 knowledge can be found in the theories on Multivariate |
745 knowledge can be found in the theories on Multivariate |
746 Analysis~\footnote{http://isabelle.in.tum.de/dist/library/HOL/HOL-Multivariate\_Analysis}. However, |
746 Analysis~\footnote{http://isabelle.in.tum.de/dist/library/HOL/HOL-Multivariate\_Analysis}. However, |
747 building up knowledge such that a proof for the above rules would be |
747 building up knowledge such that a proof for the above rules would be |
748 reasonably short and easily comprehensible, still requires lots of |
748 reasonably short and easily comprehensible, still requires lots of |
749 work (and is definitely out of scope of our case study). |
749 work (and is definitely out of scope of our case study). |
2046 program has been adapted in an unelegant way. |
2046 program has been adapted in an unelegant way. |
2047 \item Implement an algorithms for partial fraction decomposition, |
2047 \item Implement an algorithms for partial fraction decomposition, |
2048 which is considered a standard normal form in Computer Algebra. |
2048 which is considered a standard normal form in Computer Algebra. |
2049 \item Implement a specification for partial fraction decomposition and |
2049 \item Implement a specification for partial fraction decomposition and |
2050 locate it appropriately in the hierarchy of specification. |
2050 locate it appropriately in the hierarchy of specification. |
2051 \item Declare definitions and theorems within the theory of ${\cal |
2051 \item Declare definitions and theorems within the theory of |
2052 Z}$-Transformation, and prove the theorems (which was not done in the |
2052 ${\cal Z}$-transform, and prove the theorems (which was not done in the |
2053 case study). |
2053 case study). |
2054 \end{itemize} |
2054 \end{itemize} |
2055 On the other hand, for the one the class of problems implemented, |
2055 On the other hand, for the one the class of problems implemented, |
2056 adding an arbitrary number of examples within this class requires a |
2056 adding an arbitrary number of examples within this class requires a |
2057 few minutes~\footnote{As shown in Fig.\ref{fig-interactive}, an |
2057 few minutes~\footnote{As shown in Fig.\ref{fig-interactive}, an |