equal
deleted
inserted
replaced
136 Replacing our previous definition of @{text xor} by the |
136 Replacing our previous definition of @{text xor} by the |
137 following specifies an Isabelle symbol for the new operator: |
137 following specifies an Isabelle symbol for the new operator: |
138 *} |
138 *} |
139 |
139 |
140 (*<*) |
140 (*<*) |
141 hide const xor |
141 hide_const xor |
142 setup {* Sign.add_path "version1" *} |
142 setup {* Sign.add_path "version1" *} |
143 (*>*) |
143 (*>*) |
144 definition xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infixl "\<oplus>" 60) |
144 definition xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infixl "\<oplus>" 60) |
145 where "A \<oplus> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)" |
145 where "A \<oplus> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)" |
146 (*<*) |
146 (*<*) |
159 Proof~General's X-Symbol mode or {\LaTeX} output is active. Now |
159 Proof~General's X-Symbol mode or {\LaTeX} output is active. Now |
160 consider the following hybrid declaration of @{text xor}: |
160 consider the following hybrid declaration of @{text xor}: |
161 *} |
161 *} |
162 |
162 |
163 (*<*) |
163 (*<*) |
164 hide const xor |
164 hide_const xor |
165 setup {* Sign.add_path "version2" *} |
165 setup {* Sign.add_path "version2" *} |
166 (*>*) |
166 (*>*) |
167 definition xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infixl "[+]\<ignore>" 60) |
167 definition xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infixl "[+]\<ignore>" 60) |
168 where "A [+]\<ignore> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)" |
168 where "A [+]\<ignore> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)" |
169 |
169 |