238 \begin{quote} |
238 \begin{quote} |
239 \verb!\begin{center}!\\ |
239 \verb!\begin{center}!\\ |
240 \verb!@!\verb!{thm[mode=Rule] conjI} {\sc conjI}!\\ |
240 \verb!@!\verb!{thm[mode=Rule] conjI} {\sc conjI}!\\ |
241 \verb!\end{center}! |
241 \verb!\end{center}! |
242 \end{quote} |
242 \end{quote} |
243 It is not recommended to use the standard \texttt{display} attribute |
243 It is not recommended to use the standard \texttt{display} option |
244 together with \texttt{Rule} because centering does not work and because |
244 together with \texttt{Rule} because centering does not work and because |
245 the line breaking mechanisms of \texttt{display} and \texttt{mathpartir} can |
245 the line breaking mechanisms of \texttt{display} and \texttt{mathpartir} can |
246 clash. |
246 clash. |
247 |
247 |
248 Of course you can display multiple rules in this fashion: |
248 Of course you can display multiple rules in this fashion: |
249 \begin{quote} |
249 \begin{quote} |
250 \verb!\begin{center}\isastyle!\\ |
250 \verb!\begin{center}!\\ |
251 \verb!@!\verb!{thm[mode=Rule] conjI} {\sc conjI} \\[1ex]!\\ |
251 \verb!@!\verb!{thm[mode=Rule] conjI} {\sc conjI} \\[1ex]!\\ |
252 \verb!@!\verb!{thm[mode=Rule] conjE} {\sc disjI$_1$} \qquad!\\ |
252 \verb!@!\verb!{thm[mode=Rule] conjE} {\sc disjI$_1$} \qquad!\\ |
253 \verb!@!\verb!{thm[mode=Rule] disjE} {\sc disjI$_2$}!\\ |
253 \verb!@!\verb!{thm[mode=Rule] disjE} {\sc disjI$_2$}!\\ |
254 \verb!\end{center}! |
254 \verb!\end{center}! |
255 \end{quote} |
255 \end{quote} |
256 yields |
256 yields |
257 \begin{center}\isastyle |
257 \begin{center}\small |
258 \isa{\mbox{}\inferrule{\mbox{P}\\\ \mbox{Q}}{\mbox{P\ {\isasymand}\ Q}}} {\sc conjI} \\[1ex] |
258 \isa{\mbox{}\inferrule{\mbox{P}\\\ \mbox{Q}}{\mbox{P\ {\isasymand}\ Q}}} {\sc conjI} \\[1ex] |
259 \isa{\mbox{}\inferrule{\mbox{P}}{\mbox{P\ {\isasymor}\ Q}}} {\sc disjI$_1$} \qquad |
259 \isa{\mbox{}\inferrule{\mbox{P}}{\mbox{P\ {\isasymor}\ Q}}} {\sc disjI$_1$} \qquad |
260 \isa{\mbox{}\inferrule{\mbox{Q}}{\mbox{P\ {\isasymor}\ Q}}} {\sc disjI$_2$} |
260 \isa{\mbox{}\inferrule{\mbox{Q}}{\mbox{P\ {\isasymor}\ Q}}} {\sc disjI$_2$} |
261 \end{center} |
261 \end{center} |
262 Note that we included \verb!\isastyle! to obtain |
|
263 the smaller font that otherwise comes only with \texttt{display}. |
|
264 |
262 |
265 The \texttt{mathpartir} package copes well if there are too many |
263 The \texttt{mathpartir} package copes well if there are too many |
266 premises for one line: |
264 premises for one line: |
267 \begin{center} |
265 \begin{center} |
268 \isa{\mbox{}\inferrule{\mbox{A\ {\isasymlongrightarrow}\ B}\\\ \mbox{B\ {\isasymlongrightarrow}\ C}\\\ \mbox{C\ {\isasymlongrightarrow}\ D}\\\ \mbox{D\ {\isasymlongrightarrow}\ E}\\\ \mbox{E\ {\isasymlongrightarrow}\ F}\\\ \mbox{F\ {\isasymlongrightarrow}\ G}\\\ \mbox{G\ {\isasymlongrightarrow}\ H}\\\ \mbox{H\ {\isasymlongrightarrow}\ I}\\\ \mbox{I\ {\isasymlongrightarrow}\ J}\\\ \mbox{J\ {\isasymlongrightarrow}\ K}}{\mbox{A\ {\isasymlongrightarrow}\ K}}} |
266 \isa{\mbox{}\inferrule{\mbox{A\ {\isasymlongrightarrow}\ B}\\\ \mbox{B\ {\isasymlongrightarrow}\ C}\\\ \mbox{C\ {\isasymlongrightarrow}\ D}\\\ \mbox{D\ {\isasymlongrightarrow}\ E}\\\ \mbox{E\ {\isasymlongrightarrow}\ F}\\\ \mbox{F\ {\isasymlongrightarrow}\ G}\\\ \mbox{G\ {\isasymlongrightarrow}\ H}\\\ \mbox{H\ {\isasymlongrightarrow}\ I}\\\ \mbox{I\ {\isasymlongrightarrow}\ J}\\\ \mbox{J\ {\isasymlongrightarrow}\ K}}{\mbox{A\ {\isasymlongrightarrow}\ K}}} |
274 |
272 |
275 |
273 |
276 In case you print theorems without premises no rule will be printed by the |
274 In case you print theorems without premises no rule will be printed by the |
277 \texttt{Rule} print mode. However, you can use \texttt{Axiom} instead: |
275 \texttt{Rule} print mode. However, you can use \texttt{Axiom} instead: |
278 \begin{quote} |
276 \begin{quote} |
279 \verb!\begin{center}\isastyle!\\ |
277 \verb!\begin{center}!\\ |
280 \verb!@!\verb!{thm[mode=Axiom] refl} {\sc refl}! \\ |
278 \verb!@!\verb!{thm[mode=Axiom] refl} {\sc refl}! \\ |
281 \verb!\end{center}! |
279 \verb!\end{center}! |
282 \end{quote} |
280 \end{quote} |
283 yields |
281 yields |
284 \begin{center}\isastyle |
282 \begin{center} |
285 \isa{\mbox{}\inferrule{\mbox{}}{\mbox{t\ {\isacharequal}\ t}}} {\sc refl} |
283 \isa{\mbox{}\inferrule{\mbox{}}{\mbox{t\ {\isacharequal}\ t}}} {\sc refl} |
286 \end{center}% |
284 \end{center}% |
|
285 \end{isamarkuptext}% |
|
286 \isamarkuptrue% |
|
287 % |
|
288 \isamarkupsubsection{Displays and font sizes% |
|
289 } |
|
290 \isamarkuptrue% |
|
291 % |
|
292 \begin{isamarkuptext}% |
|
293 When displaying theorems with the \texttt{display} option, e.g. |
|
294 \verb!@!\verb!{thm[display] refl}! \begin{isabelle}% |
|
295 t\ {\isacharequal}\ t% |
|
296 \end{isabelle} the theorem is |
|
297 set in small font. It uses the \LaTeX-macro \verb!\isastyle!, |
|
298 which is also the style that regular theory text is set in, e.g.% |
|
299 \end{isamarkuptext}% |
|
300 \isamarkuptrue% |
|
301 \isacommand{lemma}\isamarkupfalse% |
|
302 \ {\isachardoublequoteopen}t\ {\isacharequal}\ t{\isachardoublequoteclose}% |
|
303 \isadelimproof |
|
304 % |
|
305 \endisadelimproof |
|
306 % |
|
307 \isatagproof |
|
308 % |
|
309 \endisatagproof |
|
310 {\isafoldproof}% |
|
311 % |
|
312 \isadelimproof |
|
313 % |
|
314 \endisadelimproof |
|
315 % |
|
316 \begin{isamarkuptext}% |
|
317 \noindent Otherwise \verb!\isastyleminor! is used, |
|
318 which does not modify the font size (assuming you stick to the default |
|
319 \verb!\isabellestyle{it}! in \texttt{root.tex}). If you prefer |
|
320 normal font size throughout your text, include |
|
321 \begin{quote} |
|
322 \verb!\renewcommand{\isastyle}{\isastyleminor}! |
|
323 \end{quote} |
|
324 in \texttt{root.tex}. On the other hand, if you like the small font, |
|
325 just put \verb!\isastyle! in front of the text in question, |
|
326 e.g.\ at the start of one of the center-environments above. |
|
327 |
|
328 The advantage of the display option is that you can display a whole |
|
329 list of theorems in one go. For example, |
|
330 \verb!@!\verb!{thm[display] foldl.simps}! |
|
331 generates \begin{isabelle}% |
|
332 foldl\ f\ a\ {\isacharbrackleft}{\isacharbrackright}\ {\isacharequal}\ a\isasep\isanewline% |
|
333 foldl\ f\ a\ {\isacharparenleft}x{\isasymcdot}xs{\isacharparenright}\ {\isacharequal}\ foldl\ f\ {\isacharparenleft}f\ a\ x{\isacharparenright}\ xs% |
|
334 \end{isabelle}% |
287 \end{isamarkuptext}% |
335 \end{isamarkuptext}% |
288 \isamarkuptrue% |
336 \isamarkuptrue% |
289 % |
337 % |
290 \isamarkupsubsection{If-then% |
338 \isamarkupsubsection{If-then% |
291 } |
339 } |
370 \isamarkupsection{Proofs% |
418 \isamarkupsection{Proofs% |
371 } |
419 } |
372 \isamarkuptrue% |
420 \isamarkuptrue% |
373 % |
421 % |
374 \begin{isamarkuptext}% |
422 \begin{isamarkuptext}% |
375 Full proofs, even if written in beautiful Isar style, are likely to |
423 Full proofs, even if written in beautiful Isar style, are |
376 be too long and detailed to be included in conference papers, but |
424 likely to be too long and detailed to be included in conference |
377 some key lemmas might be of interest. |
425 papers, but some key lemmas might be of interest. |
378 |
426 It is usually easiest to put them in figures like the one in Fig.\ |
379 It is usually easiest to put them in figures like the one in Fig.\ |
427 \ref{fig:proof}. This was achieved with the \isakeyword{text\_raw} command:% |
380 \ref{fig:proof}. This was achieved with the \isakeyword{text\_raw} |
|
381 command:% |
|
382 \end{isamarkuptext}% |
428 \end{isamarkuptext}% |
383 \isamarkuptrue% |
429 \isamarkuptrue% |
384 % |
430 % |
385 \begin{figure} |
431 \begin{figure} |
386 \begin{center}\begin{minipage}{0.6\textwidth} |
432 \begin{center}\begin{minipage}{0.6\textwidth} |
387 \isastyle\isamarkuptrue |
433 \isastyleminor\isamarkuptrue |
388 \isacommand{lemma}\isamarkupfalse% |
434 \isacommand{lemma}\isamarkupfalse% |
389 \ True\isanewline |
435 \ True\isanewline |
390 % |
436 % |
391 \isadelimproof |
437 \isadelimproof |
392 % |
438 % |
419 \begin{quote} |
465 \begin{quote} |
420 \small |
466 \small |
421 \verb!text_raw {!\verb!*!\\ |
467 \verb!text_raw {!\verb!*!\\ |
422 \verb! \begin{figure}!\\ |
468 \verb! \begin{figure}!\\ |
423 \verb! \begin{center}\begin{minipage}{0.6\textwidth}!\\ |
469 \verb! \begin{center}\begin{minipage}{0.6\textwidth}!\\ |
424 \verb! \isastyle\isamarkuptrue!\\ |
470 \verb! \isastyleminor\isamarkuptrue!\\ |
425 \verb!*!\verb!}!\\ |
471 \verb!*!\verb!}!\\ |
426 \verb!lemma True!\\ |
472 \verb!lemma True!\\ |
427 \verb!proof -!\\ |
473 \verb!proof -!\\ |
428 \verb! -- "pretty trivial"!\\ |
474 \verb! -- "pretty trivial"!\\ |
429 \verb! show True by force!\\ |
475 \verb! show True by force!\\ |
431 \verb!text_raw {!\verb!*!\\ |
477 \verb!text_raw {!\verb!*!\\ |
432 \verb! \end{minipage}\end{center}!\\ |
478 \verb! \end{minipage}\end{center}!\\ |
433 \verb! \caption{Example proof in a figure.}\label{fig:proof}!\\ |
479 \verb! \caption{Example proof in a figure.}\label{fig:proof}!\\ |
434 \verb! \end{figure}!\\ |
480 \verb! \end{figure}!\\ |
435 \verb!*!\verb!}! |
481 \verb!*!\verb!}! |
436 \end{quote}% |
482 \end{quote} |
|
483 |
|
484 Other theory text, e.g.\ definitions, can be put in figures, too.% |
437 \end{isamarkuptext}% |
485 \end{isamarkuptext}% |
438 \isamarkuptrue% |
486 \isamarkuptrue% |
439 % |
487 % |
440 \isamarkupsection{Styles\label{sec:styles}% |
488 \isamarkupsection{Styles\label{sec:styles}% |
441 } |
489 } |