# HG changeset patch # User nipkow # Date 1617090145 -7200 # Node ID 2cdbb6a2f2a7ad98aacded28863e705408e499f5 # Parent c526eb2c7ca0cb3488384c4c2cc7dcdba2ac1def updated to latest latex due to new mechanism for dealing with bold ccfonts diff -r c526eb2c7ca0 -r 2cdbb6a2f2a7 src/Doc/Prog_Prove/Basics.thy --- a/src/Doc/Prog_Prove/Basics.thy Mon Mar 29 12:26:13 2021 +0100 +++ b/src/Doc/Prog_Prove/Basics.thy Tue Mar 30 09:42:25 2021 +0200 @@ -132,7 +132,7 @@ \subsection{Quotation Marks} The textual definition of a theory follows a fixed syntax with keywords like -\isacommand{begin} and \isacommand{datatype}. Embedded in this syntax are +\isacom{begin} and \isacom{datatype}. Embedded in this syntax are the types and formulas of HOL. To distinguish the two levels, everything HOL-specific (terms and types) must be enclosed in quotation marks: \texttt{"}\dots\texttt{"}. Quotation marks around a diff -r c526eb2c7ca0 -r 2cdbb6a2f2a7 src/Doc/Prog_Prove/Bool_nat_list.thy --- a/src/Doc/Prog_Prove/Bool_nat_list.thy Mon Mar 29 12:26:13 2021 +0100 +++ b/src/Doc/Prog_Prove/Bool_nat_list.thy Tue Mar 30 09:42:25 2021 +0200 @@ -186,7 +186,7 @@ text\By default, variables \xs\, \ys\ and \zs\ are of \list\ type. -Command \indexed{\isacommand{value}}{value} evaluates a term. For example,\ +Command \indexed{\isacom{value}}{value} evaluates a term. For example,\ value "rev(Cons True (Cons False Nil))" diff -r c526eb2c7ca0 -r 2cdbb6a2f2a7 src/Doc/Prog_Prove/Isar.thy --- a/src/Doc/Prog_Prove/Isar.thy Mon Mar 29 12:26:13 2021 +0100 +++ b/src/Doc/Prog_Prove/Isar.thy Tue Mar 30 09:42:25 2021 +0200 @@ -445,11 +445,11 @@ \begin{samepage} \begin{quote} -\isakeyword{have} \"t\<^sub>1 = t\<^sub>2"\ \isasymproof\\ -\isakeyword{also have} \"... = t\<^sub>3"\ \isasymproof\\ +\isacom{have} \"t\<^sub>1 = t\<^sub>2"\ \isasymproof\\ +\isacom{also have} \"... = t\<^sub>3"\ \isasymproof\\ \quad $\vdots$\\ -\isakeyword{also have} \"... = t\<^sub>n"\ \isasymproof \\ -\isakeyword{finally show} \"t\<^sub>1 = t\<^sub>n"\\ \texttt{.} +\isacom{also have} \"... = t\<^sub>n"\ \isasymproof \\ +\isacom{finally show} \"t\<^sub>1 = t\<^sub>n"\\ \texttt{.} \end{quote} \end{samepage} @@ -461,21 +461,21 @@ In general, if \this\ is the theorem \<^term>\p t\<^sub>1 t\<^sub>2\ then ``\...\'' stands for \t\<^sub>2\. \item[``\.\''] (a single dot) is a proof method that solves a goal by one of the -assumptions. This works here because the result of \isakeyword{finally} +assumptions. This works here because the result of \isacom{finally} is the theorem \mbox{\t\<^sub>1 = t\<^sub>n\}, -\isakeyword{show} \"t\<^sub>1 = t\<^sub>n"\ states the theorem explicitly, -and ``\.\'' proves the theorem with the result of \isakeyword{finally}. +\isacom{show} \"t\<^sub>1 = t\<^sub>n"\ states the theorem explicitly, +and ``\.\'' proves the theorem with the result of \isacom{finally}. \end{description} The above proof template also works for arbitrary mixtures of \=\, \\\ and \<\, for example: \begin{quote} -\isakeyword{have} \"t\<^sub>1 < t\<^sub>2"\ \isasymproof\\ -\isakeyword{also have} \"... = t\<^sub>3"\ \isasymproof\\ +\isacom{have} \"t\<^sub>1 < t\<^sub>2"\ \isasymproof\\ +\isacom{also have} \"... = t\<^sub>3"\ \isasymproof\\ \quad $\vdots$\\ -\isakeyword{also have} \"... \ t\<^sub>n"\ \isasymproof \\ -\isakeyword{finally show} \"t\<^sub>1 < t\<^sub>n"\\ \texttt{.} +\isacom{also have} \"... \ t\<^sub>n"\ \isasymproof \\ +\isacom{finally show} \"t\<^sub>1 < t\<^sub>n"\\ \texttt{.} \end{quote} -The relation symbol in the \isakeyword{finally} step needs to be the most precise one +The relation symbol in the \isacom{finally} step needs to be the most precise one possible. In the example above, you must not write \t\<^sub>1 \ t\<^sub>n\ instead of \mbox{\t\<^sub>1 < t\<^sub>n\}. \begin{warn} @@ -484,24 +484,24 @@ \end{warn} If you want to go beyond merely using the above proof patterns and want to -understand what \isakeyword{also} and \isakeyword{finally} mean, read on. +understand what \isacom{also} and \isacom{finally} mean, read on. There is an Isar theorem variable called \calculation\, similar to \this\. -When the first \isakeyword{also} in a chain is encountered, Isabelle sets -\calculation := this\. In each subsequent \isakeyword{also} step, +When the first \isacom{also} in a chain is encountered, Isabelle sets +\calculation := this\. In each subsequent \isacom{also} step, Isabelle composes the theorems \calculation\ and \this\ (i.e.\ the two previous (in)equalities) using some predefined set of rules including transitivity of \=\, \\\ and \<\ but also mixed rules like \<^prop>\\ x \ y; y < z \ \ x < z\. The result of this composition is assigned to \calculation\. Consider \begin{quote} -\isakeyword{have} \"t\<^sub>1 \ t\<^sub>2"\ \isasymproof\\ -\isakeyword{also} \isakeyword{have} \"... < t\<^sub>3"\ \isasymproof\\ -\isakeyword{also} \isakeyword{have} \"... = t\<^sub>4"\ \isasymproof\\ -\isakeyword{finally show} \"t\<^sub>1 < t\<^sub>4"\\ \texttt{.} +\isacom{have} \"t\<^sub>1 \ t\<^sub>2"\ \isasymproof\\ +\isacom{also} \isacom{have} \"... < t\<^sub>3"\ \isasymproof\\ +\isacom{also} \isacom{have} \"... = t\<^sub>4"\ \isasymproof\\ +\isacom{finally show} \"t\<^sub>1 < t\<^sub>4"\\ \texttt{.} \end{quote} -After the first \isakeyword{also}, \calculation\ is \"t\<^sub>1 \ t\<^sub>2"\, -and after the second \isakeyword{also}, \calculation\ is \"t\<^sub>1 < t\<^sub>3"\. -The command \isakeyword{finally} is short for \isakeyword{also from} \calculation\. -Therefore the \isakeyword{also} hidden in \isakeyword{finally} sets \calculation\ +After the first \isacom{also}, \calculation\ is \"t\<^sub>1 \ t\<^sub>2"\, +and after the second \isacom{also}, \calculation\ is \"t\<^sub>1 < t\<^sub>3"\. +The command \isacom{finally} is short for \isacom{also from} \calculation\. +Therefore the \isacom{also} hidden in \isacom{finally} sets \calculation\ to \t\<^sub>1 < t\<^sub>4\ and the final ``\texttt{.}'' succeeds. For more information on this style of proof see @{cite "BauerW-TPHOLs01"}. @@ -993,7 +993,7 @@ next case (evSS m) have "evn(Suc(Suc m)) = evn m" by simp - thus ?case using \evn m\ by blast + thus ?case using `evn m` by blast qed text\ diff -r c526eb2c7ca0 -r 2cdbb6a2f2a7 src/Doc/Prog_Prove/document/prelude.tex --- a/src/Doc/Prog_Prove/document/prelude.tex Mon Mar 29 12:26:13 2021 +0100 +++ b/src/Doc/Prog_Prove/document/prelude.tex Tue Mar 30 09:42:25 2021 +0200 @@ -6,7 +6,9 @@ \usepackage{alltt} \usepackage[T1]{fontenc} -\usepackage{ccfonts} +\usepackage[boldsans]{ccfonts} +\DeclareFontSeriesDefault[rm]{bf}{bx}%bf default for rm: bold extended +\DeclareFontSeriesDefault[sf]{bf}{sbc}%bf default for sf: semibold \usepackage[euler-digits]{eulervm} \usepackage{isabelle,isabellesym} @@ -50,8 +52,9 @@ \protected\def\isacharunderscorekeyword{\raisebox{2pt}{\_}} % isabelle keyword, adapted from isabelle.sty \renewcommand{\isakeyword}[1] -{\emph{\def\isachardot{.}\def\isacharunderscore{\isacharunderscorekeyword}% -\def\isacharbraceleft{\{}\def\isacharbraceright{\}}\def\bfdefault{sbc}\textbf{#1}}} +{\emph{\sffamily\bfseries% +\def\isachardot{.}\def\isacharunderscore{\isacharunderscorekeyword}% +\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}} % add \noindent to text blocks automatically \renewenvironment{isamarkuptext}{\par\isastyletext\begin{isapar}\noindent}{\end{isapar}}