more stuff;
authorwenzelm
Fri Jul 30 14:59:32 1999 +0200 (1999-07-30)
changeset 7134320b412e5800
parent 7133 64c9f2364dae
child 7135 8eabfd7e6b9b
more stuff;
doc-src/IsarRef/Makefile
doc-src/IsarRef/clasimp.tex
doc-src/IsarRef/classical.tex
doc-src/IsarRef/hol.tex
doc-src/IsarRef/isar-ref.tex
doc-src/IsarRef/pure.tex
doc-src/IsarRef/simplifier.tex
doc-src/IsarRef/syntax.tex
     1.1 --- a/doc-src/IsarRef/Makefile	Fri Jul 30 13:44:29 1999 +0200
     1.2 +++ b/doc-src/IsarRef/Makefile	Fri Jul 30 14:59:32 1999 +0200
     1.3 @@ -14,8 +14,8 @@
     1.4  NAME = isar-ref
     1.5  
     1.6  FILES = isar-ref.tex intro.tex basics.tex syntax.tex pure.tex \
     1.7 -	simplifier.tex classical.tex hol.tex ../isar.sty \
     1.8 -	../rail.sty ../proof.sty ../iman.sty ../extra.sty ../manual.bib
     1.9 +	clasimp.tex hol.tex ../isar.sty \
    1.10 +	../rail.sty ../railsetup.sty ../proof.sty ../iman.sty ../extra.sty ../manual.bib
    1.11  
    1.12  dvi: $(NAME).dvi
    1.13  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/doc-src/IsarRef/clasimp.tex	Fri Jul 30 14:59:32 1999 +0200
     2.3 @@ -0,0 +1,7 @@
     2.4 +
     2.5 +\chapter{The Simplifier and Classical Reasoner}
     2.6 +
     2.7 +%%% Local Variables: 
     2.8 +%%% mode: latex
     2.9 +%%% TeX-master: "isar-ref"
    2.10 +%%% End: 
     3.1 --- a/doc-src/IsarRef/classical.tex	Fri Jul 30 13:44:29 1999 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,7 +0,0 @@
     3.4 -
     3.5 -\chapter{The Classical Reasoner}
     3.6 -
     3.7 -%%% Local Variables: 
     3.8 -%%% mode: latex
     3.9 -%%% TeX-master: "isar-ref"
    3.10 -%%% End: 
     4.1 --- a/doc-src/IsarRef/hol.tex	Fri Jul 30 13:44:29 1999 +0200
     4.2 +++ b/doc-src/IsarRef/hol.tex	Fri Jul 30 14:59:32 1999 +0200
     4.3 @@ -1,5 +1,5 @@
     4.4  
     4.5 -\chapter{HOL specific elements}
     4.6 +\chapter{Isabelle/HOL specific elements}
     4.7  
     4.8  %%% Local Variables: 
     4.9  %%% mode: latex
     5.1 --- a/doc-src/IsarRef/isar-ref.tex	Fri Jul 30 13:44:29 1999 +0200
     5.2 +++ b/doc-src/IsarRef/isar-ref.tex	Fri Jul 30 14:59:32 1999 +0200
     5.3 @@ -1,14 +1,25 @@
     5.4  
     5.5  %% $Id$
     5.6  
     5.7 -\documentclass[12pt]{report}
     5.8 -\usepackage{graphicx,a4,../iman,../extra,../proof,../rail,../isar,../pdfsetup}
     5.9 +\documentclass[12pt,fleqn]{report}
    5.10 +\usepackage{graphicx,a4,../iman,../extra,../proof,../rail,../railsetup,../isar,../pdfsetup}
    5.11  
    5.12  \title{\includegraphics[scale=0.5]{isabelle_isar} \\[4ex] The Isabelle/Isar Reference Manual}
    5.13  \author{\emph{Markus Wenzel} \\ TU M\"unchen}
    5.14  
    5.15  \makeindex
    5.16  
    5.17 +\railterm{lbrace,rbrace,llbrace,rrbrace}
    5.18 +\railterm{ident,longident,symident,var,textvar,typefree,typevar,nat,string,verbatim}
    5.19 +
    5.20 +\railalias{name}{\railqtoken{name}}
    5.21 +\railalias{nameref}{\railqtoken{nameref}}
    5.22 +\railalias{text}{\railqtoken{text}}
    5.23 +\railalias{type}{\railqtoken{type}}
    5.24 +\railalias{term}{\railqtoken{term}}
    5.25 +\railalias{prop}{\railqtoken{prop}}
    5.26 +\railalias{atom}{\railqtoken{atom}}
    5.27 +
    5.28  
    5.29  \setcounter{secnumdepth}{2} \setcounter{tocdepth}{2}
    5.30  
    5.31 @@ -16,20 +27,8 @@
    5.32  \sloppy
    5.33  \binperiod     %%%treat . like a binary operator
    5.34  
    5.35 -\railalias{lbrace}{\ttlbrace}
    5.36 -\railalias{rbrace}{\ttrbrace}
    5.37 -\railterm{lbrace,rbrace}
    5.38 -
    5.39 -\railterm{ident,longident,symident,var,textvar,typefree,typevar,nat,string,verbatim}
    5.40 -\railterm{name,nameref,text,type,term,prop,atom}
    5.41 +\renewcommand{\phi}{\varphi}
    5.42  
    5.43 -\makeatletter
    5.44 -\newcommand{\railtoken}[1]{{\rail@termfont{#1}}}
    5.45 -\newcommand{\railnonterm}[1]{{\rail@nontfont{#1}}}
    5.46 -\makeatother
    5.47 -
    5.48 -\newcommand\indexoutertoken[1]{\index{#1@\railtoken{#1} (outer syntax)|bold}}
    5.49 -\newcommand\indexouternonterm[1]{\index{#1@\railnonterm{#1} (outer syntax)|bold}}
    5.50  
    5.51  \begin{document}
    5.52  
    5.53 @@ -57,8 +56,7 @@
    5.54  \include{basics}
    5.55  \include{syntax}
    5.56  \include{pure}
    5.57 -\include{simplifier}
    5.58 -\include{classical}
    5.59 +\include{clasimp}
    5.60  \include{hol}
    5.61  
    5.62  \begingroup
     6.1 --- a/doc-src/IsarRef/pure.tex	Fri Jul 30 13:44:29 1999 +0200
     6.2 +++ b/doc-src/IsarRef/pure.tex	Fri Jul 30 14:59:32 1999 +0200
     6.3 @@ -1,6 +1,620 @@
     6.4  
     6.5  \chapter{Common Isar elements}
     6.6  
     6.7 +FIXME $*$ indicates \emph{improper commands}
     6.8 +
     6.9 +\section{Theory commands}
    6.10 +
    6.11 +\subsection{Defining theories}
    6.12 +
    6.13 +\indexisarcmd{theory}\indexisarcmd{end}\indexisarcmd{context}
    6.14 +\begin{matharray}{rcl}
    6.15 +  \isarcmd{theory} & : & \isartrans{\cdot}{theory} \\
    6.16 +  \isarcmd{context}^* & : & \isartrans{\cdot}{theory} \\
    6.17 +  \isarcmd{end} & : & \isartrans{theory}{\cdot} \\
    6.18 +\end{matharray}
    6.19 +
    6.20 +Isabelle/Isar ``new-style'' theories are either defined via theory files or
    6.21 +interactively.\footnote{In contrast, ``old-style'' Isabelle theories support
    6.22 +  batch processing only, with only the ML proof script part suitable for
    6.23 +  interaction.}
    6.24 +
    6.25 +The first command of any theory has to be $\THEORY$, starting a new theory
    6.26 +based on the merge of existing ones.  In interactive experiments, the theory
    6.27 +context may be changed by $\CONTEXT$ without creating a new theory.  In both
    6.28 +cases the concluding command is $\END$, which has to be the very last one of
    6.29 +any proper theory file.
    6.30 +
    6.31 +\begin{rail}
    6.32 +  'theory' name '=' (name + '+') filespecs? ':'
    6.33 +  ;
    6.34 +  'context' name
    6.35 +  ;
    6.36 +  'end'
    6.37 +  ;;
    6.38 +
    6.39 +  filespecs : 'files' ((name | '(' name ')') +);
    6.40 +\end{rail}
    6.41 +
    6.42 +\begin{description}
    6.43 +\item [$\THEORY~A = B@1 + \cdots + B@n$] commences a new theory $A$ based on
    6.44 +  existing ones $B@1 + \cdots + B@n$.  Note that Isabelle's theory loader
    6.45 +  system ensures that any of the base theories are properly loaded (and fully
    6.46 +  up-to-date when $\THEORY$ is executed interactively).
    6.47 +  
    6.48 +\item [$\CONTEXT~B$] enters existing theory context $B$, basically in
    6.49 +  read-only mode, so only a limited set of commands may be performed.  Just as
    6.50 +  for $\THEORY$, the theory loader ensures that $B$ is loaded and up-to-date.
    6.51 +
    6.52 +\item [$\END$] concludes the current theory definition of context switch.
    6.53 +\end{description}
    6.54 +
    6.55 +
    6.56 +\subsection{Formal comments}
    6.57 +
    6.58 +\indexisarcmd{title}\indexisarcmd{chapter}\indexisarcmd{subsection}\indexisarcmd{subsubsection}
    6.59 +\indexisarcmd{text}\indexisarcmd{txt}
    6.60 +\begin{matharray}{rcl}
    6.61 +  \isarcmd{title} & : & \isartrans{theory}{theory} \\
    6.62 +  \isarcmd{chapter} & : & \isartrans{theory}{theory} \\
    6.63 +  \isarcmd{subsection} & : & \isartrans{theory}{theory} \\
    6.64 +  \isarcmd{subsubsection} & : & \isartrans{theory}{theory} \\
    6.65 +  \isarcmd{text} & : & \isartrans{theory}{theory} \\
    6.66 +  \isarcmd{txt} & : & \isartrans{proof(state)}{proof(state)} \\
    6.67 +\end{matharray}
    6.68 +
    6.69 +There are several commands to include \emph{formal comments} in theory and
    6.70 +proof specification.  In contrast to source-level comments
    6.71 +\verb|(*|\dots\verb|*)|, which are stripped at the lexical level, any text
    6.72 +given as formal comment is meant to be part of the actual document.
    6.73 +Consequently, it would be included in the final printed version.
    6.74 +
    6.75 +Apart from plain prose, formal comments may also refer to logical entities of
    6.76 +the current theory context (types, terms, theorems etc.).  Proper processing
    6.77 +of the text would then include some further consistency checks with the items
    6.78 +declared in the current theory, e.g.\ type-checking of included terms.
    6.79 +\footnote{The current version of Isabelle/Isar does not process formal
    6.80 +  comments in any such way.  This will be available as part of the automatic
    6.81 +  theory and proof document preparation system (via (PDF)LaTeX) that is
    6.82 +  planned for the near future.}
    6.83 +
    6.84 +\begin{rail}
    6.85 +  'title' text text? text?
    6.86 +  ;
    6.87 +  'chapter' text
    6.88 +  ;
    6.89 +  'subsection' text
    6.90 +  ;
    6.91 +  'subsubsection' text
    6.92 +  ;
    6.93 +  'text' text
    6.94 +  ;
    6.95 +  'txt' text
    6.96 +  ;
    6.97 +\end{rail}
    6.98 +
    6.99 +\begin{description}
   6.100 +\item [$\isarkeyword{title}~title~author~date$] specifies the document title
   6.101 +  just as in typical LaTeX documents.
   6.102 +\item [$\isarkeyword{chapter}~text$, $\isarkeyword{subsection}~text$,
   6.103 +  $\isarkeyword{subsubsection}~text$] specify chapter and subsection headings.
   6.104 +\item [$\TEXT~text$] specifies an actual body of prose text, including
   6.105 +  references to formal entities.\footnote{The latter feature is not yet
   6.106 +    exploited in any way.}
   6.107 +\item [$\TXT~text$] is similar to $\TEXT$, but may appear within proofs.
   6.108 +\end{description}
   6.109 +
   6.110 +
   6.111 +\subsection{Type classes and sorts}
   6.112 +
   6.113 +\indexisarcmd{classes}\indexisarcmd{classrel}\indexisarcmd{defaultsort}
   6.114 +\begin{matharray}{rcl}
   6.115 +  \isarcmd{classes} & : & \isartrans{theory}{theory} \\
   6.116 +  \isarcmd{classrel} & : & \isartrans{theory}{theory} \\
   6.117 +  \isarcmd{defaultsort} & : & \isartrans{theory}{theory} \\
   6.118 +\end{matharray}
   6.119 +
   6.120 +\begin{rail}
   6.121 +  'classes' (name ('<' (nameref ',' +))? comment? +)
   6.122 +  ;
   6.123 +  'classrel' nameref '<' nameref comment?
   6.124 +  ;
   6.125 +  'defaultsort' sort comment?
   6.126 +  ;
   6.127 +\end{rail}
   6.128 +
   6.129 +\begin{description}
   6.130 +\item [$\isarkeyword{classes}~c<cs ~\dots$] declares class $c$ to be a
   6.131 +  subclass of existing classes $cs$.  Cyclic class structures are ruled out.
   6.132 +\item [$\isarkeyword{classrel}~c@1<c@2$] states a subclass relation between
   6.133 +  existing classes $c@1$ and $c@2$.  This is done axiomatically!  The
   6.134 +  $\isarkeyword{instance}$ command provides a way introduce proven class
   6.135 +  relations (see \S\ref{sec:axclass}).
   6.136 +\item [$\isarkeyword{defaultsort}~s$] makes sort $s$ the new default sort for
   6.137 +  any type variables input without sort constraints.  Typically, the default
   6.138 +  sort would be only changed when defining new logics.
   6.139 +\end{description}
   6.140 +
   6.141 +
   6.142 +\subsection{Types}
   6.143 +
   6.144 +\indexisarcmd{typedecl}\indexisarcmd{types}\indexisarcmd{nonterminals}\indexisarcmd{arities}
   6.145 +\begin{matharray}{rcl}
   6.146 +  \isarcmd{types} & : & \isartrans{theory}{theory} \\
   6.147 +  \isarcmd{typedecl} & : & \isartrans{theory}{theory} \\
   6.148 +  \isarcmd{nonterminals} & : & \isartrans{theory}{theory} \\
   6.149 +  \isarcmd{arities} & : & \isartrans{theory}{theory} \\
   6.150 +\end{matharray}
   6.151 +
   6.152 +\begin{rail}
   6.153 +  'types' (typespec '=' type infix? comment? +)
   6.154 +  ;
   6.155 +  'typedecl' typespec infix? comment?
   6.156 +  ;
   6.157 +  'nonterminals' (name +) comment?
   6.158 +  ;
   6.159 +  'arities' (nameref '::' arity comment? +)
   6.160 +  ;
   6.161 +\end{rail}
   6.162 +
   6.163 +\begin{description}
   6.164 +\item [$\TYPES~(\vec\alpha)t = \tau~\dots$] introduces \emph{type synonym}
   6.165 +  $(\vec\alpha)t$ for existing type $\tau$.  Unlike actual type definitions,
   6.166 +  as are available in Isabelle/HOL for example, type synonyms are just purely
   6.167 +  syntactic abbreviations, without any logical significance.  Internally, type
   6.168 +  synonyms are fully expanded, as may be observed when printing terms or
   6.169 +  theorems.
   6.170 +\item [$\isarkeyword{typedecl}~(\vec\alpha)t$] declares a new type constructor
   6.171 +  $t$, intended as an actual logical type.  Note that some logics such as
   6.172 +  Isabelle/HOL provide their own version of $\isarkeyword{typedecl}$.
   6.173 +\item [$\isarkeyword{nonterminals}~c~\dots$] declares $0$-ary type
   6.174 +  constructors $c$ to act as purely syntactic types, i.e.\ nonterminal symbols
   6.175 +  of Isabelle's inner syntax of terms or types.
   6.176 +\item [$\isarkeyword{arities}~t::(\vec s)s~\dots$] augments Isabelle's
   6.177 +  order-sorted signature of types by new type constructor arities.  This is
   6.178 +  done axiomatically!  The $\isarkeyword{instance}$ command provides a way
   6.179 +  introduce proven type arities (see \S\ref{sec:axclass}).
   6.180 +\end{description}
   6.181 +
   6.182 +
   6.183 +\subsection{Constants and simple definitions}
   6.184 +
   6.185 +\indexisarcmd{consts}\indexisarcmd{defs}\indexisarcmd{constdefs}
   6.186 +\begin{matharray}{rcl}
   6.187 +  \isarcmd{consts} & : & \isartrans{theory}{theory} \\
   6.188 +  \isarcmd{defs} & : & \isartrans{theory}{theory} \\
   6.189 +  \isarcmd{constdefs} & : & \isartrans{theory}{theory} \\
   6.190 +\end{matharray}
   6.191 +
   6.192 +\begin{rail}
   6.193 +  'consts' (constdecl +)
   6.194 +  ;
   6.195 +  'defs' (thmdecl? prop comment? +)
   6.196 +  ;
   6.197 +  'constdefs' (constdecl prop comment? +)
   6.198 +  ;
   6.199 +
   6.200 +  constdecl: name '::' type mixfix? comment?
   6.201 +  ;
   6.202 +\end{rail}
   6.203 +
   6.204 +\begin{description}
   6.205 +\item [$\CONSTS~c::\tau~\dots$] declares constant $c$ to have any instance of
   6.206 +  type scheme $\tau$.  The optional mixfix annotations may attach concrete
   6.207 +  syntax to the constant.
   6.208 +\item [$\DEFS~name: eqn~\dots$] introduces $eqn$ as a definitional axiom for
   6.209 +  some existing constant.  See \cite[\S6]{isabelle-ref} for more details on
   6.210 +  the form of equations admitted as constant definitions.
   6.211 +\item [$\isarkeyword{constdefs}~c::\tau~eqn~\dots$] combines constant
   6.212 +  declarations and definitions, using canonical name $c_def$ for the
   6.213 +  definitional axiom.
   6.214 +\end{description}
   6.215 +
   6.216 +
   6.217 +\subsection{Concrete syntax}
   6.218 +
   6.219 +\indexisarcmd{syntax}\indexisarcmd{translations}
   6.220 +\begin{matharray}{rcl}
   6.221 +  \isarcmd{syntax} & : & \isartrans{theory}{theory} \\
   6.222 +  \isarcmd{translations} & : & \isartrans{theory}{theory} \\
   6.223 +\end{matharray}
   6.224 +
   6.225 +\begin{rail}
   6.226 +  'syntax' ('(' name 'output'? ')')? (constdecl +)
   6.227 +  ;
   6.228 +  'translations' (transpat ('==' | '=>' | '<=') transpat comment? +)
   6.229 +  ;
   6.230 +  transpat: ('(' nameref ')')? string
   6.231 +  ;
   6.232 +\end{rail}
   6.233 +
   6.234 +\begin{description}
   6.235 +\item [$\isarkeyword{syntax}~mode~decls$] is similar to $\CONSTS~decls$,
   6.236 +  except the actual logical signature extension.  Thus the context free
   6.237 +  grammar of Isabelle's inner syntax may be augmented in arbitrary ways.  The
   6.238 +  $mode$ argument refers to the print mode that the grammar rules belong;
   6.239 +  unless there is the \texttt{output} flag given, all productions are added
   6.240 +  both to the input and output grammar.
   6.241 +\item [$\isarkeyword{translations}~rule~\dots$] specifies syntactic
   6.242 +  translation rules (macros): parse/print rules (\texttt{==}), parse rules
   6.243 +  (\texttt{=>}), print rules (\texttt{<=}).  Translation patterns may be
   6.244 +  prefixed by the syntactic category to be used for parsing; the default is
   6.245 +  \texttt{logic}.
   6.246 +\end{description}
   6.247 +
   6.248 +
   6.249 +\subsection{Axioms and theorems}
   6.250 +
   6.251 +\indexisarcmd{axioms}\indexisarcmd{theorems}\indexisarcmd{lemmas}
   6.252 +\begin{matharray}{rcl}
   6.253 +  \isarcmd{axioms} & : & \isartrans{theory}{theory} \\
   6.254 +  \isarcmd{theorems} & : & \isartrans{theory}{theory} \\
   6.255 +  \isarcmd{lemmas} & : & \isartrans{theory}{theory} \\
   6.256 +\end{matharray}
   6.257 +
   6.258 +\begin{rail}
   6.259 +  'axioms' (name attributes? ':' prop comment? +)
   6.260 +  ;
   6.261 +  ('theorems' | 'lemmas') thmdef? thmrefs
   6.262 +  ;
   6.263 +\end{rail}
   6.264 +
   6.265 +\begin{description}
   6.266 +\item [$\isarkeyword{axioms}~name: \phi~\dots$] introduces arbitrary
   6.267 +  statements as logical axioms.  In fact, axioms are ``axiomatic theorems'',
   6.268 +  and may be referred as any other theorems later.
   6.269 +  
   6.270 +  Axioms are usually only introduced when declaring new logical systems.
   6.271 +  Everyday work is normally done the hard way, with proper definitions and
   6.272 +  actual theorems.
   6.273 +\item [$\isarkeyword{theorems}~name = thms$] stores lists of existing theorems
   6.274 +  as $name$.  Typical applications would also involve attributes to augment
   6.275 +  the default simpset, for example.
   6.276 +\item [$\isarkeyword{lemmas}$] is similar to $\isarkeyword{theorems}$, but
   6.277 +  tags the results as ``lemma''.
   6.278 +\end{description}
   6.279 +
   6.280 +
   6.281 +\subsection{Manipulating name spaces}
   6.282 +
   6.283 +\indexisarcmd{global}\indexisarcmd{local}\indexisarcmd{path}
   6.284 +\begin{matharray}{rcl}
   6.285 +  \isarcmd{global} & : & \isartrans{theory}{theory} \\
   6.286 +  \isarcmd{local} & : & \isartrans{theory}{theory} \\
   6.287 +  \isarcmd{path} & : & \isartrans{theory}{theory} \\
   6.288 +\end{matharray}
   6.289 +
   6.290 +\begin{rail}
   6.291 +  'global'
   6.292 +  ;
   6.293 +  'local'
   6.294 +  ;
   6.295 +  'path' nameref
   6.296 +  ;
   6.297 +\end{rail}
   6.298 +
   6.299 +\begin{description}
   6.300 +\item [$\isarkeyword{global}$] FIXME
   6.301 +\item [$\isarkeyword{local}$] FIXME
   6.302 +\item [$\isarkeyword{path}~name$] FIXME
   6.303 +\end{description}
   6.304 +
   6.305 +
   6.306 +\subsection{Incorporating ML code}
   6.307 +
   6.308 +\indexisarcmd{use}\indexisarcmd{ML}\indexisarcmd{setup}
   6.309 +\begin{matharray}{rcl}
   6.310 +  \isarcmd{use} & : & \isartrans{\cdot}{\cdot} \\
   6.311 +  \isarcmd{ML} & : & \isartrans{\cdot}{\cdot} \\
   6.312 +  \isarcmd{setup} & : & \isartrans{\cdot}{\cdot} \\
   6.313 +\end{matharray}
   6.314 +
   6.315 +\begin{rail}
   6.316 +  'use' name
   6.317 +  ;
   6.318 +  'ML' text
   6.319 +  ;
   6.320 +  'setup' text
   6.321 +  ;
   6.322 +\end{rail}
   6.323 +
   6.324 +\begin{description}
   6.325 +\item [$\isarkeyword{use}~file$] FIXME
   6.326 +\item [$\isarkeyword{ML}~text$] FIXME
   6.327 +\item [$\isarkeyword{setup}~text$] FIXME
   6.328 +\end{description}
   6.329 +
   6.330 +
   6.331 +\subsection{ML translation functions}
   6.332 +
   6.333 +\indexisarcmd{parse_ast_translation}\indexisarcmd{parse_translation}
   6.334 +\indexisarcmd{print_translation}\indexisarcmd{typed_print_translation}
   6.335 +\indexisarcmd{print_ast_translation}\indexisarcmd{token_translation}
   6.336 +\begin{matharray}{rcl}
   6.337 +  \isarcmd{parse_ast_translation} & : & \isartrans{theory}{theory} \\
   6.338 +  \isarcmd{parse_translation} & : & \isartrans{theory}{theory} \\
   6.339 +  \isarcmd{print_translation} & : & \isartrans{theory}{theory} \\
   6.340 +  \isarcmd{typed_print_translation} & : & \isartrans{theory}{theory} \\
   6.341 +  \isarcmd{print_ast_translation} & : & \isartrans{theory}{theory} \\
   6.342 +  \isarcmd{token_translation} & : & \isartrans{theory}{theory} \\
   6.343 +\end{matharray}
   6.344 +
   6.345 +Syntax translation functions written in ML admit almost arbitrary
   6.346 +manipulations of Isabelle's inner syntax.  Any of the above commands have a
   6.347 +single \railqtoken{text} argument that refers to an ML expression of
   6.348 +appropriate type.  See \cite[\S8]{isabelle-ref} for more information on syntax
   6.349 +transformations.
   6.350 +
   6.351 +
   6.352 +\subsection{Oracles}
   6.353 +
   6.354 +\indexisarcmd{oracle}
   6.355 +\begin{matharray}{rcl}
   6.356 +  \isarcmd{oracle} & : & \isartrans{theory}{theory} \\
   6.357 +\end{matharray}
   6.358 +
   6.359 +\begin{rail}
   6.360 +  'oracle' name '=' text comment?
   6.361 +  ;
   6.362 +\end{rail}
   6.363 +
   6.364 +\begin{description}
   6.365 +\item [$\isarkeyword{oracle}~name=text$] FIXME
   6.366 +\end{description}
   6.367 +
   6.368 +
   6.369 +\section{Proof commands}
   6.370 +
   6.371 +\subsection{Goal statements}
   6.372 +
   6.373 +\indexisarcmd{}
   6.374 +\begin{matharray}{rcl}
   6.375 +  \isarcmd{theorem} & : & \isartrans{theory}{proof(prove)} \\
   6.376 +  \isarcmd{lemma} & : & \isartrans{theory}{proof(prove)} \\
   6.377 +  \isarcmd{have} & : & \isartrans{proof(state)}{proof(prove)} \\
   6.378 +  \isarcmd{show} & : & \isartrans{proof(state)}{proof(prove)} \\
   6.379 +  \isarcmd{hence} & : & \isartrans{proof(state)}{proof(prove)} \\
   6.380 +  \isarcmd{thus} & : & \isartrans{proof(state)}{proof(prove)} \\
   6.381 +\end{matharray}
   6.382 +
   6.383 +\begin{rail}
   6.384 +  ('theorem' | 'lemma') goal
   6.385 +  ;
   6.386 +  ('have' | 'show' | 'hence' | 'thus') goal
   6.387 +  ;
   6.388 +
   6.389 +  goal: thmdecl? proppat comment?
   6.390 +  ;
   6.391 +\end{rail}
   6.392 +
   6.393 +\begin{description}
   6.394 +\item [$\THEOREM{name}{\phi}$] enters proof mode with $\phi$ as main goal,
   6.395 +  eventually resulting in some theorem $\turn \phi$, which stored in the
   6.396 +  theory.
   6.397 +\item [$\LEMMANAME$] is similar to $\THEOREMNAME$, but tags the result as
   6.398 +  ``lemma''.
   6.399 +\item [$\HAVE{name}{\phi}$] FIXME
   6.400 +\item [$\SHOW{name}{\phi}$] FIXME
   6.401 +\item [$\HENCE{name}{\phi}$] FIXME
   6.402 +\item [$\THUS{name}{\phi}$] FIXME
   6.403 +\end{description}
   6.404 +
   6.405 +
   6.406 +\subsection{Initial and terminal proof steps}
   6.407 +
   6.408 +\indexisarcmd{proof}\indexisarcmd{qed}\indexisarcmd{by}
   6.409 +\indexisarcmd{.}\indexisarcmd{..}\indexisarcmd{sorry}
   6.410 +\begin{matharray}{rcl}
   6.411 +  \isarcmd{proof} & : & \isartrans{proof(prove)}{proof(state)} \\
   6.412 +  \isarcmd{qed} & : & \isartrans{proof(state)}{proof(state) ~|~ theory} \\
   6.413 +  \isarcmd{by} & : & \isartrans{proof(prove)}{proof(state) ~|~ theory} \\
   6.414 +  \isarcmd{.} & : & \isartrans{proof(prove)}{proof(state) ~|~ theory} \\
   6.415 +  \isarcmd{..} & : & \isartrans{proof(prove)}{proof(state) ~|~ theory} \\
   6.416 +  \isarcmd{sorry} & : & \isartrans{proof(prove)}{proof(state) ~|~ theory} \\
   6.417 +\end{matharray}
   6.418 +
   6.419 +\begin{rail}
   6.420 +  'proof' interest? meth? comment?
   6.421 +  ;
   6.422 +  'qed' meth? comment?
   6.423 +  ;
   6.424 +  'by' meth meth? comment?
   6.425 +  ;
   6.426 +  ('.' | '..' | 'sorry') comment?
   6.427 +  ;
   6.428 +
   6.429 +  meth: method interest?
   6.430 +  ;
   6.431 +\end{rail}
   6.432 +
   6.433 +\begin{description}
   6.434 +\item [$ $] FIXME
   6.435 +\end{description}
   6.436 +
   6.437 +
   6.438 +\subsection{Facts and forward chaining}
   6.439 +
   6.440 +\indexisarcmd{note}\indexisarcmd{then}\indexisarcmd{from}\indexisarcmd{with}
   6.441 +\begin{matharray}{rcl}
   6.442 +  \isarcmd{note} & : & \isartrans{proof(state)}{proof(state)} \\
   6.443 +  \isarcmd{then} & : & \isartrans{proof(state)}{proof(chain)} \\
   6.444 +  \isarcmd{from} & : & \isartrans{proof(state)}{proof(chain)} \\
   6.445 +  \isarcmd{with} & : & \isartrans{proof(state)}{proof(chain)} \\
   6.446 +\end{matharray}
   6.447 +
   6.448 +\begin{rail}
   6.449 +  'note' thmdef? thmrefs comment?
   6.450 +  ;
   6.451 +  'then' comment?
   6.452 +  ;
   6.453 +  ('from' | 'with') thmrefs comment?
   6.454 +  ;
   6.455 +\end{rail}
   6.456 +
   6.457 +\begin{description}
   6.458 +\item [$ $] FIXME
   6.459 +\end{description}
   6.460 +
   6.461 +
   6.462 +\subsection{Proof context}
   6.463 +
   6.464 +\indexisarcmd{fix}\indexisarcmd{assume}\indexisarcmd{presume}\indexisarcmd{def}\indexisarcmd{let}
   6.465 +\begin{matharray}{rcl}
   6.466 +  \isarcmd{fix} & : & \isartrans{proof(state)}{proof(state)} \\
   6.467 +  \isarcmd{assume} & : & \isartrans{proof(state)}{proof(state)} \\
   6.468 +  \isarcmd{presume} & : & \isartrans{proof(state)}{proof(state)} \\
   6.469 +  \isarcmd{def} & : & \isartrans{proof(state)}{proof(state)} \\
   6.470 +  \isarcmd{let} & : & \isartrans{proof(state)}{proof(state)} \\
   6.471 +\end{matharray}
   6.472 +
   6.473 +\begin{rail}
   6.474 +  'fix' (var +) comment?
   6.475 +  ;
   6.476 +  ('assume' | 'presume') thmdecl? (proppat +) comment?
   6.477 +  ;
   6.478 +  'def' thmdecl? var '==' termpat comment?
   6.479 +  ;
   6.480 +  'let' ((term + 'as') '=' term comment? + 'and')
   6.481 +  ;
   6.482 +
   6.483 +  var: name ('::' type)?
   6.484 +  ;
   6.485 +\end{rail}
   6.486 +
   6.487 +\begin{description}
   6.488 +\item [$ $] FIXME
   6.489 +\end{description}
   6.490 +
   6.491 +
   6.492 +\subsection{Block structure}
   6.493 +
   6.494 +\indexisarcmd{next}\indexisarcmd{\{\{}\indexisarcmd{\}\}}
   6.495 +\begin{matharray}{rcl}
   6.496 +  \isarcmd{next} & : & \isartrans{proof(state)}{proof(state)} \\
   6.497 +  \isarcmd{\{\{} & : & \isartrans{proof(state)}{proof(state)} \\
   6.498 +  \isarcmd{\}\}} & : & \isartrans{proof(state)}{proof(state)} \\
   6.499 +\end{matharray}
   6.500 +
   6.501 +\begin{rail}
   6.502 +  llbrace
   6.503 +  ;
   6.504 +  rrbrace
   6.505 +  ;
   6.506 +  'next'
   6.507 +  ;
   6.508 +\end{rail}
   6.509 +
   6.510 +\begin{description}
   6.511 +\item [$ $] FIXME
   6.512 +\end{description}
   6.513 +
   6.514 +
   6.515 +\subsection{Calculational proof}
   6.516 +
   6.517 +\indexisarcmd{also}\indexisarcmd{finally}
   6.518 +\begin{matharray}{rcl}
   6.519 +  \isarcmd{also} & : & \isartrans{proof(state)}{proof(state)} \\
   6.520 +  \isarcmd{finally} & : & \isartrans{proof(state)}{proof(chain)} \\
   6.521 +\end{matharray}
   6.522 +
   6.523 +\begin{rail}
   6.524 +  ('also' | 'finally') transrules? comment?
   6.525 +  ;
   6.526 +
   6.527 +  transrules: '(' thmrefs ')' interest?
   6.528 +  ;
   6.529 +\end{rail}
   6.530 +
   6.531 +\begin{description}
   6.532 +\item [$ $] FIXME
   6.533 +\end{description}
   6.534 +
   6.535 +
   6.536 +
   6.537 +\subsection{Improper proof steps}
   6.538 +
   6.539 +\indexisarcmd{apply}\indexisarcmd{then_apply}\indexisarcmd{back}
   6.540 +\begin{matharray}{rcl}
   6.541 +  \isarcmd{apply}^* & : & \isartrans{proof}{proof} \\
   6.542 +  \isarcmd{then_apply}^* & : & \isartrans{proof}{proof} \\
   6.543 +  \isarcmd{back}^* & : & \isartrans{proof}{proof} \\
   6.544 +\end{matharray}
   6.545 +
   6.546 +\railalias{thenapply}{then\_apply}
   6.547 +\railterm{thenapply}
   6.548 +
   6.549 +\begin{rail}
   6.550 +  'apply' method
   6.551 +  ;
   6.552 +  thenapply method
   6.553 +  ;
   6.554 +  'back'
   6.555 +  ;
   6.556 +\end{rail}
   6.557 +
   6.558 +\begin{description}
   6.559 +\item [$ $] FIXME
   6.560 +\end{description}
   6.561 +
   6.562 +
   6.563 +\section{Other commands}
   6.564 +
   6.565 +\subsection{Diagnostics}
   6.566 +
   6.567 +\indexisarcmd{typ}\indexisarcmd{term}\indexisarcmd{prop}\indexisarcmd{thm}
   6.568 +\begin{matharray}{rcl}
   6.569 +  \isarcmd{typ} & : & \isarkeep{theory~|~proof} \\
   6.570 +  \isarcmd{term} & : & \isarkeep{theory~|~proof} \\
   6.571 +  \isarcmd{prop} & : & \isarkeep{theory~|~proof} \\
   6.572 +  \isarcmd{thm} & : & \isarkeep{theory~|~proof} \\
   6.573 +\end{matharray}
   6.574 +
   6.575 +\begin{rail}
   6.576 +  'typ' type
   6.577 +  ;
   6.578 +  'term' term
   6.579 +  ;
   6.580 +  'prop' prop
   6.581 +  ;
   6.582 +  'thm' thmrefs
   6.583 +  ;
   6.584 +\end{rail}
   6.585 +
   6.586 +\begin{description}
   6.587 +\item [$\isarkeyword{typ}~\tau$, $\isarkeyword{term}~t$,
   6.588 +  $\isarkeyword{prop}~\phi$] read and print types / terms / propositions
   6.589 +  according to the current theory or proof context.
   6.590 +\item [$\isarkeyword{thm}~thms$] retrieves lists of theorems from the current
   6.591 +  theory or proof context.  Note that any attributes included in the theorem
   6.592 +  specifications are applied to a temporary proof context derived from the
   6.593 +  current theory or proof; the resulting context is discarded.
   6.594 +\end{description}
   6.595 +
   6.596 +
   6.597 +\subsection{System operations}
   6.598 +
   6.599 +\indexisarcmd{cd}\indexisarcmd{pwd}\indexisarcmd{use_thy}\indexisarcmd{use_thy_only}
   6.600 +\indexisarcmd{update_thy}\indexisarcmd{update_thy_only}
   6.601 +\begin{matharray}{rcl}
   6.602 +  \isarcmd{cd} & : & \isarkeep{\cdot} \\
   6.603 +  \isarcmd{pwd} & : & \isarkeep{\cdot} \\
   6.604 +  \isarcmd{use_thy} & : & \isarkeep{\cdot} \\
   6.605 +  \isarcmd{use_thy_only} & : & \isarkeep{\cdot} \\
   6.606 +  \isarcmd{update_thy} & : & \isarkeep{\cdot} \\
   6.607 +  \isarcmd{update_thy_only} & : & \isarkeep{\cdot} \\
   6.608 +\end{matharray}
   6.609 +
   6.610 +\begin{description}
   6.611 +\item [$\isarkeyword{cd}~name$] changes the current directory of the Isabelle
   6.612 +  process.
   6.613 +\item [$\isarkeyword{pwd}~$] prints the current working directory.
   6.614 +\item [$\isarkeyword{use_thy}~name$, $\isarkeyword{use_thy_only}~name$,
   6.615 +  $\isarkeyword{update_thy}~name$, $\isarkeyword{update_thy_only}~name$] load
   6.616 +  theory files.  These commands are exactly the same as the corresponding ML
   6.617 +  functions (see also \cite[\S1 and \S6]{isabelle-ref}).
   6.618 +\end{description}
   6.619 +
   6.620 +
   6.621  %%% Local Variables: 
   6.622  %%% mode: latex
   6.623  %%% TeX-master: "isar-ref"
     7.1 --- a/doc-src/IsarRef/simplifier.tex	Fri Jul 30 13:44:29 1999 +0200
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,7 +0,0 @@
     7.4 -
     7.5 -\chapter{The Simplifier}
     7.6 -
     7.7 -%%% Local Variables: 
     7.8 -%%% mode: latex
     7.9 -%%% TeX-master: "isar-ref"
    7.10 -%%% End: 
     8.1 --- a/doc-src/IsarRef/syntax.tex	Fri Jul 30 13:44:29 1999 +0200
     8.2 +++ b/doc-src/IsarRef/syntax.tex	Fri Jul 30 14:59:32 1999 +0200
     8.3 @@ -5,6 +5,8 @@
     8.4  
     8.5  \chapter{Isar document syntax}
     8.6  
     8.7 +FIXME shortcut
     8.8 +
     8.9  FIXME important note: inner versus outer syntax
    8.10  
    8.11  \section{Lexical matters}
    8.12 @@ -12,22 +14,26 @@
    8.13  \section{Common syntax entities}
    8.14  
    8.15  The Isar proof and theory language syntax has been carefully designed with
    8.16 -orthogonality in mind.  Many common syntax entities such that those for names,
    8.17 -terms, types etc.\ have been factored out.  Some of these basic syntactic
    8.18 -entities usually represent the level of abstraction for error messages: e.g.\ 
    8.19 -some higher syntax element such as $\CONSTS$ referring to \railtoken{name} or
    8.20 -\railtoken{type}, would really report a missing \railtoken{name} or
    8.21 -\railtoken{type} rather than any of its constituent primitive tokens (as
    8.22 -defined below).  These quasi-tokens are represented in the syntax diagrams
    8.23 -below using the same font as actual tokens (such as \railtoken{string}).
    8.24 +orthogonality in mind.  Subsequently, we introduce several basic syntactic
    8.25 +entities, such as names, terms, theorem specifications, which have been
    8.26 +factored out of the actual Isar language elements described later.
    8.27 +
    8.28 +Some of the basic syntactic entities introduced below act much like tokens
    8.29 +rather than nonterminals, in particular for error messages are concerned.
    8.30 +E.g.\ syntax elements such as $\CONSTS$ referring to \railqtoken{name} or
    8.31 +\railqtoken{type} would really report a missing \railqtoken{name} or
    8.32 +\railqtoken{type} rather than any of its constituent primitive tokens
    8.33 +(\railtoken{ident}, \railtoken{string} etc.).
    8.34  
    8.35  
    8.36  \subsection{Names}
    8.37  
    8.38 -Entity \railtoken{name} usually refers to any name of types, constants,
    8.39 +Entity \railqtoken{name} usually refers to any name of types, constants,
    8.40  theorems, etc.\ to be \emph{declared} or \emph{defined} (so qualified
    8.41 -identifiers are excluded).  Already existing objects are typically referenced
    8.42 -by \railtoken{nameref}.
    8.43 +identifiers are excluded).  Quoted strings provide an escape for
    8.44 +non-identifier names or those ruled out by outer syntax keywords (e.g.\ 
    8.45 +\verb|"let"|).  Already existing objects are usually referenced by
    8.46 +\railqtoken{nameref}.
    8.47  
    8.48  \indexoutertoken{name}\indexoutertoken{nameref}
    8.49  \begin{rail}
    8.50 @@ -40,23 +46,23 @@
    8.51  
    8.52  \subsection{Comments}
    8.53  
    8.54 -Large chunks of verbatim \railtoken{text} are usually given
    8.55 -\railtoken{verbatim}, i.e.\ enclosed in \verb|{*|~\verb|*}|; for convenience,
    8.56 -any of the smaller text entities (\railtoken{ident}, \railtoken{string} etc.)
    8.57 -are admitted as well.  Almost any of the Isar commands may be annotated by a
    8.58 -marginal comment: \texttt{--} \railtoken{text}.  Note that this kind of
    8.59 -comment is actually part of the language, while source level comments
    8.60 -\verb|(*|~\verb|*)| are already stripped at the lexical level.  A few commands
    8.61 -such as $\PROOFNAME$ admit some parts to be mark with a ``level of interest'':
    8.62 -currently only \texttt{\%} for ``boring, don't read this''.
    8.63 +Large chunks of plain \railqtoken{text} are usually given \railtoken{verbatim},
    8.64 +i.e.\ enclosed in \verb|{*|\dots\verb|*}|.  For convenience, any of the
    8.65 +smaller text entities (\railtoken{ident}, \railtoken{string} etc.)  are
    8.66 +admitted as well.  Almost any of the Isar commands may be annotated by a
    8.67 +marginal \railnonterm{comment}: \texttt{--} \railqtoken{text}.  Note that this
    8.68 +kind of comment is actually part of the language, while source level comments
    8.69 +\verb|(*|\dots\verb|*)| are already stripped at the lexical level.  A few
    8.70 +commands such as $\PROOFNAME$ admit additional markup with a ``level of
    8.71 +interest'', currently only \texttt{\%} for ``boring, don't read this''.
    8.72  
    8.73  \indexoutertoken{text}\indexouternonterm{comment}\indexouternonterm{interest}
    8.74  \begin{rail}
    8.75    text : verbatim | nameref
    8.76    ;
    8.77 -  comment : (() | '--' text)
    8.78 +  comment : '--' text
    8.79    ;
    8.80 -  interest : (() | '\%')
    8.81 +  interest : '\%'
    8.82    ;
    8.83  \end{rail}
    8.84  
    8.85 @@ -84,16 +90,16 @@
    8.86  flexible in order to be modeled explicitly at the outer theory level.
    8.87  Basically, any such entity would have to be quoted at the outer level to turn
    8.88  it into a single token, with the actual parsing deferred to some functions
    8.89 -that read and type-check terms etc.\ (note that \railtoken{prop}s will be
    8.90 -handled differently from plain \railtoken{term}s here).  For convenience, the
    8.91 +that read and type-check terms etc.\ (note that \railqtoken{prop}s will be
    8.92 +handled differently from plain \railqtoken{term}s here).  For convenience, the
    8.93  quotes may be omitted for any \emph{atomic} term or type (e.g.\ a single
    8.94  variable).
    8.95  
    8.96  \indexoutertoken{type}\indexoutertoken{term}\indexoutertoken{prop}
    8.97  \begin{rail}
    8.98 -  type : ident | longident | symident | typefree | typevar | string
    8.99 +  type : nameref | typefree | typevar
   8.100    ;
   8.101 -  term : ident | longident | symident | var | textvar | nat | string
   8.102 +  term : nameref | var | textvar | nat
   8.103    ;
   8.104    prop : term
   8.105    ;
   8.106 @@ -116,7 +122,7 @@
   8.107  Statements like $\SHOWNAME$ involve propositions, some others like $\DEFNAME$
   8.108  plain terms.  Any of these usually admit automatic binding of schematic text
   8.109  variables by giving (optional) patterns $\IS{p@1 \dots p@n}$.  For
   8.110 -\railtoken{prop}s the $\CONCLNAME$ part refers to the conclusion only, in case
   8.111 +\railqtoken{prop}s the $\CONCLNAME$ part refers to the conclusion only, in case
   8.112  actual rules are involved, rather than atomic propositions.
   8.113  
   8.114  \indexouternonterm{termpat}\indexouternonterm{proppat}
   8.115 @@ -130,9 +136,9 @@
   8.116  
   8.117  \subsection{Mixfix annotations}
   8.118  
   8.119 -Mixfix annotations specify concrete \emph{inner} syntax.  Some commands such
   8.120 -as $\TYPES$ admit infixes only, while $\CONSTS$ etc.\ support the full range
   8.121 -of general mixfixes and binders.
   8.122 +Mixfix annotations specify concrete \emph{inner} syntax of Isabelle types and
   8.123 +terms.  Some commands such as $\TYPES$ admit infixes only, while $\CONSTS$
   8.124 +etc.\ support the full range of general mixfixes and binders.
   8.125  
   8.126  \indexouternonterm{infix}\indexouternonterm{mixfix}
   8.127  \begin{rail}
   8.128 @@ -145,39 +151,45 @@
   8.129  \end{rail}
   8.130  
   8.131  
   8.132 -\subsection{Attributes and theorem specifications}\label{sec:syn-att}
   8.133 +\subsection{Attributes and theorems}\label{sec:syn-att}
   8.134  
   8.135  Attributes (and proof methods, see \S\ref{sec:syn-meth}) have their own
   8.136  ``semi-inner'' syntax, which does not have to be atomic at the outer level
   8.137  unlike that of types and terms.  Instead, the attribute argument
   8.138  specifications may be any sequence of atomic entities (identifiers, strings
   8.139 -etc.), or properly bracketed argument lists.  Below \railtoken{atom} refers to
   8.140 +etc.), or properly bracketed argument lists.  Below \railqtoken{atom} refers to
   8.141  any atomic entity (\railtoken{ident}, \railtoken{longident},
   8.142  \railtoken{symident} etc.), including keywords that conform to
   8.143  \railtoken{symident}, but do not coincide with actual command names.
   8.144  
   8.145  \indexoutertoken{atom}\indexouternonterm{args}\indexouternonterm{attributes}
   8.146  \begin{rail}
   8.147 -  args : (atom | '(' (args *) ')' | '[' (args *) ']' | lbrace (args *) rbrace) *
   8.148 +  atom : nameref | typefree | typevar | var | textvar | nat
   8.149 +  ;
   8.150 +  arg : atom | '(' args ')' | '[' args ']' | lbrace args rbrace
   8.151    ;
   8.152 -  attributes : '[' (name args + ',') ']'
   8.153 +  args : arg *
   8.154 +  ;
   8.155 +  attributes : '[' (nameref args * ',') ']'
   8.156    ;
   8.157  \end{rail}
   8.158  
   8.159 -Theorem specifications come in three flavours: \railnonterm{thmdecl} usually
   8.160 -refers to the result of a goal statement (such as $\SHOWNAME$),
   8.161 +Theorem specifications come in three flavors: \railnonterm{thmdecl} usually
   8.162 +refers to the result of an assumption or goal statement (e.g.\ $\SHOWNAME$),
   8.163  \railnonterm{thmdef} collects lists of existing theorems (as in $\NOTENAME$),
   8.164 -\railnonterm{thmref} refers to any list of existing theorems (e.g.\ occurring
   8.165 +\railnonterm{thmrefs} refers to any list of existing theorems (e.g.\ occurring
   8.166  as proof method arguments).  Any of these may include lists of attributes,
   8.167  which are applied to the preceding theorem or list of theorems.
   8.168  
   8.169 -\indexouternonterm{thmdecl}\indexouternonterm{thmdef}\indexouternonterm{thmref}
   8.170 +\indexouternonterm{thmdecl}\indexouternonterm{thmdef}\indexouternonterm{thmrefs}
   8.171  \begin{rail}
   8.172 -  thmdecl : (() | name) (() | attributes) ':'
   8.173 +  thmname : name attributes | name | attributes
   8.174    ;
   8.175 -  thmdef : (() | name) (() | attributes) '='
   8.176 +  thmdecl : thmname ':'
   8.177    ;
   8.178 -  thmref : (name (() | attributes) +)
   8.179 +  thmdef : thmname '='
   8.180 +  ;
   8.181 +  thmrefs : nameref (() | attributes) +
   8.182    ;
   8.183  \end{rail}
   8.184  
   8.185 @@ -187,15 +199,18 @@
   8.186  Proof methods are either basic ones, or expressions composed of methods via
   8.187  ``\texttt{,}'' (sequential composition), ``\texttt{|}'' (alternatives),
   8.188  ``\texttt{?}'' (try), ``\texttt{*}'' (repeat, ${} \ge 0$ times),
   8.189 -``\texttt{+}'' (repeat, ${} > 0$ times).  In practice, proof methods are
   8.190 -typically just a comma separeted list of \railtoken{name}~\railtoken{args}
   8.191 +``\texttt{+}'' (repeat, ${} > 0$ times).  In practice, proof methods are very
   8.192 +often just a comma separated list of \railqtoken{nameref}~\railnonterm{args}
   8.193  specifications.  Thus the syntax is similar to that of attributes, with plain
   8.194  parentheses instead of square brackets (see also \S\ref{sec:syn-att}).  Note
   8.195 -that parentheses may be dropped for methods without arguments.
   8.196 +that parentheses may be dropped for single method specifications without
   8.197 +arguments.
   8.198  
   8.199  \indexouternonterm{method}
   8.200  \begin{rail}
   8.201 -  method : (name args | (name | '(' method ')') (() | '?' | '*' | '+')) + (',' | '|')
   8.202 +  method : (nameref | '(' methods ')') (() | '?' | '*' | '+')
   8.203 +  ;
   8.204 +  methods : (nameref args | method) + (',' | '|')
   8.205    ;
   8.206  \end{rail}
   8.207