9722
|
1 |
%
|
|
2 |
\begin{isabellebody}%
|
9924
|
3 |
\def\isabellecontext{types}%
|
9673
|
4 |
\isacommand{types}\ number\ \ \ \ \ \ \ {\isacharequal}\ nat\isanewline
|
|
5 |
\ \ \ \ \ \ gate\ \ \ \ \ \ \ \ \ {\isacharequal}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\isanewline
|
9933
|
6 |
\ \ \ \ \ \ {\isacharparenleft}{\isacharprime}a{\isacharcomma}{\isacharprime}b{\isacharparenright}alist\ {\isacharequal}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}a\ {\isasymtimes}\ {\isacharprime}b{\isacharparenright}list{\isachardoublequote}%
|
8749
|
7 |
\begin{isamarkuptext}%
|
|
8 |
\noindent\indexbold{*types}%
|
|
9 |
Internally all synonyms are fully expanded. As a consequence Isabelle's
|
|
10 |
output never contains synonyms. Their main purpose is to improve the
|
8771
|
11 |
readability of theories. Synonyms can be used just like any other
|
8749
|
12 |
type:%
|
|
13 |
\end{isamarkuptext}%
|
9673
|
14 |
\isacommand{consts}\ nand\ {\isacharcolon}{\isacharcolon}\ gate\isanewline
|
|
15 |
\ \ \ \ \ \ \ exor\ {\isacharcolon}{\isacharcolon}\ gate%
|
8749
|
16 |
\begin{isamarkuptext}%
|
|
17 |
\subsection{Constant definitions}
|
|
18 |
\label{sec:ConstDefinitions}
|
|
19 |
\indexbold{definition}
|
|
20 |
|
|
21 |
The above constants \isa{nand} and \isa{exor} are non-recursive and can
|
|
22 |
therefore be defined directly by%
|
|
23 |
\end{isamarkuptext}%
|
9673
|
24 |
\isacommand{defs}\ nand{\isacharunderscore}def{\isacharcolon}\ {\isachardoublequote}nand\ A\ B\ {\isasymequiv}\ {\isasymnot}{\isacharparenleft}A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isanewline
|
|
25 |
\ \ \ \ \ exor{\isacharunderscore}def{\isacharcolon}\ {\isachardoublequote}exor\ A\ B\ {\isasymequiv}\ A\ {\isasymand}\ {\isasymnot}B\ {\isasymor}\ {\isasymnot}A\ {\isasymand}\ B{\isachardoublequote}%
|
8749
|
26 |
\begin{isamarkuptext}%
|
|
27 |
\noindent%
|
9792
|
28 |
where \isacommand{defs}\indexbold{*defs} is a keyword and
|
|
29 |
\isa{nand{\isacharunderscore}def} and \isa{exor{\isacharunderscore}def} are user-supplied names.
|
8749
|
30 |
The symbol \indexboldpos{\isasymequiv}{$IsaEq} is a special form of equality
|
9541
|
31 |
that must be used in constant definitions.
|
8749
|
32 |
Declarations and definitions can also be merged%
|
|
33 |
\end{isamarkuptext}%
|
9673
|
34 |
\isacommand{constdefs}\ nor\ {\isacharcolon}{\isacharcolon}\ gate\isanewline
|
|
35 |
\ \ \ \ \ \ \ \ \ {\isachardoublequote}nor\ A\ B\ {\isasymequiv}\ {\isasymnot}{\isacharparenleft}A\ {\isasymor}\ B{\isacharparenright}{\isachardoublequote}\isanewline
|
10187
|
36 |
\ \ \ \ \ \ \ \ \ \ exor{\isadigit{2}}\ {\isacharcolon}{\isacharcolon}\ gate\isanewline
|
|
37 |
\ \ \ \ \ \ \ \ \ {\isachardoublequote}exor{\isadigit{2}}\ A\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymor}\ B{\isacharparenright}\ {\isasymand}\ {\isacharparenleft}{\isasymnot}A\ {\isasymor}\ {\isasymnot}B{\isacharparenright}{\isachardoublequote}%
|
8749
|
38 |
\begin{isamarkuptext}%
|
|
39 |
\noindent\indexbold{*constdefs}%
|
9792
|
40 |
in which case the default name of each definition is $f$\isa{{\isacharunderscore}def}, where
|
8749
|
41 |
$f$ is the name of the defined constant.%
|
|
42 |
\end{isamarkuptext}%
|
9722
|
43 |
\end{isabellebody}%
|
9145
|
44 |
%%% Local Variables:
|
|
45 |
%%% mode: latex
|
|
46 |
%%% TeX-master: "root"
|
|
47 |
%%% End:
|