author | wenzelm |
Tue, 15 Mar 2011 13:03:54 +0100 | |
changeset 41984 | e5dba3d75e9e |
parent 40879 | ca132ef44944 |
child 42596 | 6c621a9d612a |
permissions | -rw-r--r-- |
27042 | 1 |
% |
2 |
\begin{isabellebody}% |
|
40406 | 3 |
\def\isabellecontext{Document{\isaliteral{5F}{\isacharunderscore}}Preparation}% |
27042 | 4 |
% |
5 |
\isadelimtheory |
|
6 |
% |
|
7 |
\endisadelimtheory |
|
8 |
% |
|
9 |
\isatagtheory |
|
10 |
\isacommand{theory}\isamarkupfalse% |
|
40406 | 11 |
\ Document{\isaliteral{5F}{\isacharunderscore}}Preparation\isanewline |
27042 | 12 |
\isakeyword{imports}\ Main\isanewline |
13 |
\isakeyword{begin}% |
|
14 |
\endisatagtheory |
|
15 |
{\isafoldtheory}% |
|
16 |
% |
|
17 |
\isadelimtheory |
|
18 |
% |
|
19 |
\endisadelimtheory |
|
20 |
% |
|
21 |
\isamarkupchapter{Document preparation \label{ch:document-prep}% |
|
22 |
} |
|
23 |
\isamarkuptrue% |
|
24 |
% |
|
25 |
\begin{isamarkuptext}% |
|
28788 | 26 |
Isabelle/Isar provides a simple document preparation system |
27 |
based on regular {PDF-\LaTeX} technology, with full support for |
|
28 |
hyper-links and bookmarks. Thus the results are well suited for WWW |
|
29 |
browsing and as printed copies. |
|
27042 | 30 |
|
28788 | 31 |
\medskip Isabelle generates {\LaTeX} output while running a |
27042 | 32 |
\emph{logic session} (see also \cite{isabelle-sys}). Getting |
33 |
started with a working configuration for common situations is quite |
|
34 |
easy by using the Isabelle \verb|mkdir| and \verb|make| |
|
35 |
tools. First invoke |
|
36 |
\begin{ttbox} |
|
28505 | 37 |
isabelle mkdir Foo |
27042 | 38 |
\end{ttbox} |
28788 | 39 |
to initialize a separate directory for session \verb|Foo| (it |
40 |
is safe to experiment, since \verb|isabelle mkdir| never |
|
41 |
overwrites existing files). Ensure that \verb|Foo/ROOT.ML| |
|
27042 | 42 |
holds ML commands to load all theories required for this session; |
43 |
furthermore \verb|Foo/document/root.tex| should include any |
|
44 |
special {\LaTeX} macro packages required for your document (the |
|
45 |
default is usually sufficient as a start). |
|
46 |
||
47 |
The session is controlled by a separate \verb|IsaMakefile| |
|
48 |
(with crude source dependencies by default). This file is located |
|
49 |
one level up from the \verb|Foo| directory location. Now |
|
50 |
invoke |
|
51 |
\begin{ttbox} |
|
28505 | 52 |
isabelle make Foo |
27042 | 53 |
\end{ttbox} |
54 |
to run the \verb|Foo| session, with browser information and |
|
55 |
document preparation enabled. Unless any errors are reported by |
|
56 |
Isabelle or {\LaTeX}, the output will appear inside the directory |
|
28788 | 57 |
defined by the \verb|ISABELLE_BROWSER_INFO| setting (as |
58 |
reported by the batch job in verbose mode). |
|
27042 | 59 |
|
60 |
\medskip You may also consider to tune the \verb|usedir| |
|
28788 | 61 |
options in \verb|IsaMakefile|, for example to switch the output |
62 |
format between \verb|pdf| and \verb|dvi|, or activate the |
|
27042 | 63 |
\verb|-D| option to retain a second copy of the generated |
28788 | 64 |
{\LaTeX} sources (for manual inspection or separate runs of |
65 |
\hyperlink{executable.latex}{\mbox{\isa{\isatt{latex}}}}). |
|
27042 | 66 |
|
67 |
\medskip See \emph{The Isabelle System Manual} \cite{isabelle-sys} |
|
68 |
for further details on Isabelle logic sessions and theory |
|
69 |
presentation. The Isabelle/HOL tutorial \cite{isabelle-hol-book} |
|
28788 | 70 |
also covers theory presentation to some extent.% |
27042 | 71 |
\end{isamarkuptext}% |
72 |
\isamarkuptrue% |
|
73 |
% |
|
74 |
\isamarkupsection{Markup commands \label{sec:markup}% |
|
75 |
} |
|
76 |
\isamarkuptrue% |
|
77 |
% |
|
78 |
\begin{isamarkuptext}% |
|
79 |
\begin{matharray}{rcl} |
|
40406 | 80 |
\indexdef{}{command}{header}\hypertarget{command.header}{\hyperlink{command.header}{\mbox{\isa{\isacommand{header}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}toplevel\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ toplevel{\isaliteral{22}{\isachardoublequote}}} \\[0.5ex] |
81 |
\indexdef{}{command}{chapter}\hypertarget{command.chapter}{\hyperlink{command.chapter}{\mbox{\isa{\isacommand{chapter}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\ |
|
82 |
\indexdef{}{command}{section}\hypertarget{command.section}{\hyperlink{command.section}{\mbox{\isa{\isacommand{section}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\ |
|
83 |
\indexdef{}{command}{subsection}\hypertarget{command.subsection}{\hyperlink{command.subsection}{\mbox{\isa{\isacommand{subsection}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\ |
|
84 |
\indexdef{}{command}{subsubsection}\hypertarget{command.subsubsection}{\hyperlink{command.subsubsection}{\mbox{\isa{\isacommand{subsubsection}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\ |
|
85 |
\indexdef{}{command}{text}\hypertarget{command.text}{\hyperlink{command.text}{\mbox{\isa{\isacommand{text}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\ |
|
86 |
\indexdef{}{command}{text\_raw}\hypertarget{command.text-raw}{\hyperlink{command.text-raw}{\mbox{\isa{\isacommand{text{\isaliteral{5F}{\isacharunderscore}}raw}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\[0.5ex] |
|
87 |
\indexdef{}{command}{sect}\hypertarget{command.sect}{\hyperlink{command.sect}{\mbox{\isa{\isacommand{sect}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{22}{\isachardoublequote}}} \\ |
|
88 |
\indexdef{}{command}{subsect}\hypertarget{command.subsect}{\hyperlink{command.subsect}{\mbox{\isa{\isacommand{subsect}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{22}{\isachardoublequote}}} \\ |
|
89 |
\indexdef{}{command}{subsubsect}\hypertarget{command.subsubsect}{\hyperlink{command.subsubsect}{\mbox{\isa{\isacommand{subsubsect}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{22}{\isachardoublequote}}} \\ |
|
90 |
\indexdef{}{command}{txt}\hypertarget{command.txt}{\hyperlink{command.txt}{\mbox{\isa{\isacommand{txt}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{22}{\isachardoublequote}}} \\ |
|
91 |
\indexdef{}{command}{txt\_raw}\hypertarget{command.txt-raw}{\hyperlink{command.txt-raw}{\mbox{\isa{\isacommand{txt{\isaliteral{5F}{\isacharunderscore}}raw}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{22}{\isachardoublequote}}} \\ |
|
27042 | 92 |
\end{matharray} |
93 |
||
28788 | 94 |
Markup commands provide a structured way to insert text into the |
95 |
document generated from a theory. Each markup command takes a |
|
96 |
single \hyperlink{syntax.text}{\mbox{\isa{text}}} argument, which is passed as argument to a |
|
97 |
corresponding {\LaTeX} macro. The default macros provided by |
|
40802 | 98 |
\verb|~~/lib/texinputs/isabelle.sty| can be redefined according |
28788 | 99 |
to the needs of the underlying document and {\LaTeX} styles. |
100 |
||
101 |
Note that formal comments (\secref{sec:comments}) are similar to |
|
102 |
markup commands, but have a different status within Isabelle/Isar |
|
103 |
syntax. |
|
27042 | 104 |
|
105 |
\begin{rail} |
|
106 |
('chapter' | 'section' | 'subsection' | 'subsubsection' | 'text') target? text |
|
107 |
; |
|
40255
9ffbc25e1606
eliminated obsolete \_ escapes in rail environments;
wenzelm
parents:
39689
diff
changeset
|
108 |
('header' | 'text_raw' | 'sect' | 'subsect' | 'subsubsect' | 'txt' | 'txt_raw') text |
27042 | 109 |
; |
110 |
\end{rail} |
|
111 |
||
28788 | 112 |
\begin{description} |
27042 | 113 |
|
28788 | 114 |
\item \hyperlink{command.header}{\mbox{\isa{\isacommand{header}}}} provides plain text markup just preceding |
115 |
the formal beginning of a theory. The corresponding {\LaTeX} macro |
|
116 |
is \verb|\isamarkupheader|, which acts like \hyperlink{command.section}{\mbox{\isa{\isacommand{section}}}} by default. |
|
27052 | 117 |
|
28788 | 118 |
\item \hyperlink{command.chapter}{\mbox{\isa{\isacommand{chapter}}}}, \hyperlink{command.section}{\mbox{\isa{\isacommand{section}}}}, \hyperlink{command.subsection}{\mbox{\isa{\isacommand{subsection}}}}, |
119 |
and \hyperlink{command.subsubsection}{\mbox{\isa{\isacommand{subsubsection}}}} mark chapter and section headings |
|
120 |
within the main theory body or local theory targets. The |
|
121 |
corresponding {\LaTeX} macros are \verb|\isamarkupchapter|, |
|
122 |
\verb|\isamarkupsection|, \verb|\isamarkupsubsection| etc. |
|
27042 | 123 |
|
28788 | 124 |
\item \hyperlink{command.sect}{\mbox{\isa{\isacommand{sect}}}}, \hyperlink{command.subsect}{\mbox{\isa{\isacommand{subsect}}}}, and \hyperlink{command.subsubsect}{\mbox{\isa{\isacommand{subsubsect}}}} |
125 |
mark section headings within proofs. The corresponding {\LaTeX} |
|
126 |
macros are \verb|\isamarkupsect|, \verb|\isamarkupsubsect| etc. |
|
27042 | 127 |
|
28788 | 128 |
\item \hyperlink{command.text}{\mbox{\isa{\isacommand{text}}}} and \hyperlink{command.txt}{\mbox{\isa{\isacommand{txt}}}} specify paragraphs of plain |
40406 | 129 |
text. This corresponds to a {\LaTeX} environment \verb|\begin{isamarkuptext}| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|\end{isamarkuptext}| etc. |
27042 | 130 |
|
40406 | 131 |
\item \hyperlink{command.text-raw}{\mbox{\isa{\isacommand{text{\isaliteral{5F}{\isacharunderscore}}raw}}}} and \hyperlink{command.txt-raw}{\mbox{\isa{\isacommand{txt{\isaliteral{5F}{\isacharunderscore}}raw}}}} insert {\LaTeX} |
28788 | 132 |
source into the output, without additional markup. Thus the full |
133 |
range of document manipulations becomes available, at the risk of |
|
134 |
messing up document output. |
|
27042 | 135 |
|
28788 | 136 |
\end{description} |
27042 | 137 |
|
40406 | 138 |
Except for \hyperlink{command.text-raw}{\mbox{\isa{\isacommand{text{\isaliteral{5F}{\isacharunderscore}}raw}}}} and \hyperlink{command.txt-raw}{\mbox{\isa{\isacommand{txt{\isaliteral{5F}{\isacharunderscore}}raw}}}}, the text |
28788 | 139 |
passed to any of the above markup commands may refer to formal |
140 |
entities via \emph{document antiquotations}, see also |
|
141 |
\secref{sec:antiq}. These are interpreted in the present theory or |
|
40406 | 142 |
proof context, or the named \isa{{\isaliteral{22}{\isachardoublequote}}target{\isaliteral{22}{\isachardoublequote}}}. |
27042 | 143 |
|
144 |
\medskip The proof markup commands closely resemble those for theory |
|
145 |
specifications, but have a different formal status and produce |
|
28788 | 146 |
different {\LaTeX} macros. The default definitions coincide for |
147 |
analogous commands such as \hyperlink{command.section}{\mbox{\isa{\isacommand{section}}}} and \hyperlink{command.sect}{\mbox{\isa{\isacommand{sect}}}}.% |
|
27042 | 148 |
\end{isamarkuptext}% |
149 |
\isamarkuptrue% |
|
150 |
% |
|
28788 | 151 |
\isamarkupsection{Document Antiquotations \label{sec:antiq}% |
27042 | 152 |
} |
153 |
\isamarkuptrue% |
|
154 |
% |
|
155 |
\begin{isamarkuptext}% |
|
156 |
\begin{matharray}{rcl} |
|
28788 | 157 |
\indexdef{}{antiquotation}{theory}\hypertarget{antiquotation.theory}{\hyperlink{antiquotation.theory}{\mbox{\isa{theory}}}} & : & \isa{antiquotation} \\ |
158 |
\indexdef{}{antiquotation}{thm}\hypertarget{antiquotation.thm}{\hyperlink{antiquotation.thm}{\mbox{\isa{thm}}}} & : & \isa{antiquotation} \\ |
|
159 |
\indexdef{}{antiquotation}{lemma}\hypertarget{antiquotation.lemma}{\hyperlink{antiquotation.lemma}{\mbox{\isa{lemma}}}} & : & \isa{antiquotation} \\ |
|
160 |
\indexdef{}{antiquotation}{prop}\hypertarget{antiquotation.prop}{\hyperlink{antiquotation.prop}{\mbox{\isa{prop}}}} & : & \isa{antiquotation} \\ |
|
161 |
\indexdef{}{antiquotation}{term}\hypertarget{antiquotation.term}{\hyperlink{antiquotation.term}{\mbox{\isa{term}}}} & : & \isa{antiquotation} \\ |
|
40406 | 162 |
\indexdef{}{antiquotation}{term\_type}\hypertarget{antiquotation.term-type}{\hyperlink{antiquotation.term-type}{\mbox{\isa{term{\isaliteral{5F}{\isacharunderscore}}type}}}} & : & \isa{antiquotation} \\ |
32898
e871d897969c
term styles also cover antiquotations term_type and typeof
haftmann
parents:
32893
diff
changeset
|
163 |
\indexdef{}{antiquotation}{typeof}\hypertarget{antiquotation.typeof}{\hyperlink{antiquotation.typeof}{\mbox{\isa{typeof}}}} & : & \isa{antiquotation} \\ |
28788 | 164 |
\indexdef{}{antiquotation}{const}\hypertarget{antiquotation.const}{\hyperlink{antiquotation.const}{\mbox{\isa{const}}}} & : & \isa{antiquotation} \\ |
165 |
\indexdef{}{antiquotation}{abbrev}\hypertarget{antiquotation.abbrev}{\hyperlink{antiquotation.abbrev}{\mbox{\isa{abbrev}}}} & : & \isa{antiquotation} \\ |
|
166 |
\indexdef{}{antiquotation}{typ}\hypertarget{antiquotation.typ}{\hyperlink{antiquotation.typ}{\mbox{\isa{typ}}}} & : & \isa{antiquotation} \\ |
|
39437 | 167 |
\indexdef{}{antiquotation}{type}\hypertarget{antiquotation.type}{\hyperlink{antiquotation.type}{\mbox{\isa{type}}}} & : & \isa{antiquotation} \\ |
168 |
\indexdef{}{antiquotation}{class}\hypertarget{antiquotation.class}{\hyperlink{antiquotation.class}{\mbox{\isa{class}}}} & : & \isa{antiquotation} \\ |
|
28788 | 169 |
\indexdef{}{antiquotation}{text}\hypertarget{antiquotation.text}{\hyperlink{antiquotation.text}{\mbox{\isa{text}}}} & : & \isa{antiquotation} \\ |
170 |
\indexdef{}{antiquotation}{goals}\hypertarget{antiquotation.goals}{\hyperlink{antiquotation.goals}{\mbox{\isa{goals}}}} & : & \isa{antiquotation} \\ |
|
171 |
\indexdef{}{antiquotation}{subgoals}\hypertarget{antiquotation.subgoals}{\hyperlink{antiquotation.subgoals}{\mbox{\isa{subgoals}}}} & : & \isa{antiquotation} \\ |
|
172 |
\indexdef{}{antiquotation}{prf}\hypertarget{antiquotation.prf}{\hyperlink{antiquotation.prf}{\mbox{\isa{prf}}}} & : & \isa{antiquotation} \\ |
|
40406 | 173 |
\indexdef{}{antiquotation}{full\_prf}\hypertarget{antiquotation.full-prf}{\hyperlink{antiquotation.full-prf}{\mbox{\isa{full{\isaliteral{5F}{\isacharunderscore}}prf}}}} & : & \isa{antiquotation} \\ |
28788 | 174 |
\indexdef{}{antiquotation}{ML}\hypertarget{antiquotation.ML}{\hyperlink{antiquotation.ML}{\mbox{\isa{ML}}}} & : & \isa{antiquotation} \\ |
40406 | 175 |
\indexdef{}{antiquotation}{ML\_type}\hypertarget{antiquotation.ML-type}{\hyperlink{antiquotation.ML-type}{\mbox{\isa{ML{\isaliteral{5F}{\isacharunderscore}}type}}}} & : & \isa{antiquotation} \\ |
176 |
\indexdef{}{antiquotation}{ML\_struct}\hypertarget{antiquotation.ML-struct}{\hyperlink{antiquotation.ML-struct}{\mbox{\isa{ML{\isaliteral{5F}{\isacharunderscore}}struct}}}} & : & \isa{antiquotation} \\ |
|
40802 | 177 |
\indexdef{}{antiquotation}{file}\hypertarget{antiquotation.file}{\hyperlink{antiquotation.file}{\mbox{\isa{file}}}} & : & \isa{antiquotation} \\ |
27042 | 178 |
\end{matharray} |
179 |
||
28788 | 180 |
The overall content of an Isabelle/Isar theory may alternate between |
181 |
formal and informal text. The main body consists of formal |
|
182 |
specification and proof commands, interspersed with markup commands |
|
183 |
(\secref{sec:markup}) or document comments (\secref{sec:comments}). |
|
184 |
The argument of markup commands quotes informal text to be printed |
|
185 |
in the resulting document, but may again refer to formal entities |
|
186 |
via \emph{document antiquotations}. |
|
27042 | 187 |
|
40406 | 188 |
For example, embedding of ``\isa{{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}term\ {\isaliteral{5B}{\isacharbrackleft}}show{\isaliteral{5F}{\isacharunderscore}}types{\isaliteral{5D}{\isacharbrackright}}\ {\isaliteral{22}{\isachardoublequote}}f\ x\ {\isaliteral{3D}{\isacharequal}}\ a\ {\isaliteral{2B}{\isacharplus}}\ x{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7D}{\isacharbraceright}}}'' |
28788 | 189 |
within a text block makes |
190 |
\isa{{\isacharparenleft}f{\isasymColon}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a{\isacharparenright}\ {\isacharparenleft}x{\isasymColon}{\isacharprime}a{\isacharparenright}\ {\isacharequal}\ {\isacharparenleft}a{\isasymColon}{\isacharprime}a{\isacharparenright}\ {\isacharplus}\ x} appear in the final {\LaTeX} document. |
|
191 |
||
192 |
Antiquotations usually spare the author tedious typing of logical |
|
193 |
entities in full detail. Even more importantly, some degree of |
|
194 |
consistency-checking between the main body of formal text and its |
|
195 |
informal explanation is achieved, since terms and types appearing in |
|
196 |
antiquotations are checked within the current theory or proof |
|
197 |
context. |
|
27042 | 198 |
|
199 |
\begin{rail} |
|
200 |
atsign lbrace antiquotation rbrace |
|
201 |
; |
|
202 |
||
203 |
antiquotation: |
|
204 |
'theory' options name | |
|
32893 | 205 |
'thm' options styles thmrefs | |
27453 | 206 |
'lemma' options prop 'by' method | |
32893 | 207 |
'prop' options styles prop | |
208 |
'term' options styles term | |
|
32898
e871d897969c
term styles also cover antiquotations term_type and typeof
haftmann
parents:
32893
diff
changeset
|
209 |
'term_type' options styles term | |
e871d897969c
term styles also cover antiquotations term_type and typeof
haftmann
parents:
32893
diff
changeset
|
210 |
'typeof' options styles term | |
27042 | 211 |
'const' options term | |
212 |
'abbrev' options term | |
|
213 |
'typ' options type | |
|
39437 | 214 |
'type' options name | |
215 |
'class' options name | |
|
27042 | 216 |
'text' options name | |
217 |
'goals' options | |
|
218 |
'subgoals' options | |
|
219 |
'prf' options thmrefs | |
|
40255
9ffbc25e1606
eliminated obsolete \_ escapes in rail environments;
wenzelm
parents:
39689
diff
changeset
|
220 |
'full_prf' options thmrefs | |
27042 | 221 |
'ML' options name | |
40255
9ffbc25e1606
eliminated obsolete \_ escapes in rail environments;
wenzelm
parents:
39689
diff
changeset
|
222 |
'ML_type' options name | |
40802 | 223 |
'ML_struct' options name | |
224 |
'file' options name |
|
27042 | 225 |
; |
226 |
options: '[' (option * ',') ']' |
|
227 |
; |
|
228 |
option: name | name '=' name |
|
229 |
; |
|
32893 | 230 |
styles: '(' (style + ',') ')' |
231 |
; |
|
232 |
style: (name +) |
|
233 |
; |
|
27042 | 234 |
\end{rail} |
235 |
||
236 |
Note that the syntax of antiquotations may \emph{not} include source |
|
40406 | 237 |
comments \verb|(*|~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}~\verb|*)| nor verbatim |
238 |
text \verb|{|\verb|*|~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}~\verb|*|\verb|}|. |
|
27042 | 239 |
|
28788 | 240 |
\begin{description} |
27042 | 241 |
|
40406 | 242 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}theory\ A{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints the name \isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{22}{\isachardoublequote}}}, which is |
27042 | 243 |
guaranteed to refer to a valid ancestor theory in the current |
244 |
context. |
|
245 |
||
40406 | 246 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}thm\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints theorems \isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}. |
28788 | 247 |
Full fact expressions are allowed here, including attributes |
248 |
(\secref{sec:syn-att}). |
|
249 |
||
40406 | 250 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}prop\ {\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a well-typed proposition \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}}. |
27042 | 251 |
|
40406 | 252 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}lemma\ {\isaliteral{5C3C7068693E}{\isasymphi}}\ by\ m{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} proves a well-typed proposition |
253 |
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}} by method \isa{m} and prints the original \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}}. |
|
27453 | 254 |
|
40406 | 255 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}term\ t{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a well-typed term \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{22}{\isachardoublequote}}}. |
27042 | 256 |
|
40406 | 257 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}term{\isaliteral{5F}{\isacharunderscore}}type\ t{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a well-typed term \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{22}{\isachardoublequote}}} |
32898
e871d897969c
term styles also cover antiquotations term_type and typeof
haftmann
parents:
32893
diff
changeset
|
258 |
annotated with its type. |
e871d897969c
term styles also cover antiquotations term_type and typeof
haftmann
parents:
32893
diff
changeset
|
259 |
|
40406 | 260 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}typeof\ t{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints the type of a well-typed term |
261 |
\isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{22}{\isachardoublequote}}}. |
|
32898
e871d897969c
term styles also cover antiquotations term_type and typeof
haftmann
parents:
32893
diff
changeset
|
262 |
|
40406 | 263 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}const\ c{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a logical or syntactic constant |
264 |
\isa{{\isaliteral{22}{\isachardoublequote}}c{\isaliteral{22}{\isachardoublequote}}}. |
|
27042 | 265 |
|
40406 | 266 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}abbrev\ c\ x\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ x\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a constant abbreviation |
267 |
\isa{{\isaliteral{22}{\isachardoublequote}}c\ x\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ x\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ rhs{\isaliteral{22}{\isachardoublequote}}} as defined in the current context. |
|
39437 | 268 |
|
40406 | 269 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}typ\ {\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a well-formed type \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{22}{\isachardoublequote}}}. |
39437 | 270 |
|
40406 | 271 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}type\ {\isaliteral{5C3C6B617070613E}{\isasymkappa}}{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a (logical or syntactic) type |
272 |
constructor \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6B617070613E}{\isasymkappa}}{\isaliteral{22}{\isachardoublequote}}}. |
|
39437 | 273 |
|
40406 | 274 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}class\ c{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints a class \isa{c}. |
39437 | 275 |
|
40406 | 276 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}text\ s{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints uninterpreted source text \isa{s}. This is particularly useful to print portions of text according |
28788 | 277 |
to the Isabelle document style, without demanding well-formedness, |
278 |
e.g.\ small pieces of terms that should not be parsed or |
|
279 |
type-checked yet. |
|
27042 | 280 |
|
40406 | 281 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}goals{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints the current \emph{dynamic} goal |
27042 | 282 |
state. This is mainly for support of tactic-emulation scripts |
28788 | 283 |
within Isar. Presentation of goal states does not conform to the |
284 |
idea of human-readable proof documents! |
|
27042 | 285 |
|
28788 | 286 |
When explaining proofs in detail it is usually better to spell out |
287 |
the reasoning via proper Isar proof commands, instead of peeking at |
|
288 |
the internal machine configuration. |
|
27042 | 289 |
|
40406 | 290 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}subgoals{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} is similar to \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}goals{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}}, but |
27042 | 291 |
does not print the main goal. |
292 |
||
40406 | 293 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}prf\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} prints the (compact) proof terms |
294 |
corresponding to the theorems \isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}. Note that this |
|
28788 | 295 |
requires proof terms to be switched on for the current logic |
296 |
session. |
|
27042 | 297 |
|
40406 | 298 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}full{\isaliteral{5F}{\isacharunderscore}}prf\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} is like \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}prf\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}}, but prints the full proof terms, i.e.\ also displays |
28788 | 299 |
information omitted in the compact proof term, which is denoted by |
40406 | 300 |
``\isa{{\isaliteral{5F}{\isacharunderscore}}}'' placeholders there. |
27042 | 301 |
|
40406 | 302 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}ML\ s{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}ML{\isaliteral{5F}{\isacharunderscore}}type\ s{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}}, and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}ML{\isaliteral{5F}{\isacharunderscore}}struct\ s{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} check text \isa{s} as ML value, type, and |
28788 | 303 |
structure, respectively. The source is printed verbatim. |
27042 | 304 |
|
40802 | 305 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{40}{\isacharat}}{\isaliteral{7B}{\isacharbraceleft}}file\ path{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} checks that \isa{{\isaliteral{22}{\isachardoublequote}}path{\isaliteral{22}{\isachardoublequote}}} refers to a |
306 |
file (or directory) and prints it verbatim. |
|
307 |
||
28788 | 308 |
\end{description}% |
309 |
\end{isamarkuptext}% |
|
310 |
\isamarkuptrue% |
|
311 |
% |
|
312 |
\isamarkupsubsubsection{Styled antiquotations% |
|
313 |
} |
|
314 |
\isamarkuptrue% |
|
315 |
% |
|
316 |
\begin{isamarkuptext}% |
|
32893 | 317 |
The antiquotations \isa{thm}, \isa{prop} and \isa{term} admit an extra \emph{style} specification to modify the |
318 |
printed result. A style is specified by a name with a possibly |
|
319 |
empty number of arguments; multiple styles can be sequenced with |
|
320 |
commas. The following standard styles are available: |
|
27042 | 321 |
|
28788 | 322 |
\begin{description} |
27042 | 323 |
|
28788 | 324 |
\item \isa{lhs} extracts the first argument of any application |
325 |
form with at least two arguments --- typically meta-level or |
|
27042 | 326 |
object-level equality, or any other binary relation. |
327 |
||
28788 | 328 |
\item \isa{rhs} is like \isa{lhs}, but extracts the second |
27042 | 329 |
argument. |
330 |
||
40406 | 331 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}concl{\isaliteral{22}{\isachardoublequote}}} extracts the conclusion \isa{C} from a rule |
332 |
in Horn-clause normal form \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ A\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{22}{\isachardoublequote}}}. |
|
27042 | 333 |
|
40406 | 334 |
\item \isa{{\isaliteral{22}{\isachardoublequote}}prem{\isaliteral{22}{\isachardoublequote}}} \isa{n} extract premise number |
335 |
\isa{{\isaliteral{22}{\isachardoublequote}}n{\isaliteral{22}{\isachardoublequote}}} from from a rule in Horn-clause |
|
336 |
normal form \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ A\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{22}{\isachardoublequote}}} |
|
27042 | 337 |
|
28788 | 338 |
\end{description}% |
339 |
\end{isamarkuptext}% |
|
340 |
\isamarkuptrue% |
|
341 |
% |
|
342 |
\isamarkupsubsubsection{General options% |
|
343 |
} |
|
344 |
\isamarkuptrue% |
|
345 |
% |
|
346 |
\begin{isamarkuptext}% |
|
347 |
The following options are available to tune the printed output |
|
348 |
of antiquotations. Note that many of these coincide with global ML |
|
349 |
flags of the same names. |
|
27042 | 350 |
|
28788 | 351 |
\begin{description} |
27042 | 352 |
|
40406 | 353 |
\item \indexdef{}{antiquotation option}{show\_types}\hypertarget{antiquotation option.show-types}{\hyperlink{antiquotation option.show-types}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}types}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} and |
354 |
\indexdef{}{antiquotation option}{show\_sorts}\hypertarget{antiquotation option.show-sorts}{\hyperlink{antiquotation option.show-sorts}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}sorts}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} control |
|
30397 | 355 |
printing of explicit type and sort constraints. |
27042 | 356 |
|
40406 | 357 |
\item \indexdef{}{antiquotation option}{show\_structs}\hypertarget{antiquotation option.show-structs}{\hyperlink{antiquotation option.show-structs}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}structs}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} |
30397 | 358 |
controls printing of implicit structures. |
27042 | 359 |
|
40879
ca132ef44944
configuration option "show_abbrevs" supersedes print mode "no_abbrevs", with inverted meaning;
wenzelm
parents:
40802
diff
changeset
|
360 |
\item \indexdef{}{antiquotation option}{show\_abbrevs}\hypertarget{antiquotation option.show-abbrevs}{\hyperlink{antiquotation option.show-abbrevs}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}abbrevs}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} |
ca132ef44944
configuration option "show_abbrevs" supersedes print mode "no_abbrevs", with inverted meaning;
wenzelm
parents:
40802
diff
changeset
|
361 |
controls folding of abbreviations. |
ca132ef44944
configuration option "show_abbrevs" supersedes print mode "no_abbrevs", with inverted meaning;
wenzelm
parents:
40802
diff
changeset
|
362 |
|
40406 | 363 |
\item \indexdef{}{antiquotation option}{long\_names}\hypertarget{antiquotation option.long-names}{\hyperlink{antiquotation option.long-names}{\mbox{\isa{long{\isaliteral{5F}{\isacharunderscore}}names}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} forces |
30397 | 364 |
names of types and constants etc.\ to be printed in their fully |
365 |
qualified internal form. |
|
27042 | 366 |
|
40406 | 367 |
\item \indexdef{}{antiquotation option}{short\_names}\hypertarget{antiquotation option.short-names}{\hyperlink{antiquotation option.short-names}{\mbox{\isa{short{\isaliteral{5F}{\isacharunderscore}}names}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} |
30397 | 368 |
forces names of types and constants etc.\ to be printed unqualified. |
369 |
Note that internalizing the output again in the current context may |
|
370 |
well yield a different result. |
|
27042 | 371 |
|
40406 | 372 |
\item \indexdef{}{antiquotation option}{unique\_names}\hypertarget{antiquotation option.unique-names}{\hyperlink{antiquotation option.unique-names}{\mbox{\isa{unique{\isaliteral{5F}{\isacharunderscore}}names}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} |
30397 | 373 |
determines whether the printed version of qualified names should be |
374 |
made sufficiently long to avoid overlap with names declared further |
|
375 |
back. Set to \isa{false} for more concise output. |
|
27042 | 376 |
|
40406 | 377 |
\item \indexdef{}{antiquotation option}{eta\_contract}\hypertarget{antiquotation option.eta-contract}{\hyperlink{antiquotation option.eta-contract}{\mbox{\isa{eta{\isaliteral{5F}{\isacharunderscore}}contract}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} |
378 |
prints terms in \isa{{\isaliteral{5C3C6574613E}{\isasymeta}}}-contracted form. |
|
27042 | 379 |
|
40406 | 380 |
\item \indexdef{}{antiquotation option}{display}\hypertarget{antiquotation option.display}{\hyperlink{antiquotation option.display}{\mbox{\isa{display}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} indicates |
30397 | 381 |
if the text is to be output as multi-line ``display material'', |
382 |
rather than a small piece of text without line breaks (which is the |
|
383 |
default). |
|
27042 | 384 |
|
28788 | 385 |
In this mode the embedded entities are printed in the same style as |
386 |
the main theory text. |
|
387 |
||
40406 | 388 |
\item \indexdef{}{antiquotation option}{break}\hypertarget{antiquotation option.break}{\hyperlink{antiquotation option.break}{\mbox{\isa{break}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} controls |
30397 | 389 |
line breaks in non-display material. |
27042 | 390 |
|
40406 | 391 |
\item \indexdef{}{antiquotation option}{quotes}\hypertarget{antiquotation option.quotes}{\hyperlink{antiquotation option.quotes}{\mbox{\isa{quotes}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} indicates |
30397 | 392 |
if the output should be enclosed in double quotes. |
27042 | 393 |
|
40406 | 394 |
\item \indexdef{}{antiquotation option}{mode}\hypertarget{antiquotation option.mode}{\hyperlink{antiquotation option.mode}{\mbox{\isa{mode}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ name{\isaliteral{22}{\isachardoublequote}}} adds \isa{name} to the print mode to be used for presentation. Note that the |
30397 | 395 |
standard setup for {\LaTeX} output is already present by default, |
396 |
including the modes \isa{latex} and \isa{xsymbols}. |
|
27042 | 397 |
|
40406 | 398 |
\item \indexdef{}{antiquotation option}{margin}\hypertarget{antiquotation option.margin}{\hyperlink{antiquotation option.margin}{\mbox{\isa{margin}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ nat{\isaliteral{22}{\isachardoublequote}}} and |
399 |
\indexdef{}{antiquotation option}{indent}\hypertarget{antiquotation option.indent}{\hyperlink{antiquotation option.indent}{\mbox{\isa{indent}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ nat{\isaliteral{22}{\isachardoublequote}}} change the margin |
|
30397 | 400 |
or indentation for pretty printing of display material. |
27042 | 401 |
|
40406 | 402 |
\item \indexdef{}{antiquotation option}{goals\_limit}\hypertarget{antiquotation option.goals-limit}{\hyperlink{antiquotation option.goals-limit}{\mbox{\isa{goals{\isaliteral{5F}{\isacharunderscore}}limit}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ nat{\isaliteral{22}{\isachardoublequote}}} |
30397 | 403 |
determines the maximum number of goals to be printed (for goal-based |
404 |
antiquotation). |
|
27042 | 405 |
|
40406 | 406 |
\item \indexdef{}{antiquotation option}{source}\hypertarget{antiquotation option.source}{\hyperlink{antiquotation option.source}{\mbox{\isa{source}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ bool{\isaliteral{22}{\isachardoublequote}}} prints the |
30397 | 407 |
original source text of the antiquotation arguments, rather than its |
408 |
internal representation. Note that formal checking of |
|
409 |
\hyperlink{antiquotation.thm}{\mbox{\isa{thm}}}, \hyperlink{antiquotation.term}{\mbox{\isa{term}}}, etc. is still |
|
410 |
enabled; use the \hyperlink{antiquotation.text}{\mbox{\isa{text}}} antiquotation for unchecked |
|
411 |
output. |
|
28788 | 412 |
|
40406 | 413 |
Regular \isa{{\isaliteral{22}{\isachardoublequote}}term{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}typ{\isaliteral{22}{\isachardoublequote}}} antiquotations with \isa{{\isaliteral{22}{\isachardoublequote}}source\ {\isaliteral{3D}{\isacharequal}}\ false{\isaliteral{22}{\isachardoublequote}}} involve a full round-trip from the original source |
28788 | 414 |
to an internalized logical entity back to a source form, according |
415 |
to the syntax of the current context. Thus the printed output is |
|
416 |
not under direct control of the author, it may even fluctuate a bit |
|
417 |
as the underlying theory is changed later on. |
|
418 |
||
40406 | 419 |
In contrast, \indexdef{}{antiquotation option}{source}\hypertarget{antiquotation option.source}{\hyperlink{antiquotation option.source}{\mbox{\isa{source}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}\ true{\isaliteral{22}{\isachardoublequote}}} |
30397 | 420 |
admits direct printing of the given source text, with the desirable |
421 |
well-formedness check in the background, but without modification of |
|
422 |
the printed text. |
|
28788 | 423 |
|
424 |
\end{description} |
|
27042 | 425 |
|
40406 | 426 |
For boolean flags, ``\isa{{\isaliteral{22}{\isachardoublequote}}name\ {\isaliteral{3D}{\isacharequal}}\ true{\isaliteral{22}{\isachardoublequote}}}'' may be abbreviated as |
27042 | 427 |
``\isa{name}''. All of the above flags are disabled by default, |
28788 | 428 |
unless changed from ML, say in the \verb|ROOT.ML| of the |
429 |
logic session.% |
|
27042 | 430 |
\end{isamarkuptext}% |
431 |
\isamarkuptrue% |
|
432 |
% |
|
28788 | 433 |
\isamarkupsection{Markup via command tags \label{sec:tags}% |
27042 | 434 |
} |
435 |
\isamarkuptrue% |
|
436 |
% |
|
437 |
\begin{isamarkuptext}% |
|
28788 | 438 |
Each Isabelle/Isar command may be decorated by additional |
439 |
presentation tags, to indicate some modification in the way it is |
|
440 |
printed in the document. |
|
27042 | 441 |
|
442 |
\indexouternonterm{tags} |
|
443 |
\begin{rail} |
|
444 |
tags: ( tag * ) |
|
445 |
; |
|
446 |
tag: '\%' (ident | string) |
|
447 |
\end{rail} |
|
448 |
||
28788 | 449 |
Some tags are pre-declared for certain classes of commands, serving |
450 |
as default markup if no tags are given in the text: |
|
27042 | 451 |
|
28788 | 452 |
\medskip |
27042 | 453 |
\begin{tabular}{ll} |
40406 | 454 |
\isa{{\isaliteral{22}{\isachardoublequote}}theory{\isaliteral{22}{\isachardoublequote}}} & theory begin/end \\ |
455 |
\isa{{\isaliteral{22}{\isachardoublequote}}proof{\isaliteral{22}{\isachardoublequote}}} & all proof commands \\ |
|
456 |
\isa{{\isaliteral{22}{\isachardoublequote}}ML{\isaliteral{22}{\isachardoublequote}}} & all commands involving ML code \\ |
|
27042 | 457 |
\end{tabular} |
458 |
||
28788 | 459 |
\medskip The Isabelle document preparation system |
460 |
\cite{isabelle-sys} allows tagged command regions to be presented |
|
27042 | 461 |
specifically, e.g.\ to fold proof texts, or drop parts of the text |
462 |
completely. |
|
463 |
||
40406 | 464 |
For example ``\hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{25}{\isacharpercent}}invisible\ auto{\isaliteral{22}{\isachardoublequote}}}'' causes |
28788 | 465 |
that piece of proof to be treated as \isa{invisible} instead of |
40406 | 466 |
\isa{{\isaliteral{22}{\isachardoublequote}}proof{\isaliteral{22}{\isachardoublequote}}} (the default), which may be shown or hidden |
467 |
depending on the document setup. In contrast, ``\hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{25}{\isacharpercent}}visible\ auto{\isaliteral{22}{\isachardoublequote}}}'' forces this text to be shown |
|
27042 | 468 |
invariably. |
469 |
||
470 |
Explicit tag specifications within a proof apply to all subsequent |
|
40406 | 471 |
commands of the same level of nesting. For example, ``\hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{25}{\isacharpercent}}visible\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.qed}{\mbox{\isa{\isacommand{qed}}}}'' forces the whole |
28788 | 472 |
sub-proof to be typeset as \isa{visible} (unless some of its parts |
473 |
are tagged differently). |
|
474 |
||
475 |
\medskip Command tags merely produce certain markup environments for |
|
476 |
type-setting. The meaning of these is determined by {\LaTeX} |
|
40802 | 477 |
macros, as defined in \verb|~~/lib/texinputs/isabelle.sty| or |
28788 | 478 |
by the document author. The Isabelle document preparation tools |
479 |
also provide some high-level options to specify the meaning of |
|
480 |
arbitrary tags to ``keep'', ``drop'', or ``fold'' the corresponding |
|
481 |
parts of the text. Logic sessions may also specify ``document |
|
482 |
versions'', where given tags are interpreted in some particular way. |
|
483 |
Again see \cite{isabelle-sys} for further details.% |
|
27042 | 484 |
\end{isamarkuptext}% |
485 |
\isamarkuptrue% |
|
486 |
% |
|
487 |
\isamarkupsection{Draft presentation% |
|
488 |
} |
|
489 |
\isamarkuptrue% |
|
490 |
% |
|
491 |
\begin{isamarkuptext}% |
|
492 |
\begin{matharray}{rcl} |
|
40406 | 493 |
\indexdef{}{command}{display\_drafts}\hypertarget{command.display-drafts}{\hyperlink{command.display-drafts}{\mbox{\isa{\isacommand{display{\isaliteral{5F}{\isacharunderscore}}drafts}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}any\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\ |
494 |
\indexdef{}{command}{print\_drafts}\hypertarget{command.print-drafts}{\hyperlink{command.print-drafts}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}drafts}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}any\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\ |
|
27042 | 495 |
\end{matharray} |
496 |
||
497 |
\begin{rail} |
|
40255
9ffbc25e1606
eliminated obsolete \_ escapes in rail environments;
wenzelm
parents:
39689
diff
changeset
|
498 |
('display_drafts' | 'print_drafts') (name +) |
27042 | 499 |
; |
500 |
\end{rail} |
|
501 |
||
28788 | 502 |
\begin{description} |
27042 | 503 |
|
40406 | 504 |
\item \hyperlink{command.display-drafts}{\mbox{\isa{\isacommand{display{\isaliteral{5F}{\isacharunderscore}}drafts}}}}~\isa{paths} and \hyperlink{command.print-drafts}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}drafts}}}}~\isa{paths} perform simple output of a given list |
27042 | 505 |
of raw source files. Only those symbols that do not require |
506 |
additional {\LaTeX} packages are displayed properly, everything else |
|
507 |
is left verbatim. |
|
508 |
||
28788 | 509 |
\end{description}% |
27042 | 510 |
\end{isamarkuptext}% |
511 |
\isamarkuptrue% |
|
512 |
% |
|
513 |
\isadelimtheory |
|
514 |
% |
|
515 |
\endisadelimtheory |
|
516 |
% |
|
517 |
\isatagtheory |
|
518 |
\isacommand{end}\isamarkupfalse% |
|
519 |
% |
|
520 |
\endisatagtheory |
|
521 |
{\isafoldtheory}% |
|
522 |
% |
|
523 |
\isadelimtheory |
|
524 |
% |
|
525 |
\endisadelimtheory |
|
526 |
\isanewline |
|
527 |
\end{isabellebody}% |
|
528 |
%%% Local Variables: |
|
529 |
%%% mode: latex |
|
530 |
%%% TeX-master: "root" |
|
531 |
%%% End: |