doc-src/TutorialI/basics.tex
changeset 10983 59961d32b1ae
parent 10978 5eebea8f359f
child 11205 67cec35dbc58
equal deleted inserted replaced
10982:55c0f9a8df78 10983:59961d32b1ae
     6 verification system. Isabelle is a generic system for implementing logical
     6 verification system. Isabelle is a generic system for implementing logical
     7 formalisms, and Isabelle/HOL is the specialization of Isabelle for
     7 formalisms, and Isabelle/HOL is the specialization of Isabelle for
     8 HOL, which abbreviates Higher-Order Logic. We introduce HOL step by step
     8 HOL, which abbreviates Higher-Order Logic. We introduce HOL step by step
     9 following the equation
     9 following the equation
    10 \[ \mbox{HOL} = \mbox{Functional Programming} + \mbox{Logic}. \]
    10 \[ \mbox{HOL} = \mbox{Functional Programming} + \mbox{Logic}. \]
    11 We assume that the reader is familiar with the basic concepts of both fields.
    11 We do not assume that the reader is familiar with mathematical logic but that
    12 For excellent introductions to functional programming consult the textbooks
    12 (s)he is used to logical and set theoretic notation.  In contrast, we do assume
    13 by Bird and Wadler~\cite{Bird-Wadler} or Paulson~\cite{paulson-ml2}.  Although
    13 that the reader is familiar with the basic concepts of functional programming.
    14 this tutorial initially concentrates on functional programming, do not be
    14 For excellent introductions consult the textbooks by Bird and
    15 misled: HOL can express most mathematical concepts, and functional
    15 Wadler~\cite{Bird-Wadler} or Paulson~\cite{paulson-ml2}.  Although this
    16 programming is just one particularly simple and ubiquitous instance.
    16 tutorial initially concentrates on functional programming, do not be
       
    17 misled: HOL can express most mathematical concepts, and functional programming
       
    18 is just one particularly simple and ubiquitous instance.
    17 
    19 
    18 Isabelle~\cite{paulson-isa-book} is implemented in ML~\cite{SML}.
    20 Isabelle~\cite{paulson-isa-book} is implemented in ML~\cite{SML}.
    19 This has influenced some of HOL's concrete syntax but is otherwise
    21 This has influenced some of HOL's concrete syntax but is otherwise
    20 irrelevant for us because this tutorial is based on
    22 irrelevant for us because this tutorial is based on
    21 Isabelle/Isar~\cite{isabelle-isar-ref}, an extension of Isabelle
    23 Isabelle/Isar~\cite{isabelle-isar-ref}, an extension of Isabelle
   231 \isa{\isasymlambda{}x.~x} and \isa{\isasymforall{}x.~x=x} instead.
   233 \isa{\isasymlambda{}x.~x} and \isa{\isasymforall{}x.~x=x} instead.
   232 \item Identifiers\indexbold{identifier} may contain \isa{_} and \isa{'}.
   234 \item Identifiers\indexbold{identifier} may contain \isa{_} and \isa{'}.
   233 \end{itemize}
   235 \end{itemize}
   234 
   236 
   235 For the sake of readability the usual mathematical symbols are used throughout
   237 For the sake of readability the usual mathematical symbols are used throughout
   236 the tutorial. Their ASCII-equivalents are shown in table~\ref{tab:ascii} in
   238 the tutorial. Their \textsc{ascii}-equivalents are shown in table~\ref{tab:ascii} in
   237 the appendix.
   239 the appendix.
   238 
   240 
   239 
   241 
   240 \section{Variables}
   242 \section{Variables}
   241 \label{sec:variables}
   243 \label{sec:variables}
   276 scripts currently presented in this tutorial, the recommended interface for
   278 scripts currently presented in this tutorial, the recommended interface for
   277 Isabelle/Isar is the Emacs-based \bfindex{Proof
   279 Isabelle/Isar is the Emacs-based \bfindex{Proof
   278   General}~\cite{Aspinall:TACAS:2000,proofgeneral}.
   280   General}~\cite{Aspinall:TACAS:2000,proofgeneral}.
   279 
   281 
   280 Some interfaces (including the shell level) offer special fonts with
   282 Some interfaces (including the shell level) offer special fonts with
   281 mathematical symbols. For those that do not, remember that ASCII-equivalents
   283 mathematical symbols. For those that do not, remember that \textsc{ascii}-equivalents
   282 are shown in table~\ref{tab:ascii} in the appendix.
   284 are shown in table~\ref{tab:ascii} in the appendix.
   283 
   285 
   284 Finally, a word about semicolons.\indexbold{$Isar@\texttt{;}} 
   286 Finally, a word about semicolons.\indexbold{$Isar@\texttt{;}} 
   285 Commands may but need not be terminated by semicolons.
   287 Commands may but need not be terminated by semicolons.
   286 At the shell level it is advisable to use semicolons to enforce that a command
   288 At the shell level it is advisable to use semicolons to enforce that a command
   293 Assuming you have installed Isabelle, you start it by typing \texttt{isabelle
   295 Assuming you have installed Isabelle, you start it by typing \texttt{isabelle
   294   -I HOL} in a shell window.\footnote{Simply executing \texttt{isabelle -I}
   296   -I HOL} in a shell window.\footnote{Simply executing \texttt{isabelle -I}
   295   starts the default logic, which usually is already \texttt{HOL}.  This is
   297   starts the default logic, which usually is already \texttt{HOL}.  This is
   296   controlled by the \texttt{ISABELLE_LOGIC} setting, see \emph{The Isabelle
   298   controlled by the \texttt{ISABELLE_LOGIC} setting, see \emph{The Isabelle
   297     System Manual} for more details.} This presents you with Isabelle's most
   299     System Manual} for more details.} This presents you with Isabelle's most
   298 basic ASCII interface.  In addition you need to open an editor window to
   300 basic \textsc{ascii} interface.  In addition you need to open an editor window to
   299 create theory files.  While you are developing a theory, we recommend to
   301 create theory files.  While you are developing a theory, we recommend to
   300 type each command into the file first and then enter it into Isabelle by
   302 type each command into the file first and then enter it into Isabelle by
   301 copy-and-paste, thus ensuring that you have a complete record of your theory.
   303 copy-and-paste, thus ensuring that you have a complete record of your theory.
   302 As mentioned above, Proof General offers a much superior interface.
   304 As mentioned above, Proof General offers a much superior interface.
   303 If you have installed Proof General, you can start it by typing \texttt{Isabelle}.
   305 If you have installed Proof General, you can start it by typing \texttt{Isabelle}.