79 typefree & = & \verb,',ident \\ |
79 typefree & = & \verb,',ident \\ |
80 typevar & = & typefree ~|~ \verb,?,typefree ~|~ \verb,?,typefree\verb,.,nat \\ |
80 typevar & = & typefree ~|~ \verb,?,typefree ~|~ \verb,?,typefree\verb,.,nat \\ |
81 string & = & \verb,", ~\dots~ \verb,", \\ |
81 string & = & \verb,", ~\dots~ \verb,", \\ |
82 verbatim & = & \verb,{*, ~\dots~ \verb,*}, \\[1ex] |
82 verbatim & = & \verb,{*, ~\dots~ \verb,*}, \\[1ex] |
83 |
83 |
84 letter & = & sletter ~|~ xletter \\ |
84 letter & = & latin ~|~ symletter \\ |
|
85 latin & = & \verb,a, ~|~ \dots ~|~ \verb,z, ~|~ \verb,A, ~|~ \dots ~|~ \verb,Z, \\ |
85 digit & = & \verb,0, ~|~ \dots ~|~ \verb,9, \\ |
86 digit & = & \verb,0, ~|~ \dots ~|~ \verb,9, \\ |
86 quasiletter & = & letter ~|~ digit ~|~ \verb,_, ~|~ \verb,', \\ |
87 quasiletter & = & letter ~|~ digit ~|~ \verb,_, ~|~ \verb,', ~|~ \verb,\<^isub>, ~|~ \verb,\<^isup>, \\ |
87 sym & = & \verb,!, ~|~ \verb,#, ~|~ \verb,$, ~|~ \verb,%, ~|~ \verb,&, ~|~ %$ |
88 sym & = & \verb,!, ~|~ \verb,#, ~|~ \verb,$, ~|~ \verb,%, ~|~ \verb,&, ~|~ %$ |
88 \verb,*, ~|~ \verb,+, ~|~ \verb,-, ~|~ \verb,/, ~|~ \verb,:, ~|~ \\ |
89 \verb,*, ~|~ \verb,+, ~|~ \verb,-, ~|~ \verb,/, ~|~ \verb,:, ~|~ \\ |
89 & & \verb,<, ~|~ \verb,=, ~|~ \verb,>, ~|~ \verb,?, ~|~ \texttt{\at} ~|~ |
90 & & \verb,<, ~|~ \verb,=, ~|~ \verb,>, ~|~ \verb,?, ~|~ \texttt{\at} ~|~ |
90 \verb,^, ~|~ \verb,_, ~|~ \verb,`, ~|~ \verb,|, ~|~ \verb,~, \\ |
91 \verb,^, ~|~ \verb,_, ~|~ \verb,`, ~|~ \verb,|, ~|~ \verb,~, \\ |
91 symbol & = & {\forall} ~|~ {\exists} ~|~ {\land} ~|~ {\lor} ~|~ \dots\\ |
92 symbol & = & {\forall} ~|~ {\exists} ~|~ {\land} ~|~ {\lor} ~|~ \dots\\ |
92 sletter & = & \verb,a, ~|~ \dots ~|~ \verb,z, ~|~ \verb,A, ~|~ \dots ~|~ \verb,Z, \\ |
93 symletter & = & \verb,\<, (latin ~|~ latin~latin ~|~ greek) \verb,>, \\ |
93 xletter & = & {\tt \backslash<} ~ (sletter ~|~ dletter ~|~ gletter ~|~ cletter) ~ {\tt >}\\ |
94 greek & = & \verb,alpha, ~|~ \verb,beta, ~|~ \verb,gamma, ~|~ \verb,delta, ~|~ \verb,epsilon, ~|~ \verb,zeta, ~|~ \verb,eta, ~| \\ |
94 dletter & = & \verb,aa, ~|~ \dots ~|~ \verb,zz, ~|~ \verb,AA, ~|~ \dots ~|~ \verb,ZZ, \\ |
95 & & \verb,theta, ~|~ \verb,iota, ~|~ \verb,kappa, ~|~ \verb,mu, ~|~ \verb,nu, ~|~ \verb,xi, ~|~ \verb,pi, ~|~ \verb,rho, ~| \\ |
95 bletter & = & {\tt bool} ~|~ {\tt complex} ~|~ {\tt nat} ~|~ {\tt rat} ~|~ {\tt real} ~|~ {\tt int}\\ |
96 & & \verb,sigma, ~|~ \verb,tau, ~|~ \verb,upsilon, ~|~ \verb,phi, ~|~ \verb,psi, ~|~ \verb,omega, ~|~ \verb,Gamma, ~| \\ |
96 cletter & = & {\tt \hat{}\, isup} ~~|~~ {\tt \hat{}\, isub} |
97 & & \verb,Delta, ~|~ \verb,Theta, ~|~ \verb,Lambda, ~|~ \verb,Xi, ~|~ \verb,Pi, ~|~ \verb,Sigma, ~|~ \verb,Upsilon, ~| \\ |
97 \end{matharray} |
98 & & \verb,Phi, ~|~ \verb,Psi, ~|~ \verb,Omega, |
98 \begin{matharray}{rcl} |
|
99 gletter & = & {\tt alpha} ~|~ {\tt beta} ~|~ {\tt gamma} ~|~ {\tt delta} ~|~ {\tt epsilon} ~|~ {\tt zeta} ~|~ {\tt eta} ~|\\ |
|
100 & & {\tt theta} ~|~ {\tt iota} ~|~ {\tt kappa} ~|~ {\tt mu} ~|~ {\tt nu} ~|~ {\tt xi} ~|~ {\tt pi} ~|~ {\tt rho} ~|\\ |
|
101 & & {\tt sigma} ~|~ {\tt tau} ~|~ {\tt upsilon} ~|~ {\tt phi} ~|~ {\tt psi} ~|~ {\tt omega} ~|~ {\tt Gamma} ~|\\ |
|
102 & & {\tt Delta} ~|~ {\tt Theta} ~|~ {\tt Lambda} ~|~ {\tt Xi} ~|~ {\tt Pi} ~|~ {\tt Sigma} ~|~ {\tt Upsilon} ~|\\ |
|
103 & & {\tt Phi} ~|~ {\tt Psi} ~|~ {\tt Omega} |
|
104 \end{matharray} |
99 \end{matharray} |
105 |
100 |
106 The syntax of $string$ admits any characters, including newlines; ``\verb|"|'' |
101 The syntax of $string$ admits any characters, including newlines; ``\verb|"|'' |
107 (double-quote) and ``\verb|\|'' (backslash) need to be escaped by a backslash. |
102 (double-quote) and ``\verb|\|'' (backslash) need to be escaped by a backslash. |
108 Note that ML-style control characters are \emph{not} supported. The body of |
103 Note that ML-style control characters are \emph{not} supported. The body of |
126 \medskip |
121 \medskip |
127 |
122 |
128 Mathematical symbols such as ``$\forall$'' are represented in plain ASCII as |
123 Mathematical symbols such as ``$\forall$'' are represented in plain ASCII as |
129 ``\verb,\<forall>,''. Concerning Isabelle itself, any sequence of the form |
124 ``\verb,\<forall>,''. Concerning Isabelle itself, any sequence of the form |
130 \verb,\<,$ident$\verb,>, (or \verb,\\<,$ident$\verb,>,) is a legal symbol. |
125 \verb,\<,$ident$\verb,>, (or \verb,\\<,$ident$\verb,>,) is a legal symbol. |
131 Greek letters \verb+\<alpha>+, \verb+\<beta>+, etc (apart from |
126 Greek letters \verb+\<alpha>+, \verb+\<beta>+, etc. (apart from |
132 \verb+\<lambda>+), caligraphic letters in various styles, as |
127 \verb+\<lambda>+), as well as the \verb+\<^isub>+ and \verb+\<^isup>+ control |
133 well as the special \verb+\<^isub>+ and \verb+\<^isup>+ sub/superscipt |
128 characters may be used in identifiers as well. |
134 control characters are considered proper letters and can be used as |
|
135 part of any identifier. |
|
136 |
129 |
137 Display of appropriate glyphs is a matter of front-end tools, say the |
130 Display of appropriate glyphs is a matter of front-end tools, say the |
138 user-interface of Proof~General plus the X-Symbol package, or the {\LaTeX} |
131 user-interface of Proof~General plus the X-Symbol package, or the {\LaTeX} |
139 macro setup of document output. A list of predefined Isabelle symbols is |
132 macro setup of document output. A list of predefined Isabelle symbols is |
140 given in \cite[appendix~A]{isabelle-sys}. |
133 given in \cite[appendix~A]{isabelle-sys}. |
469 |
462 |
470 Note that the syntax of antiquotations may \emph{not} include source comments |
463 Note that the syntax of antiquotations may \emph{not} include source comments |
471 \texttt{(*~\dots~*)} or verbatim text \verb|{*|~\dots~\verb|*}|. |
464 \texttt{(*~\dots~*)} or verbatim text \verb|{*|~\dots~\verb|*}|. |
472 |
465 |
473 \begin{descr} |
466 \begin{descr} |
474 |
467 |
475 \item [$\at\{thm~\vec a\}$] prints theorems $\vec a$. Note that attribute |
468 \item [$\at\{thm~\vec a\}$] prints theorems $\vec a$. Note that attribute |
476 specifications may be included as well (see also \S\ref{sec:syn-att}); the |
469 specifications may be included as well (see also \S\ref{sec:syn-att}); the |
477 $no_vars$ operation (see \S\ref{sec:misc-meth-att}) would be particularly |
470 $no_vars$ operation (see \S\ref{sec:misc-meth-att}) would be particularly |
478 useful to suppress printing of schematic variables. |
471 useful to suppress printing of schematic variables. |
479 |
472 |
480 \item [$\at\{prop~\phi\}$] prints a well-typed proposition $\phi$. |
473 \item [$\at\{prop~\phi\}$] prints a well-typed proposition $\phi$. |
481 |
474 |
482 \item [$\at\{term~t\}$] prints a well-typed term $t$. |
475 \item [$\at\{term~t\}$] prints a well-typed term $t$. |
483 |
476 |
484 \item [$\at\{typ~\tau\}$] prints a well-formed type $\tau$. |
477 \item [$\at\{typ~\tau\}$] prints a well-formed type $\tau$. |
485 |
478 |
486 \item [$\at\{text~s\}$] prints uninterpreted source text $s$. This is |
479 \item [$\at\{text~s\}$] prints uninterpreted source text $s$. This is |
487 particularly useful to print portions of text according to the Isabelle |
480 particularly useful to print portions of text according to the Isabelle |
488 {\LaTeX} output style, without demanding well-formedness (e.g.\ small pieces |
481 {\LaTeX} output style, without demanding well-formedness (e.g.\ small pieces |
489 of terms that should not be parsed or type-checked yet). |
482 of terms that should not be parsed or type-checked yet). |
490 |
483 |
491 \item [$\at\{goals\}$] prints the current \emph{dynamic} goal state. This is |
484 \item [$\at\{goals\}$] prints the current \emph{dynamic} goal state. This is |
492 mainly for support of tactic-emulation scripts within Isar --- presentation |
485 mainly for support of tactic-emulation scripts within Isar --- presentation |
493 of goal states does not conform to actual human-readable proof documents. |
486 of goal states does not conform to actual human-readable proof documents. |
494 Please do not include goal states into document output unless you really |
487 Please do not include goal states into document output unless you really |
495 know what you are doing! |
488 know what you are doing! |