summary |
shortlog |
changelog |
graph |
tags |
bookmarks |
branches |
files |
changeset |
raw | gz |
help

author | paulson |

Tue, 24 Jul 2001 11:25:54 +0200 | |

changeset 11450 | 1b02a6c4032f |

parent 11449 | d25be0ad1a6c |

child 11451 | 8abfb4f7bd02 |

tweaks and indexing

--- a/doc-src/TutorialI/ToyList/ToyList.thy Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/ToyList/ToyList.thy Tue Jul 24 11:25:54 2001 +0200 @@ -19,16 +19,16 @@ empty~list and the operator that adds an element to the front of a list. For example, the term \isa{Cons True (Cons False Nil)} is a value of type @{typ"bool list"}, namely the list with the elements @{term"True"} and -@{term"False"}. Because this notation becomes unwieldy very quickly, the +@{term"False"}. Because this notation quickly becomes unwieldy, the datatype declaration is annotated with an alternative syntax: instead of @{term[source]Nil} and \isa{Cons x xs} we can write @{term"[]"}\index{$HOL2list@\texttt{[]}|bold} and @{term"x # xs"}\index{$HOL2list@\texttt{\#}|bold}. In fact, this -alternative syntax is the standard syntax. Thus the list \isa{Cons True +alternative syntax is the familiar one. Thus the list \isa{Cons True (Cons False Nil)} becomes @{term"True # False # []"}. The annotation \isacommand{infixr}\index{infixr@\isacommand{infixr} (annotation)} means that @{text"#"} associates to -the right, i.e.\ the term @{term"x # y # z"} is read as @{text"x # (y # z)"} +the right: the term @{term"x # y # z"} is read as @{text"x # (y # z)"} and not as @{text"(x # y) # z"}. The @{text 65} is the priority of the infix @{text"#"}.

--- a/doc-src/TutorialI/ToyList/document/ToyList.tex Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/ToyList/document/ToyList.tex Tue Jul 24 11:25:54 2001 +0200 @@ -21,16 +21,16 @@ empty~list and the operator that adds an element to the front of a list. For example, the term \isa{Cons True (Cons False Nil)} is a value of type \isa{bool\ list}, namely the list with the elements \isa{True} and -\isa{False}. Because this notation becomes unwieldy very quickly, the +\isa{False}. Because this notation quickly becomes unwieldy, the datatype declaration is annotated with an alternative syntax: instead of \isa{Nil} and \isa{Cons x xs} we can write \isa{{\isacharbrackleft}{\isacharbrackright}}\index{$HOL2list@\texttt{[]}|bold} and \isa{x\ {\isacharhash}\ xs}\index{$HOL2list@\texttt{\#}|bold}. In fact, this -alternative syntax is the standard syntax. Thus the list \isa{Cons True +alternative syntax is the familiar one. Thus the list \isa{Cons True (Cons False Nil)} becomes \isa{True\ {\isacharhash}\ False\ {\isacharhash}\ {\isacharbrackleft}{\isacharbrackright}}. The annotation \isacommand{infixr}\index{infixr@\isacommand{infixr} (annotation)} means that \isa{{\isacharhash}} associates to -the right, i.e.\ the term \isa{x\ {\isacharhash}\ y\ {\isacharhash}\ z} is read as \isa{x\ {\isacharhash}\ {\isacharparenleft}y\ {\isacharhash}\ z{\isacharparenright}} +the right: the term \isa{x\ {\isacharhash}\ y\ {\isacharhash}\ z} is read as \isa{x\ {\isacharhash}\ {\isacharparenleft}y\ {\isacharhash}\ z{\isacharparenright}} and not as \isa{{\isacharparenleft}x\ {\isacharhash}\ y{\isacharparenright}\ {\isacharhash}\ z}. The \isa{{\isadigit{6}}{\isadigit{5}}} is the priority of the infix \isa{{\isacharhash}}.

--- a/doc-src/TutorialI/appendix.tex Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/appendix.tex Tue Jul 24 11:25:54 2001 +0200 @@ -107,7 +107,7 @@ \hline \end{tabular} \end{center} -\caption{Mathematical symbols, their \textsc{ascii}-equivalents and internal names} +\caption{Mathematical Symbols, Their \textsc{ascii}-Equivalents and Internal Names} \label{tab:ascii} \end{table}\indexbold{ASCII@\textsc{ascii} symbols} @@ -153,7 +153,7 @@ \hline \end{tabular} \end{center} -\caption{Reserved words in HOL terms} +\caption{Reserved Words in HOL Terms} \label{tab:ReservedWords} \end{table} @@ -185,6 +185,6 @@ %\hline %\end{tabular} %\end{center} -%\caption{Minor keywords in HOL theories} +%\caption{Minor Keywords in HOL Theories} %\label{tab:keywords} %\end{table}

--- a/doc-src/TutorialI/basics.tex Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/basics.tex Tue Jul 24 11:25:54 2001 +0200 @@ -8,10 +8,11 @@ of Isabelle for HOL, which abbreviates Higher-Order Logic. We introduce HOL step by step following the equation \[ \mbox{HOL} = \mbox{Functional Programming} + \mbox{Logic}. \] -We do not assume that the reader is familiar with mathematical logic but that -(s)he is used to logical and set theoretic notation, such as covered -in a good discrete math course~\cite{Rosen-DMA}. In contrast, we do assume -that the reader is familiar with the basic concepts of functional +We do not assume that you are familiar with mathematical logic but that +you are used to logical and set theoretic notation, such as covered +in a good discrete mathematics course~\cite{Rosen-DMA}. +In contrast, we do assume +that you are familiar with the basic concepts of functional programming~\cite{Bird-Haskell,Hudak-Haskell,paulson-ml2,Thompson-Haskell}. Although this tutorial initially concentrates on functional programming, do not be misled: HOL can express most mathematical concepts, and functional @@ -19,15 +20,16 @@ Isabelle~\cite{paulson-isa-book} is implemented in ML~\cite{SML}. This has influenced some of Isabelle/HOL's concrete syntax but is otherwise irrelevant -for us because this tutorial is based on +for us: this tutorial is based on Isabelle/Isar~\cite{isabelle-isar-ref}, an extension of Isabelle which hides the implementation language almost completely. Thus the full name of the system should be Isabelle/Isar/HOL, but that is a bit of a mouthful. There are other implementations of HOL, in particular the one by Mike Gordon +\index{Gordon, Mike}% \emph{et al.}, which is usually referred to as ``the HOL system'' \cite{mgordon-hol}. For us, HOL refers to the logical system, and sometimes -its incarnation Isabelle/HOL. +its incarnation Isabelle/HOL\@. A tutorial is by definition incomplete. Currently the tutorial only introduces the rudiments of Isar's proof language. To fully exploit the power @@ -50,23 +52,24 @@ format of a theory \texttt{T} is \begin{ttbox} theory T = B\(@1\) + \(\cdots\) + B\(@n\): -\(\textit{declarations, definitions, and proofs}\) +{\rmfamily\textit{declarations, definitions, and proofs}} end \end{ttbox} where \texttt{B}$@1$, \dots, \texttt{B}$@n$ are the names of existing -theories that \texttt{T} is based on and \texttt{\textit{declarations, - definitions, and proofs}} represents the newly introduced concepts +theories that \texttt{T} is based on and \textit{declarations, + definitions, and proofs} represents the newly introduced concepts (types, functions etc.) and proofs about them. The \texttt{B}$@i$ are the -direct \textbf{parent theories}\indexbold{parent theory} of \texttt{T}. -Everything defined in the parent theories (and their parents \dots) is +direct \textbf{parent theories}\indexbold{parent theories} of~\texttt{T}\@. +Everything defined in the parent theories (and their parents, recursively) is automatically visible. To avoid name clashes, identifiers can be -\textbf{qualified} by theory names as in \texttt{T.f} and -\texttt{B.f}.\indexbold{identifier!qualified} Each theory \texttt{T} must +\textbf{qualified}\indexbold{identifiers!qualified} +by theory names as in \texttt{T.f} and~\texttt{B.f}. +Each theory \texttt{T} must reside in a \textbf{theory file}\index{theory files} named \texttt{T.thy}. This tutorial is concerned with introducing you to the different linguistic -constructs that can fill \textit{\texttt{declarations, definitions, and - proofs}} in the above theory template. A complete grammar of the basic +constructs that can fill the \textit{declarations, definitions, and + proofs} above. A complete grammar of the basic constructs is found in the Isabelle/Isar Reference Manual. HOL's theory collection is available online at @@ -92,24 +95,28 @@ Embedded in a theory are the types, terms and formulae of HOL\@. HOL is a typed logic whose type system resembles that of functional programming languages -like ML or Haskell. Thus there are\index{types} +like ML or Haskell. Thus there are +\index{types|(} \begin{description} -\item[base types,] in particular \tydx{bool}, the type of truth values, +\item[base types,] +in particular \tydx{bool}, the type of truth values, and \tydx{nat}, the type of natural numbers. -\item[type constructors,] in particular \tydx{list}, the type of +\item[type constructors,]\index{type constructors} + in particular \tydx{list}, the type of lists, and \tydx{set}, the type of sets. Type constructors are written postfix, e.g.\ \isa{(nat)list} is the type of lists whose elements are natural numbers. Parentheses around single arguments can be dropped (as in \isa{nat list}), multiple arguments are separated by commas (as in \isa{(bool,nat)ty}). -\item[function types,] denoted by \isasymFun\indexbold{$IsaFun@\isasymFun}. +\item[function types,]\index{function types} +denoted by \isasymFun\indexbold{$IsaFun@\isasymFun}. In HOL \isasymFun\ represents \emph{total} functions only. As is customary, \isa{$\tau@1$ \isasymFun~$\tau@2$ \isasymFun~$\tau@3$} means \isa{$\tau@1$ \isasymFun~($\tau@2$ \isasymFun~$\tau@3$)}. Isabelle also supports the notation \isa{[$\tau@1,\dots,\tau@n$] \isasymFun~$\tau$} which abbreviates \isa{$\tau@1$ \isasymFun~$\cdots$ \isasymFun~$\tau@n$ \isasymFun~$\tau$}. -\item[type variables,]\indexbold{type variables}\indexbold{variables!type} +\item[type variables,]\index{type variables}\index{variables!type} denoted by \ttindexboldpos{'a}{$Isatype}, \isa{'b} etc., just like in ML\@. They give rise to polymorphic types like \isa{'a \isasymFun~'a}, the type of the identity function. @@ -125,7 +132,7 @@ strange happens, we recommend that you set the flag\index{flags} \isa{show_types}\index{*show_types (flag)}. Isabelle will then display type information - that is usually suppressed. simply type + that is usually suppressed. Simply type \begin{ttbox} ML "set show_types" \end{ttbox} @@ -134,36 +141,41 @@ This can be reversed by \texttt{ML "reset show_types"}. Various other flags, which we introduce as we go along, can be set and reset in the same manner.% \index{flags!setting and resetting} -\end{warn} +\end{warn}% +\index{types|)} -\textbf{Terms}\index{terms} are formed as in functional programming by +\index{terms|(} +\textbf{Terms} are formed as in functional programming by applying functions to arguments. If \isa{f} is a function of type \isa{$\tau@1$ \isasymFun~$\tau@2$} and \isa{t} is a term of type $\tau@1$ then \isa{f~t} is a term of type $\tau@2$. HOL also supports infix functions like \isa{+} and some basic constructs from functional programming, such as conditional expressions: \begin{description} -\item[\isa{if $b$ then $t@1$ else $t@2$}]\indexbold{*if (symbol)} +\item[\isa{if $b$ then $t@1$ else $t@2$}]\index{*if expressions} Here $b$ is of type \isa{bool} and $t@1$ and $t@2$ are of the same type. -\item[\isa{let $x$ = $t$ in $u$}]\indexbold{*let (symbol)} +\item[\isa{let $x$ = $t$ in $u$}]\index{*let expressions} is equivalent to $u$ where all occurrences of $x$ have been replaced by $t$. For example, \isa{let x = 0 in x+x} is equivalent to \isa{0+0}. Multiple bindings are separated by semicolons: \isa{let $x@1$ = $t@1$; \dots; $x@n$ = $t@n$ in $u$}. \item[\isa{case $e$ of $c@1$ \isasymFun~$e@1$ |~\dots~| $c@n$ \isasymFun~$e@n$}] -\indexbold{*case (symbol)} +\index{*case expressions} evaluates to $e@i$ if $e$ is of the form $c@i$. \end{description} Terms may also contain -\isasymlambda-abstractions\indexbold{$Isalam@\isasymlambda}. For example, +\isasymlambda-abstractions.\index{lambda@$\lambda$ expressions} +For example, \isa{\isasymlambda{}x.~x+1} is the function that takes an argument \isa{x} and returns \isa{x+1}. Instead of \isa{\isasymlambda{}x.\isasymlambda{}y.\isasymlambda{}z.~$t$} we can write -\isa{\isasymlambda{}x~y~z.~$t$}. +\isa{\isasymlambda{}x~y~z.~$t$}.% +\index{terms|)} -\textbf{Formulae}\indexbold{formulae} are terms of type \tydx{bool}. +\index{formulae|(}% +\textbf{Formulae} are terms of type \tydx{bool}. There are the basic constants \cdx{True} and \cdx{False} and the usual logical connectives (in decreasing order of priority): \indexboldpos{\protect\isasymnot}{$HOL0not}, \indexboldpos{\protect\isasymand}{$HOL0and}, @@ -173,49 +185,41 @@ \isasymimp~C)} and is thus logically equivalent to \isa{A \isasymand~B \isasymimp~C} (which is \isa{(A \isasymand~B) \isasymimp~C}). -Equality is available in the form of the infix function -\isa{=}\indexbold{$HOL0eq@\texttt{=}} of type \isa{'a \isasymFun~'a +Equality\index{equality} is available in the form of the infix function +\isa{=} of type \isa{'a \isasymFun~'a \isasymFun~bool}. Thus \isa{$t@1$ = $t@2$} is a formula provided $t@1$ -and $t@2$ are terms of the same type. In case $t@1$ and $t@2$ are of type -\isa{bool}, \isa{=} acts as if-and-only-if. The formula +and $t@2$ are terms of the same type. If $t@1$ and $t@2$ are of type +\isa{bool} then \isa{=} acts as \rmindex{if-and-only-if}. +The formula \isa{$t@1$~\isasymnoteq~$t@2$} is merely an abbreviation for \isa{\isasymnot($t@1$ = $t@2$)}. -Quantifiers are written as -\isa{\isasymforall{}x.~$P$}\index{$HOL0All@\isasymforall|bold} and -\isa{\isasymexists{}x.~$P$}\index{$HOL0Ex@\isasymexists|bold}. +Quantifiers\index{quantifiers} are written as +\isa{\isasymforall{}x.~$P$} and \isa{\isasymexists{}x.~$P$}. There is even -\isa{\isasymuniqex{}x.~$P$}\index{$HOL0ExU@\isasymuniqex|bold}, which +\isa{\isasymuniqex{}x.~$P$}, which means that there exists exactly one \isa{x} that satisfies \isa{$P$}. Nested quantifications can be abbreviated: \isa{\isasymforall{}x~y~z.~$P$} means -\isa{\isasymforall{}x.\isasymforall{}y.\isasymforall{}z.~$P$}. +\isa{\isasymforall{}x.\isasymforall{}y.\isasymforall{}z.~$P$}.% +\index{formulae|)} Despite type inference, it is sometimes necessary to attach explicit \bfindex{type constraints} to a term. The syntax is \isa{$t$::$\tau$} as in \isa{x < (y::nat)}. Note that \ttindexboldpos{::}{$Isatype} binds weakly and should therefore be enclosed -in parentheses: \isa{x < y::nat} is ill-typed because it is interpreted as -\isa{(x < y)::nat}. The main reason for type constraints is overloading of -functions like \isa{+}, \isa{*} and \isa{<}. See {\S}\ref{sec:overloading} for -a full discussion of overloading and Table~\ref{tab:overloading} for the most +in parentheses. For instance, +\isa{x < y::nat} is ill-typed because it is interpreted as +\isa{(x < y)::nat}. Type constraints may be needed to disambiguate +expressions +involving overloaded functions such as~\isa{+}, +\isa{*} and~\isa{<}. Section~\ref{sec:overloading} +discusses overloading, while Table~\ref{tab:overloading} presents the most important overloaded function symbols. -\begin{warn} -In general, HOL's concrete syntax tries to follow the conventions of -functional programming and mathematics. Below we list the main rules that you -should be familiar with to avoid certain syntactic traps. A particular -problem for novices can be the priority of operators. If you are unsure, use -additional parentheses. In those cases where Isabelle echoes your -input, you can see which parentheses are dropped --- they were superfluous. If -you are unsure how to interpret Isabelle's output because you don't know -where the (dropped) parentheses go, set the flag\index{flags} -\isa{show_brackets}\index{*show_brackets (flag)}: -\begin{ttbox} -ML "set show_brackets"; \(\dots\); ML "reset show_brackets"; -\end{ttbox} -\end{warn} - +In general, HOL's concrete \rmindex{syntax} tries to follow the conventions of +functional programming and mathematics. Here are the main rules that you +should be familiar with to avoid certain syntactic traps: \begin{itemize} \item Remember that \isa{f t u} means \isa{(f t) u} and not \isa{f(t u)}! @@ -233,26 +237,43 @@ \item Constructs with an opening but without a closing delimiter bind very weakly and should therefore be enclosed in parentheses if they appear in subterms, as -in \isa{(\isasymlambda{}x.~x) = f}. This includes \sdx{if}, -\sdx{let}, \sdx{case}, \isa{\isasymlambda}, and quantifiers. +in \isa{(\isasymlambda{}x.~x) = f}. This includes +\isa{if},\index{*if expressions} +\isa{let},\index{*let expressions} +\isa{case},\index{*case expressions} +\isa{\isasymlambda}, and quantifiers. \item Never write \isa{\isasymlambda{}x.x} or \isa{\isasymforall{}x.x=x} -because \isa{x.x} is always read as a single qualified identifier that +because \isa{x.x} is always taken as a single qualified identifier that refers to an item \isa{x} in theory \isa{x}. Write \isa{\isasymlambda{}x.~x} and \isa{\isasymforall{}x.~x=x} instead. -\item Identifiers\indexbold{identifier} may contain \isa{_} and \isa{'}. +\item Identifiers\indexbold{identifiers} may contain the characters \isa{_} +and~\isa{'}. \end{itemize} -For the sake of readability the usual mathematical symbols are used throughout +For the sake of readability, we use the usual mathematical symbols throughout the tutorial. Their \textsc{ascii}-equivalents are shown in table~\ref{tab:ascii} in the appendix. +\begin{warn} +A particular +problem for novices can be the priority of operators. If you are unsure, use +additional parentheses. In those cases where Isabelle echoes your +input, you can see which parentheses are dropped --- they were superfluous. If +you are unsure how to interpret Isabelle's output because you don't know +where the (dropped) parentheses go, set the flag\index{flags} +\isa{show_brackets}\index{*show_brackets (flag)}: +\begin{ttbox} +ML "set show_brackets"; \(\dots\); ML "reset show_brackets"; +\end{ttbox} +\end{warn} + \section{Variables} \label{sec:variables} -\indexbold{variable} +\index{variables|(} -Isabelle distinguishes free and bound variables just as is customary. Bound +Isabelle distinguishes free and bound variables, as is customary. Bound variables are automatically renamed to avoid clashes with free variables. In addition, Isabelle has a third kind of variable, called a \textbf{schematic variable}\index{variables!schematic} or \textbf{unknown}\index{unknowns}, @@ -266,15 +287,18 @@ Most of the time you can and should ignore unknowns and work with ordinary variables. Just don't be surprised that after you have finished the proof of -a theorem, Isabelle will turn your free variables into unknowns: it merely +a theorem, Isabelle will turn your free variables into unknowns. It indicates that Isabelle will automatically instantiate those unknowns suitably when the theorem is used in some other proof. Note that for readability we often drop the \isa{?}s when displaying a theorem. \begin{warn} - If you use \isa{?}\index{$HOL0Ex@\texttt{?}} as an existential - quantifier, it needs to be followed by a space. Otherwise \isa{?x} is - interpreted as a schematic variable. -\end{warn} + For historical reasons, Isabelle accepts \isa{?} as an ASCII representation + of the \(\exists\) symbol. However, the \isa{?} character must then be followed + by a space, as in \isa{?~x. f(x) = 0}. Otherwise, \isa{?x} is + interpreted as a schematic variable. The preferred ASCII representation of + the \(\exists\) symbol is \isa{EX}\@. +\end{warn}% +\index{variables|)} \section{Interaction and Interfaces} @@ -287,7 +311,7 @@ Although shell-based interaction is quite feasible for the kind of proof scripts currently presented in this tutorial, the recommended interface for Isabelle/Isar is the Emacs-based \bfindex{Proof - General}~\cite{Aspinall:TACAS:2000,proofgeneral}. + General}~\cite{proofgeneral,Aspinall:TACAS:2000}. Some interfaces (including the shell level) offer special fonts with mathematical symbols. For those that do not, remember that \textsc{ascii}-equivalents @@ -308,7 +332,7 @@ controlled by the \texttt{ISABELLE_LOGIC} setting, see \emph{The Isabelle System Manual} for more details.} This presents you with Isabelle's most basic \textsc{ascii} interface. In addition you need to open an editor window to -create theory files. While you are developing a theory, we recommend to +create theory files. While you are developing a theory, we recommend that you type each command into the file first and then enter it into Isabelle by copy-and-paste, thus ensuring that you have a complete record of your theory. As mentioned above, Proof General offers a much superior interface.

--- a/doc-src/TutorialI/fp.tex Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/fp.tex Tue Jul 24 11:25:54 2001 +0200 @@ -1,17 +1,19 @@ \chapter{Functional Programming in HOL} -Although on the surface this chapter is mainly concerned with how to write -functional programs in HOL and how to verify them, most of the constructs and -proof procedures introduced are general purpose and recur in any specification -or verification task. In fact, we really should speak of functional -\emph{modelling} rather than \emph{programming}: our primary aim is not +This chapter describes how to write +functional programs in HOL and how to verify them. However, +most of the constructs and +proof procedures introduced are general and recur in any specification +or verification task. We really should speak of functional +\emph{modelling} rather than functional \emph{programming}: +our primary aim is not to write programs but to design abstract models of systems. HOL is a specification language that goes well beyond what can be expressed as a program. However, for the time being we concentrate on the computable. -The dedicated functional programmer should be warned: HOL offers only -\emph{total functional programming} --- all functions in HOL must be total, -i.e.\ they must terminate for all inputs; lazy data structures are not +If you are a purist functional programmer, please note that all functions +in HOL must be total: +they must terminate for all inputs. Lazy data structures are not directly available. \section{An Introductory Theory} @@ -25,22 +27,24 @@ \begin{figure}[htbp] \begin{ttbox}\makeatother \input{ToyList2/ToyList1}\end{ttbox} -\caption{A theory of lists} +\caption{A Theory of Lists} \label{fig:ToyList} \end{figure} +\index{*ToyList (example)|(} {\makeatother\input{ToyList/document/ToyList.tex}} The complete proof script is shown in Fig.\ts\ref{fig:ToyList-proofs}. The concatenation of Figs.\ts\ref{fig:ToyList} and~\ref{fig:ToyList-proofs} constitutes the complete theory \texttt{ToyList} and should reside in file \texttt{ToyList.thy}. It is good practice to present all declarations and -definitions at the beginning of a theory to facilitate browsing. +definitions at the beginning of a theory to facilitate browsing.% +\index{*ToyList (example)|)} \begin{figure}[htbp] \begin{ttbox}\makeatother \input{ToyList2/ToyList2}\end{ttbox} -\caption{Proofs about lists} +\caption{Proofs about Lists} \label{fig:ToyList-proofs} \end{figure} @@ -465,7 +469,7 @@ \put(30,30){\line(3,-2){13}} \end{picture} \end{center} -\caption{A sample trie} +\caption{A Sample Trie} \label{fig:trie} \end{figure}

--- a/doc-src/TutorialI/preface.tex Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/preface.tex Tue Jul 24 11:25:54 2001 +0200 @@ -8,8 +8,9 @@ discussion of meta-theory. It is written for potential users rather than for our colleagues in the research world. -Another departure from previous documentation is the use of Markus -Wenzel's proof script notation instead of ML tactic files. The latter +\index{Wenzel, Markus}% +Another departure from previous documentation is that we describe Markus +Wenzel's proof script notation instead of ML tactic scripts. The latter make it easier to introduce new tactics on the fly, but hardly anybody does that. Wenzel's dedicated syntax is elegant, replacing for example eight simplification tactics with a single method, namely \isa{simp},

--- a/doc-src/TutorialI/tutorial.ind Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/tutorial.ind Tue Jul 24 11:25:54 2001 +0200 @@ -1,20 +1,16 @@ \begin{theindex} \item \emph {$\forall \tmspace +\thinmuskip {.1667em}$}, \bold{189} - \item \isasymforall, \bold{3} \item \ttall, \bold{189} \item \emph {$\exists \tmspace +\thinmuskip {.1667em}$}, \bold{189} - \item \isasymexists, \bold{3} \item \texttt{?}, 5, \bold{189} \item \emph {$\varepsilon $}, \bold{189} - \item \isasymuniqex, \bold{3}, \bold{189} + \item \isasymuniqex, \bold{189} \item \ttuniquex, \bold{189} \item \emph {$\wedge $}, \bold{189} \item \isasymand, \bold{3} \item {\texttt {\&}}, \bold{189} - \item \texttt {=}, \bold{3} - \item \emph {$\DOTSB \mathrel {\smash -}\mathrel {\mkern -3mu}\rightarrow $}, - \bold{189} + \item \emph {$\DOTSB \relbar \joinrel \rightarrow $}, \bold{189} \item \isasymimp, \bold{3} \item \texttt {-->}, \bold{189} \item \emph {$\neg $}, \bold{189} @@ -60,14 +56,13 @@ \item \emph {$\Rightarrow $}, \bold{3}, \bold{189} \item \texttt {=>}, \bold{189} \item \texttt {<=}, \bold{189} - \item \emph {$\DOTSB \mathrel =\mathrel {\mkern -3mu}\Rightarrow $}, - \bold{189} + \item \emph {$\DOTSB \Relbar \joinrel \Rightarrow $}, \bold{189} \item \texttt {==>}, \bold{189} \item \emph {$\mathopen {[\mkern -3mu[}$}, \bold{10}, \bold{189} \item \ttlbr, \bold{189} \item \emph {$\mathclose {]\mkern -3mu]}$}, \bold{10}, \bold{189} \item \ttrbr, \bold{189} - \item \emph {$\lambda $}, \bold{3}, \bold{189} + \item \emph {$\lambda $}, \bold{189} \item \texttt {\%}, \bold{189} \item \texttt {,}, \bold{29} \item \texttt {;}, \bold{5} @@ -138,7 +133,8 @@ \item \isa {card_Pow} (theorem), \bold{93} \item \isa {card_Un_Int} (theorem), \bold{93} \item cardinality, 93 - \item \isa {case} (symbol), \bold{3}, 4, 16, 30, 31 + \item \isa {case} (symbol), 16, 30, 31 + \item \isa {case} expressions, 3, 4 \item case distinction, \bold{17} \item case splits, \bold{29} \item \isa {case_tac} (method), 17, 85 @@ -154,6 +150,7 @@ \item composition \subitem of functions, \bold{94} \subitem of relations, \bold{96} + \item conditional expressions, \see{\isa{if} expressions}{1} \item congruence rules, \bold{157} \item \isa {conjE} (theorem), \bold{55} \item \isa {conjI} (theorem), \bold{52} @@ -202,7 +199,7 @@ \item \isa {elim!} (attribute), 115 \item elimination rules, 53--54 \item \isa {Eps} (constant), 93 - \item equality + \item equality, 3 \subitem of functions, \bold{93} \subitem of records, 143 \subitem of sets, \bold{90} @@ -234,11 +231,12 @@ \item flags, 3, 4, 31 \subitem setting and resetting, 3 \item \isa {force} (method), 75, 76 - \item formulae, \bold{3} + \item formulae, 3 \item forward proof, 76--82 \item \isa {frule} (method), 67 \item \isa {frule_tac} (method), 60 \item \isa {fst} (constant), 21 + \item function types, 3 \item functions, 93--95 \subitem total, 9, 45--50 \subitem underdefined, 165 @@ -248,6 +246,7 @@ \item \isa {gcd} (constant), 76--78, 85--87 \item generalizing for induction, 113 \item Girard, Jean-Yves, \fnote{55} + \item Gordon, Mike, 1 \item ground terms example, 119--124 \indexspace @@ -262,10 +261,12 @@ \item \isa {Id_def} (theorem), \bold{96} \item \isa {id_def} (theorem), \bold{94} \item identifier, \bold{4} + \item identifiers \subitem qualified, \bold{2} \item identity function, \bold{94} \item identity relation, \bold{96} - \item \isa {if} (symbol), \bold{3}, 4 + \item \isa {if} expressions, 3, 4 + \item if-and-only-if, 3 \item \isa {iff} (attribute), 73, 74, 86, 114 \item \isa {iffD1} (theorem), \bold{78} \item \isa {iffD2} (theorem), \bold{78} @@ -324,6 +325,7 @@ \indexspace + \item $\lambda$ expressions, 3 \item \isa {LEAST} (symbol), 21, 69 \item least number operator, \see{\protect\isa{LEAST}}{69} \item \isacommand {lemma} (command), 11 @@ -332,7 +334,8 @@ \item \isa {length_induct}, \bold{172} \item \isa {less_than} (constant), 98 \item \isa {less_than_iff} (theorem), \bold{98} - \item \isa {let} (symbol), \bold{3}, 4, 29 + \item \isa {let} (symbol), 29 + \item \isa {let} expressions, 3, 4 \item \isa {lex_prod_def} (theorem), \bold{99} \item lexicographic product, \bold{99}, 160 \item {\texttt{lfp}} @@ -400,7 +403,7 @@ \indexspace \item pairs and tuples, 21, 137--140 - \item parent theory, \bold{2} + \item parent theories, \bold{2} \item partial function, 164 \item pattern, higher-order, \bold{159} \item PDL, 102--105 @@ -419,7 +422,7 @@ \indexspace - \item quantifiers + \item quantifiers, 3 \subitem and inductive definitions, 119--121 \subitem existential, 66 \subitem for sets, 92 @@ -543,11 +546,12 @@ \item tuples, \see{pairs and tuples}{1} \item \isacommand {typ} (command), 14 \item type constraints, \bold{4} + \item type constructors, 2 \item type inference, \bold{3} - \item type variables, \bold{3} + \item type variables, 3 \item \isacommand {typedecl} (command), 150 \item \isacommand {typedef} (command), 151--155 - \item types, 2 + \item types, 2--3 \subitem declaring, 150--151 \subitem defining, 151--155 \item \isacommand {types} (command), 22 @@ -577,11 +581,12 @@ \item variable, \bold{4} \item variables \subitem schematic, 4 - \subitem type, \bold{3} + \subitem type, 3 \item \isa {vimage_def} (theorem), \bold{95} \indexspace + \item Wenzel, Markus, v \item \isa {wf_induct} (theorem), \bold{99} \item \isa {while} (constant), 167 \item \isa {While_Combinator} (theory), 167

--- a/doc-src/TutorialI/tutorial.tex Mon Jul 23 19:06:11 2001 +0200 +++ b/doc-src/TutorialI/tutorial.tex Tue Jul 24 11:25:54 2001 +0200 @@ -10,6 +10,7 @@ \makeindex +\index{conditional expressions|see{\isa{if} expressions}} \index{primitive recursion|see{\isacommand{primrec}}} \index{product type|see{pairs and tuples}} \index{termination|see{functions, total}} @@ -42,7 +43,7 @@ \tableofcontents -\newpage\pagenumbering{arabic} +\cleardoublepage\pagenumbering{arabic} \input{basics} \input{fp}