doc-src/isac/mat-eng-de.tex
author Alexandra Hirn <alexandra.hirn@hotmail.com>
Thu, 29 Jul 2010 14:12:11 +0200
branchlatex-isac-doc
changeset 37889 fe4854d9fdda
parent 37888 97c7a4059d2e
child 37891 6a55c9954896
permissions -rw-r--r--
complete
ahirn@37877
     1
\documentclass[11pt,a4paper,headline,headcount,towside,nocenter]{report}
ahirn@37877
     2
\usepackage{latexsym} 
alexandra@37882
     3
ahirn@37877
     4
%\usepackage{ngerman}
ahirn@37877
     5
%\grmn@dq@error ...and \dq \string #1 is undefined}
ahirn@37877
     6
%l.989 ...tch the problem type \\{\tt["squareroot",
ahirn@37877
     7
%                                                  "univ
ahirn@37877
     8
\bibliographystyle{alpha}
ahirn@37877
     9
ahirn@37877
    10
\def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
ahirn@37877
    11
ahirn@37877
    12
\title{\isac --- Interface for\\
ahirn@37877
    13
  Developers of Math Knowledge\\[1.0ex]
ahirn@37877
    14
  and\\[1.0ex]
ahirn@37877
    15
  Tools for Experiments in\\
ahirn@37877
    16
  Symbolic Computation\\[1.0ex]}
alexandra@37889
    17
\author{Alexandra Hirn und Eva Rott\\
ahirn@37877
    18
  \tt isac-users@ist.tugraz.at\\[1.0ex]}
ahirn@37877
    19
\date{\today}
ahirn@37877
    20
ahirn@37877
    21
\begin{document}
ahirn@37877
    22
\maketitle
ahirn@37877
    23
\newpage
ahirn@37877
    24
\tableofcontents
ahirn@37877
    25
\newpage
ahirn@37877
    26
\listoftables
ahirn@37877
    27
\newpage
ahirn@37877
    28
alexandra@37887
    29
\chapter{Einleitung}
ahirn@37877
    30
\section{``Authoring'' und ``Tutoring''}
ahirn@37877
    31
{TO DO} Mathematik lernen -- verschiedene Autoren -- Isabelle
ahirn@37877
    32
Die Grundlage f\"ur \isac{} bildet Isabelle. Dies ist ein ``theorem prover'', der von L. Paulson und T. Nipkow entwickelt wird und Hard- und Software pr\"uft.
ahirn@37877
    33
\section{Der Inhalt des Dokuments}
ahirn@37877
    34
\paragraph{TO DO} {Als Anleitung:} Dieses Dokument beschreibt das Kerngebiet (KE) von \isac{}, das Gebiet der mathematics engine (ME) im Kerngebiet und die verschiedenen Funktionen wie das Umschreiben und der Vergleich.
ahirn@37877
    35
ahirn@37877
    36
\isac{} und KE wurden in SML geschrieben, die Sprache in Verbindung mit dem Vorg\"anger des Theorem Provers Isabelle entwickelt. So kam es, dass in diesem Dokument die Ebene ASCII als SML Code pr\"asentiert wird. Der Leser wird vermutlich erkennen, dass der \isac{} Benutzer eine vollkommen andere Sichtweise auf eine grafische Benutzeroberfl\"ache bekommt.
ahirn@37877
    37
ahirn@37877
    38
Das Dokument ist eigenst\"andig; Basiswissen \"uber SML (für eine Einf\"uhrung siehe \cite{Paulson:91}), Terme und Umschreibung wird vorrausgesetzt.
ahirn@37877
    39
ahirn@37877
    40
%The interfaces will be moderately exended during the first phase of development of the mathematics knowledge. The work on the subprojects defined should {\em not} create interfaces of any interest to a user or another author of knowledge except identifiers (of type string) for theorems, rulesets etc.
ahirn@37877
    41
ahirn@37877
    42
Hinweis: SML Code, Verzeichnis, Dateien sind {\tt in 'tt' geschrieben}; besonders in {\tt ML>} ist das Kerngebiet schnell.
ahirn@37877
    43
ahirn@37877
    44
\paragraph{Versuchen Sie es!}  Ein weiteres Anliegen dieses Textes ist, dem Leser Tipps f\"ur Versuche mit den Anwendungen zu geben.
ahirn@37877
    45
ahirn@37877
    46
\section{Gleich am Computer ausprobieren!}\label{get-started}
ahirn@37877
    47
\paragraph{TO DO screenshot} Bevor Sie mit Ihren Versuchen beginnen, m\"ochten wir Ihnen noch einige Hinweise geben.
ahirn@37877
    48
\begin{itemize}
ahirn@37877
    49
 \item System starten
ahirn@37877
    50
 \item Shell aufmachen und die Datei mat-eng-de.sml \"offnen.
ahirn@37877
    51
 \item $>$  :  Hinter diesem Zeichen (``Prompt'') stehen jene, die Sie selbst eingeben bzw. mit Copy und Paste aus der Datei kopieren.
ahirn@37877
    52
 \item Die Eingabe wird mit ``;'' und ``Enter'' abgeschlossen.
ahirn@37877
    53
 \item Zeilen, die nicht mit Prompt beginnen, werden vom Computer ausgegeben.
ahirn@37877
    54
 
ahirn@37877
    55
\end{itemize}
ahirn@37877
    56
ahirn@37877
    57
\part{Experimentelle Ann\"aherung}
ahirn@37877
    58
ahirn@37877
    59
\chapter{Terme und Theorien}
ahirn@37877
    60
Wie bereits erw\"ahnt, geht es um Computer-Mathematik. In den letzten Jahren hat die ``computer science'' grosse Fortschritte darin gemacht, Mathematik auf dem Computer verst\"andlich darzustellen. Dies gilt f\"ur mathematische Formeln, f\"ur die Beschreibung von Problem (behandelt in Abs.\ref{pbl}), f\"ur L\"osungsmethoden (behandelt in Abs.\ref{met}) etc. Wir beginnen mit mathematischen Formeln --- gleich zum Ausprobieren wie in Abs.\ref{get-started} oben vorbereitet.
ahirn@37877
    61
ahirn@37877
    62
\section{Von der Formel zum Term}
ahirn@37877
    63
Um ein Beispiel zu nennen: Die Formel $a+b\cdot 3$ l\"asst sich in lesbarer Form so eingeben:
ahirn@37877
    64
{\footnotesize\begin{verbatim}
ahirn@37877
    65
  > "a + b * 3";
ahirn@37877
    66
  val it = "a + b * 3" : string
ahirn@37877
    67
\end{verbatim}}
ahirn@37877
    68
\noindent ``a + b * 3'' ist also ein String (=Zeichenfolge). In dieser Form weiss der Computer nicht, dass z.B. eine Multiplikation {\em vor} einer Addition zu rechnen ist. Isabelle braucht Formeln in einer anderen Form; Diese kann man mit der Funktion ``str2term'' (= string to term) umrechnen:
ahirn@37877
    69
{\footnotesize\begin{verbatim}
ahirn@37877
    70
  > str2term "a + b * 3";
ahirn@37877
    71
  val it =
ahirn@37877
    72
     Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
ahirn@37877
    73
           Free ("a", "RealDef.real") $
ahirn@37877
    74
        (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
ahirn@37877
    75
           ...) : Term.term
ahirn@37877
    76
\end{verbatim}}
ahirn@37877
    77
\noindent Jene Form braucht Isabelle intern zum rechnen. Sie heisst Term und ist nicht lesbar, daf\"ur aber speicherbar mit Hilfe von ``val'' (=value) 
ahirn@37877
    78
{\footnotesize\begin{verbatim}
ahirn@37877
    79
  > val term = str2term "a + b * 3";
ahirn@37877
    80
  val term =  
ahirn@37877
    81
     Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
ahirn@37877
    82
           Free ("a", "RealDef.real") $
ahirn@37877
    83
        (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
ahirn@37877
    84
           ...) : Term.term
ahirn@37877
    85
\end{verbatim}
ahirn@37877
    86
Der gespeicherte Term kann einer Funktion ``atomty'' \"ubergeben werden, die jenen in einer abstrakten Struktur zeigt:
ahirn@37877
    87
{\footnotesize\begin{verbatim}
ahirn@37877
    88
  > atomty term;
ahirn@37877
    89
 
ahirn@37877
    90
  ***
ahirn@37877
    91
  *** Const (op +, [real, real] => real)
ahirn@37877
    92
  *** . Free (a, real)
ahirn@37877
    93
  *** . Const (op *, [real, real] => real)
ahirn@37877
    94
  *** . . Free (b, real)
ahirn@37877
    95
  *** . . Free (3, real)
ahirn@37877
    96
  ***
ahirn@37877
    97
 
ahirn@37877
    98
  val it = () : unit
ahirn@37877
    99
\end{verbatim}%size
ahirn@37877
   100
ahirn@37877
   101
ahirn@37877
   102
\section{``Theory'' und ``Parsing``}
ahirn@37877
   103
Die theory gibt an, welcher Ausdruck wo steht. Eine derzeitige theory wird intern als \texttt{thy} gekennzeichnet. Jene theory, die alles Wissen ent\"ahlt ist \isac{}. 
ahirn@37877
   104
ahirn@37877
   105
{\footnotesize\begin{verbatim}
ahirn@37877
   106
  > Isac.thy;
ahirn@37877
   107
       val it =
ahirn@37877
   108
          {ProtoPure, CPure, HOL, Set, Typedef, Fun, Product_Type, Lfp, Gfp,
ahirn@37877
   109
          Sum_Type, Relation, Record, Inductive, Transitive_Closure,
ahirn@37877
   110
          Wellfounded_Recursion, NatDef, Nat, NatArith, Divides, Power,
ahirn@37877
   111
          SetInterval, Finite_Set, Equiv, IntDef, Int, Datatype_Universe,
ahirn@37877
   112
          Datatype, Numeral, Bin, IntArith, Wellfounded_Relations, Recdef, IntDiv,
ahirn@37877
   113
          IntPower, NatBin, NatSimprocs, Relation_Power, PreList, List, Map,
ahirn@37877
   114
          Hilbert_Choice, Main, Lubs, PNat, PRat, PReal, RealDef, RealOrd,
ahirn@37877
   115
          RealInt, RealBin, RealArith0, RealArith, RComplete, RealAbs, RealPow,
ahirn@37877
   116
          Ring_and_Field, Complex_Numbers, Real, ListG, Tools, Script, Typefix,
ahirn@37877
   117
          Float, ComplexI, Descript, Atools, Simplify, Poly, Rational, PolyMinus,
ahirn@37877
   118
          Equation, LinEq, Root, RootEq, RatEq, RootRat, RootRatEq, PolyEq, Vect,
ahirn@37877
   119
          Calculus, Trig, LogExp, Diff, DiffApp, Integrate, EqSystem, Biegelinie,
ahirn@37877
   120
          AlgEin, Test, Isac} : Theory.theory
ahirn@37877
   121
\end{verbatim}
ahirn@37877
   122
Die, die ein Mal enth\"alt ist groups.thy. Suchen Sie nach '*' unter der Adresse:
ahirn@37877
   123
ahirn@37877
   124
http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/Groups.html
ahirn@37877
   125
Hier wird Ihnen erkl\"art, wie das Mal vom Computer gelesen wird.
ahirn@37877
   126
{\footnotesize\begin{verbatim}
ahirn@37877
   127
  > Group.thy
ahirn@37877
   128
      fixes f :: "'a => 'a => 'a" (infixl "*" 70)
ahirn@37877
   129
      assumes assoc [ac_simps]: "a * b * c = a * (b * c)"
ahirn@37877
   130
\end{verbatim}
ahirn@37877
   131
Der ''infix`` ist der Operator, der zwischen zwei Argumenten steht. 70 bedeutet, dass Mal eine hohe Priorit\"at hat (bei einem Plus liegt der Wert bei 50 oder 60). 
ahirn@37877
   132
ahirn@37877
   133
Parsing entsteht durch einen string und eine theory. Es verwendet Informationen, die in der theory von Isabelle enthalten sind.
ahirn@37877
   134
{\footnotesize\begin{verbatim}
ahirn@37877
   135
  > parse;
ahirn@37877
   136
       val it = fn : Theory.theory -> string -> Thm.cterm Library.option
ahirn@37877
   137
\end{verbatim}
ahirn@37877
   138
Dieser term kann wieder in seine einzelnen Teile zerlegt werden.
ahirn@37877
   139
{\footnotesize\begin{verbatim}
ahirn@37877
   140
   > val it = (term_of o the) it;
ahirn@37877
   141
        val it =
ahirn@37877
   142
           Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
ahirn@37877
   143
               Free ("a", "RealDef.real") $
ahirn@37877
   144
           (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
ahirn@37877
   145
               ...) : Term.term
ahirn@37877
   146
\end{verbatim}
ahirn@37877
   147
ahirn@37877
   148
\paragraph{Versuchen Sie es!} Das mathematische Wissen w\"achst, indem man zu den Urspr\"ungen schaut. In den folgenden Beispielen werden verschiedene Meldungen genauer erkl\"art.
ahirn@37877
   149
ahirn@37877
   150
{\footnotesize\begin{verbatim}
ahirn@37877
   151
   > (*-1-*);
ahirn@37877
   152
   > parse HOL.thy "2^^^3";
ahirn@37877
   153
      *** Inner lexical error at: "^^^3"
ahirn@37877
   154
      val it = None : Thm.cterm Library.option         
ahirn@37877
   155
\end{verbatim}
ahirn@37877
   156
''Inner lexical error`` bedeutet, dass ein Fehler aufgetreten ist, vermutlich hat man sich vertippt.
ahirn@37877
   157
ahirn@37877
   158
{\footnotesize\begin{verbatim}
ahirn@37877
   159
   > (*-2-*);
ahirn@37877
   160
   > parse HOL.thy "d_d x (a + x)";
ahirn@37877
   161
      val it = None : Thm.cterm Library.option               
ahirn@37877
   162
\end{verbatim}
ahirn@37877
   163
Fehlt ''Inner lexical error`` wurde der Parse nicht gefunden.
ahirn@37877
   164
ahirn@37877
   165
{\footnotesize\begin{verbatim}
ahirn@37877
   166
   > (*-3-*);
ahirn@37877
   167
   > parse Rational.thy "2^^^3";
ahirn@37877
   168
      val it = Some "2 ^^^ 3" : Thm.cterm Library.option               
ahirn@37877
   169
\end{verbatim}
ahirn@37877
   170
ahirn@37877
   171
{\footnotesize\begin{verbatim}
ahirn@37877
   172
   > (*-4-*);
ahirn@37877
   173
   > val Some t4 = parse Rational.thy "d_d x (a + x)";
ahirn@37877
   174
      val t4 = "d_d x (a + x)" : Thm.cterm              
ahirn@37877
   175
\end{verbatim}
ahirn@37877
   176
ahirn@37877
   177
{\footnotesize\begin{verbatim}
ahirn@37877
   178
   > (*-5-*);
ahirn@37877
   179
   > val Some t5 = parse Diff.thy  "d_d x (a + x)";
ahirn@37877
   180
      val t5 = "d_d x (a + x)" : Thm.cterm             
ahirn@37877
   181
\end{verbatim}
ahirn@37877
   182
ahirn@37877
   183
Der Pase liefert hier einen ''zu sch\"onen`` Ausdruck in Form eines cterms, der wie ein string aussieht. Am verl\"asslichsten sind terme, die sich selbst erzeugen lassen.
ahirn@37877
   184
ahirn@37877
   185
\section{Details von Termen}
ahirn@37877
   186
Mit Hilfe der darunterliegenden Darstellung sieht man, dass ein cterm in einen term umgewandelt werden kann.
ahirn@37877
   187
{\footnotesize\begin{verbatim}
ahirn@37877
   188
   > term_of;
ahirn@37877
   189
      val it = fn : Thm.cterm -> Term.term
ahirn@37877
   190
\end{verbatim}
ahirn@37877
   191
Durch die Umwandlung eines cterms in einen term sieht man die einzelnen Teile des Terms. ''Free`` bedeutet, dass man die Variable \"andern kann.
ahirn@37877
   192
{\footnotesize\begin{verbatim}
ahirn@37877
   193
   > term_of t4;
ahirn@37877
   194
      val it =
ahirn@37877
   195
         Free ("d_d", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
ahirn@37877
   196
         ...: Term.term
ahirn@37877
   197
ahirn@37877
   198
\end{verbatim}
ahirn@37877
   199
In diesem Fall sagt uns das ''Const``, dass die Variable eine Konstante ist, also ein Fixwert ist und immer die selbe Funktion hat.
ahirn@37877
   200
{\footnotesize\begin{verbatim}
ahirn@37877
   201
   > term_of t5;
ahirn@37877
   202
      val it =
ahirn@37877
   203
         Const ("Diff.d_d", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
ahirn@37877
   204
         ... : Term.term
ahirn@37877
   205
\end{verbatim}
ahirn@37877
   206
Sollten verschiedene Teile des Output nicht sichtbar sein, kann die Schriftgr\"osse ge\"andert werden.
ahirn@37877
   207
{\footnotesize\begin{verbatim}
ahirn@37877
   208
   > print_depth;
ahirn@37877
   209
      val it = fn : int -> unit
ahirn@37877
   210
 \end{verbatim}
ahirn@37877
   211
Zuerst gibt man die Schriftgr\"osse ein, danach den term, der gr\"osser werden soll.
ahirn@37877
   212
{\footnotesize\begin{verbatim}
ahirn@37877
   213
   > print_depth 10;
ahirn@37877
   214
      val it = () : unit
ahirn@37877
   215
   > term_of t4;
ahirn@37877
   216
         val it =
ahirn@37877
   217
            Free ("d_d", "[RealDef.real, RealDef.real] => RealDef.real") $
ahirn@37877
   218
                Free ("x", "RealDef.real") $
ahirn@37877
   219
            (Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
ahirn@37877
   220
                Free ("a", "RealDef.real") $ Free ("x", "RealDef.real"))
ahirn@37877
   221
         : Term.term
ahirn@37877
   222
ahirn@37877
   223
   > print_depth 10;
ahirn@37877
   224
         val it = () : unit
ahirn@37877
   225
   > term_of t5;
ahirn@37877
   226
         val it =
ahirn@37877
   227
            Const ("Diff.d_d", "[RealDef.real, RealDef.real] => RealDef.real") $
ahirn@37877
   228
                Free ("x", "RealDef.real") $
ahirn@37877
   229
            (Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
ahirn@37877
   230
                Free ("a", "RealDef.real") $ Free ("x", "RealDef.real"))
ahirn@37877
   231
         : Term.term
ahirn@37877
   232
\end{verbatim}
ahirn@37877
   233
ahirn@37877
   234
Eine andere Variante um den Unterschied der beiden Terme zu sehen ist folgende: 
ahirn@37877
   235
{\footnotesize\begin{verbatim}
ahirn@37877
   236
   > (*-4-*) val thy = Rational.thy;
ahirn@37877
   237
      val thy =
ahirn@37877
   238
         {ProtoPure, CPure, HOL, Set, Typedef, Fun, Product_Type, Lfp, Gfp,
ahirn@37877
   239
         Sum_Type, Relation, Record, Inductive, Transitive_Closure,
ahirn@37877
   240
         Wellfounded_Recursion, NatDef, Nat, NatArith, Divides, Power,
ahirn@37877
   241
         SetInterval, Finite_Set, Equiv, IntDef, Int, Datatype_Universe,
ahirn@37877
   242
         Datatype, Numeral, Bin, IntArith, Wellfounded_Relations, Recdef, IntDiv,
ahirn@37877
   243
         IntPower, NatBin, NatSimprocs, Relation_Power, PreList, List, Map,
ahirn@37877
   244
         Hilbert_Choice, Main, Lubs, PNat, PRat, PReal, RealDef, RealOrd,
ahirn@37877
   245
         RealInt, RealBin, RealArith0, RealArith, RComplete, RealAbs, RealPow,
ahirn@37877
   246
         Ring_and_Field, Complex_Numbers, Real, ListG, Tools, Script, Typefix,
ahirn@37877
   247
         Float, ComplexI, Descript, Atools, Simplify, Poly, Rational}
ahirn@37877
   248
     : Theory.theory
ahirn@37877
   249
   > ((atomty) o term_of o the o (parse thy)) "d_d x (a + x)";
ahirn@37877
   250
 
ahirn@37877
   251
      ***
ahirn@37877
   252
      *** Free (d_d, [real, real] => real)
ahirn@37877
   253
      *** . Free (x, real)
ahirn@37877
   254
      *** . Const (op +, [real, real] => real)
ahirn@37877
   255
      *** . . Free (a, real)
ahirn@37877
   256
      *** . . Free (x, real)
ahirn@37877
   257
      ***
ahirn@37877
   258
 
ahirn@37877
   259
      val it = () : unit
ahirn@37877
   260
ahirn@37877
   261
ahirn@37877
   262
   > (*-5-*) val thy = Diff.thy;
ahirn@37877
   263
      val thy =
ahirn@37877
   264
         {ProtoPure, CPure, HOL, Set, Typedef, Fun, Product_Type, Lfp, Gfp,
ahirn@37877
   265
         Sum_Type, Relation, Record, Inductive, Transitive_Closure,
ahirn@37877
   266
         Wellfounded_Recursion, NatDef, Nat, NatArith, Divides, Power,
ahirn@37877
   267
         SetInterval, Finite_Set, Equiv, IntDef, Int, Datatype_Universe,
ahirn@37877
   268
         Datatype, Numeral, Bin, IntArith, Wellfounded_Relations, Recdef, IntDiv,
ahirn@37877
   269
         IntPower, NatBin, NatSimprocs, Relation_Power, PreList, List, Map,
ahirn@37877
   270
         Hilbert_Choice, Main, Lubs, PNat, PRat, PReal, RealDef, RealOrd,
ahirn@37877
   271
         RealInt, RealBin, RealArith0, RealArith, RComplete, RealAbs, RealPow,
ahirn@37877
   272
         Ring_and_Field, Complex_Numbers, Real, Calculus, Trig, ListG, Tools,
ahirn@37877
   273
         Script, Typefix, Float, ComplexI, Descript, Atools, Simplify, Poly,
ahirn@37877
   274
         Equation, LinEq, Root, RootEq, Rational, RatEq, RootRat, RootRatEq,
ahirn@37877
   275
         PolyEq, LogExp, Diff} : Theory.theory
ahirn@37877
   276
 
ahirn@37877
   277
   > ((atomty) o term_of o the o (parse thy)) "d_d x (a + x)";
ahirn@37877
   278
 
ahirn@37877
   279
      ***
ahirn@37877
   280
      *** Const (Diff.d_d, [real, real] => real)
ahirn@37877
   281
      *** . Free (x, real)
ahirn@37877
   282
      *** . Const (op +, [real, real] => real)
ahirn@37877
   283
      *** . . Free (a, real)
ahirn@37877
   284
      *** . . Free (x, real)
ahirn@37877
   285
      ***
ahirn@37877
   286
 
ahirn@37877
   287
      val it = () : unit
ahirn@37877
   288
\end{verbatim}
ahirn@37877
   289
ahirn@37877
   290
ahirn@37877
   291
{\chapter{''Rewriting``}}
ahirn@37877
   292
{\section{}}
ahirn@37877
   293
Bei Rewriting handelt es sich um die Vereinfachung eines Terms in vielen kleinen Schritten und nach bestimmten Regeln. Der Computer wendet dabei hintereinander verschiedene Rechengesetze an, weil er den Term ansonsten nicht l\"osen kann.
ahirn@37877
   294
ahirn@37877
   295
{\footnotesize\begin{verbatim}
ahirn@37877
   296
> rewrite_;
ahirn@37877
   297
val it = fn
ahirn@37877
   298
:
ahirn@37877
   299
   Theory.theory ->
ahirn@37877
   300
   ((Term.term * Term.term) list -> Term.term * Term.term -> bool) ->
ahirn@37877
   301
   rls ->
ahirn@37877
   302
   bool ->
ahirn@37877
   303
   Thm.thm -> Term.term -> (Term.term * Term.term list) Library.option
ahirn@37877
   304
ahirn@37877
   305
> rewrite;
ahirn@37877
   306
val it = fn
ahirn@37877
   307
:
ahirn@37877
   308
   theory' ->
ahirn@37877
   309
   rew_ord' ->
ahirn@37877
   310
   rls' -> bool -> thm' -> cterm' -> (string * string list) Library.option
ahirn@37877
   311
ahirn@37877
   312
\end{verbatim}
ahirn@37877
   313
\textbf{Versuchen Sie es!} Um zu sehen, wie der Computer vorgeht und welche Rechengesetze er anwendet, zeigen wir Ihnen durch Differenzieren von (a + a * (2 + b)), die einzelnen Schritte. Sie k\"onnen nat\"urlichauch selbst einige Beispiele ausprobieren!
ahirn@37877
   314
ahirn@37877
   315
Zuerst legt man fest, dass es sich um eine Differenzierung handelt.
ahirn@37877
   316
{\footnotesize\begin{verbatim}
ahirn@37877
   317
   > val thy' = "Diff.thy";
ahirn@37877
   318
      val thy' = "Diff.thy" : string
ahirn@37877
   319
\end{verbatim}
ahirn@37877
   320
Dann gibt man die zu l\"osende Rechnung ein.
ahirn@37877
   321
{\footnotesize\begin{verbatim}
ahirn@37877
   322
   > val ct = "d_d x (a + a * (2 + b))";
ahirn@37877
   323
      val ct = "d_d x (a + a * (2 + b))" : string
ahirn@37877
   324
\end{verbatim}
ahirn@37877
   325
Anschließend gibt man bekannt, dass die Summenregel angewandt werden soll.
ahirn@37877
   326
{\footnotesize\begin{verbatim}
ahirn@37877
   327
   > val thm = ("diff_sum","");
ahirn@37877
   328
      val thm = ("diff_sum", "") : string * string
ahirn@37877
   329
\end{verbatim}
ahirn@37877
   330
Schliesslich wird die erste Ableitung angezeigt.
ahirn@37877
   331
{\footnotesize\begin{verbatim}
ahirn@37877
   332
   > val Some (ct,_) = rewrite_inst thy' "tless_true" "eval_rls" true
ahirn@37877
   333
                        [("bdv","x::real")] thm ct;#
ahirn@37877
   334
      val ct = "d_d x a + d_d x (a * (2 + b))" : cterm'
ahirn@37877
   335
\end{verbatim}
ahirn@37877
   336
Will man auch die zweite Ableitung sehen, geht man so vor:
ahirn@37877
   337
{\footnotesize\begin{verbatim}
ahirn@37877
   338
   > val thm = ("diff_prod_const","");
ahirn@37877
   339
      val thm = ("diff_prod_const", "") : string * string
ahirn@37877
   340
\end{verbatim} 
ahirn@37877
   341
Auch die zweite Ableitung wird sichtbar.
ahirn@37877
   342
{\footnotesize\begin{verbatim}
ahirn@37877
   343
   > val Some (ct,_) = rewrite_inst thy' "tless_true" "eval_rls" true
ahirn@37877
   344
                        [("bdv","x::real")] thm ct;#
ahirn@37877
   345
      val ct = "d_d x a + a * d_d x (2 + b)" : cterm'
ahirn@37877
   346
\end{verbatim}
ahirn@37877
   347
alexandra@37882
   348
{\section{M\"oglichkeiten von Rewriting}
alexandra@37882
   349
Es gibt verscheidene Varianten von Rewriting, die alle eine bestimmte Bedeutung haben.
alexandra@37882
   350
\textit{rewrite\_inst} bedeutet, dass die Liste der Terme vor dem Rewriting durch ein ''Theorem`` (ein mathematischer Begriff f\"ur einen Satz) ersetzt wird.
alexandra@37882
   351
{\footnotesize\begin{verbatim}
alexandra@37882
   352
> rewrite_inst;
alexandra@37882
   353
val it = fn
alexandra@37882
   354
:
alexandra@37882
   355
   theory' ->
alexandra@37882
   356
   rew_ord' ->
alexandra@37882
   357
   rls' ->
alexandra@37882
   358
   bool -> 'a -> thm' -> cterm' -> (cterm' * cterm' list) Library.option
alexandra@37882
   359
\end{verbatim}
alexandra@37882
   360
Mit Hilfe von \textit{rewrite\_set} werden Terme, die normalerweise nur mit einem Thoerem vereinfacht dargestellt werden, mit einem ganzen ''rule set`` (=Regelsatz, weiter unten erkl\"art) umgeschrieben.
alexandra@37882
   361
{\footnotesize\begin{verbatim}
alexandra@37882
   362
   > rewrite_set;
alexandra@37882
   363
      val it = fn
alexandra@37882
   364
      : theory' -> bool -> rls' -> cterm' -> (string * string list) Library.option
alexandra@37882
   365
\end{verbatim}
alexandra@37882
   366
\textit{rewrite\_set\_inst} ist eine Kombination der beiden oben genannten M\"oglichkeiten.
alexandra@37882
   367
{\footnotesize\begin{verbatim}
alexandra@37882
   368
   > rewrite_set_inst;
alexandra@37882
   369
      val it = fn
alexandra@37882
   370
      :
alexandra@37882
   371
         theory' ->
alexandra@37882
   372
         bool -> subs' -> rls' -> cterm' -> (string * string list) Library.option
alexandra@37882
   373
\end{verbatim}
alexandra@37882
   374
Wenn man sehen m\"ochte, wie Rewriting bei den einzelnen Theorems funktioniert, kann man dies mit \textit{trace\_rewrite} versuchen.
alexandra@37882
   375
{\footnotesize\begin{verbatim}
alexandra@37882
   376
   > toggle;
alexandra@37882
   377
      val it = fn : bool ref -> bool
alexandra@37882
   378
   > toggle trace_rewrite;
alexandra@37882
   379
      val it = true : bool
alexandra@37882
   380
   > toggle trace_rewrite;
alexandra@37882
   381
      val it = false : bool
alexandra@37882
   382
\end{verbatim}
alexandra@37882
   383
 
alexandra@37882
   384
\section{Rule sets}
alexandra@37882
   385
Einige der oben genannten Varianten von Rewriting beziehen sich nicht nur auf einen Theorem, sondern auf einen ganzen Block von Theorems, die man als Rule set bezeichnet.
alexandra@37882
   386
Dieser wird so lange angewendet, bis ein Element davon f\"ur Rewriting verwendet werden kann. Sollte der Begriff ''terminate`` fehlen, wird das Rule set nicht beendet und l\"auft weiter.
alexandra@37882
   387
Ein Beispiel f\"ur einen Regelsatz ist folgendes:
alexandra@37882
   388
\footnotesize\begin{verbatim}
alexandra@37882
   389
???????????
alexandra@37882
   390
\end{verbatim}
ahirn@37877
   391
alexandra@37882
   392
\footnotesize\begin{verbatim}
alexandra@37882
   393
   > sym;
alexandra@37882
   394
      val it = "?s = ?t ==> ?t = ?s" : Thm.thm
alexandra@37882
   395
   > rearrange_assoc;
alexandra@37882
   396
      val it =
alexandra@37882
   397
         Rls
alexandra@37882
   398
            {id = "rearrange_assoc",
alexandra@37882
   399
               scr = Script (Free ("empty_script", "RealDef.real")),
alexandra@37882
   400
               calc = [],
alexandra@37882
   401
               erls =
alexandra@37882
   402
               Rls
alexandra@37882
   403
                  {id = "e_rls",
alexandra@37882
   404
                     scr = EmptyScr,
alexandra@37882
   405
                     calc = [],
alexandra@37882
   406
                     erls = Erls,
alexandra@37882
   407
                     srls = Erls,
alexandra@37882
   408
                     rules = [],
alexandra@37882
   409
                     rew_ord = ("dummy_ord", fn),
alexandra@37882
   410
                     preconds = []},
alexandra@37882
   411
               srls =
alexandra@37882
   412
               Rls
alexandra@37882
   413
                  {id = "e_rls",
alexandra@37882
   414
                     scr = EmptyScr,
alexandra@37882
   415
                     calc = [],
alexandra@37882
   416
                     erls = Erls,
alexandra@37882
   417
                     srls = Erls,
alexandra@37882
   418
                     rules = [],
alexandra@37882
   419
                     rew_ord = ("dummy_ord", fn),
alexandra@37882
   420
                     preconds = []},
alexandra@37882
   421
               rules =
alexandra@37882
   422
               [Thm ("sym_radd_assoc", "?m1 + (?n1 + ?k1) = ?m1 + ?n1 + ?k1"  [.]),
alexandra@37882
   423
                  Thm
alexandra@37882
   424
                     ("sym_rmult_assoc",
alexandra@37882
   425
                        "?m1 * (?n1 * ?k1) = ?m1 * ?n1 * ?k1"  [.])],
alexandra@37882
   426
               rew_ord = ("e_rew_ord", fn),
alexandra@37882
   427
               preconds = []} : rls
alexandra@37882
   428
\end{verbatim}
ahirn@37877
   429
ahirn@37877
   430
alexandra@37882
   431
\section{Berechnung von Konstanten}
alexandra@37882
   432
Sobald Konstanten in dem Bereich des Subterms sind, k\"onnen sie von einer Funktion berechnet werden:
alexandra@37882
   433
\footnotesize\begin{verbatim}
alexandra@37882
   434
   > calculate;
alexandra@37882
   435
      val it = fn
alexandra@37882
   436
      :
alexandra@37882
   437
         theory' ->
alexandra@37882
   438
         string *
alexandra@37882
   439
         (
alexandra@37882
   440
         string ->
alexandra@37882
   441
         Term.term -> Theory.theory -> (string * Term.term) Library.option) ->
alexandra@37882
   442
         cterm' -> (string * thm') Library.option
ahirn@37877
   443
alexandra@37882
   444
   > calculate_;
alexandra@37882
   445
      val it = fn
alexandra@37882
   446
      :
alexandra@37882
   447
         Theory.theory ->
alexandra@37882
   448
         string *
alexandra@37882
   449
         (
alexandra@37882
   450
         string ->
alexandra@37882
   451
         Term.term -> Theory.theory -> (string * Term.term) Library.option) ->
alexandra@37882
   452
         Term.term -> (Term.term * (string * Thm.thm)) Library.option
alexandra@37882
   453
\end{verbatim}
alexandra@37882
   454
Man bekommt das Ergebnis und die Theorem bezieht sich darauf. Daher sind die folgenden mathematischen Rechnungen m\"oglich:
alexandra@37882
   455
\footnotesize\begin{verbatim}
alexandra@37882
   456
   > calclist;
alexandra@37882
   457
      val it =
alexandra@37882
   458
         [("Vars", ("Tools.Vars", fn)), ("matches", ("Tools.matches", fn)),
alexandra@37882
   459
            ("lhs", ("Tools.lhs", fn)), ("plus", ("op +", fn)),
alexandra@37882
   460
            ("times", ("op *", fn)), ("divide_", ("HOL.divide", fn)),
alexandra@37882
   461
            ("power_", ("Atools.pow", fn)), ("is_const", ("Atools.is'_const", fn)),
alexandra@37882
   462
            ("le", ("op <", fn)), ("leq", ("op <=", fn)),
alexandra@37882
   463
            ("ident", ("Atools.ident", fn)), ("sqrt", ("Root.sqrt", fn)),
alexandra@37882
   464
            ("Test.is_root_free", ("is'_root'_free", fn)),
alexandra@37882
   465
            ("Test.contains_root", ("contains'_root", fn))]
alexandra@37882
   466
      :
alexandra@37882
   467
         (
alexandra@37882
   468
         string *
alexandra@37882
   469
         (
alexandra@37882
   470
         string *
alexandra@37882
   471
         (
alexandra@37882
   472
         string ->
alexandra@37882
   473
         Term.term -> Theory.theory -> (string * Term.term) Library.option))) list
alexandra@37882
   474
\end{verbatim}
alexandra@37882
   475
Diese werden so angewendet:
alexandra@37882
   476
\footnotesize\begin{verbatim}
alexandra@37882
   477
\end{verbatim}
ahirn@37877
   478
ahirn@37877
   479
ahirn@37877
   480
alexandra@37882
   481
\chapter{Termordnung}
alexandra@37882
   482
Die Anordnungen der Begriffe sind unverzichtbar f\"ur den Gebrauch des Umschreibens von normalen Funktionen und von normalen Formeln, die n\"otig sind um passende Modelle für Probleme zu finden.
alexandra@37882
   483
alexandra@37882
   484
\section{Beispiel f\"ur Termordnungen}
alexandra@37882
   485
Es ist nicht unbedeutend eine Verbindung $<$ zu Termen herzustellen, die wirklich eine Ordnung besitzen, wie eine \"ubergehende und antisymmetrische Verbindung. Diese Ordnungen sind selbstaufrufende Bahnordnungen.
alexandra@37882
   486
Hier ein Beispiel:
alexandra@37882
   487
alexandra@37882
   488
{\footnotesize\begin{verbatim}
alexandra@37882
   489
   > sqrt_right;
alexandra@37882
   490
      val it = fn : bool -> Theory.theory -> subst -> Term.term * Term.term -> b       ool
alexandra@37882
   491
   > tless_true;
alexandra@37882
   492
      val it = fn : subst -> Term.term * Term.term -> bool
alexandra@37882
   493
\end{verbatim}
alexandra@37882
   494
alexandra@37882
   495
Das bool Argument gibt Ihnen die M\"oglichkeit die Kontrolle zu den zugeh\"origen Unterordunungen zur\"uck zu verfolgen, damit sich die Unterordnungen, die 'true' sind als strings anzeigen lassen.
alexandra@37882
   496
alexandra@37888
   497
{\section{Geordnetes Rewriting}}
alexandra@37888
   498
Beim Rewriting entstehen Probleme in den meisten elementaren Bereichen. Es gibt ein ''law of commutativity`` das genau solche Probleme mit '+' und '*' verursacht. Diese Probleme können nur durch geordnetes Rewriting gel\"ost werden, da hier ein Term nur umgeschrieben wird, wenn ein kleinerer dadurch entsteht.
alexandra@37888
   499
\paragraph{Versuchen Sie es!} Das geordnete Rewriting ist eine Technik, um ein normales Polynom aus ganzzahligen Termen zu schaffen.
alexandra@37888
   500
Geordnetes Rewriting endet mit Klammern, aber auf Grund der weggelassenen Verbindung.
alexandra@37888
   501
alexandra@37888
   502
alexandra@37888
   503
\chapter{Die Hirarchie von Problemen}
alexandra@37888
   504
\section{''Matching``}
alexandra@37888
   505
Matching ist eine Technik von Rewriting, die von \isac verwendet wird, um ein Problem und den passenden Problemtyp daf\"ur zu finden. Die folgende Funktion, die \"uberpr\"uft, ob matching möglich ist, hat diese Signatur:
alexandra@37888
   506
{\footnotesize\begin{verbatim}
alexandra@37888
   507
> matches;
alexandra@37888
   508
val it = fn : Theory.theory -> Term.term -> Term.term -> bool
alexandra@37888
   509
\end{verbatim}
alexandra@37888
   510
Die folgende Gleichung wird in Operatoren und freie Variablen zerlegt.
alexandra@37888
   511
{\footnotesize\begin{verbatim}
alexandra@37888
   512
> val t = (term_of o the o (parse thy)) "3 * x^^^2 = 1";
alexandra@37888
   513
val t =
alexandra@37888
   514
Const ("op =", "[RealDef.real, RealDef.real] => bool") $
alexandra@37888
   515
(Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   516
Free ("3", "RealDef.real") $
alexandra@37888
   517
(Const
alexandra@37888
   518
("Atools.pow",
alexandra@37888
   519
"[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   520
Free ("x", "RealDef.real") $ Free ("2", " RealDef.real"))) $
alexandra@37888
   521
Free ("1", "RealDef.real") : Term.term
alexandra@37888
   522
\end{verbatim}
alexandra@37888
   523
Nun wird ein Modell erstellt, das sich nicht auf bestimmte Zahlen bezieht, sondern nur eine generelle Zerlegung durchführt.
alexandra@37888
   524
{\footnotesize\begin{verbatim}
alexandra@37888
   525
> val p = (term_of o the o (parse thy)) "a * b^^^2 = c";
alexandra@37888
   526
val p =
alexandra@37888
   527
Const ("op =", "[RealDef.real, RealDef.real] => bool") $
alexandra@37888
   528
(Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   529
Free ("a", "RealDef.real") $
alexandra@37888
   530
(Const
alexandra@37888
   531
("Atools.pow",
alexandra@37888
   532
"[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   533
Free ("b", "RealDef.real") $ Free ("2", "RealDef.real"))) $
alexandra@37888
   534
Free ("c", "RealDef.real") : Term.term
alexandra@37888
   535
\end{verbatim}
alexandra@37888
   536
Dieses Modell enth\"allt sogenannte \textit{scheme variables}.
alexandra@37888
   537
{\footnotesize\begin{verbatim}
alexandra@37888
   538
> atomt p;
alexandra@37888
   539
"*** -------------"
alexandra@37888
   540
"*** Const (op =)"
alexandra@37888
   541
"*** . Const (op *)""*** . . Free (a, )"
alexandra@37888
   542
"*** . . Const (Atools.pow)"
alexandra@37888
   543
"*** . . . Free (b, )"
alexandra@37888
   544
"*** . . . Free (2, )"
alexandra@37888
   545
"*** . Free (c, )"
alexandra@37888
   546
"\n"
alexandra@37888
   547
val it = "\n" : string
alexandra@37888
   548
\end{verbatim}
alexandra@37888
   549
Das Modell wird durch den Befehl free2var erstellt.
alexandra@37888
   550
{\footnotesize\begin{verbatim}
alexandra@37888
   551
> free2var;
alexandra@37888
   552
val it = fn : Term.term -> Term.term
alexandra@37888
   553
> val pat = free2var p;
alexandra@37888
   554
val pat =
alexandra@37888
   555
Const ("op =", "[RealDef.real, RealDef.real] => bool") $
alexandra@37888
   556
(Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   557
Var (("a", 0), "RealDef.real") $
alexandra@37888
   558
(Const
alexandra@37888
   559
("Atools.pow",
alexandra@37888
   560
"[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   561
Var (("b", 0), "RealDef.real") $
alexandra@37888
   562
Free ("2", "RealDef.real"))) $ Var (("c", 0), "RealDef.real")
alexandra@37888
   563
: Term.term
alexandra@37888
   564
> Sign.string_of_term (sign_of thy) pat;
alexandra@37888
   565
val it = "?a * ?b ^^^ 2 = ?c" : string
alexandra@37888
   566
\end{verbatim}
alexandra@37888
   567
Durch atomt pat wird der Term aufgespalten und so in eine Form gebracht, die f\"ur die weiteren Schritte ben\"otigt werden.
alexandra@37888
   568
{\footnotesize\begin{verbatim}
alexandra@37888
   569
> atomt pat;
alexandra@37888
   570
"*** -------------"
alexandra@37888
   571
"*** Const (op =)"
alexandra@37888
   572
"*** . Const (op *)"
alexandra@37888
   573
"*** . . Var ((a, 0), )"
alexandra@37888
   574
"*** . . Const (Atools.pow)"
alexandra@37888
   575
"*** . . . Var ((b, 0), )"
alexandra@37888
   576
"*** . . . Free (2, )"
alexandra@37888
   577
"*** . Var ((c, 0), )"
alexandra@37888
   578
"\n"
alexandra@37888
   579
val it = "\n" : string
alexandra@37888
   580
\end{verbatim}
alexandra@37888
   581
Jetzt kann das Matching f\"ur die beiden vorigen Terme angewendet werden.
alexandra@37888
   582
{\footnotesize\begin{verbatim}
alexandra@37888
   583
> matches thy t pat;
alexandra@37888
   584
val it = true : bool
alexandra@37888
   585
> val t2 = (term_of o the o (parse thy)) "x^^^2 = 1";
alexandra@37888
   586
val t2 =
alexandra@37888
   587
Const ("op =", "[RealDef.real, RealDef.real] => bool") $
alexandra@37888
   588
(Const
alexandra@37888
   589
("Atools.pow",
alexandra@37888
   590
"[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   591
Free ("x", "RealDef.real") $ Free ("2", "RealDef.real")) $
alexandra@37888
   592
Free ("1", "RealDef.real") : Term.term
alexandra@37888
   593
> matches thy t2 pat;
alexandra@37888
   594
val it = false : bool
alexandra@37888
   595
> val pat2 = (term_of o the o (parse thy)) "?u^^^2 = ?v";
alexandra@37888
   596
val pat2 =
alexandra@37888
   597
Const ("op =", "[RealDef.real, RealDef.real] => bool") $
alexandra@37888
   598
(Const
alexandra@37888
   599
("Atools.pow",
alexandra@37888
   600
"[RealDef.real, RealDef.real] => RealDef.real") $
alexandra@37888
   601
Var (("u", 0), "RealDef.real") $ Free ("2", "RealDef.real")) $
alexandra@37888
   602
Var (("v", 0), "RealDef.real") : Term.term
alexandra@37888
   603
> matches thy t2 pat2;
alexandra@37888
   604
val it = true : bool
alexandra@37888
   605
\end{verbatim}
alexandra@37888
   606
alexandra@37888
   607
\section{Zugriff auf die Hierarchie}
alexandra@37888
   608
Man verwendet folgenden Befehl, um sich Zugang zur Hierarchie von Problemtypen zu verschaffen.
alexandra@37888
   609
{\footnotesize\begin{verbatim}
alexandra@37888
   610
> show_ptyps;
alexandra@37888
   611
val it = fn : unit -> unit
alexandra@37888
   612
> show_ptyps();
alexandra@37888
   613
[
alexandra@37888
   614
["e_pblID"],
alexandra@37888
   615
["simplification", "polynomial"],
alexandra@37888
   616
["simplification", "rational"],
alexandra@37888
   617
["vereinfachen", "polynom", "plus_minus"],
alexandra@37888
   618
["vereinfachen", "polynom", "klammer"],
alexandra@37888
   619
["vereinfachen", "polynom", "binom_klammer"],
alexandra@37888
   620
["probe", "polynom"],
alexandra@37888
   621
["probe", "bruch"],
alexandra@37888
   622
["equation", "univariate", "linear"],
alexandra@37888
   623
["equation", "univariate", "root", "sq", "rat"],
alexandra@37888
   624
["equation", "univariate", "root", "normalize"],
alexandra@37888
   625
["equation", "univariate", "rational"],
alexandra@37888
   626
["equation", "univariate", "polynomial", "degree_0"],
alexandra@37888
   627
["equation", "univariate", "polynomial", "degree_1"],
alexandra@37888
   628
["equation", "univariate", "polynomial", "degree_2", "sq_only"],
alexandra@37888
   629
["equation", "univariate", "polynomial", " 
alexandra@37888
   630
 degree_2", "bdv_only"],
alexandra@37888
   631
["equation", "univariate", "polynomial", "degree_2", "pqFormula"],
alexandra@37888
   632
["equation", "univariate", "polynomial", "degree_2", "abcFormula"],
alexandra@37888
   633
["equation", "univariate", "polynomial", "degree_3"],
alexandra@37888
   634
["equation", "univariate", "polynomial", "degree_4"],
alexandra@37888
   635
["equation", "univariate", "polynomial", "normalize"],
alexandra@37888
   636
["equation", "univariate", "expanded", "degree_2"],
alexandra@37888
   637
["equation", "makeFunctionTo"],
alexandra@37888
   638
["function", "derivative_of", "named"],
alexandra@37888
   639
["function", "maximum_of", "on_interval"],
alexandra@37888
   640
["function", "make", "by_explicit"],
alexandra@37888
   641
["function", "make", "by_new_variable"],
alexandra@37888
   642
["function", "integrate", "named"],
alexandra@37888
   643
["tool", "find_values"],
alexandra@37888
   644
["system", "linear", "2x2", "triangular"],
alexandra@37888
   645
["system", "linear", "2x2", "normalize"],
alexandra@37888
   646
["system", "linear", "3x3"],
alexandra@37888
   647
["system", "linear", "4x4", "triangular"],
alexandra@37888
   648
["system", "linear", "4x4", "normalize"],
alexandra@37888
   649
["Biegelinien", "
alexandra@37888
   650
MomentBestimmte"],
alexandra@37888
   651
["Biegelinien", "MomentGegebene"],
alexandra@37888
   652
["Biegelinien", "einfache"],
alexandra@37888
   653
["Biegelinien", "QuerkraftUndMomentBestimmte"],
alexandra@37888
   654
["Biegelinien", "vonBelastungZu"],
alexandra@37888
   655
["Biegelinien", "setzeRandbedingungen"],
alexandra@37888
   656
["Berechnung", "numerischSymbolische"],
alexandra@37888
   657
["test", "equation", "univariate", "linear"],
alexandra@37888
   658
["test", "equation", "univariate", "plain_square"],
alexandra@37888
   659
["test", "equation", "univariate", "polynomial", "degree_two", "pq_formula"],
alexandra@37888
   660
["test", "equation", "univariate", "polynomial", "degree_two", "abc_formula"],
alexandra@37888
   661
["test", "equation", "univariate", "squareroot"],
alexandra@37888
   662
["test", "equation", "univariate", "normalize"],
alexandra@37888
   663
["test", "equation", "univariate", "sqroot-test"]
alexandra@37888
   664
]
alexandra@37888
   665
val it = () : unit
alexandra@37888
   666
\end{verbatim}
alexandra@37888
   667
alexandra@37888
   668
\section{Die passende ''Formalization`` f\"ur den Problemtyp}
alexandra@37888
   669
Eine andere Art des Matching ist es die richtige ''Formalization`` zum jeweiligen Problemtyp zu finden. Wenn es eine ''Formalization`` gibt, dann kann \isac{} selbstst\"andig die Probleme l\"osen.
alexandra@37888
   670
alexandra@37888
   671
\section{Problem - Refinement}
alexandra@37888
   672
Will man die Hierarchie der Probleme aufstellen, so ist darauf zu achten, dass man die verschiedenen Branches so konstruiert, dass das Problem - Refinement automatisch durchgef\"uhrt werden kann. F\"ur diese Anwendung wird die Hierarchie nach folgenden Regeln aufgestellt:
alexandra@37888
   673
$F$ ist eine Formalization und $P$ und $P_i,\:i=1\cdots n$ sind Problemtypen, wobei $P_i$ ein spezieller Problemtyp ist, im Bezug auf $P$, dann gilt:
alexandra@37888
   674
{\small
alexandra@37888
   675
\begin{enumerate}
alexandra@37888
   676
\item wenn für $F$ der Problemtyp $P_i$ passt, dann passt auch $P$
alexandra@37888
   677
\item wenn zu $F$ der Problemtyp P passt, dann sollte es nicht mehr als ein $P_i$ geben, das zu $F$ passt.
alexandra@37888
   678
\item alle $F$ , die zu $P$ passen, m\"ussen auch zu $P_n$ passen
alexandra@37888
   679
\end{enumerate}
alexandra@37888
   680
Zuerst ein Beispiel für die ersten zwei Punkte:
alexandra@37888
   681
{\footnotesize\begin{verbatim}
alexandra@37888
   682
> refine;
alexandra@37888
   683
val it = fn : fmz_ -> pblID -> SpecifyTools.match list
alexandra@37888
   684
> val fmz = ["equality (sqrt(9 + 4 * x)=sqrt x 
alexandra@37888
   685
+ sqrt (5 + x))",
alexandra@37888
   686
# "soleFor x","errorBound (eps=0)",
alexandra@37888
   687
# "solutions L"];
alexandra@37888
   688
val fmz =
alexandra@37888
   689
["equality (sqrt(9 + 4 * x)=sqrt x + sqrt (5 + x))", "soleFor x",
alexandra@37888
   690
"errorBound (eps=0)", ...] : string list
alexandra@37888
   691
> refine fmz ["univariate","equation"];
alexandra@37888
   692
*** pass ["equation","univariate"]
alexandra@37888
   693
*** comp_dts: ??.empty $ soleFor x
alexandra@37888
   694
Exception- ERROR raised
alexandra@37888
   695
\end{verbatim}
alexandra@37888
   696
Wenn die ersten zwei Regeln nicht angewendet werden k\"onnen, wird die dritte verwendet:
alexandra@37888
   697
{\footnotesize\begin{verbatim}
alexandra@37888
   698
> val fmz = ["equality (x + 1 = 2)",
alexandra@37888
   699
# "solveFor x","errorBound (eps=0)",
alexandra@37888
   700
# "solutions L"];
alexandra@37888
   701
val fmz = ["equality (x + 1 = 2)", "solveFor x", "errorBound (eps=0)", ...]
alexandra@37888
   702
: string list
alexandra@37888
   703
> refine fmz ["univariate","equation"];
alexandra@37888
   704
*** pass ["equation","univariate"]
alexandra@37888
   705
*** pass ["equation","univariate","linear"]
alexandra@37888
   706
*** pass ["equation","univariate","root"]
alexandra@37888
   707
*** pass ["equation","univariate","rational"]
alexandra@37888
   708
*** pass ["equation","univariate","polynomial" ]
alexandra@37888
   709
*** pass ["equation","univariate","polynomial","degree_0"]
alexandra@37888
   710
*** pass ["equation","univariate","polynomial","degree_1"]
alexandra@37888
   711
*** pass ["equation","univariate","polynomial","degree_2"]
alexandra@37888
   712
*** pass ["equation","univariate","polynomial","degree_3"]
alexandra@37888
   713
*** pass ["equation","univariate","polynomial","degree_4"]
alexandra@37888
   714
*** pass ["equation","univariate","polynomial","normalize"]
alexandra@37888
   715
val it =
alexandra@37888
   716
[Matches
alexandra@37888
   717
(["univariate", "equation"],
alexandra@37888
   718
{Find = [Correct "solutions L"], With = [...], ...}),
alexandra@37888
   719
NoMatch (["linear", "univariate", ...], {Find = [...], ...}),
alexandra@37888
   720
NoMatch (["root", ...], ...), ...] : SpecifyTools.match list
alexandra@37888
   721
\end{verbatim}
alexandra@37888
   722
Der Problemtyp $P_n$ verwandelt x + 1 = 2 in die normale Form -1 + x = 0. Diese suche nach der jeweiligen Problemhierarchie kann mit Hilfe von einem ''proof state`` durchgeführt werden (siehe nächstes Kapitel).
alexandra@37882
   723
alexandra@37887
   724
alexandra@37882
   725
\chapter{Methods}
alexandra@37882
   726
Methods werden dazu verwendet, Probleme von \texttt{type} zu l\"osen. Sie sind in einer anderen Programmiersprache beschrieben. Die Sprache sieht einfach aus, hat aber im Hintergrund einen enormen Pr\"ufauffwand. So muss sich der Programmierer nicht mit technischen Details befassen, gleichzeitig k\"onnen aber auch keine falschen Anweisungen eingegeben werden.
alexandra@37882
   727
\section{Der ''Syntax`` des Scriptes}
alexandra@37882
   728
Syntax beschreibt den Zusammenhang der einzelnen Zeichen und Zeichenfolgen mit den Theorien.
alexandra@37882
   729
Er kann so definiert werden:
alexandra@37882
   730
\begin{tabbing}
alexandra@37882
   731
123\=123\=expr ::=\=$|\;\;$\=\kill
alexandra@37882
   732
\>script ::= {\tt Script} id arg$\,^*$ = body\\
alexandra@37882
   733
\>\>arg ::= id $\;|\;\;($ ( id :: type ) $)$\\
alexandra@37882
   734
\>\>body ::= expr\\
alexandra@37882
   735
\>\>expr ::= \>\>{\tt let} id = expr $($ ; id = expr$)^*$ {\tt in} expr\\
alexandra@37882
   736
\>\>\>$|\;$\>{\tt if} prop {\tt then} expr {\tt else} expr\\
alexandra@37882
   737
\>\>\>$|\;$\>listexpr\\
alexandra@37882
   738
\>\>\>$|\;$\>id\\
alexandra@37882
   739
\>\>\>$|\;$\>seqex id\\
alexandra@37882
   740
\>\>seqex ::= \>\>{\tt While} prop {\tt Do} seqex\\
alexandra@37882
   741
\>\>\>$|\;$\>{\tt Repeat} seqex\\
alexandra@37882
   742
\>\>\>$|\;$\>{\tt Try} seqex\\
alexandra@37882
   743
\>\>\>$|\;$\>seqex {\tt Or} seqex\\
alexandra@37882
   744
\>\>\>$|\;$\>seqex {\tt @@} seqex\\
alexandra@37882
   745
\>\>\>$|\;$\>tac $($ id $|$ listexpr $)^*$\\
alexandra@37882
   746
\>\>type ::= id\\
alexandra@37882
   747
\>\>tac ::= id
alexandra@37882
   748
\end{tabbing}}
ahirn@37877
   749
alexandra@37887
   750
\section{\"Uberpr\"ufung der Auswertung}
alexandra@37887
   751
Das Kontrollsystem arbeitet mit den folgenden Script-Ausdr\"ucken, die {\it tacticals} genannt werden:
alexandra@37887
   752
\begin{description}
alexandra@37887
   753
\item{{\tt while} prop {\tt Do} expr id} 
alexandra@37887
   754
\item{{\tt if} prop {\tt then} expr {\tt else} expr}
alexandra@37887
   755
\end{description}
alexandra@37887
   756
W\"ahrend die genannten Bezeichnungen das Kontrollsystem durch Auswertung der Formeln ausl\"osen, h\"angen die anderen von der Anwendbarkeit der Formel in den entsprechenden Unterbegriffen ab:
alexandra@37887
   757
\begin{description}
alexandra@37887
   758
\item{{\tt Repeat} expr id}
alexandra@37887
   759
\item{{\tt Try} expr id}
alexandra@37887
   760
\item{expr {\tt Or} expr id}
alexandra@37887
   761
\item{expr {\tt @@} expr id}
alexandra@37887
   762
\item xxx
alexandra@37887
   763
\end{description}
alexandra@37887
   764
alexandra@37887
   765
alexandra@37888
   766
alexandra@37888
   767
\chapter{Befehle von \isac{}}
alexandra@37889
   768
In diesem Kapitel werden alle schon zur Verf\"ugung stehenden Schritte aufgelistet. Diese Liste kann sich auf Grund von weiteren Entwicklungen von \isac{} noch \"andern.\
alexandra@37889
   769
\newline \textbf{Init\_Proof\_Hid (dialogmode, formalization, specifictaion} gibt die eingegebenen Befehle weiter an die mathematic engine, wobei die beiden letzten Begriffe die Beispiele automatisch speichern. Es ist nicht vorgesehen, dass der Sch\"uler tactic verwendet.\
alexandra@37889
   770
\newline \textbf{Init\_Proof} bildet mit einem ''proof tree`` ein leeres Modell.\
alexandra@37889
   771
\newline \textbf{Model\_Problem problem} bestimmt ein problemtype, das wom\"oglich in der ''hierachy`` gefunden wurde, und verwendet es f\"u das Umformen.\
alexandra@37889
   772
\newline \textbf{Add\_Given, Add\_Find, Add\_Relation formula} f\"ugt eine Formel in ein bestimmtes Feld eines Modells ein. Dies ist notwendig, solange noch kein Objekt f\"ur den Benutzer vorhanden ist, in dem man die Formel eingeben kann, und nicht die gew\"unschte tactic und Formel von einer Liste w\"ahlen will.\
alexandra@37889
   773
\newline \textbf{Specify\_Theorie theory, Specify\_Problem proble, Specify\_Method method} gibt das entsprechende Element des Basiswissens an.\
alexandra@37889
   774
\newline \textbf{Refine\_Problem problem} sucht nach einem Problem in der hierachy, das auf das vorhandene zutrifft.\
alexandra@37889
   775
\newline \textbf{Apply\_Method method} beendet das Modell und die Beschreibung. Danach wird die L\"osungmeldung ge\"offnet.\
alexandra@37889
   776
\newline \textbf{Free\_Solve} beginnt eine L\"osungsmeldung ohne die Hilfe eine method.\
alexandra@37889
   777
\newline \textbf{Rewrite theorem} bef\"ordert ein theorem in die aktuelle Formel und wandelt es demenetsprechend um. Wenn dies nicht m\"oglich ist, kommt eine Meldung mit ''error``.\
alexandra@37889
   778
\newline \textbf{Rewrite\_Asm theorem} hat die gleiche Funktion wie Rewrite, speichert jedoch eine endg\"ultige Vorraussetzung des Theorems, anstatt diese zu sch\"atzen.\
alexandra@37889
   779
\newline \textbf{Rewrite\_Set ruleset} hat \"ahnliche Funktionen wie Rewrite, gilt aber f\"ur einen ganzen Satz von Theorems, dem rule set.\
alexandra@37889
   780
\newline \textbf{Rewrite\_Inst (substitution, theorem), Rewrite\_Set\_Inst (substitution, rule set)} ist vergleichbar mit besonderen tactics, ersetzt aber Konstanten in der Theorem, bevor es zu einer Anwendung kommt.\
alexandra@37889
   781
\newline \textbf{Calculate operation} berechnet das Ergebnis der Eingabe mit der aktuellen Formel (plus, minus, times, cancel, pow, sqrt).\
alexandra@37889
   782
\newline \textbf{Substitute substitution} f\"ugt substitution der momentanen Formel hinzu und wandelt es um.\
alexandra@37889
   783
\newline \textbf{Take formula} startet eine neue Reihe von Rechnungen in den Formeln, wo sich schon eine andere Rechnung befindet.\
alexandra@37889
   784
\newline \textbf{Subproblem (theory, problem)} beginnt ein subproblem innerhalb einer Rechnung.\
alexandra@37889
   785
\newline \textbf{Function formula} ruft eine Funktion auf, in der der Name in der Formel enthalten ist. ???????\
alexandra@37889
   786
\newline \textbf{Split\_And, Conclude\_And, Split\_Or, Conclude\_Or, Begin\_Trans, End\_Trans, Begin\_Sequ, End\_Sequ, Split\_Intersect, End\_Intersect} betreffen den Bau einzelner branches des proof trees. Normalerweise werden sie vom dialog guide verdr\"angt.\
alexandra@37889
   787
\newline \textbf{Check\_elementwise assumption} wird in Bezug auf die aktuelle Formel verwendet, die Elemente in einer Liste enth\"alt.\
alexandra@37889
   788
\newline \textbf{Or\_to\_List} wandelt eine Verbindung von Gleichungen in eine Liste von Gleichungen um.\
alexandra@37889
   789
\newline \textbf{Check\_postcond:} \"uberpr\"uft die momentane Formel im Bezug auf die Nachbedinung beim beenden des subproblem.\
alexandra@37889
   790
\newline \textbf{End\_Proof} beendet eine \"Uberpr\"ufung und gibt erst dann ein Ergebnis aus, wenn Check\_postcond erfolgreich abgeschlossen wurde.
alexandra@37888
   791
alexandra@37889
   792
\section{Die Funktionsweise der mathematic engine}
alexandra@37889
   793
Ein proof (= Beweis) wird in der mathematic engine {\tt me} von der tactic {\tt Init\_Proof} gestartet und wird wechselwirkend mit anderen tactics vornagebracht. Auf den input (= das, was eingegeben wurde) einzelner tactics folgt eine Formel, die von der {\tt me} ausgegeben wird, und die darauf folgende tactic gilt. Der proof ist beendet, sobald die {\tt me} {\tt End\_Proof} als n\"achste tactic vorschl\"agt.
alexandra@37889
   794
\newline Im Anschluss werden Sie einen Rechenbeweis sehen, der von der L\"osung einer Gleichung (= equation) handelt, bei der diese automatisch differenziert wird. 
alexandra@37889
   795
{\footnotesize\begin{verbatim}
alexandra@37889
   796
??????????????????????????????????????????????????????????????????????????????????   
alexandra@37888
   797
alexandra@37889
   798
ML> val fmz = ["equality ((x+#1)*(x+#2)=x^^^#2+#8)","solveFor x",
ahirn@37877
   799
                  "errorBound (eps=#0)","solutions L"];
ahirn@37877
   800
   val fmz =
ahirn@37877
   801
     ["equality ((x+#1)*(x+#2)=x^^^#2+#8)","solveFor x","errorBound (eps=#0)",
ahirn@37877
   802
      "solutions L"] : string list
ahirn@37877
   803
   ML>
ahirn@37877
   804
   ML> val spec as (dom, pbt, met) = ("SqRoot.thy",["univariate","equation"],
ahirn@37877
   805
                                 ("SqRoot.thy","no_met"));
ahirn@37877
   806
   val dom = "SqRoot.thy" : string
ahirn@37877
   807
   val pbt = ["univariate","equation"] : string list
ahirn@37877
   808
   val met = ("SqRoot.thy","no_met") : string * string
alexandra@37889
   809
\end{verbatim}
ahirn@37877
   810
alexandra@37889
   811
\section{Der Beginn einer Rechnung}
alexandra@37889
   812
Um einen neuen proof beginnen zu k\"onnen, werden folgende Schritte durchgef\"uhrt:
alexandra@37889
   813
Der proof state wird von einem proof tree und einer position ausgegeben. Beide sind zu Beginn leer. Die tactic {\tt Init\_Proof} ist, wie alle anderen tactics auch, an einen string gekoppelt.
alexandra@37889
   814
\footnotesize\begin{verbatim}
alexandra@37889
   815
???????????????????????????????????????????????????????????????????????????????????????????? 
alexandra@37889
   816
ML>  val (mID,m) = ("Init_Proof",Init_Proof (fmz, (dom,pbt,met)));
ahirn@37877
   817
   val mID = "Init_Proof" : string
ahirn@37877
   818
   val m =
ahirn@37877
   819
     Init_Proof
ahirn@37877
   820
       (["equality ((x+#1)*(x+#2)=x^^^#2+#8)","solveFor x","errorBound (eps=#0)",
ahirn@37877
   821
         "solutions L"],("SqRoot.thy",[#,#],(#,#))) : mstep
ahirn@37877
   822
   ML>
ahirn@37877
   823
   ML>  val (p,_,f,nxt,_,pt) = me (mID,m) e_pos' c EmptyPtree;
ahirn@37877
   824
   val p = ([],Pbl) : pos'
ahirn@37877
   825
   val f = Form' (PpcKF (0,EdUndef,0,Nundef,(#,#))) : mout
ahirn@37877
   826
   val nxt = ("Refine_Tacitly",Refine_Tacitly ["univariate","equation"])
ahirn@37877
   827
     : string * mstep
ahirn@37877
   828
   val pt =
ahirn@37877
   829
     Nd
ahirn@37877
   830
       (PblObj
ahirn@37877
   831
          {branch=#,cell=#,env=#,loc=#,meth=#,model=#,origin=#,ostate=#,probl=#,
ahirn@37877
   832
           result=#,spec=#},[]) : ptree
alexandra@37889
   833
\end{verbatim}
alexandra@37889
   834
Die mathematics engine gibt etwas mit dem type {\tt mout} aus, was in unserem Fall ein Problem darstellt. Sobald die Schriftgr\"osse ge\"andert wird, m\"usste dieses jedoch gel\"ost sein.
alexandra@37889
   835
\footnotesize\begin{verbatim}
alexandra@37889
   836
?????????????????????????????????????????????????????????????????????????????????????????????
ahirn@37877
   837
   ML> Compiler.Control.Print.printDepth:=8; (*4 default*)
ahirn@37877
   838
   val it = () : unit
ahirn@37877
   839
   ML>
ahirn@37877
   840
   ML> f;
ahirn@37877
   841
   val it =
ahirn@37877
   842
     Form'
ahirn@37877
   843
       (PpcKF
ahirn@37877
   844
          (0,EdUndef,0,Nundef,
ahirn@37877
   845
           (Problem [],
ahirn@37877
   846
            {Find=[Incompl "solutions []"],
ahirn@37877
   847
             Given=[Incompl "equality",Incompl "solveFor"],Relate=[],
ahirn@37877
   848
             Where=[False "matches (?a = ?b) e_"],With=[]}))) : mout
alexandra@37889
   849
\end{verbatim}
ahirn@37877
   850
{\footnotesize\begin{verbatim}
alexandra@37889
   851
?????????????????????????????????????????????????????????????????????????????????????????????
ahirn@37877
   852
   ML>  nxt;
ahirn@37877
   853
   val it = ("Refine_Tacitly",Refine_Tacitly ["univariate","equation"])
ahirn@37877
   854
     : string * mstep
ahirn@37877
   855
   ML>
ahirn@37877
   856
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   857
   val nxt = ("Model_Problem",Model_Problem ["normalize","univariate","equation"])
ahirn@37877
   858
     : string * mstep
ahirn@37877
   859
   ML>
ahirn@37877
   860
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
alexandra@37889
   861
\end{verbatim}
ahirn@37877
   862
alexandra@37889
   863
\section{The phase of modeling}
alexandra@37889
   864
Dieses Kapitel besch\"aftigt sich mit dem input der Einzelheiten bei einem Problem. Die {\tt me} kann dabei helfen, wenn man die formalization durch {\tt Init\_Proof} darauf hinweist. Normalerweise weiss die mathematic engine die n\"achste gute tactic.
ahirn@37877
   865
{\footnotesize\begin{verbatim}
alexandra@37889
   866
?????????????????????????????????????????????????????????????????????????????????????????????
ahirn@37877
   867
   ML>  nxt;
ahirn@37877
   868
   val it =
ahirn@37877
   869
     ("Add_Given",Add_Given "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)")
ahirn@37877
   870
     : string * mstep
ahirn@37877
   871
   ML>
ahirn@37877
   872
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   873
   val nxt = ("Add_Given",Add_Given "solveFor x") : string * mstep
ahirn@37877
   874
   ML>
ahirn@37877
   875
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   876
   val nxt = ("Add_Find",Add_Find "solutions L") : string * mstep
ahirn@37877
   877
   ML>
ahirn@37877
   878
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt; 
ahirn@37877
   879
   val f = Form' (PpcKF (0,EdUndef,0,Nundef,(#,#))) : mout
alexandra@37889
   880
\end{verbatim}
ahirn@37877
   881
{\footnotesize\begin{verbatim}
alexandra@37889
   882
?????????????????????????????????????????????????????????????????????????????????????????????
ahirn@37877
   883
   ML>  Compiler.Control.Print.printDepth:=8;
ahirn@37877
   884
   ML>  f;
ahirn@37877
   885
   val it =
ahirn@37877
   886
     Form'
ahirn@37877
   887
       (PpcKF
ahirn@37877
   888
          (0,EdUndef,0,Nundef,
ahirn@37877
   889
           (Problem [],
ahirn@37877
   890
            {Find=[Correct "solutions L"],
ahirn@37877
   891
             Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
ahirn@37877
   892
                    Correct "solveFor x"],Relate=[],Where=[],With=[]}))) : mout
alexandra@37889
   893
\end{verbatim}
ahirn@37877
   894
alexandra@37889
   895
alexandra@37889
   896
\section{The phase of specification}
alexandra@37889
   897
Diese phase liefert eindeutige Bestimmungen einer Domäne, den problem type und die method damit man sie verwenden kann. F\"ur gew\"ohnlich wird die Suche nach dem richtigen problem type unterst\"utzt. Dazu sind zwei tactics verwendbar: {\tt Specify\_Problem} entwickelt ein Feedback, wie ein problem type bei dem jetzigen Problem zusammenpasst und {\tt Refine\_Problem} stellt Hilfe durch das System bereit, falls der Benutzer die \"Ubersicht verliert.
ahirn@37877
   898
{\footnotesize\begin{verbatim}
alexandra@37889
   899
??????????????????????????????????????????????????????????????????????????????????????????
alexandra@37889
   900
   ML> nxt;
ahirn@37877
   901
   val it = ("Specify_Domain",Specify_Domain "SqRoot.thy") : string * mstep
ahirn@37877
   902
   ML>
ahirn@37877
   903
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   904
   val nxt =
ahirn@37877
   905
     ("Specify_Problem",Specify_Problem ["normalize","univariate","equation"])
ahirn@37877
   906
     : string * mstep
ahirn@37877
   907
   val pt =
ahirn@37877
   908
     Nd
ahirn@37877
   909
       (PblObj
ahirn@37877
   910
          {branch=#,cell=#,env=#,loc=#,meth=#,model=#,origin=#,ostate=#,probl=#,
ahirn@37877
   911
              result=#,spec=#},[]) : ptree
alexandra@37889
   912
\end{verbatim}
alexandra@37889
   913
Die {\tt me} erkennt den richtigen Problem type und arbeitet so weiter:
ahirn@37877
   914
{\footnotesize\begin{verbatim}
alexandra@37889
   915
?????????????????????????????????????????????????????????????????????????????????????????
ahirn@37877
   916
   ML> val nxt = ("Specify_Problem",
ahirn@37877
   917
               Specify_Problem ["polynomial","univariate","equation"]);
ahirn@37877
   918
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   919
   val f = Form' (PpcKF (0,EdUndef,0,Nundef,(#,#))) : mout
ahirn@37877
   920
   val nxt =
ahirn@37877
   921
     ("Refine_Problem",Refine_Problem ["normalize","univariate","equation"])
ahirn@37877
   922
     : string * mstep
ahirn@37877
   923
   ML>
ahirn@37877
   924
   ML> val nxt = ("Specify_Problem",
ahirn@37877
   925
               Specify_Problem ["linear","univariate","equation"]);
ahirn@37877
   926
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   927
   val f =
ahirn@37877
   928
     Form'
ahirn@37877
   929
       (PpcKF
ahirn@37877
   930
          (0,EdUndef,0,Nundef,
ahirn@37877
   931
           (Problem ["linear","univariate","equation"],
ahirn@37877
   932
            {Find=[Correct "solutions L"],
ahirn@37877
   933
             Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
ahirn@37877
   934
                    Correct "solveFor x"],Relate=[],
ahirn@37877
   935
             Where=[False
ahirn@37877
   936
                    "matches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
ahirn@37877
   937
             With=[]}))) : mout 
alexandra@37889
   938
\end{verbatim}
alexandra@37889
   939
Wir nehmen wieder an, dass der dialog guide die n\"achsten tactics, veranlasst von der mathematic engine, versteckt und der Sch\"uler Hilfe ben\"otigt. Dann muss {\tt Refine\_Problem} angewandt werden. Dieser Befehl findet immer den richtigen Weg, wenn man es auf den problem type bezieht [''univariate``, ''equation``].
ahirn@37877
   940
{\footnotesize\begin{verbatim}
alexandra@37889
   941
????????????????????????????????????????????????????????????????????????????????????????????
ahirn@37877
   942
   ML> val nxt = ("Refine_Problem",
ahirn@37877
   943
                  Refine_Problem ["linear","univariate","equation
ahirn@37877
   944
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   945
   val f = Problems (RefinedKF [NoMatch #]) : mout
ahirn@37877
   946
   ML>
ahirn@37877
   947
   ML>  Compiler.Control.Print.printDepth:=9;f;Compiler.Control.Print.printDepth:=4;
ahirn@37877
   948
   val f =
ahirn@37877
   949
     Problems
ahirn@37877
   950
       (RefinedKF
ahirn@37877
   951
          [NoMatch
ahirn@37877
   952
             (["linear","univariate","equation"],
ahirn@37877
   953
              {Find=[Correct "solutions L"],
ahirn@37877
   954
               Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
ahirn@37877
   955
                      Correct "solveFor x"],Relate=[],
ahirn@37877
   956
               Where=[False
ahirn@37877
   957
                     "matches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
ahirn@37877
   958
               With=[]})]) : mout
ahirn@37877
   959
   ML>
ahirn@37877
   960
   ML> val nxt = ("Refine_Problem",Refine_Problem ["univariate","equation"]);
ahirn@37877
   961
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
   962
   val f =
ahirn@37877
   963
     Problems
ahirn@37877
   964
       (RefinedKF [Matches #,NoMatch #,NoMatch #,NoMatch #,NoMatch #,Matches #])
ahirn@37877
   965
     : mout
ahirn@37877
   966
   ML>
ahirn@37877
   967
   ML>
ahirn@37877
   968
   ML>  Compiler.Control.Print.printDepth:=9;f;Compiler.Control.Print.printDepth:=4;
ahirn@37877
   969
   val f =
ahirn@37877
   970
     Problems
ahirn@37877
   971
       (RefinedKF
ahirn@37877
   972
          [Matches
ahirn@37877
   973
             (["univariate","equation"],
ahirn@37877
   974
              {Find=[Correct "solutions L"],
ahirn@37877
   975
               Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
ahirn@37877
   976
                      Correct "solveFor x"],Relate=[],
ahirn@37877
   977
               Where=[Correct
ahirn@37877
   978
               With=[]}),
ahirn@37877
   979
           NoMatch
ahirn@37877
   980
             (["linear","univariate","equation"],
ahirn@37877
   981
              {Find=[Correct "solutions L"],
ahirn@37877
   982
               Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
ahirn@37877
   983
                      Correct "solveFor x"],Relate=[],
ahirn@37877
   984
               Where=[False
ahirn@37877
   985
                      "matches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
ahirn@37877
   986
                  With=[]}),
ahirn@37877
   987
           NoMatch
ahirn@37877
   988
             ...
ahirn@37877
   989
             ...   
ahirn@37877
   990
           Matches
ahirn@37877
   991
             (["normalize","univariate","equation"],
ahirn@37877
   992
              {Find=[Correct "solutions L"],
ahirn@37877
   993
               Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
ahirn@37877
   994
                      Correct "solveFor x"],Relate=[],Where=[],With=[]})]) : mout
alexandra@37889
   995
\end{verbatim}
alexandra@37889
   996
Die tactic {\tt Refine\_Problem} wandelt alle matches wieder in problem types um und sucht in der problem hierachy weiter.
ahirn@37877
   997
alexandra@37889
   998
alexandra@37889
   999
\section{The phase of solving}
alexandra@37889
  1000
Diese phase beginnt mit dem Aufruf einer method, die eine normale form innarhalb einer tactic ausf\"uhrt: {\tt Rewrite rnorm\_equation\_add} and {\tt Rewrite\_Set SqRoot\_simplify}:
ahirn@37877
  1001
{\footnotesize\begin{verbatim} 
ahirn@37877
  1002
   ML> nxt;
ahirn@37877
  1003
   val it = ("Apply_Method",Apply_Method ("SqRoot.thy","norm_univar_equation"))
ahirn@37877
  1004
     : string * mstep
ahirn@37877
  1005
   ML>
ahirn@37877
  1006
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
  1007
   val f =
ahirn@37877
  1008
     Form' (FormKF (~1,EdUndef,1,Nundef,"(x + #1) * (x + #2) = x ^^^ #2 + #8"))
ahirn@37877
  1009
   val nxt =
ahirn@37877
  1010
     ("Rewrite", Rewrite
ahirn@37877
  1011
        ("rnorm_equation_add","~ ?b =!= #0 ==> (?a = ?b) = (?a + #-1 * ?b = #0)"))
ahirn@37877
  1012
   ML>
ahirn@37877
  1013
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
  1014
   val f =
ahirn@37877
  1015
     Form' (FormKF (~1,EdUndef,1,Nundef,
ahirn@37877
  1016
           "(x + #1) * (x + #2) + #-1 * (x ^^^ #2 + #8) = #0")) : mout
ahirn@37877
  1017
   val nxt = ("Rewrite_Set",Rewrite_Set "SqRoot_simplify") : string * mstep
ahirn@37877
  1018
   ML>
ahirn@37877
  1019
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
  1020
   val f = Form' (FormKF (~1,EdUndef,1,Nundef,"#-6 + #3 * x = #0")) : mout
ahirn@37877
  1021
   val nxt = ("Subproblem",Subproblem ("SqRoot.thy",[#,#])) : string * mstep
alexandra@37889
  1022
\end{verbatim}
alexandra@37889
  1023
Die Formel $-6 + 3 * x = 0$ ist die Eingabe eine subproblems, das wiederum gebraucht wird, um die Gleichungsart zu erkennen und die entsprechende method auszuf\"uhren:
ahirn@37877
  1024
{\footnotesize\begin{verbatim}
ahirn@37877
  1025
   ML> nxt;
ahirn@37877
  1026
   val it = ("Subproblem",Subproblem ("SqRoot.thy",["univariate","equation"]))
ahirn@37877
  1027
   ML>   
ahirn@37877
  1028
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
  1029
   val f =
ahirn@37877
  1030
     Form' (FormKF
ahirn@37877
  1031
          (~1,EdUndef,1,Nundef,"Subproblem (SqRoot.thy, [univariate, equation])"))
ahirn@37877
  1032
     : mout
ahirn@37877
  1033
   val nxt = ("Refine_Tacitly",Refine_Tacitly ["univariate","equation"])
ahirn@37877
  1034
   ML>
ahirn@37877
  1035
   ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
  1036
   val nxt = ("Model_Problem",Model_Problem ["linear","univariate","equation"])
alexandra@37889
  1037
\end{verbatim}
alexandra@37889
  1038
{\tt Refine [''univariate``, ''equation``]} sucht die passende Gleichungsart aus der problem hierachy heraus, welche man mit {\tt Model\_Problem [''linear``, ''univariate``, ''equation``]} \"uber das System ansehen kann.
alexandra@37889
  1039
Nun folgt erneut die phase of modeling und die phase of specification.
ahirn@37877
  1040
alexandra@37889
  1041
\section{The final phase: \"Uberpr\"ufung der ''post-condition``}
alexandra@37889
  1042
Die gezeigten problems, die durch \isac{} gel\"ost wurden, sind so genannte 'example construction problems'. Das massivste Merkmal solcher problems ist die post-condition. Im Umgang mit dieser gibt es in diesem Zusammenhang noch offene Fragen.
alexandra@37889
  1043
Dadurch wird die post-condition im folgenden Beispiel als problem und subproblem erw\"ahnt.
ahirn@37877
  1044
{\footnotesize\begin{verbatim}
ahirn@37877
  1045
   ML> nxt;
ahirn@37877
  1046
   val it = ("Check_Postcond",Check_Postcond ["linear","univariate","equation"])
ahirn@37877
  1047
   ML>
ahirn@37877
  1048
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
  1049
   val f = Form' (FormKF (~1,EdUndef,1,Nundef,"[x = #2]")) : mout
ahirn@37877
  1050
   val nxt =
ahirn@37877
  1051
     ("Check_Postcond",Check_Postcond ["normalize","univariate","equation"])
ahirn@37877
  1052
   ML>
ahirn@37877
  1053
   ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
ahirn@37877
  1054
   val f = Form' (FormKF (~1,EdUndef,0,Nundef,"[x = #2]")) : mout
ahirn@37877
  1055
   val nxt = ("End_Proof'",End_Proof') : string * mstep
alexandra@37889
  1056
\end{verbatim}
alexandra@37889
  1057
Die tactic {\tt End\_Proof'} bedeutet, dass der proof erflogreich beendet wurde.\\
ahirn@37877
  1058
alexandra@37889
  1059
{\it Die tactics, die vom System vorgeschlagen werden, m\"ussen vom Benutzer nicht angewendet werden. Er kann selbstverst\"andlich auch andere tactics verwenden und das System wird melden, ob dieser Befehl zutreffend ist oder nicht. Man sollte unbedingt selbst verschiedene Beispiele ausprobieren!}
ahirn@37877
  1060
ahirn@37877
  1061
alexandra@37889
  1062
\part{Systematische Beschreibung}
ahirn@37877
  1063
alexandra@37889
  1064
\chapter{Die Struktur des Grundlagenwissens}
ahirn@37877
  1065
alexandra@37889
  1066
\section{Taktiken und Daten}
alexandra@37889
  1067
Zuerst betrachten wir das ME von außen. Wir sehen uns Taktiken und an und verbinden sie mit unserem Grundwissen (KB). Im Bezug auf das KB befassen wir uns mit den kleinsten Teilchen, die von den Autoren des KB sehr genau durchgef\"uhrt werden m\"ussen.
alexandra@37889
  1068
Diese Teile sind in alphabetischer Anordnung in Tab.\ref{kb-items} auf Seite \pageref{kb-items} aufgelistet.
ahirn@37877
  1069
ahirn@37877
  1070
{\begin{table}[h]
alexandra@37889
  1071
\caption{Kleinste Teilchen des KB} \label{kb-items}
ahirn@37877
  1072
%\tabcolsep=0.3mm
ahirn@37877
  1073
\begin{center}
ahirn@37877
  1074
\def\arraystretch{1.0}
ahirn@37877
  1075
\begin{tabular}{lp{9.0cm}}
alexandra@37889
  1076
Abk\"urzung & Beschreibung \\
ahirn@37877
  1077
\hline
ahirn@37877
  1078
&\\
ahirn@37877
  1079
{\it calc\_list}
alexandra@37889
  1080
& gesammelte Liste von allen ausgewerteten Funktionen {\it eval\_fn}\\
ahirn@37877
  1081
{\it eval\_fn}
alexandra@37889
  1082
& ausgewertete Funktionen f\"r Zahlen und f\"ur Eigenschaften, die in SML kodiert sind\\
alexandra@37889
  1083
{\it eval\_rls }
alexandra@37889
  1084
& Regelsatz {\it rls} f\"ur einfache Ausdr\"ucke mit {\it eval\_fn}s\\
ahirn@37877
  1085
{\it fmz}
alexandra@37889
  1086
& Formalisierung, d.h. eine sehr geringe Darstellung von einem Beispiel \\
ahirn@37877
  1087
{\it met}
alexandra@37889
  1088
& eine Methode d.h. eine Datenstruktur, die alle Informationen zum L\"osen einer Phase enth\"alt ({\it rew\_ord}, {\it scr}, etc.)\\
ahirn@37877
  1089
{\it metID}
alexandra@37889
  1090
& bezieht sich auf {\it met}\\
ahirn@37877
  1091
{\it op}
alexandra@37889
  1092
& ein Operator, der der Schl\"ussel zu {\it eval\_fn} in einer {\it calc\_list} ist \\
ahirn@37877
  1093
{\it pbl}
alexandra@37889
  1094
& Problem d.h. der Knotenpunkt in der Hierarchie von Problemen\\
ahirn@37877
  1095
{\it pblID}
alexandra@37889
  1096
& bezieht sich auf {\it pbl}\\
ahirn@37877
  1097
{\it rew\_ord}
alexandra@37889
  1098
& Anordnung beim Rewriting\\
ahirn@37877
  1099
{\it rls}
alexandra@37889
  1100
& Regelsatz, d.h. eine Datenstruktur, die Theoremss {\it thm} und Operatoren {\it op} zur Vereinfachuing (mit {\it rew\_ord}) enth\"alt \\
ahirn@37877
  1101
{\it Rrls}
alexandra@37889
  1102
& Regelsatz f\"ur das 'reverse rewriting' (eine \isac-Technik, die das schrittweise Rewriting entwickelt, z.B. f\"ur die zur\"uckgenommenen Teile)\\
ahirn@37877
  1103
{\it scr}
alexandra@37889
  1104
& Skript, das die Algorithmen durch Anwenden von Taktiken beschreibt und ein Teil von {\it met} ist \\
ahirn@37877
  1105
{\it norm\_rls}
alexandra@37889
  1106
& spezielles Regelwerk zum Berechnen von Normalformen, im Zusammenhang mit {\it thy}\\
ahirn@37877
  1107
{\it spec}
alexandra@37889
  1108
& Spezifikation, z.B, ein Tripel ({\it thyID, pblID, metID})\\
ahirn@37877
  1109
{\it subs}
alexandra@37889
  1110
& Ersatz, z.B. eine Liste von Variablen und ihren jeweiligen Werten\\
ahirn@37877
  1111
{\it term}
alexandra@37889
  1112
& Term von Isabelle, z.B. eine Formel\\
ahirn@37877
  1113
{\it thm}
alexandra@37889
  1114
& theorem\\
ahirn@37877
  1115
{\it thy}
alexandra@37889
  1116
& Theorie\\
ahirn@37877
  1117
{\it thyID}
alexandra@37889
  1118
& im Bezug auf {\it thy} \\
alexandra@37889
  1119
\end{tabular}\end{center}\end{table}}
alexandra@37889
  1120
alexandra@37889
  1121
Die Verbindung zwischen Taktiken und Daten werden in Tab.\ref{tac-kb} auf Seite \pageref{tac-kb} dargestellt.
alexandra@37889
  1122
alexandra@37889
  1123
ahirn@37877
  1124
\begin{table}[h]
alexandra@37889
  1125
\caption{Welche Taktiken verwenden die Teile des KB~?} \label{tac-kb}
ahirn@37877
  1126
\tabcolsep=0.3mm
ahirn@37877
  1127
\begin{center}
ahirn@37877
  1128
\begin{tabular}{|ll||cccc|ccc|cccc|} \hline
alexandra@37889
  1129
Taktik &Eingabe & & & &norm\_& &rew\_&rls &eval\_&eval\_&calc\_& \\
alexandra@37889
  1130
& &thy &scr &Rrls&rls &thm &ord &Rrls&fn &rls &list &dsc\\
ahirn@37877
  1131
\hline\hline
ahirn@37877
  1132
Init\_Proof
alexandra@37889
  1133
&fmz & x & & & x & & & & & & & x \\
alexandra@37889
  1134
&spec & & & & & & & & & & & \\
ahirn@37877
  1135
\hline
ahirn@37877
  1136
\multicolumn{13}{|l|}{model phase}\\
ahirn@37877
  1137
\hline
alexandra@37889
  1138
Add\_*
alexandra@37889
  1139
&term & x & & & x & & & & & & & x \\
alexandra@37889
  1140
FormFK &model & x & & & x & & & & & & & x \\
ahirn@37877
  1141
\hline
ahirn@37877
  1142
\multicolumn{13}{|l|}{specify phase}\\
ahirn@37877
  1143
\hline
alexandra@37889
  1144
Specify\_Theory
alexandra@37889
  1145
&thyID & x & & & x & & & & x & x & & x \\
alexandra@37889
  1146
Specify\_Problem
alexandra@37889
  1147
&pblID & x & & & x & & & & x & x & & x \\
alexandra@37889
  1148
Refine\_Problem
alexandra@37889
  1149
&pblID & x & & & x & & & & x & x & & x \\
alexandra@37889
  1150
Specify\_Method
alexandra@37889
  1151
&metID & x & & & x & & & & x & x & & x \\
alexandra@37889
  1152
Apply\_Method
alexandra@37889
  1153
&metID & x & x & & x & & & & x & x & & x \\
ahirn@37877
  1154
\hline
ahirn@37877
  1155
\multicolumn{13}{|l|}{solve phase}\\
ahirn@37877
  1156
\hline
alexandra@37889
  1157
Rewrite,\_Inst
alexandra@37889
  1158
&thm & x & x & & & x &met & & x &met & & \\
ahirn@37877
  1159
Rewrite, Detail
alexandra@37889
  1160
&thm & x & x & & & x &rls & & x &rls & & \\
ahirn@37877
  1161
Rewrite, Detail
alexandra@37889
  1162
&thm & x & x & & & x &Rrls & & x &Rrls & & \\
ahirn@37877
  1163
Rewrite\_Set,\_Inst
alexandra@37889
  1164
&rls & x & x & & & & & x & x & x & & \\
alexandra@37889
  1165
Calculate
alexandra@37889
  1166
&op & x & x & & & & & & & & x & \\
alexandra@37889
  1167
Substitute
alexandra@37889
  1168
&subs & x & & & x & & & & & & & \\
alexandra@37889
  1169
& & & & & & & & & & & & \\
alexandra@37889
  1170
SubProblem
alexandra@37889
  1171
&spec & x & x & & x & & & & x & x & & x \\
alexandra@37889
  1172
&fmz & & & & & & & & & & & \\
ahirn@37877
  1173
\hline
alexandra@37889
  1174
\end{tabular}\end{center}\end{table}}
ahirn@37877
  1175
ahirn@37877
  1176
alexandra@37889
  1177
\section{Die theories von \isac{}}
alexandra@37889
  1178
Die theories von \isac{} basieren auf den theories f\"ur HOL und Real von Isabelle. Diese theories haben eine spezielle Form, die durch die Endung {\tt *.thy} definiert sind; normalerweise werden diese theories zusammen mit SML verwendet, und dann haben sie den selben Dateinamen, aber die Endung {\tt *.ML}.
alexandra@37889
  1179
Die theories von \isac{} representieren den folgenden Teil vom Basiswissen von \isac{}, die Hierarchie von den zwei theories ist demnach strukturiert. Die {\tt *.ML} Dateien beinhalten {\em alle} Daten von den anderen zwei Hauptlinien des Basiswissens, die Probleme und die Methoden(ohne ihre jeweilige Struktur, die von den Problem Browsern und den Methode Browsern gemacht wird, zu pr\"asentieren.
alexandra@37889
  1180
Die Tab.\ref{theories} auf Seite \pageref{theories} listet die basis theories auf, die geplant sind in der Version \isac{} 1 angewendet zu werden. Wir erwarten, dass die Liste erweitert wird in n\"aherer Zukunft, und wir werden uns auch den theorie Browser genauer ansehen.
alexandra@37889
  1181
Die ersten drei theories auf der Liste geh\"oren {\em nicht} zum Grundwissen von \isac{}; sie besch\"aftigen sich mit der Skriptsprache f\"ur Methoden und ist hier nur zur Vollst\"andigkeit angef\"uhrt.
ahirn@37877
  1182
ahirn@37877
  1183
{\begin{table}[h]
alexandra@37889
  1184
\caption{Theorien von der ersten Version von \isac} \label{theories}
ahirn@37877
  1185
%\tabcolsep=0.3mm
ahirn@37877
  1186
\begin{center}
ahirn@37877
  1187
\def\arraystretch{1.0}
ahirn@37877
  1188
\begin{tabular}{lp{9.0cm}}
alexandra@37889
  1189
Theorie & Beschreibung \\
ahirn@37877
  1190
\hline
ahirn@37877
  1191
&\\
ahirn@37877
  1192
ListI.thy
alexandra@37889
  1193
& ordnet die Bezeichnungen den Funktionen, die in {\tt Isabelle2002/src/HOL/List.thy} sind zu, und (intermediatly~?) definiert einige weitere Listen von Funktionen\\
ahirn@37877
  1194
ListI.ML
alexandra@37889
  1195
& {\tt eval\_fn} f\"ur die zus\"atzliche Listen von Funktionen\\
ahirn@37877
  1196
Tools.thy
alexandra@37889
  1197
& Funktion, die f\"ur die Auswertung von Skripten ben\"otigt wird\\
ahirn@37877
  1198
Tools.ML
alexandra@37889
  1199
& bezieht sich auf {\tt eval\_fn}s\\
ahirn@37877
  1200
Script.thy
alexandra@37889
  1201
& Vorraussetzung f\"ur Skripten: Typen, Taktiken, tacticals\\
ahirn@37877
  1202
Script.ML
alexandra@37889
  1203
& eine Reihe von Taktiken und Funktionen f\"ur den internen Gebrauch\\
ahirn@37877
  1204
& \\
ahirn@37877
  1205
\hline
ahirn@37877
  1206
& \\
ahirn@37877
  1207
Typefix.thy
alexandra@37889
  1208
& fortgeschrittener Austritt, um den type Fehlern zu entkommen\\
ahirn@37877
  1209
Descript.thy
alexandra@37889
  1210
& {\it Beschreibungen} f\"ur die Formeln von {\it Modellen} und {\it Problemen}\\
ahirn@37877
  1211
Atools
alexandra@37889
  1212
& Neudefinierung von Operatoren; allgemeine Eigenschaften und Funktionen f\"ur Vorraussetzungen; Theorems f\"ur {\tt eval\_rls}\\
ahirn@37877
  1213
Float
alexandra@37889
  1214
& Gleitkommerzahlendarstellung\\
ahirn@37877
  1215
Equation
alexandra@37889
  1216
& grunds\"atzliche Vorstellung f\"ur  Gleichungen und Gleichungssysteme\\
ahirn@37877
  1217
Poly
alexandra@37889
  1218
& Polynome\\
ahirn@37877
  1219
PolyEq
alexandra@37889
  1220
& polynomiale Gleichungen und Gleichungssysteme \\
ahirn@37877
  1221
Rational.thy
alexandra@37889
  1222
& zus\"atzliche Theorems f\"ur Rationale Zahlen\\
ahirn@37877
  1223
Rational.ML
alexandra@37889
  1224
& abbrechen, hinzuf\"ugen und vereinfachen von Rationalen Zahlen durch Verwenden von (einer allgemeineren Form von) Euclids Algorithmus; die entsprechenden umgekehrten Regels\"atze\\
ahirn@37877
  1225
RatEq
alexandra@37889
  1226
& Gleichung mit rationalen Zahlen\\
ahirn@37877
  1227
Root
alexandra@37889
  1228
& Radikanten; berechnen der Normalform; das betreffende umgekehrte Regelwerk\\
ahirn@37877
  1229
RootEq
alexandra@37889
  1230
& Gleichungen mit Wurzeln\\
ahirn@37877
  1231
RatRootEq
alexandra@37889
  1232
& Gleichungen mit rationalen Zahlen und Wurzeln (z.B. mit Termen, die beide Vorg\"ange enthalten)\\
ahirn@37877
  1233
Vect
alexandra@37889
  1234
& Vektoren Analysis\\
ahirn@37877
  1235
Trig
alexandra@37889
  1236
& Trigonometrie\\
ahirn@37877
  1237
LogExp
alexandra@37889
  1238
& Logarithmus und Exponentialfunktionen\\
ahirn@37877
  1239
Calculus
alexandra@37889
  1240
& nicht der Norm entsprechende Analysis\\
ahirn@37877
  1241
Diff
alexandra@37889
  1242
& Differenzierung\\
ahirn@37877
  1243
DiffApp
alexandra@37889
  1244
& Anwendungen beim Differenzieren (Maximum-Minimum-Probleme)\\
ahirn@37877
  1245
Test
alexandra@37889
  1246
& (alte) Daten f\"ur Testfolgen\\
ahirn@37877
  1247
Isac
alexandra@37889
  1248
& enth\"alt alle Theorien von\isac{}\\
alexandra@37889
  1249
\end{tabular}\end{center}\end{table}}
ahirn@37877
  1250
ahirn@37877
  1251
alexandra@37889
  1252
\section{Daten in {\tt *.thy} und {\tt *.ML}}
alexandra@37889
  1253
Wie schon zuvor angesprochen, haben die arbeiten die theories von *.thy und *.ML zusamnmen und haben deswegen den selben Dateiname. Wie diese Daten zwischen den zwei Dateien verteilt werden wird in der
alexandra@37889
  1254
Tab.\ref{thy-ML} auf Seite \pageref{thy-ML} gezeigt. Die Ordnung von den Dateinteilchen in den theories sollte an der Ordnung von der Liste festhalten.
alexandra@37889
  1255
ahirn@37877
  1256
{\begin{table}[h]
alexandra@37889
  1257
\caption{Daten in {\tt *.thy}- und {\tt *.ML}-files} \label{thy-ML}
ahirn@37877
  1258
\tabcolsep=2.0mm
ahirn@37877
  1259
\begin{center}
ahirn@37877
  1260
\def\arraystretch{1.0}
ahirn@37877
  1261
\begin{tabular}{llp{7.7cm}}
alexandra@37889
  1262
Datei & Daten & Beschreibung \\
ahirn@37877
  1263
\hline
ahirn@37877
  1264
& &\\
ahirn@37877
  1265
{\tt *.thy}
alexandra@37889
  1266
& consts
alexandra@37889
  1267
& Operatoren, Eigenschaften, Funktionen und Skriptnamen ('{\tt Skript} Name \dots{\tt Argumente}')
ahirn@37877
  1268
\\
alexandra@37889
  1269
& rules
alexandra@37889
  1270
& theorems: \isac{} verwendet die Theorems von Isabelle, wenn m\"oglich; zus\"atzliche Theorems, die jenen von Isabelle entsprechen, bekommen ein {\it I} angeh\"angt
ahirn@37877
  1271
\\& &\\
ahirn@37877
  1272
{\tt *.ML}
alexandra@37889
  1273
& {\tt theory' :=}
alexandra@37889
  1274
& Die Theorie, die 
alexandra@37889
  1275
abgegrenzt ist von der {\tt *.thy}-Datei, wird durch \isac{} zug\"anglich gemacht
ahirn@37877
  1276
\\
ahirn@37877
  1277
& {\tt eval\_fn}
alexandra@37889
  1278
& die Auswertungsfunktion f\"ur die Operatoren und Eigenschaften, kodiert im meta-Level (SML); die Bezeichnugn von so einer Funktion ist eine Kombination von Schl\"usselw\"ortern {\tt eval\_} und einer Bezeichnung von der Funktion, die in in {\tt *.thy} erkl\"art ist\\
alexandra@37889
  1279
& {\tt *\_simplify}
alexandra@37889
  1280
& der automatisierte Vereinfacher f\"ur die tats\"achliche Theorie, z.B. die Bezeichnung von diesem Regelwerk ist eine Kombination aus den Theorienbezeichnungen und dem Schl\"usselwort {\tt *\_simplify}
ahirn@37877
  1281
\\
ahirn@37877
  1282
& {\tt norm\_rls :=}
alexandra@37889
  1283
& der automatisierte Vereinfacherthe {\tt *\_simplify} wird so aufgehoben, dass er \"uber \isac zug\"anglich ist
ahirn@37877
  1284
\\
ahirn@37877
  1285
& {\tt rew\_ord' :=}
alexandra@37889
  1286
& das Gleiche f\"ur die Anordnung des Rewriting, wenn es ausserhalb eines speziellen Regelwerks gebraucht wird
ahirn@37877
  1287
\\
ahirn@37877
  1288
& {\tt ruleset' :=}
alexandra@37889
  1289
& dasselbe wie f\"ur Regels\"atze (gew\"ohnliche Regels\"atze, umgekehrte Regels\"atze, und {\tt eval\_rls})
ahirn@37877
  1290
\\
ahirn@37877
  1291
& {\tt calc\_list :=}
alexandra@37889
  1292
& dasselbe f\"ur {\tt eval\_fn}s, wenn es ausserhalb eines bestimmten Regelwerks gebraucht wird (wenn es ausserhalb eines bestimmten Regelwerks ben\"otigt wird) (z.B. f\"ur eine Taktik {\tt Calculate} in einem Skript)
ahirn@37877
  1293
\\
ahirn@37877
  1294
& {\tt store\_pbl}
alexandra@37889
  1295
& Probleme, die in {\tt *.ML}-Dateien definiert sind, werden zug\"anglich f\"ur \isac{}
ahirn@37877
  1296
\\
ahirn@37877
  1297
& {\tt methods :=}
alexandra@37889
  1298
& Methoden, die in {\tt *.ML}-Dateien definiert sind werden zug\"anglich f\"ur \isac{}
ahirn@37877
  1299
\\
alexandra@37889
  1300
\end{tabular}\end{center}\end{table}}
ahirn@37877
  1301
alexandra@37889
  1302
\section{Formale Beschreibung der Hierarchie von Problemen}
ahirn@37877
  1303
alexandra@37889
  1304
\section{Skripttaktiken}
alexandra@37889
  1305
Tats\"achlich sind es die Taktiken, die die Berechnungen vorantreiben: im Hintergrund bauen sie den ''Prooftree`` und sie \"ubernehmen die wichtigsten Aufgaben w\"ahrend der Auswertung bei der der ''script-interpreter`` zur Steuerung des Benutzers transferiert wird. Hier beschreiben wir nur den Syntax von den Taktiken; die Semantik ist beschrieben etwas weiter unten im Kontext mit den Taktiken, die die Benutzer/Innen dieses Programmes verwenden: da gibt es einen Schriftverkehr zwischen den Benutzer Taktiken und den Skripttaktiken.
ahirn@37877
  1306
ahirn@37877
  1307
ahirn@37877
  1308
ahirn@37877
  1309
\part{Authoring on the knowledge}
ahirn@37877
  1310
ahirn@37877
  1311
ahirn@37877
  1312
\section{Add a theorem}
ahirn@37877
  1313
\section{Define and add a problem}
ahirn@37877
  1314
\section{Define and add a predicate}
ahirn@37877
  1315
\section{Define and add a method}
ahirn@37877
  1316
\section{}
ahirn@37877
  1317
\section{}
ahirn@37877
  1318
\section{}
ahirn@37877
  1319
\section{}
ahirn@37877
  1320
ahirn@37877
  1321
ahirn@37877
  1322
ahirn@37877
  1323
\newpage
ahirn@37877
  1324
\bibliography{bib/isac,bib/from-theses}
ahirn@37877
  1325
ahirn@37877
  1326
\end{document}