doc-src/IsarRef/intro.tex
changeset 8684 dfe444b748aa
parent 8547 93b8685d004b
child 8843 5370a030dd47
equal deleted inserted replaced
8683:9d3e8c4a0287 8684:dfe444b748aa
   134 Porting of existing tactic scripts is best done by running two separate
   134 Porting of existing tactic scripts is best done by running two separate
   135 Proof~General sessions, one for replaying the old script and the other for the
   135 Proof~General sessions, one for replaying the old script and the other for the
   136 emerging Isabelle/Isar document.
   136 emerging Isabelle/Isar document.
   137 
   137 
   138 
   138 
   139 \section{How to write Isar proofs anyway?}
   139 \subsection{Document preparation}
       
   140 
       
   141 Isabelle/Isar provides a simple document preparation system based on current
       
   142 (PDF) {\LaTeX} technology, with full support of hyper-links (both local
       
   143 references and URLs), bookmarks, thumbnails etc.  Thus the results are equally
       
   144 well suited for WWW browsing and as printed copies.
       
   145 
       
   146 \medskip
       
   147 
       
   148 Isabelle generates {\LaTeX} output as part of the run of a \emph{logic
       
   149   session} (see also \cite{isabelle-sys}).  Getting started with a working
       
   150 configuration for common situations is quite easy by using the Isabelle
       
   151 \texttt{mkdir} and \texttt{make} tools.  Just invoke
       
   152 \begin{ttbox}
       
   153   isatool mkdir -d Foo
       
   154 \end{ttbox}
       
   155 to setup a separate directory for session \texttt{Foo}.\footnote{It is safe to
       
   156   experiment, since \texttt{isatool mkdir} never overwrites existing files.}
       
   157 Ensure that \texttt{Foo/ROOT.ML} loads all theories required for this session.
       
   158 Furthermore \texttt{Foo/document/root.tex} should include any special {\LaTeX}
       
   159 macro packages required for your document (the default is usually sufficient
       
   160 as a start).
       
   161 
       
   162 The session is controlled by a separate \texttt{IsaMakefile} (with very crude
       
   163 source dependencies only by default).  This file is located one level up from
       
   164 the \texttt{Foo} directory location.  At that point just invoke
       
   165 \begin{ttbox}
       
   166   isatool make Foo
       
   167 \end{ttbox}
       
   168 to run the \texttt{Foo} session, with browser information and document
       
   169 preparation enabled.  Unless any errors are reported by Isabelle or {\LaTeX},
       
   170 the output will appear inside the directory indicated by \texttt{isatool
       
   171   getenv ISABELLE_BROWSER_INFO}, with the logical session prefix added (e.g.\ 
       
   172 \texttt{HOL/Foo}).  Note that the \texttt{index.html} located there provides a
       
   173 link to the finished {\LaTeX} document, too.
       
   174 
       
   175 Note that this really is batch processing --- better let Isabelle check your
       
   176 theory and proof developments beforehand in interactive mode.
       
   177 
       
   178 \medskip
       
   179 
       
   180 You may also consider to tune the \texttt{usedir} options in
       
   181 \texttt{IsaMakefile}, for example to change the output format from
       
   182 \texttt{dvi} to \texttt{pdf}, or activate the \texttt{-D document} option in
       
   183 order to preserve a copy of the generated {\LaTeX} sources.  The latter
       
   184 feature is very useful for debugging {\LaTeX} errors, while avoiding repeated
       
   185 runs of Isabelle.
       
   186 
       
   187 \medskip
       
   188 
       
   189 See \emph{The Isabelle System Manual} \cite{isabelle-sys} for further details
       
   190 on Isabelle logic sessions and theory presentation.
       
   191 
       
   192 
       
   193 \subsection{How to write Isar proofs anyway?}
   140 
   194 
   141 This is one of the key questions, of course.  Isar offers a rather different
   195 This is one of the key questions, of course.  Isar offers a rather different
   142 approach to formal proof documents than plain old tactic scripts.  Experienced
   196 approach to formal proof documents than plain old tactic scripts.  Experienced
   143 users of existing interactive theorem proving systems may have to learn
   197 users of existing interactive theorem proving systems may have to learn
   144 thinking differently in order to make effective use of Isabelle/Isar.  On the
   198 thinking differently in order to make effective use of Isabelle/Isar.  On the