doc-src/isac/mat-eng-de.tex
author Alexandra Hirn <alexandra.hirn@hotmail.com>
Wed, 28 Jul 2010 13:26:19 +0200
branchlatex-isac-doc
changeset 37888 97c7a4059d2e
parent 37887 b82d6c1732d5
child 37889 fe4854d9fdda
permissions -rw-r--r--
chapter 1 - 7
     1 \documentclass[11pt,a4paper,headline,headcount,towside,nocenter]{report}
     2 \usepackage{latexsym} 
     3 
     4 %\usepackage{ngerman}
     5 %\grmn@dq@error ...and \dq \string #1 is undefined}
     6 %l.989 ...tch the problem type \\{\tt["squareroot",
     7 %                                                  "univ
     8 \bibliographystyle{alpha}
     9 
    10 \def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
    11 
    12 \title{\isac --- Interface for\\
    13   Developers of Math Knowledge\\[1.0ex]
    14   and\\[1.0ex]
    15   Tools for Experiments in\\
    16   Symbolic Computation\\[1.0ex]}
    17 \author{The \isac-Team\\
    18   \tt isac-users@ist.tugraz.at\\[1.0ex]}
    19 \date{\today}
    20 
    21 \begin{document}
    22 \maketitle
    23 \newpage
    24 \tableofcontents
    25 \newpage
    26 \listoftables
    27 \newpage
    28 
    29 \chapter{Einleitung}
    30 \section{``Authoring'' und ``Tutoring''}
    31 {TO DO} Mathematik lernen -- verschiedene Autoren -- Isabelle
    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.
    33 \section{Der Inhalt des Dokuments}
    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.
    35 
    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.
    37 
    38 Das Dokument ist eigenst\"andig; Basiswissen \"uber SML (für eine Einf\"uhrung siehe \cite{Paulson:91}), Terme und Umschreibung wird vorrausgesetzt.
    39 
    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.
    41 
    42 Hinweis: SML Code, Verzeichnis, Dateien sind {\tt in 'tt' geschrieben}; besonders in {\tt ML>} ist das Kerngebiet schnell.
    43 
    44 \paragraph{Versuchen Sie es!}  Ein weiteres Anliegen dieses Textes ist, dem Leser Tipps f\"ur Versuche mit den Anwendungen zu geben.
    45 
    46 \section{Gleich am Computer ausprobieren!}\label{get-started}
    47 \paragraph{TO DO screenshot} Bevor Sie mit Ihren Versuchen beginnen, m\"ochten wir Ihnen noch einige Hinweise geben.
    48 \begin{itemize}
    49  \item System starten
    50  \item Shell aufmachen und die Datei mat-eng-de.sml \"offnen.
    51  \item $>$  :  Hinter diesem Zeichen (``Prompt'') stehen jene, die Sie selbst eingeben bzw. mit Copy und Paste aus der Datei kopieren.
    52  \item Die Eingabe wird mit ``;'' und ``Enter'' abgeschlossen.
    53  \item Zeilen, die nicht mit Prompt beginnen, werden vom Computer ausgegeben.
    54  
    55 \end{itemize}
    56 
    57 \part{Experimentelle Ann\"aherung}
    58 
    59 \chapter{Terme und Theorien}
    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.
    61 
    62 \section{Von der Formel zum Term}
    63 Um ein Beispiel zu nennen: Die Formel $a+b\cdot 3$ l\"asst sich in lesbarer Form so eingeben:
    64 {\footnotesize\begin{verbatim}
    65   > "a + b * 3";
    66   val it = "a + b * 3" : string
    67 \end{verbatim}}
    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:
    69 {\footnotesize\begin{verbatim}
    70   > str2term "a + b * 3";
    71   val it =
    72      Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
    73            Free ("a", "RealDef.real") $
    74         (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
    75            ...) : Term.term
    76 \end{verbatim}}
    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) 
    78 {\footnotesize\begin{verbatim}
    79   > val term = str2term "a + b * 3";
    80   val term =  
    81      Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
    82            Free ("a", "RealDef.real") $
    83         (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
    84            ...) : Term.term
    85 \end{verbatim}
    86 Der gespeicherte Term kann einer Funktion ``atomty'' \"ubergeben werden, die jenen in einer abstrakten Struktur zeigt:
    87 {\footnotesize\begin{verbatim}
    88   > atomty term;
    89  
    90   ***
    91   *** Const (op +, [real, real] => real)
    92   *** . Free (a, real)
    93   *** . Const (op *, [real, real] => real)
    94   *** . . Free (b, real)
    95   *** . . Free (3, real)
    96   ***
    97  
    98   val it = () : unit
    99 \end{verbatim}%size
   100 
   101 
   102 \section{``Theory'' und ``Parsing``}
   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{}. 
   104 
   105 {\footnotesize\begin{verbatim}
   106   > Isac.thy;
   107        val it =
   108           {ProtoPure, CPure, HOL, Set, Typedef, Fun, Product_Type, Lfp, Gfp,
   109           Sum_Type, Relation, Record, Inductive, Transitive_Closure,
   110           Wellfounded_Recursion, NatDef, Nat, NatArith, Divides, Power,
   111           SetInterval, Finite_Set, Equiv, IntDef, Int, Datatype_Universe,
   112           Datatype, Numeral, Bin, IntArith, Wellfounded_Relations, Recdef, IntDiv,
   113           IntPower, NatBin, NatSimprocs, Relation_Power, PreList, List, Map,
   114           Hilbert_Choice, Main, Lubs, PNat, PRat, PReal, RealDef, RealOrd,
   115           RealInt, RealBin, RealArith0, RealArith, RComplete, RealAbs, RealPow,
   116           Ring_and_Field, Complex_Numbers, Real, ListG, Tools, Script, Typefix,
   117           Float, ComplexI, Descript, Atools, Simplify, Poly, Rational, PolyMinus,
   118           Equation, LinEq, Root, RootEq, RatEq, RootRat, RootRatEq, PolyEq, Vect,
   119           Calculus, Trig, LogExp, Diff, DiffApp, Integrate, EqSystem, Biegelinie,
   120           AlgEin, Test, Isac} : Theory.theory
   121 \end{verbatim}
   122 Die, die ein Mal enth\"alt ist groups.thy. Suchen Sie nach '*' unter der Adresse:
   123 
   124 http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/Groups.html
   125 Hier wird Ihnen erkl\"art, wie das Mal vom Computer gelesen wird.
   126 {\footnotesize\begin{verbatim}
   127   > Group.thy
   128       fixes f :: "'a => 'a => 'a" (infixl "*" 70)
   129       assumes assoc [ac_simps]: "a * b * c = a * (b * c)"
   130 \end{verbatim}
   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). 
   132 
   133 Parsing entsteht durch einen string und eine theory. Es verwendet Informationen, die in der theory von Isabelle enthalten sind.
   134 {\footnotesize\begin{verbatim}
   135   > parse;
   136        val it = fn : Theory.theory -> string -> Thm.cterm Library.option
   137 \end{verbatim}
   138 Dieser term kann wieder in seine einzelnen Teile zerlegt werden.
   139 {\footnotesize\begin{verbatim}
   140    > val it = (term_of o the) it;
   141         val it =
   142            Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
   143                Free ("a", "RealDef.real") $
   144            (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
   145                ...) : Term.term
   146 \end{verbatim}
   147 
   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.
   149 
   150 {\footnotesize\begin{verbatim}
   151    > (*-1-*);
   152    > parse HOL.thy "2^^^3";
   153       *** Inner lexical error at: "^^^3"
   154       val it = None : Thm.cterm Library.option         
   155 \end{verbatim}
   156 ''Inner lexical error`` bedeutet, dass ein Fehler aufgetreten ist, vermutlich hat man sich vertippt.
   157 
   158 {\footnotesize\begin{verbatim}
   159    > (*-2-*);
   160    > parse HOL.thy "d_d x (a + x)";
   161       val it = None : Thm.cterm Library.option               
   162 \end{verbatim}
   163 Fehlt ''Inner lexical error`` wurde der Parse nicht gefunden.
   164 
   165 {\footnotesize\begin{verbatim}
   166    > (*-3-*);
   167    > parse Rational.thy "2^^^3";
   168       val it = Some "2 ^^^ 3" : Thm.cterm Library.option               
   169 \end{verbatim}
   170 
   171 {\footnotesize\begin{verbatim}
   172    > (*-4-*);
   173    > val Some t4 = parse Rational.thy "d_d x (a + x)";
   174       val t4 = "d_d x (a + x)" : Thm.cterm              
   175 \end{verbatim}
   176 
   177 {\footnotesize\begin{verbatim}
   178    > (*-5-*);
   179    > val Some t5 = parse Diff.thy  "d_d x (a + x)";
   180       val t5 = "d_d x (a + x)" : Thm.cterm             
   181 \end{verbatim}
   182 
   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.
   184 
   185 \section{Details von Termen}
   186 Mit Hilfe der darunterliegenden Darstellung sieht man, dass ein cterm in einen term umgewandelt werden kann.
   187 {\footnotesize\begin{verbatim}
   188    > term_of;
   189       val it = fn : Thm.cterm -> Term.term
   190 \end{verbatim}
   191 Durch die Umwandlung eines cterms in einen term sieht man die einzelnen Teile des Terms. ''Free`` bedeutet, dass man die Variable \"andern kann.
   192 {\footnotesize\begin{verbatim}
   193    > term_of t4;
   194       val it =
   195          Free ("d_d", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
   196          ...: Term.term
   197 
   198 \end{verbatim}
   199 In diesem Fall sagt uns das ''Const``, dass die Variable eine Konstante ist, also ein Fixwert ist und immer die selbe Funktion hat.
   200 {\footnotesize\begin{verbatim}
   201    > term_of t5;
   202       val it =
   203          Const ("Diff.d_d", "[RealDef.real, RealDef.real] => RealDef.real") $ ... $
   204          ... : Term.term
   205 \end{verbatim}
   206 Sollten verschiedene Teile des Output nicht sichtbar sein, kann die Schriftgr\"osse ge\"andert werden.
   207 {\footnotesize\begin{verbatim}
   208    > print_depth;
   209       val it = fn : int -> unit
   210  \end{verbatim}
   211 Zuerst gibt man die Schriftgr\"osse ein, danach den term, der gr\"osser werden soll.
   212 {\footnotesize\begin{verbatim}
   213    > print_depth 10;
   214       val it = () : unit
   215    > term_of t4;
   216          val it =
   217             Free ("d_d", "[RealDef.real, RealDef.real] => RealDef.real") $
   218                 Free ("x", "RealDef.real") $
   219             (Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
   220                 Free ("a", "RealDef.real") $ Free ("x", "RealDef.real"))
   221          : Term.term
   222 
   223    > print_depth 10;
   224          val it = () : unit
   225    > term_of t5;
   226          val it =
   227             Const ("Diff.d_d", "[RealDef.real, RealDef.real] => RealDef.real") $
   228                 Free ("x", "RealDef.real") $
   229             (Const ("op +", "[RealDef.real, RealDef.real] => RealDef.real") $
   230                 Free ("a", "RealDef.real") $ Free ("x", "RealDef.real"))
   231          : Term.term
   232 \end{verbatim}
   233 
   234 Eine andere Variante um den Unterschied der beiden Terme zu sehen ist folgende: 
   235 {\footnotesize\begin{verbatim}
   236    > (*-4-*) val thy = Rational.thy;
   237       val thy =
   238          {ProtoPure, CPure, HOL, Set, Typedef, Fun, Product_Type, Lfp, Gfp,
   239          Sum_Type, Relation, Record, Inductive, Transitive_Closure,
   240          Wellfounded_Recursion, NatDef, Nat, NatArith, Divides, Power,
   241          SetInterval, Finite_Set, Equiv, IntDef, Int, Datatype_Universe,
   242          Datatype, Numeral, Bin, IntArith, Wellfounded_Relations, Recdef, IntDiv,
   243          IntPower, NatBin, NatSimprocs, Relation_Power, PreList, List, Map,
   244          Hilbert_Choice, Main, Lubs, PNat, PRat, PReal, RealDef, RealOrd,
   245          RealInt, RealBin, RealArith0, RealArith, RComplete, RealAbs, RealPow,
   246          Ring_and_Field, Complex_Numbers, Real, ListG, Tools, Script, Typefix,
   247          Float, ComplexI, Descript, Atools, Simplify, Poly, Rational}
   248      : Theory.theory
   249    > ((atomty) o term_of o the o (parse thy)) "d_d x (a + x)";
   250  
   251       ***
   252       *** Free (d_d, [real, real] => real)
   253       *** . Free (x, real)
   254       *** . Const (op +, [real, real] => real)
   255       *** . . Free (a, real)
   256       *** . . Free (x, real)
   257       ***
   258  
   259       val it = () : unit
   260 
   261 
   262    > (*-5-*) val thy = Diff.thy;
   263       val thy =
   264          {ProtoPure, CPure, HOL, Set, Typedef, Fun, Product_Type, Lfp, Gfp,
   265          Sum_Type, Relation, Record, Inductive, Transitive_Closure,
   266          Wellfounded_Recursion, NatDef, Nat, NatArith, Divides, Power,
   267          SetInterval, Finite_Set, Equiv, IntDef, Int, Datatype_Universe,
   268          Datatype, Numeral, Bin, IntArith, Wellfounded_Relations, Recdef, IntDiv,
   269          IntPower, NatBin, NatSimprocs, Relation_Power, PreList, List, Map,
   270          Hilbert_Choice, Main, Lubs, PNat, PRat, PReal, RealDef, RealOrd,
   271          RealInt, RealBin, RealArith0, RealArith, RComplete, RealAbs, RealPow,
   272          Ring_and_Field, Complex_Numbers, Real, Calculus, Trig, ListG, Tools,
   273          Script, Typefix, Float, ComplexI, Descript, Atools, Simplify, Poly,
   274          Equation, LinEq, Root, RootEq, Rational, RatEq, RootRat, RootRatEq,
   275          PolyEq, LogExp, Diff} : Theory.theory
   276  
   277    > ((atomty) o term_of o the o (parse thy)) "d_d x (a + x)";
   278  
   279       ***
   280       *** Const (Diff.d_d, [real, real] => real)
   281       *** . Free (x, real)
   282       *** . Const (op +, [real, real] => real)
   283       *** . . Free (a, real)
   284       *** . . Free (x, real)
   285       ***
   286  
   287       val it = () : unit
   288 \end{verbatim}
   289 
   290 
   291 {\chapter{''Rewriting``}}
   292 {\section{}}
   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.
   294 
   295 {\footnotesize\begin{verbatim}
   296 > rewrite_;
   297 val it = fn
   298 :
   299    Theory.theory ->
   300    ((Term.term * Term.term) list -> Term.term * Term.term -> bool) ->
   301    rls ->
   302    bool ->
   303    Thm.thm -> Term.term -> (Term.term * Term.term list) Library.option
   304 
   305 > rewrite;
   306 val it = fn
   307 :
   308    theory' ->
   309    rew_ord' ->
   310    rls' -> bool -> thm' -> cterm' -> (string * string list) Library.option
   311 
   312 \end{verbatim}
   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!
   314 
   315 Zuerst legt man fest, dass es sich um eine Differenzierung handelt.
   316 {\footnotesize\begin{verbatim}
   317    > val thy' = "Diff.thy";
   318       val thy' = "Diff.thy" : string
   319 \end{verbatim}
   320 Dann gibt man die zu l\"osende Rechnung ein.
   321 {\footnotesize\begin{verbatim}
   322    > val ct = "d_d x (a + a * (2 + b))";
   323       val ct = "d_d x (a + a * (2 + b))" : string
   324 \end{verbatim}
   325 Anschließend gibt man bekannt, dass die Summenregel angewandt werden soll.
   326 {\footnotesize\begin{verbatim}
   327    > val thm = ("diff_sum","");
   328       val thm = ("diff_sum", "") : string * string
   329 \end{verbatim}
   330 Schliesslich wird die erste Ableitung angezeigt.
   331 {\footnotesize\begin{verbatim}
   332    > val Some (ct,_) = rewrite_inst thy' "tless_true" "eval_rls" true
   333                         [("bdv","x::real")] thm ct;#
   334       val ct = "d_d x a + d_d x (a * (2 + b))" : cterm'
   335 \end{verbatim}
   336 Will man auch die zweite Ableitung sehen, geht man so vor:
   337 {\footnotesize\begin{verbatim}
   338    > val thm = ("diff_prod_const","");
   339       val thm = ("diff_prod_const", "") : string * string
   340 \end{verbatim} 
   341 Auch die zweite Ableitung wird sichtbar.
   342 {\footnotesize\begin{verbatim}
   343    > val Some (ct,_) = rewrite_inst thy' "tless_true" "eval_rls" true
   344                         [("bdv","x::real")] thm ct;#
   345       val ct = "d_d x a + a * d_d x (2 + b)" : cterm'
   346 \end{verbatim}
   347 
   348 {\section{M\"oglichkeiten von Rewriting}
   349 Es gibt verscheidene Varianten von Rewriting, die alle eine bestimmte Bedeutung haben.
   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.
   351 {\footnotesize\begin{verbatim}
   352 > rewrite_inst;
   353 val it = fn
   354 :
   355    theory' ->
   356    rew_ord' ->
   357    rls' ->
   358    bool -> 'a -> thm' -> cterm' -> (cterm' * cterm' list) Library.option
   359 \end{verbatim}
   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.
   361 {\footnotesize\begin{verbatim}
   362    > rewrite_set;
   363       val it = fn
   364       : theory' -> bool -> rls' -> cterm' -> (string * string list) Library.option
   365 \end{verbatim}
   366 \textit{rewrite\_set\_inst} ist eine Kombination der beiden oben genannten M\"oglichkeiten.
   367 {\footnotesize\begin{verbatim}
   368    > rewrite_set_inst;
   369       val it = fn
   370       :
   371          theory' ->
   372          bool -> subs' -> rls' -> cterm' -> (string * string list) Library.option
   373 \end{verbatim}
   374 Wenn man sehen m\"ochte, wie Rewriting bei den einzelnen Theorems funktioniert, kann man dies mit \textit{trace\_rewrite} versuchen.
   375 {\footnotesize\begin{verbatim}
   376    > toggle;
   377       val it = fn : bool ref -> bool
   378    > toggle trace_rewrite;
   379       val it = true : bool
   380    > toggle trace_rewrite;
   381       val it = false : bool
   382 \end{verbatim}
   383  
   384 \section{Rule sets}
   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.
   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.
   387 Ein Beispiel f\"ur einen Regelsatz ist folgendes:
   388 \footnotesize\begin{verbatim}
   389 ???????????
   390 \end{verbatim}
   391 
   392 \footnotesize\begin{verbatim}
   393    > sym;
   394       val it = "?s = ?t ==> ?t = ?s" : Thm.thm
   395    > rearrange_assoc;
   396       val it =
   397          Rls
   398             {id = "rearrange_assoc",
   399                scr = Script (Free ("empty_script", "RealDef.real")),
   400                calc = [],
   401                erls =
   402                Rls
   403                   {id = "e_rls",
   404                      scr = EmptyScr,
   405                      calc = [],
   406                      erls = Erls,
   407                      srls = Erls,
   408                      rules = [],
   409                      rew_ord = ("dummy_ord", fn),
   410                      preconds = []},
   411                srls =
   412                Rls
   413                   {id = "e_rls",
   414                      scr = EmptyScr,
   415                      calc = [],
   416                      erls = Erls,
   417                      srls = Erls,
   418                      rules = [],
   419                      rew_ord = ("dummy_ord", fn),
   420                      preconds = []},
   421                rules =
   422                [Thm ("sym_radd_assoc", "?m1 + (?n1 + ?k1) = ?m1 + ?n1 + ?k1"  [.]),
   423                   Thm
   424                      ("sym_rmult_assoc",
   425                         "?m1 * (?n1 * ?k1) = ?m1 * ?n1 * ?k1"  [.])],
   426                rew_ord = ("e_rew_ord", fn),
   427                preconds = []} : rls
   428 \end{verbatim}
   429 
   430 
   431 \section{Berechnung von Konstanten}
   432 Sobald Konstanten in dem Bereich des Subterms sind, k\"onnen sie von einer Funktion berechnet werden:
   433 \footnotesize\begin{verbatim}
   434    > calculate;
   435       val it = fn
   436       :
   437          theory' ->
   438          string *
   439          (
   440          string ->
   441          Term.term -> Theory.theory -> (string * Term.term) Library.option) ->
   442          cterm' -> (string * thm') Library.option
   443 
   444    > calculate_;
   445       val it = fn
   446       :
   447          Theory.theory ->
   448          string *
   449          (
   450          string ->
   451          Term.term -> Theory.theory -> (string * Term.term) Library.option) ->
   452          Term.term -> (Term.term * (string * Thm.thm)) Library.option
   453 \end{verbatim}
   454 Man bekommt das Ergebnis und die Theorem bezieht sich darauf. Daher sind die folgenden mathematischen Rechnungen m\"oglich:
   455 \footnotesize\begin{verbatim}
   456    > calclist;
   457       val it =
   458          [("Vars", ("Tools.Vars", fn)), ("matches", ("Tools.matches", fn)),
   459             ("lhs", ("Tools.lhs", fn)), ("plus", ("op +", fn)),
   460             ("times", ("op *", fn)), ("divide_", ("HOL.divide", fn)),
   461             ("power_", ("Atools.pow", fn)), ("is_const", ("Atools.is'_const", fn)),
   462             ("le", ("op <", fn)), ("leq", ("op <=", fn)),
   463             ("ident", ("Atools.ident", fn)), ("sqrt", ("Root.sqrt", fn)),
   464             ("Test.is_root_free", ("is'_root'_free", fn)),
   465             ("Test.contains_root", ("contains'_root", fn))]
   466       :
   467          (
   468          string *
   469          (
   470          string *
   471          (
   472          string ->
   473          Term.term -> Theory.theory -> (string * Term.term) Library.option))) list
   474 \end{verbatim}
   475 Diese werden so angewendet:
   476 \footnotesize\begin{verbatim}
   477 \end{verbatim}
   478 
   479 
   480 
   481 \chapter{Termordnung}
   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.
   483 
   484 \section{Beispiel f\"ur Termordnungen}
   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.
   486 Hier ein Beispiel:
   487 
   488 {\footnotesize\begin{verbatim}
   489    > sqrt_right;
   490       val it = fn : bool -> Theory.theory -> subst -> Term.term * Term.term -> b       ool
   491    > tless_true;
   492       val it = fn : subst -> Term.term * Term.term -> bool
   493 \end{verbatim}
   494 
   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.
   496 
   497 {\section{Geordnetes Rewriting}}
   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.
   499 \paragraph{Versuchen Sie es!} Das geordnete Rewriting ist eine Technik, um ein normales Polynom aus ganzzahligen Termen zu schaffen.
   500 Geordnetes Rewriting endet mit Klammern, aber auf Grund der weggelassenen Verbindung.
   501 
   502 
   503 \chapter{Die Hirarchie von Problemen}
   504 \section{''Matching``}
   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:
   506 {\footnotesize\begin{verbatim}
   507 > matches;
   508 val it = fn : Theory.theory -> Term.term -> Term.term -> bool
   509 \end{verbatim}
   510 Die folgende Gleichung wird in Operatoren und freie Variablen zerlegt.
   511 {\footnotesize\begin{verbatim}
   512 > val t = (term_of o the o (parse thy)) "3 * x^^^2 = 1";
   513 val t =
   514 Const ("op =", "[RealDef.real, RealDef.real] => bool") $
   515 (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $
   516 Free ("3", "RealDef.real") $
   517 (Const
   518 ("Atools.pow",
   519 "[RealDef.real, RealDef.real] => RealDef.real") $
   520 Free ("x", "RealDef.real") $ Free ("2", " RealDef.real"))) $
   521 Free ("1", "RealDef.real") : Term.term
   522 \end{verbatim}
   523 Nun wird ein Modell erstellt, das sich nicht auf bestimmte Zahlen bezieht, sondern nur eine generelle Zerlegung durchführt.
   524 {\footnotesize\begin{verbatim}
   525 > val p = (term_of o the o (parse thy)) "a * b^^^2 = c";
   526 val p =
   527 Const ("op =", "[RealDef.real, RealDef.real] => bool") $
   528 (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $
   529 Free ("a", "RealDef.real") $
   530 (Const
   531 ("Atools.pow",
   532 "[RealDef.real, RealDef.real] => RealDef.real") $
   533 Free ("b", "RealDef.real") $ Free ("2", "RealDef.real"))) $
   534 Free ("c", "RealDef.real") : Term.term
   535 \end{verbatim}
   536 Dieses Modell enth\"allt sogenannte \textit{scheme variables}.
   537 {\footnotesize\begin{verbatim}
   538 > atomt p;
   539 "*** -------------"
   540 "*** Const (op =)"
   541 "*** . Const (op *)""*** . . Free (a, )"
   542 "*** . . Const (Atools.pow)"
   543 "*** . . . Free (b, )"
   544 "*** . . . Free (2, )"
   545 "*** . Free (c, )"
   546 "\n"
   547 val it = "\n" : string
   548 \end{verbatim}
   549 Das Modell wird durch den Befehl free2var erstellt.
   550 {\footnotesize\begin{verbatim}
   551 > free2var;
   552 val it = fn : Term.term -> Term.term
   553 > val pat = free2var p;
   554 val pat =
   555 Const ("op =", "[RealDef.real, RealDef.real] => bool") $
   556 (Const ("op *", "[RealDef.real, RealDef.real] => RealDef.real") $
   557 Var (("a", 0), "RealDef.real") $
   558 (Const
   559 ("Atools.pow",
   560 "[RealDef.real, RealDef.real] => RealDef.real") $
   561 Var (("b", 0), "RealDef.real") $
   562 Free ("2", "RealDef.real"))) $ Var (("c", 0), "RealDef.real")
   563 : Term.term
   564 > Sign.string_of_term (sign_of thy) pat;
   565 val it = "?a * ?b ^^^ 2 = ?c" : string
   566 \end{verbatim}
   567 Durch atomt pat wird der Term aufgespalten und so in eine Form gebracht, die f\"ur die weiteren Schritte ben\"otigt werden.
   568 {\footnotesize\begin{verbatim}
   569 > atomt pat;
   570 "*** -------------"
   571 "*** Const (op =)"
   572 "*** . Const (op *)"
   573 "*** . . Var ((a, 0), )"
   574 "*** . . Const (Atools.pow)"
   575 "*** . . . Var ((b, 0), )"
   576 "*** . . . Free (2, )"
   577 "*** . Var ((c, 0), )"
   578 "\n"
   579 val it = "\n" : string
   580 \end{verbatim}
   581 Jetzt kann das Matching f\"ur die beiden vorigen Terme angewendet werden.
   582 {\footnotesize\begin{verbatim}
   583 > matches thy t pat;
   584 val it = true : bool
   585 > val t2 = (term_of o the o (parse thy)) "x^^^2 = 1";
   586 val t2 =
   587 Const ("op =", "[RealDef.real, RealDef.real] => bool") $
   588 (Const
   589 ("Atools.pow",
   590 "[RealDef.real, RealDef.real] => RealDef.real") $
   591 Free ("x", "RealDef.real") $ Free ("2", "RealDef.real")) $
   592 Free ("1", "RealDef.real") : Term.term
   593 > matches thy t2 pat;
   594 val it = false : bool
   595 > val pat2 = (term_of o the o (parse thy)) "?u^^^2 = ?v";
   596 val pat2 =
   597 Const ("op =", "[RealDef.real, RealDef.real] => bool") $
   598 (Const
   599 ("Atools.pow",
   600 "[RealDef.real, RealDef.real] => RealDef.real") $
   601 Var (("u", 0), "RealDef.real") $ Free ("2", "RealDef.real")) $
   602 Var (("v", 0), "RealDef.real") : Term.term
   603 > matches thy t2 pat2;
   604 val it = true : bool
   605 \end{verbatim}
   606 
   607 \section{Zugriff auf die Hierarchie}
   608 Man verwendet folgenden Befehl, um sich Zugang zur Hierarchie von Problemtypen zu verschaffen.
   609 {\footnotesize\begin{verbatim}
   610 > show_ptyps;
   611 val it = fn : unit -> unit
   612 > show_ptyps();
   613 [
   614 ["e_pblID"],
   615 ["simplification", "polynomial"],
   616 ["simplification", "rational"],
   617 ["vereinfachen", "polynom", "plus_minus"],
   618 ["vereinfachen", "polynom", "klammer"],
   619 ["vereinfachen", "polynom", "binom_klammer"],
   620 ["probe", "polynom"],
   621 ["probe", "bruch"],
   622 ["equation", "univariate", "linear"],
   623 ["equation", "univariate", "root", "sq", "rat"],
   624 ["equation", "univariate", "root", "normalize"],
   625 ["equation", "univariate", "rational"],
   626 ["equation", "univariate", "polynomial", "degree_0"],
   627 ["equation", "univariate", "polynomial", "degree_1"],
   628 ["equation", "univariate", "polynomial", "degree_2", "sq_only"],
   629 ["equation", "univariate", "polynomial", " 
   630  degree_2", "bdv_only"],
   631 ["equation", "univariate", "polynomial", "degree_2", "pqFormula"],
   632 ["equation", "univariate", "polynomial", "degree_2", "abcFormula"],
   633 ["equation", "univariate", "polynomial", "degree_3"],
   634 ["equation", "univariate", "polynomial", "degree_4"],
   635 ["equation", "univariate", "polynomial", "normalize"],
   636 ["equation", "univariate", "expanded", "degree_2"],
   637 ["equation", "makeFunctionTo"],
   638 ["function", "derivative_of", "named"],
   639 ["function", "maximum_of", "on_interval"],
   640 ["function", "make", "by_explicit"],
   641 ["function", "make", "by_new_variable"],
   642 ["function", "integrate", "named"],
   643 ["tool", "find_values"],
   644 ["system", "linear", "2x2", "triangular"],
   645 ["system", "linear", "2x2", "normalize"],
   646 ["system", "linear", "3x3"],
   647 ["system", "linear", "4x4", "triangular"],
   648 ["system", "linear", "4x4", "normalize"],
   649 ["Biegelinien", "
   650 MomentBestimmte"],
   651 ["Biegelinien", "MomentGegebene"],
   652 ["Biegelinien", "einfache"],
   653 ["Biegelinien", "QuerkraftUndMomentBestimmte"],
   654 ["Biegelinien", "vonBelastungZu"],
   655 ["Biegelinien", "setzeRandbedingungen"],
   656 ["Berechnung", "numerischSymbolische"],
   657 ["test", "equation", "univariate", "linear"],
   658 ["test", "equation", "univariate", "plain_square"],
   659 ["test", "equation", "univariate", "polynomial", "degree_two", "pq_formula"],
   660 ["test", "equation", "univariate", "polynomial", "degree_two", "abc_formula"],
   661 ["test", "equation", "univariate", "squareroot"],
   662 ["test", "equation", "univariate", "normalize"],
   663 ["test", "equation", "univariate", "sqroot-test"]
   664 ]
   665 val it = () : unit
   666 \end{verbatim}
   667 
   668 \section{Die passende ''Formalization`` f\"ur den Problemtyp}
   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.
   670 
   671 \section{Problem - Refinement}
   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:
   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:
   674 {\small
   675 \begin{enumerate}
   676 \item wenn für $F$ der Problemtyp $P_i$ passt, dann passt auch $P$
   677 \item wenn zu $F$ der Problemtyp P passt, dann sollte es nicht mehr als ein $P_i$ geben, das zu $F$ passt.
   678 \item alle $F$ , die zu $P$ passen, m\"ussen auch zu $P_n$ passen
   679 \end{enumerate}
   680 Zuerst ein Beispiel für die ersten zwei Punkte:
   681 {\footnotesize\begin{verbatim}
   682 > refine;
   683 val it = fn : fmz_ -> pblID -> SpecifyTools.match list
   684 > val fmz = ["equality (sqrt(9 + 4 * x)=sqrt x 
   685 + sqrt (5 + x))",
   686 # "soleFor x","errorBound (eps=0)",
   687 # "solutions L"];
   688 val fmz =
   689 ["equality (sqrt(9 + 4 * x)=sqrt x + sqrt (5 + x))", "soleFor x",
   690 "errorBound (eps=0)", ...] : string list
   691 > refine fmz ["univariate","equation"];
   692 *** pass ["equation","univariate"]
   693 *** comp_dts: ??.empty $ soleFor x
   694 Exception- ERROR raised
   695 \end{verbatim}
   696 Wenn die ersten zwei Regeln nicht angewendet werden k\"onnen, wird die dritte verwendet:
   697 {\footnotesize\begin{verbatim}
   698 > val fmz = ["equality (x + 1 = 2)",
   699 # "solveFor x","errorBound (eps=0)",
   700 # "solutions L"];
   701 val fmz = ["equality (x + 1 = 2)", "solveFor x", "errorBound (eps=0)", ...]
   702 : string list
   703 > refine fmz ["univariate","equation"];
   704 *** pass ["equation","univariate"]
   705 *** pass ["equation","univariate","linear"]
   706 *** pass ["equation","univariate","root"]
   707 *** pass ["equation","univariate","rational"]
   708 *** pass ["equation","univariate","polynomial" ]
   709 *** pass ["equation","univariate","polynomial","degree_0"]
   710 *** pass ["equation","univariate","polynomial","degree_1"]
   711 *** pass ["equation","univariate","polynomial","degree_2"]
   712 *** pass ["equation","univariate","polynomial","degree_3"]
   713 *** pass ["equation","univariate","polynomial","degree_4"]
   714 *** pass ["equation","univariate","polynomial","normalize"]
   715 val it =
   716 [Matches
   717 (["univariate", "equation"],
   718 {Find = [Correct "solutions L"], With = [...], ...}),
   719 NoMatch (["linear", "univariate", ...], {Find = [...], ...}),
   720 NoMatch (["root", ...], ...), ...] : SpecifyTools.match list
   721 \end{verbatim}
   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).
   723 
   724 
   725 \chapter{Methods}
   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.
   727 \section{Der ''Syntax`` des Scriptes}
   728 Syntax beschreibt den Zusammenhang der einzelnen Zeichen und Zeichenfolgen mit den Theorien.
   729 Er kann so definiert werden:
   730 \begin{tabbing}
   731 123\=123\=expr ::=\=$|\;\;$\=\kill
   732 \>script ::= {\tt Script} id arg$\,^*$ = body\\
   733 \>\>arg ::= id $\;|\;\;($ ( id :: type ) $)$\\
   734 \>\>body ::= expr\\
   735 \>\>expr ::= \>\>{\tt let} id = expr $($ ; id = expr$)^*$ {\tt in} expr\\
   736 \>\>\>$|\;$\>{\tt if} prop {\tt then} expr {\tt else} expr\\
   737 \>\>\>$|\;$\>listexpr\\
   738 \>\>\>$|\;$\>id\\
   739 \>\>\>$|\;$\>seqex id\\
   740 \>\>seqex ::= \>\>{\tt While} prop {\tt Do} seqex\\
   741 \>\>\>$|\;$\>{\tt Repeat} seqex\\
   742 \>\>\>$|\;$\>{\tt Try} seqex\\
   743 \>\>\>$|\;$\>seqex {\tt Or} seqex\\
   744 \>\>\>$|\;$\>seqex {\tt @@} seqex\\
   745 \>\>\>$|\;$\>tac $($ id $|$ listexpr $)^*$\\
   746 \>\>type ::= id\\
   747 \>\>tac ::= id
   748 \end{tabbing}}
   749 
   750 \section{\"Uberpr\"ufung der Auswertung}
   751 Das Kontrollsystem arbeitet mit den folgenden Script-Ausdr\"ucken, die {\it tacticals} genannt werden:
   752 \begin{description}
   753 \item{{\tt while} prop {\tt Do} expr id} 
   754 \item{{\tt if} prop {\tt then} expr {\tt else} expr}
   755 \end{description}
   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:
   757 \begin{description}
   758 \item{{\tt Repeat} expr id}
   759 \item{{\tt Try} expr id}
   760 \item{expr {\tt Or} expr id}
   761 \item{expr {\tt @@} expr id}
   762 \item xxx
   763 \end{description}
   764 
   765 
   766 
   767 \chapter{Befehle von \isac{}}
   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.
   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 die Taktik verwendet.
   770 \newline \textbf{Init\_Proof} bildet mit einem ''proof tree`` ein leeres Modell.
   771 \newline \textbf{Model\_Problem problem} bestimmt ein problemtype, das wom\"oglich in der ''hierachy`` gefunden wurde, und verwendet es f\"u das Umformen.
   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 Taktik und Formel von einer Liste w\"ahlen will.
   773 \newline \textbf{Specify\_Theorie theory, Specify\_Problem proble, Specify\_Method method} gibt das entsprechende Element des Basiswissens an.
   774 \newline \textbf{Refine\_Problem problem} sucht nach einem Problem in der hierachy, das auf das vorhandene zutrifft.
   775 \newline \textbf{Apply\_Method method} beendet das Modell und die Beschreibung. Danach wird die L\"osungmeldung ge\"offnet.
   776 \newline \textbf{Free\_Solve} beginnt eine L\"osungsmeldung ohne die Hilfe eine method.
   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``.
   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.
   779 \newline \textbf{Rewrite\_Set ruleset} hat \"ahnliche Funktionen wie Rewrite, gilt aber f\"ur einen ganzen Satz von Theorems, dem rule set.
   780 \newline \textbf{Rewrite\_Inst (substitution, theorem), Rewrite\_Set\_Inst (substitution, rule set)} ist vergleichbar mit besonderen Taktiken, ersetzt aber Konstanten in der Theorem, bevor es zu einer Anwendung kommt.
   781 
   782 
   783 
   784 
   785 
   786 
   787 
   788 
   789 
   790 \newpage
   791 ------------------------------- ALTER TEXT -------------------------------
   792 
   793 \chapter{Do a calculational proof}
   794 First we list all the tactics available so far (this list may be extended during further development of \isac).
   795 
   796 \section{Tactics for doing steps in calculations}
   797 \input{tactics}
   798 
   799 \section{The functionality of the math engine}
   800 A proof is being started in the math engine {\tt me} by the tactic
   801 \footnote{In the present version a tactic is of type {\tt mstep}.}
   802  {\tt Init\_Proof}, and interactively promoted by other tactics. On input of each tactic the {\tt me} returns the resulting formula and the next tactic applicable. The proof is finished, when the {\tt me} proposes {\tt End\_Proof} as the next tactic.
   803 
   804 We show a calculation (calculational proof) concerning equation solving, where the type of equation is refined automatically: The equation is given by the respective formalization ...
   805 {\footnotesize\begin{verbatim}
   806    ML> val fmz = ["equality ((x+#1)*(x+#2)=x^^^#2+#8)","solveFor x",
   807                   "errorBound (eps=#0)","solutions L"];
   808    val fmz =
   809      ["equality ((x+#1)*(x+#2)=x^^^#2+#8)","solveFor x","errorBound (eps=#0)",
   810       "solutions L"] : string list
   811    ML>
   812    ML> val spec as (dom, pbt, met) = ("SqRoot.thy",["univariate","equation"],
   813                                  ("SqRoot.thy","no_met"));
   814    val dom = "SqRoot.thy" : string
   815    val pbt = ["univariate","equation"] : string list
   816    val met = ("SqRoot.thy","no_met") : string * string
   817 \end{verbatim}}%size
   818 ... and the specification {\tt spec} of a domain {\tt dom}, a problem type {\tt pbt} and a method {\tt met}. Note that the equation is such, that it is not immediatly clear, what type it is in particular (it could be a polynomial of degree 2; but, for sure, the type is some specialized type of a univariate equation). Thus, no method ({\tt no\_met}) can be specified for solving the problem.
   819 
   820 Nevertheless this specification is sufficient for automatically solving the equation --- the appropriate method will be found by refinement within the hierarchy of problem types.
   821 
   822 
   823 \section{Initialize the calculation}
   824 The start of a new proof requires the following initializations: The proof state is given by a proof tree {\tt ptree} and a position {\tt pos'}; both are empty at the beginning. The tactic {\tt Init\_Proof} is, like all other tactics, paired with an identifier of type {\tt string} for technical reasons.
   825 {\footnotesize\begin{verbatim}
   826    ML>  val (mID,m) = ("Init_Proof",Init_Proof (fmz, (dom,pbt,met)));
   827    val mID = "Init_Proof" : string
   828    val m =
   829      Init_Proof
   830        (["equality ((x+#1)*(x+#2)=x^^^#2+#8)","solveFor x","errorBound (eps=#0)",
   831          "solutions L"],("SqRoot.thy",[#,#],(#,#))) : mstep
   832    ML>
   833    ML>  val (p,_,f,nxt,_,pt) = me (mID,m) e_pos' c EmptyPtree;
   834    val p = ([],Pbl) : pos'
   835    val f = Form' (PpcKF (0,EdUndef,0,Nundef,(#,#))) : mout
   836    val nxt = ("Refine_Tacitly",Refine_Tacitly ["univariate","equation"])
   837      : string * mstep
   838    val pt =
   839      Nd
   840        (PblObj
   841           {branch=#,cell=#,env=#,loc=#,meth=#,model=#,origin=#,ostate=#,probl=#,
   842            result=#,spec=#},[]) : ptree
   843    \end{verbatim}}%size
   844 The mathematics engine {\tt me} returns the resulting formula {\tt f} of type {\tt mout} (which in this case is a problem), the next tactic {\tt nxt}, and a new proof state ({\tt ptree}, {\tt pos'}).
   845 
   846 We can convince ourselves, that the problem is still empty, by increasing {\tt Compiler.Control.Print.printDepth}:
   847 {\footnotesize\begin{verbatim}
   848    ML> Compiler.Control.Print.printDepth:=8; (*4 default*)
   849    val it = () : unit
   850    ML>
   851    ML> f;
   852    val it =
   853      Form'
   854        (PpcKF
   855           (0,EdUndef,0,Nundef,
   856            (Problem [],
   857             {Find=[Incompl "solutions []"],
   858              Given=[Incompl "equality",Incompl "solveFor"],Relate=[],
   859              Where=[False "matches (?a = ?b) e_"],With=[]}))) : mout
   860 \end{verbatim}}%size
   861 Recall, please, the format of a problem as presented in sect.\ref{pbl} on p.\pageref{pbl}; such an 'empty' problem can be found above encapsulated by several constructors containing additional data (necessary for the dialog guide, not relevant here).\\
   862 
   863 {\it In the sequel we will omit output of the {\tt me} if it is not important for the respective context}.\\
   864 
   865 In general, the dialog guide will hide the following two tactics {\tt Refine\_Tacitly} and {\tt Model\_Problem} from the user.
   866 {\footnotesize\begin{verbatim}
   867    ML>  nxt;
   868    val it = ("Refine_Tacitly",Refine_Tacitly ["univariate","equation"])
   869      : string * mstep
   870    ML>
   871    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   872    val nxt = ("Model_Problem",Model_Problem ["normalize","univariate","equation"])
   873      : string * mstep
   874    ML>
   875    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   876 \end{verbatim}}%size
   877 
   878 
   879 \section{The phase of modeling} 
   880 comprises the input of the items of the problem; the {\tt me} can help by use of the formalization tacitly transferred by {\tt Init\_Proof}. In particular, the {\tt me} in general 'knows' the next promising tactic; the first one has been returned by the (hidden) tactic {\tt Model\_Problem}.
   881 
   882 {\footnotesize\begin{verbatim}
   883    ML>  nxt;
   884    val it =
   885      ("Add_Given",Add_Given "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)")
   886      : string * mstep
   887    ML>
   888    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   889    val nxt = ("Add_Given",Add_Given "solveFor x") : string * mstep
   890    ML>
   891    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   892    val nxt = ("Add_Find",Add_Find "solutions L") : string * mstep
   893    ML>
   894    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt; 
   895    val f = Form' (PpcKF (0,EdUndef,0,Nundef,(#,#))) : mout
   896 \end{verbatim}}%size
   897 \noindent Now the problem is 'modeled', all items are input. We convince ourselves by increasing {\tt Compiler.Control.Print.printDepth} once more.
   898 {\footnotesize\begin{verbatim}
   899    ML>  Compiler.Control.Print.printDepth:=8;
   900    ML>  f;
   901    val it =
   902      Form'
   903        (PpcKF
   904           (0,EdUndef,0,Nundef,
   905            (Problem [],
   906             {Find=[Correct "solutions L"],
   907              Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
   908                     Correct "solveFor x"],Relate=[],Where=[],With=[]}))) : mout
   909 \end{verbatim}}%size
   910 %One of the input items is considered {\tt Superfluous} by the {\tt me} consulting the problem type {\tt ["univariate","equation"]}. The {\tt ErrorBound}, however, could become important in case the equation only could be solved by some iteration method.
   911 
   912 \section{The phase of specification} 
   913 This phase provides for explicit determination of the domain, the problem type, and the method to be used. In particular, the search for the appropriate problem type is being supported. There are two tactics for this purpose: {\tt Specify\_Problem} generates feedback on how a candidate of a problem type matches the current problem, and {\tt Refine\_Problem} provides help by the system, if the user gets lost.
   914 {\footnotesize\begin{verbatim}
   915 ML> nxt;
   916    val it = ("Specify_Domain",Specify_Domain "SqRoot.thy") : string * mstep
   917    ML>
   918    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   919    val nxt =
   920      ("Specify_Problem",Specify_Problem ["normalize","univariate","equation"])
   921      : string * mstep
   922    val pt =
   923      Nd
   924        (PblObj
   925           {branch=#,cell=#,env=#,loc=#,meth=#,model=#,origin=#,ostate=#,probl=#,
   926               result=#,spec=#},[]) : ptree
   927 \end{verbatim}}%size
   928 The {\tt me} is smart enough to know the appropriate problem type (transferred tacitly with {\tt Init\_Proof}). In order to challenge the student, the dialog guide may hide this information; then the {\tt me} works as follows.
   929 {\footnotesize\begin{verbatim}
   930    ML> val nxt = ("Specify_Problem",
   931                Specify_Problem ["polynomial","univariate","equation"]);
   932    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   933    val f = Form' (PpcKF (0,EdUndef,0,Nundef,(#,#))) : mout
   934    val nxt =
   935      ("Refine_Problem",Refine_Problem ["normalize","univariate","equation"])
   936      : string * mstep
   937    ML>
   938    ML> val nxt = ("Specify_Problem",
   939                Specify_Problem ["linear","univariate","equation"]);
   940    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   941    val f =
   942      Form'
   943        (PpcKF
   944           (0,EdUndef,0,Nundef,
   945            (Problem ["linear","univariate","equation"],
   946             {Find=[Correct "solutions L"],
   947              Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
   948                     Correct "solveFor x"],Relate=[],
   949              Where=[False
   950                     "matches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
   951              With=[]}))) : mout 
   952 \end{verbatim}}%size
   953 Again assuming that the dialog guide hide the next tactic proposed by the {\tt me}, and the student gets lost, {\tt Refine\_Problem} always 'knows' the way out, if applied to the problem type {\tt["univariate","equation"]}.
   954 {\footnotesize\begin{verbatim}
   955    ML> val nxt = ("Refine_Problem",
   956                   Refine_Problem ["linear","univariate","equation
   957    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   958    val f = Problems (RefinedKF [NoMatch #]) : mout
   959    ML>
   960    ML>  Compiler.Control.Print.printDepth:=9;f;Compiler.Control.Print.printDepth:=4;
   961    val f =
   962      Problems
   963        (RefinedKF
   964           [NoMatch
   965              (["linear","univariate","equation"],
   966               {Find=[Correct "solutions L"],
   967                Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
   968                       Correct "solveFor x"],Relate=[],
   969                Where=[False
   970                      "matches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
   971                With=[]})]) : mout
   972    ML>
   973    ML> val nxt = ("Refine_Problem",Refine_Problem ["univariate","equation"]);
   974    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
   975    val f =
   976      Problems
   977        (RefinedKF [Matches #,NoMatch #,NoMatch #,NoMatch #,NoMatch #,Matches #])
   978      : mout
   979    ML>
   980    ML>
   981    ML>  Compiler.Control.Print.printDepth:=9;f;Compiler.Control.Print.printDepth:=4;
   982    val f =
   983      Problems
   984        (RefinedKF
   985           [Matches
   986              (["univariate","equation"],
   987               {Find=[Correct "solutions L"],
   988                Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
   989                       Correct "solveFor x"],Relate=[],
   990                Where=[Correct
   991                With=[]}),
   992            NoMatch
   993              (["linear","univariate","equation"],
   994               {Find=[Correct "solutions L"],
   995                Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
   996                       Correct "solveFor x"],Relate=[],
   997                Where=[False
   998                       "matches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
   999                   With=[]}),
  1000            NoMatch
  1001              ...
  1002              ...   
  1003            Matches
  1004              (["normalize","univariate","equation"],
  1005               {Find=[Correct "solutions L"],
  1006                Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
  1007                       Correct "solveFor x"],Relate=[],Where=[],With=[]})]) : mout
  1008 \end{verbatim}}%size
  1009 The tactic {\tt Refine\_Problem} returns all matches to problem types along the path traced in the problem hierarchy (anlogously to the authoring tool for refinement in sect.\ref{refine} on p.\pageref{refine}) --- a lot of information to be displayed appropriately in the hiearchy browser~!
  1010 
  1011 \section{The phase of solving} 
  1012 This phase starts by invoking a method, which acchieves the normal form within two tactics, {\tt Rewrite rnorm\_equation\_add} and {\tt Rewrite\_Set SqRoot\_simplify}:
  1013 {\footnotesize\begin{verbatim} 
  1014    ML> nxt;
  1015    val it = ("Apply_Method",Apply_Method ("SqRoot.thy","norm_univar_equation"))
  1016      : string * mstep
  1017    ML>
  1018    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
  1019    val f =
  1020      Form' (FormKF (~1,EdUndef,1,Nundef,"(x + #1) * (x + #2) = x ^^^ #2 + #8"))
  1021    val nxt =
  1022      ("Rewrite", Rewrite
  1023         ("rnorm_equation_add","~ ?b =!= #0 ==> (?a = ?b) = (?a + #-1 * ?b = #0)"))
  1024    ML>
  1025    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
  1026    val f =
  1027      Form' (FormKF (~1,EdUndef,1,Nundef,
  1028            "(x + #1) * (x + #2) + #-1 * (x ^^^ #2 + #8) = #0")) : mout
  1029    val nxt = ("Rewrite_Set",Rewrite_Set "SqRoot_simplify") : string * mstep
  1030    ML>
  1031    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
  1032    val f = Form' (FormKF (~1,EdUndef,1,Nundef,"#-6 + #3 * x = #0")) : mout
  1033    val nxt = ("Subproblem",Subproblem ("SqRoot.thy",[#,#])) : string * mstep
  1034 \end{verbatim}}%size
  1035 Now the normal form {\tt \#-6 + \#3 * x = \#0} is the input to a subproblem, which again allows for specification of the type of equation, and the respective method:
  1036 {\footnotesize\begin{verbatim}
  1037    ML> nxt;
  1038    val it = ("Subproblem",Subproblem ("SqRoot.thy",["univariate","equation"]))
  1039    ML>   
  1040    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
  1041    val f =
  1042      Form' (FormKF
  1043           (~1,EdUndef,1,Nundef,"Subproblem (SqRoot.thy, [univariate, equation])"))
  1044      : mout
  1045    val nxt = ("Refine_Tacitly",Refine_Tacitly ["univariate","equation"])
  1046    ML>
  1047    ML> val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
  1048    val nxt = ("Model_Problem",Model_Problem ["linear","univariate","equation"])
  1049 \end{verbatim}}%size
  1050 As required, the tactic {\tt Refine ["univariate","equation"]} selects the appropriate type of equation from the problem hierarchy, which can be seen by the tactic {\tt Model\_Problem ["linear","univariate","equation"]} prosed by the system.
  1051 
  1052 Again the whole phase of modeling and specification follows; we skip it here, and \isac's dialog guide may decide to do so as well.
  1053 
  1054 
  1055 \section{The final phase: check the post-condition}
  1056 The type of problems solved by \isac{} are so-called 'example construction problems' as shown above. The most characteristic point of such a problem is the post-condition. The handling of the post-condition in the given context is an open research question.
  1057 
  1058 Thus the post-condition is just mentioned, in our example for both, the problem and the subproblem:
  1059 {\footnotesize\begin{verbatim}
  1060    ML> nxt;
  1061    val it = ("Check_Postcond",Check_Postcond ["linear","univariate","equation"])
  1062    ML>
  1063    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
  1064    val f = Form' (FormKF (~1,EdUndef,1,Nundef,"[x = #2]")) : mout
  1065    val nxt =
  1066      ("Check_Postcond",Check_Postcond ["normalize","univariate","equation"])
  1067    ML>
  1068    ML>  val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
  1069    val f = Form' (FormKF (~1,EdUndef,0,Nundef,"[x = #2]")) : mout
  1070    val nxt = ("End_Proof'",End_Proof') : string * mstep
  1071 \end{verbatim}}%size
  1072 The next tactic proposed by the system, {\tt End\_Proof'} indicates that the proof has finished successfully.\\
  1073 
  1074 {\it The tactics proposed by the system need {\em not} be followed by the user; the user is free to choose other tactics, and the system will report, if this is applicable at the respective proof state, or not~! The reader may try out~!}
  1075 
  1076 
  1077 
  1078 \part{Systematic description}
  1079 
  1080 
  1081 \chapter{The structure of the knowledge base}
  1082 
  1083 \section{Tactics and data}
  1084 First we view the ME from outside, i.e. we regard tactics and relate them to the knowledge base (KB). W.r.t. the KB we address the atomic items which have to be implemented in detail by the authors of the KB
  1085 \footnote{Some of these items are fetched by the tactics from intermediate storage within the ME, and not directly from the KB.}
  1086 . The items are listed in alphabetical order in Tab.\ref{kb-items} on p.\pageref{kb-items}.
  1087 {\begin{table}[h]
  1088 \caption{Atomic items of the KB} \label{kb-items}
  1089 %\tabcolsep=0.3mm
  1090 \begin{center}
  1091 \def\arraystretch{1.0}
  1092 \begin{tabular}{lp{9.0cm}}
  1093 abbrevation & description \\
  1094 \hline
  1095 &\\
  1096 {\it calc\_list}
  1097 & associationlist of the evaluation-functions {\it eval\_fn}\\
  1098 {\it eval\_fn}
  1099 & evaluation-function for numerals and for predicates coded in SML\\
  1100 {\it eval\_rls   }
  1101 & ruleset {\it rls} for simplifying expressions with {\it eval\_fn}s\\
  1102 {\it fmz}
  1103 & formalization, i.e. a minimal formula representation of an example \\
  1104 {\it met}
  1105 & a method, i.e. a datastructure holding all informations for the solving phase ({\it rew\_ord}, {\it scr}, etc.)\\
  1106 {\it metID}
  1107 & reference to a {\it met}\\
  1108 {\it op}
  1109 & operator as key to an {\it eval\_fn} in a {\it calc\_list}\\
  1110 {\it pbl}
  1111 & problem, i.e. a node in the problem-hierarchy\\
  1112 {\it pblID}
  1113 & reference to a {\it pbl}\\
  1114 {\it rew\_ord}
  1115 & rewrite-order\\
  1116 {\it rls}
  1117 & ruleset, i.e. a datastructure holding theorems {\it thm} and operators {\it op} for simplification (with a {\it rew\_ord})\\
  1118 {\it Rrls}
  1119 & ruleset for 'reverse rewriting' (an \isac-technique generating stepwise rewriting, e.g. for cancelling fractions)\\
  1120 {\it scr}
  1121 & script describing algorithms by tactics, part of a {\it met} \\
  1122 {\it norm\_rls}
  1123 & special ruleset calculating a normalform, associated with a {\it thy}\\
  1124 {\it spec}
  1125 & specification, i.e. a tripel ({\it thyID, pblID, metID})\\
  1126 {\it subs}
  1127 & substitution, i.e. a list of variable-value-pairs\\
  1128 {\it term}
  1129 & Isabelle term, i.e. a formula\\
  1130 {\it thm}
  1131 & theorem\\     
  1132 {\it thy}
  1133 & theory\\
  1134 {\it thyID}
  1135 & reference to a {\it thy} \\
  1136 \end{tabular}\end{center}\end{table}
  1137 }
  1138 The relations between tactics and data items are shown in Tab.\ref{tac-kb}on p.\pageref{tac-kb}.
  1139 {\def\arraystretch{1.2}
  1140 \begin{table}[h]
  1141 \caption{Which tactic uses which KB's item~?} \label{tac-kb}
  1142 \tabcolsep=0.3mm
  1143 \begin{center}
  1144 \begin{tabular}{|ll||cccc|ccc|cccc|} \hline
  1145 tactic  &input &    &    &    &norm\_&   &rew\_&rls &eval\_&eval\_&calc\_&   \\
  1146         &      &thy &scr &Rrls&rls  &thm &ord  &Rrls&fn    &rls   &list  &dsc\\
  1147 \hline\hline
  1148 Init\_Proof
  1149         &fmz   & x  &    &    & x   &    &     &    &      &      &      & x \\
  1150         &spec  &    &    &    &     &    &     &    &      &      &      &   \\
  1151 \hline
  1152 \multicolumn{13}{|l|}{model phase}\\
  1153 \hline
  1154 Add\_*  &term  & x  &    &    & x   &    &     &    &      &      &      & x \\
  1155 FormFK  &model & x  &    &    & x   &    &     &    &      &      &      & x \\
  1156 \hline
  1157 \multicolumn{13}{|l|}{specify phase}\\
  1158 \hline
  1159 Specify\_Theory 
  1160         &thyID & x  &    &    & x   &    &     &    & x    & x    &      & x \\
  1161 Specify\_Problem 
  1162         &pblID & x  &    &    & x   &    &     &    & x    & x    &      & x \\
  1163 Refine\_Problem 
  1164            &pblID & x  &    &    & x   &    &     &    & x    & x    &      & x \\
  1165 Specify\_Method 
  1166         &metID & x  &    &    & x   &    &     &    & x    & x    &      & x \\
  1167 Apply\_Method 
  1168         &metID & x  & x  &    & x   &    &     &    & x    & x    &      & x \\
  1169 \hline
  1170 \multicolumn{13}{|l|}{solve phase}\\
  1171 \hline
  1172 Rewrite,\_Inst 
  1173         &thm   & x  & x  &    &     & x  &met  &    & x    &met   &      &   \\
  1174 Rewrite, Detail
  1175         &thm   & x  & x  &    &     & x  &rls  &    & x    &rls   &      &   \\
  1176 Rewrite, Detail
  1177         &thm   & x  & x  &    &     & x  &Rrls &    & x    &Rrls  &      &   \\
  1178 Rewrite\_Set,\_Inst
  1179         &rls   & x  & x  &    &     &    &     & x  & x    & x    &      &   \\
  1180 Calculate  
  1181         &op    & x  & x  &    &     &    &     &    &      &      & x    &   \\
  1182 Substitute 
  1183         &subs  & x  &    &    & x   &    &     &    &      &      &      &   \\
  1184         &      &    &    &    &     &    &     &    &      &      &      &   \\
  1185 SubProblem 
  1186         &spec  & x  & x  &    & x   &    &     &    & x    & x    &      & x \\
  1187         &fmz   &    &    &    &     &    &     &    &      &      &      &   \\
  1188 \hline
  1189 \end{tabular}\end{center}\end{table}
  1190 }
  1191 
  1192 \section{\isac's theories}
  1193 \isac's theories build upon Isabelles theories for high-order-logic (HOL) up to the respective development of real numbers ({\tt HOL/Real}). Theories have a special format defined in \cite{Isa-ref} and the suffix {\tt *.thy}; usually theories are paired with SML-files having the same filename and the suffix {\tt *.ML}.
  1194 
  1195 \isac's theories represent the deductive part of \isac's knowledge base, the hierarchy of theories is structured accordingly. The {\tt *.ML}-files, however, contain {\em all} data of the other two axes of the knowledge base, the problems and the methods (without presenting their respective structure, which is done by the problem browser and the method browser, see \ref{pbt}).
  1196 
  1197 Tab.\ref{theories} on p.\pageref{theories} lists the basic theories planned to be implemented in version \isac.1. We expext the list to be expanded in the near future, actually, have a look to the theory browser~!
  1198 
  1199 The first three theories in the list do {\em not} belong to \isac's knowledge base; they are concerned with \isac's script-language for methods and listed here for completeness.
  1200 {\begin{table}[h]
  1201 \caption{Theories in \isac-version I} \label{theories}
  1202 %\tabcolsep=0.3mm
  1203 \begin{center}
  1204 \def\arraystretch{1.0}
  1205 \begin{tabular}{lp{9.0cm}}
  1206 theory & description \\
  1207 \hline
  1208 &\\
  1209 ListI.thy
  1210 & assigns identifiers to the functions defined in {\tt Isabelle2002/src/HOL/List.thy} and (intermediatly~?) defines some more list functions\\
  1211 ListI.ML
  1212 & {\tt eval\_fn} for the additional list functions\\
  1213 Tools.thy
  1214 & functions required for the evaluation of scripts\\
  1215 Tools.ML
  1216 & the respective {\tt eval\_fn}s\\
  1217 Script.thy
  1218 & prerequisites for scripts: types, tactics, tacticals,\\
  1219 Script.ML
  1220 & sets of tactics and functions for internal use\\
  1221 & \\
  1222 \hline
  1223 & \\
  1224 Typefix.thy
  1225 & an intermediate hack for escaping type errors\\
  1226 Descript.thy
  1227 & {\it description}s for the formulas in {\it model}s and {\it problem}s\\
  1228 Atools
  1229 & (re-)definition of operators; general predicates and functions for preconditions; theorems for the {\tt eval\_rls}\\
  1230 Float
  1231 & floating point numerals\\
  1232 Equation
  1233 & basic notions for equations and equational systems\\
  1234 Poly
  1235 & polynomials\\
  1236 PolyEq
  1237 & polynomial equations and equational systems \\
  1238 Rational.thy
  1239 & additional theorems for rationals\\
  1240 Rational.ML
  1241 & cancel, add and simplify rationals using (a generalization of) Euclids algorithm; respective reverse rulesets\\
  1242 RatEq
  1243 & equations on rationals\\
  1244 Root
  1245 & radicals; calculate normalform; respective reverse rulesets\\
  1246 RootEq
  1247 & equations on roots\\
  1248 RatRootEq
  1249 & equations on rationals and roots (i.e. on terms containing both operations)\\
  1250 Vect
  1251 & vector analysis\\
  1252 Trig
  1253 & trigonometriy\\
  1254 LogExp
  1255 & logarithms and exponential functions\\
  1256 Calculus
  1257 & nonstandard analysis\\
  1258 Diff
  1259 & differentiation\\
  1260 DiffApp
  1261 & applications of differentiaten (maxima-minima-problems)\\
  1262 Test
  1263 & (old) data for the test suite\\
  1264 Isac
  1265 & collects all \isac-theoris.\\
  1266 \end{tabular}\end{center}\end{table}
  1267 }
  1268 
  1269 
  1270 \section{Data in {\tt *.thy}- and {\tt *.ML}-files}
  1271 As already mentioned, theories come in pairs of {\tt *.thy}- and {\tt *.ML}-files with the same respective filename. How data are distributed between the two files is shown in Tab.\ref{thy-ML} on p.\pageref{thy-ML}.
  1272 {\begin{table}[h]
  1273 \caption{Data in {\tt *.thy}- and {\tt *.ML}-files} \label{thy-ML}
  1274 \tabcolsep=2.0mm
  1275 \begin{center}
  1276 \def\arraystretch{1.0}
  1277 \begin{tabular}{llp{7.7cm}}
  1278 file & data & description \\
  1279 \hline
  1280 & &\\
  1281 {\tt *.thy}
  1282 & consts 
  1283 & operators, predicates, functions, script-names ('{\tt Script} name \dots{\tt arguments}')
  1284 \\
  1285 & rules  
  1286 & theorems: \isac{} uses Isabelles theorems if possible; additional theorems analoguous to such existing in Isabelle get the Isabelle-identifier attached an {\it I}
  1287 \\& &\\
  1288 {\tt *.ML}
  1289 & {\tt theory' :=} 
  1290 & the theory defined by the actual {\tt *.thy}-file is made accessible to \isac
  1291 \\
  1292 & {\tt eval\_fn}
  1293 & evaluation function for operators and predicates, coded on the meta-level (SML); the identifier of such a function is a combination of the keyword {\tt eval\_} with the identifier of the function as defined in {\tt *.thy}
  1294 \\
  1295 & {\tt *\_simplify} 
  1296 & the canonical simplifier for the actual theory, i.e. the identifier for this ruleset is a combination of the theories identifier and the keyword {\tt *\_simplify}
  1297 \\
  1298 & {\tt norm\_rls :=}
  1299 & the canonical simplifier {\tt *\_simplify} is stored such that it is accessible for \isac
  1300 \\
  1301 & {\tt rew\_ord' :=}
  1302 & the same for rewrite orders, if needed outside of one particular ruleset
  1303 \\
  1304 & {\tt ruleset' :=}
  1305 & the same for rulesets (ordinary rulesets, reverse rulesets and {\tt eval\_rls})
  1306 \\
  1307 & {\tt calc\_list :=}
  1308 & the same for {\tt eval\_fn}s, if needed outside of one particular ruleset (e.g. for a tactic {\tt Calculate} in a script)
  1309 \\
  1310 & {\tt store\_pbl}
  1311 & problems defined within this {\tt *.ML}-file are made accessible for \isac
  1312 \\
  1313 & {\tt methods :=}
  1314 & methods defined within this {\tt *.ML}-file are made accessible for \isac
  1315 \\
  1316 \end{tabular}\end{center}\end{table}
  1317 }
  1318 The order of the data-items within the theories should adhere to the order given in this list.
  1319 
  1320 \section{Formal description of the problem-hierarchy}
  1321 %for Richard Lang
  1322 
  1323 \section{Script tactics}
  1324 The tactics actually promote the calculation: they construct the prooftree behind the scenes, and they are the points during evaluation where the script-interpreter transfers control to the user. Here we only describe the sytax of the tactics; the semantics is described on p.\pageref{user-tactics} below in context with the tactics the student uses ('user-tactics'): there is a 1-to-1 correspondence between user-tactics and script-tactics.
  1325 
  1326 
  1327 
  1328 
  1329 
  1330 \part{Authoring on the knowledge}
  1331 
  1332 
  1333 \section{Add a theorem}
  1334 \section{Define and add a problem}
  1335 \section{Define and add a predicate}
  1336 \section{Define and add a method}
  1337 \section{}
  1338 \section{}
  1339 \section{}
  1340 \section{}
  1341 
  1342 
  1343 
  1344 \newpage
  1345 \bibliography{bib/isac,bib/from-theses}
  1346 
  1347 \end{document}