doc-src/IsarRef/Thy/document/intro.tex
author haftmann
Mon, 28 Apr 2008 13:41:04 +0200
changeset 26753 094d70c81243
parent 26741 eb15fd4cd1ad
child 26760 2de4ba348f06
permissions -rw-r--r--
dropping return in imperative monad bindings
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26741
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     1
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     2
\begin{isabellebody}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     3
\def\isabellecontext{intro}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     4
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     5
\isadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     6
\isanewline
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     7
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     8
\endisadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
     9
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    10
\isatagtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    11
\isacommand{theory}\isamarkupfalse%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    12
\ intro\isanewline
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    13
\isakeyword{imports}\ CPure\isanewline
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    14
\isakeyword{begin}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    15
\endisatagtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    16
{\isafoldtheory}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    17
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    18
\isadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    19
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    20
\endisadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    21
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    22
\isamarkupchapter{Introduction%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    23
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    24
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    25
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    26
\isamarkupsection{Overview%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    27
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    28
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    29
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    30
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    31
The \emph{Isabelle} system essentially provides a generic
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    32
  infrastructure for building deductive systems (programmed in
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    33
  Standard ML), with a special focus on interactive theorem proving in
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    34
  higher-order logics.  In the olden days even end-users would refer
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    35
  to certain ML functions (goal commands, tactics, tacticals etc.) to
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    36
  pursue their everyday theorem proving tasks
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    37
  \cite{isabelle-intro,isabelle-ref}.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    38
  
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    39
  In contrast \emph{Isar} provides an interpreted language environment
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    40
  of its own, which has been specifically tailored for the needs of
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    41
  theory and proof development.  Compared to raw ML, the Isabelle/Isar
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    42
  top-level provides a more robust and comfortable development
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    43
  platform, with proper support for theory development graphs,
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    44
  single-step transactions with unlimited undo, etc.  The
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    45
  Isabelle/Isar version of the \emph{Proof~General} user interface
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    46
  \cite{proofgeneral,Aspinall:TACAS:2000} provides an adequate
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    47
  front-end for interactive theory and proof development in this
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    48
  advanced theorem proving environment.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    49
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    50
  \medskip Apart from the technical advances over bare-bones ML
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    51
  programming, the main purpose of the Isar language is to provide a
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    52
  conceptually different view on machine-checked proofs
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    53
  \cite{Wenzel:1999:TPHOL,Wenzel-PhD}.  ``Isar'' stands for
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    54
  ``Intelligible semi-automated reasoning''.  Drawing from both the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    55
  traditions of informal mathematical proof texts and high-level
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    56
  programming languages, Isar offers a versatile environment for
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    57
  structured formal proof documents.  Thus properly written Isar
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    58
  proofs become accessible to a broader audience than unstructured
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    59
  tactic scripts (which typically only provide operational information
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    60
  for the machine).  Writing human-readable proof texts certainly
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    61
  requires some additional efforts by the writer to achieve a good
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    62
  presentation, both of formal and informal parts of the text.  On the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    63
  other hand, human-readable formal texts gain some value in their own
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    64
  right, independently of the mechanic proof-checking process.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    65
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    66
  Despite its grand design of structured proof texts, Isar is able to
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    67
  assimilate the old tactical style as an ``improper'' sub-language.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    68
  This provides an easy upgrade path for existing tactic scripts, as
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    69
  well as additional means for interactive experimentation and
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    70
  debugging of structured proofs.  Isabelle/Isar supports a broad
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    71
  range of proof styles, both readable and unreadable ones.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    72
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    73
  \medskip The Isabelle/Isar framework is generic and should work
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    74
  reasonably well for any Isabelle object-logic that conforms to the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    75
  natural deduction view of the Isabelle/Pure framework.  Major
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    76
  Isabelle logics like HOL \cite{isabelle-HOL}, HOLCF
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    77
  \cite{MuellerNvOS99}, FOL \cite{isabelle-logics}, and ZF
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    78
  \cite{isabelle-ZF} have already been set up for end-users.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    79
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    80
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    81
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    82
\isamarkupsection{Quick start%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    83
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    84
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    85
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    86
\isamarkupsubsection{Terminal sessions%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    87
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    88
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    89
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    90
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    91
Isar is already part of Isabelle.  The low-level \texttt{isabelle} binary
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    92
  provides option \texttt{-I} to run the Isabelle/Isar interaction loop at
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    93
  startup, rather than the raw ML top-level.  So the most basic way to do
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    94
  anything with Isabelle/Isar is as follows:
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    95
\begin{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    96
isabelle -I HOL\medskip
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    97
\out{> Welcome to Isabelle/HOL (Isabelle2005)}\medskip
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    98
theory Foo imports Main begin;
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
    99
definition foo :: nat where "foo == 1";
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   100
lemma "0 < foo" by (simp add: foo_def);
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   101
end;
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   102
\end{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   103
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   104
  Note that any Isabelle/Isar command may be retracted by
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   105
  \texttt{undo}.  See the Isabelle/Isar Quick Reference
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   106
  (appendix~\ref{ap:refcard}) for a comprehensive overview of
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   107
  available commands and other language elements.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   108
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   109
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   110
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   111
\isamarkupsubsection{Proof General%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   112
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   113
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   114
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   115
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   116
Plain TTY-based interaction as above used to be quite feasible with
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   117
  traditional tactic based theorem proving, but developing Isar
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   118
  documents really demands some better user-interface support.  The
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   119
  Proof~General environment by David Aspinall
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   120
  \cite{proofgeneral,Aspinall:TACAS:2000} offers a generic Emacs
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   121
  interface for interactive theorem provers that organizes all the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   122
  cut-and-paste and forward-backward walk through the text in a very
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   123
  neat way.  In Isabelle/Isar, the current position within a partial
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   124
  proof document is equally important than the actual proof state.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   125
  Thus Proof~General provides the canonical working environment for
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   126
  Isabelle/Isar, both for getting acquainted (e.g.\ by replaying
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   127
  existing Isar documents) and for production work.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   128
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   129
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   130
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   131
\isamarkupsubsubsection{Proof~General as default Isabelle interface%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   132
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   133
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   134
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   135
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   136
The Isabelle interface wrapper script provides an easy way to invoke
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   137
  Proof~General (including XEmacs or GNU Emacs).  The default
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   138
  configuration of Isabelle is smart enough to detect the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   139
  Proof~General distribution in several canonical places (e.g.\
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   140
  \texttt{\$ISABELLE_HOME/contrib/ProofGeneral}).  Thus the capital
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   141
  \texttt{Isabelle} executable would already refer to the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   142
  \texttt{ProofGeneral/isar} interface without further ado.  The
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   143
  Isabelle interface script provides several options; pass \verb,-?,
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   144
  to see its usage.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   145
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   146
  With the proper Isabelle interface setup, Isar documents may now be edited by
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   147
  visiting appropriate theory files, e.g.\ 
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   148
\begin{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   149
Isabelle \({\langle}isabellehome{\rangle}\)/src/HOL/Isar_examples/Summation.thy
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   150
\end{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   151
  Beginners may note the tool bar for navigating forward and backward
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   152
  through the text (this depends on the local Emacs installation).
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   153
  Consult the Proof~General documentation \cite{proofgeneral} for
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   154
  further basic command sequences, in particular ``\texttt{C-c
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   155
  C-return}'' and ``\texttt{C-c u}''.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   156
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   157
  \medskip Proof~General may be also configured manually by giving
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   158
  Isabelle settings like this (see also \cite{isabelle-sys}):
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   159
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   160
\begin{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   161
ISABELLE_INTERFACE=\$ISABELLE_HOME/contrib/ProofGeneral/isar/interface
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   162
PROOFGENERAL_OPTIONS=""
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   163
\end{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   164
  You may have to change \texttt{\$ISABELLE_HOME/contrib/ProofGeneral}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   165
  to the actual installation directory of Proof~General.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   166
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   167
  \medskip Apart from the Isabelle command line, defaults for
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   168
  interface options may be given by the \texttt{PROOFGENERAL_OPTIONS}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   169
  setting.  For example, the Emacs executable to be used may be
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   170
  configured in Isabelle's settings like this:
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   171
\begin{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   172
PROOFGENERAL_OPTIONS="-p xemacs-mule"  
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   173
\end{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   174
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   175
  Occasionally, a user's \verb,~/.emacs, file contains code that is
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   176
  incompatible with the (X)Emacs version used by Proof~General,
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   177
  causing the interface startup to fail prematurely.  Here the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   178
  \texttt{-u false} option helps to get the interface process up and
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   179
  running.  Note that additional Lisp customization code may reside in
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   180
  \texttt{proofgeneral-settings.el} of \texttt{\$ISABELLE_HOME/etc} or
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   181
  \texttt{\$ISABELLE_HOME_USER/etc}.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   182
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   183
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   184
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   185
\isamarkupsubsubsection{The X-Symbol package%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   186
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   187
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   188
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   189
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   190
Proof~General incorporates a version of the Emacs X-Symbol package
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   191
  \cite{x-symbol}, which handles proper mathematical symbols displayed
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   192
  on screen.  Pass option \texttt{-x true} to the Isabelle interface
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   193
  script, or check the appropriate Proof~General menu setting by hand.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   194
  The main challenge of getting X-Symbol to work properly is the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   195
  underlying (semi-automated) X11 font setup.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   196
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   197
  \medskip Using proper mathematical symbols in Isabelle theories can
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   198
  be very convenient for readability of large formulas.  On the other
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   199
  hand, the plain ASCII sources easily become somewhat unintelligible.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   200
  For example, $\Longrightarrow$ would appear as \verb,\<Longrightarrow>, according
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   201
  the default set of Isabelle symbols.  Nevertheless, the Isabelle
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   202
  document preparation system (see \S\ref{sec:document-prep}) will be
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   203
  happy to print non-ASCII symbols properly.  It is even possible to
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   204
  invent additional notation beyond the display capabilities of Emacs
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   205
  and X-Symbol.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   206
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   207
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   208
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   209
\isamarkupsection{Isabelle/Isar theories%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   210
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   211
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   212
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   213
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   214
Isabelle/Isar offers the following main improvements over classic
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   215
  Isabelle.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   216
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   217
  \begin{enumerate}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   218
  
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   219
  \item A \emph{theory format} that integrates specifications and
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   220
  proofs, supporting interactive development and unlimited undo
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   221
  operation.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   222
  
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   223
  \item A \emph{formal proof document language} designed to support
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   224
  intelligible semi-automated reasoning.  Instead of putting together
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   225
  unreadable tactic scripts, the author is enabled to express the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   226
  reasoning in way that is close to usual mathematical practice.  The
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   227
  old tactical style has been assimilated as ``improper'' language
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   228
  elements.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   229
  
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   230
  \item A simple document preparation system, for typesetting formal
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   231
  developments together with informal text.  The resulting
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   232
  hyper-linked PDF documents are equally well suited for WWW
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   233
  presentation and as printed copies.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   234
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   235
  \end{enumerate}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   236
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   237
  The Isar proof language is embedded into the new theory format as a
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   238
  proper sub-language.  Proof mode is entered by stating some
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   239
  $\THEOREMNAME$ or $\LEMMANAME$ at the theory level, and left again
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   240
  with the final conclusion (e.g.\ via $\QEDNAME$).  A few theory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   241
  specification mechanisms also require some proof, such as HOL's
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   242
  $\isarkeyword{typedef}$ which demands non-emptiness of the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   243
  representing sets.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   244
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   245
  New-style theory files may still be associated with separate ML
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   246
  files consisting of plain old tactic scripts.  There is no longer
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   247
  any ML binding generated for the theory and theorems, though.  ML
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   248
  functions \texttt{theory}, \texttt{thm}, and \texttt{thms} retrieve
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   249
  this information from the context \cite{isabelle-ref}.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   250
  Nevertheless, migration between classic Isabelle and Isabelle/Isar
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   251
  is relatively easy.  Thus users may start to benefit from
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   252
  interactive theory development and document preparation, even before
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   253
  they have any idea of the Isar proof language at all.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   254
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   255
  Manual conversion of existing tactic scripts may be done by running
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   256
  two separate Proof~General sessions, one for replaying the old
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   257
  script and the other for the emerging Isabelle/Isar document.  Also
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   258
  note that Isar supports emulation commands and methods that support
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   259
  traditional tactic scripts within new-style theories, see
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   260
  appendix~\ref{ap:conv} for more information.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   261
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   262
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   263
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   264
\isamarkupsubsection{Document preparation \label{sec:document-prep}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   265
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   266
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   267
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   268
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   269
Isabelle/Isar provides a simple document preparation system based on
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   270
  existing {PDF-\LaTeX} technology, with full support of hyper-links
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   271
  (both local references and URLs), bookmarks, and thumbnails.  Thus
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   272
  the results are equally well suited for WWW browsing and as printed
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   273
  copies.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   274
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   275
  \medskip
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   276
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   277
  Isabelle generates {\LaTeX} output as part of the run of a
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   278
  \emph{logic session} (see also \cite{isabelle-sys}).  Getting
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   279
  started with a working configuration for common situations is quite
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   280
  easy by using the Isabelle \texttt{mkdir} and \texttt{make} tools.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   281
  First invoke
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   282
\begin{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   283
  isatool mkdir Foo
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   284
\end{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   285
  to initialize a separate directory for session \texttt{Foo} --- it
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   286
  is safe to experiment, since \texttt{isatool mkdir} never overwrites
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   287
  existing files.  Ensure that \texttt{Foo/ROOT.ML} holds ML commands
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   288
  to load all theories required for this session; furthermore
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   289
  \texttt{Foo/document/root.tex} should include any special {\LaTeX}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   290
  macro packages required for your document (the default is usually
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   291
  sufficient as a start).
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   292
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   293
  The session is controlled by a separate \texttt{IsaMakefile} (with
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   294
  crude source dependencies by default).  This file is located one
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   295
  level up from the \texttt{Foo} directory location.  Now invoke
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   296
\begin{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   297
  isatool make Foo
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   298
\end{ttbox}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   299
  to run the \texttt{Foo} session, with browser information and
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   300
  document preparation enabled.  Unless any errors are reported by
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   301
  Isabelle or {\LaTeX}, the output will appear inside the directory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   302
  \texttt{ISABELLE_BROWSER_INFO}, as reported by the batch job in
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   303
  verbose mode.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   304
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   305
  \medskip You may also consider to tune the \texttt{usedir} options
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   306
  in \texttt{IsaMakefile}, for example to change the output format
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   307
  from \texttt{pdf} to \texttt{dvi}, or activate the \texttt{-D}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   308
  option to retain a second copy of the generated {\LaTeX} sources.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   309
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   310
  \medskip See \emph{The Isabelle System Manual} \cite{isabelle-sys}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   311
  for further details on Isabelle logic sessions and theory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   312
  presentation.  The Isabelle/HOL tutorial \cite{isabelle-hol-book}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   313
  also covers theory presentation issues.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   314
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   315
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   316
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   317
\isamarkupsubsection{How to write Isar proofs anyway? \label{sec:isar-howto}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   318
}
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   319
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   320
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   321
\begin{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   322
This is one of the key questions, of course.  First of all, the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   323
  tactic script emulation of Isabelle/Isar essentially provides a
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   324
  clarified version of the very same unstructured proof style of
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   325
  classic Isabelle.  Old-time users should quickly become acquainted
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   326
  with that (slightly degenerative) view of Isar.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   327
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   328
  Writing \emph{proper} Isar proof texts targeted at human readers is
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   329
  quite different, though.  Experienced users of the unstructured
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   330
  style may even have to unlearn some of their habits to master proof
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   331
  composition in Isar.  In contrast, new users with less experience in
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   332
  old-style tactical proving, but a good understanding of mathematical
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   333
  proof in general, often get started easier.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   334
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   335
  \medskip The present text really is only a reference manual on
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   336
  Isabelle/Isar, not a tutorial.  Nevertheless, we will attempt to
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   337
  give some clues of how the concepts introduced here may be put into
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   338
  practice.  Appendix~\ref{ap:refcard} provides a quick reference card
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   339
  of the most common Isabelle/Isar language elements.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   340
  Appendix~\ref{ap:conv} offers some practical hints on converting
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   341
  existing Isabelle theories and proof scripts to the new format
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   342
  (without restructuring proofs).
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   343
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   344
  Further issues concerning the Isar concepts are covered in the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   345
  literature
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   346
  \cite{Wenzel:1999:TPHOL,Wiedijk:2000:MV,Bauer-Wenzel:2000:HB,Bauer-Wenzel:2001}.
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   347
  The author's PhD thesis \cite{Wenzel-PhD} presently provides the
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   348
  most complete exposition of Isar foundations, techniques, and
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   349
  applications.  A number of example applications are distributed with
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   350
  Isabelle, and available via the Isabelle WWW library (e.g.\
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   351
  \url{http://isabelle.in.tum.de/library/}).  The ``Archive of Formal
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   352
  Proofs'' \url{http://afp.sourceforge.net/} also provides plenty of
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   353
  examples, both in proper Isar proof style and unstructured tactic
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   354
  scripts.%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   355
\end{isamarkuptext}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   356
\isamarkuptrue%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   357
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   358
\isadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   359
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   360
\endisadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   361
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   362
\isatagtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   363
\isacommand{end}\isamarkupfalse%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   364
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   365
\endisatagtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   366
{\isafoldtheory}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   367
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   368
\isadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   369
%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   370
\endisadelimtheory
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   371
\isanewline
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   372
\end{isabellebody}%
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   373
%%% Local Variables:
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   374
%%% mode: latex
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   375
%%% TeX-master: "root"
eb15fd4cd1ad converted intro.tex to Thy/intro.thy;
wenzelm
parents:
diff changeset
   376
%%% End: