equal
deleted
inserted
replaced
12 |
12 |
13 subsection\<open>Constant Definitions\<close> |
13 subsection\<open>Constant Definitions\<close> |
14 |
14 |
15 text\<open>\label{sec:ConstDefinitions}\indexbold{definitions}% |
15 text\<open>\label{sec:ConstDefinitions}\indexbold{definitions}% |
16 Nonrecursive definitions can be made with the \commdx{definition} |
16 Nonrecursive definitions can be made with the \commdx{definition} |
17 command, for example @{text nand} and @{text xor} gates |
17 command, for example \<open>nand\<close> and \<open>xor\<close> gates |
18 (based on type @{typ gate} above): |
18 (based on type @{typ gate} above): |
19 \<close> |
19 \<close> |
20 |
20 |
21 definition nand :: gate where "nand A B \<equiv> \<not>(A \<and> B)" |
21 definition nand :: gate where "nand A B \<equiv> \<not>(A \<and> B)" |
22 definition xor :: gate where "xor A B \<equiv> A \<and> \<not>B \<or> \<not>A \<and> B" |
22 definition xor :: gate where "xor A B \<equiv> A \<and> \<not>B \<or> \<not>A \<and> B" |
25 The symbol \indexboldpos{\isasymequiv}{$IsaEq} is a special form of equality |
25 The symbol \indexboldpos{\isasymequiv}{$IsaEq} is a special form of equality |
26 that must be used in constant definitions. |
26 that must be used in constant definitions. |
27 Pattern-matching is not allowed: each definition must be of |
27 Pattern-matching is not allowed: each definition must be of |
28 the form $f\,x@1\,\dots\,x@n~\isasymequiv~t$. |
28 the form $f\,x@1\,\dots\,x@n~\isasymequiv~t$. |
29 Section~\ref{sec:Simp-with-Defs} explains how definitions are used |
29 Section~\ref{sec:Simp-with-Defs} explains how definitions are used |
30 in proofs. The default name of each definition is $f$@{text"_def"}, where |
30 in proofs. The default name of each definition is $f$\<open>_def\<close>, where |
31 $f$ is the name of the defined constant.\<close> |
31 $f$ is the name of the defined constant.\<close> |
32 (*<*)end(*>*) |
32 (*<*)end(*>*) |