doc-src/TutorialI/Documents/Documents.thy
changeset 22098 88be1b7775c8
parent 17183 a788a05fb81b
child 25338 6eb185959aec
equal deleted inserted replaced
22097:7ee0529c5674 22098:88be1b7775c8
   138   following specifies an Isabelle symbol for the new operator:
   138   following specifies an Isabelle symbol for the new operator:
   139 *}
   139 *}
   140 
   140 
   141 (*<*)
   141 (*<*)
   142 hide const xor
   142 hide const xor
   143 ML_setup {* Context.>> (Theory.add_path "version1") *}
   143 setup {* Theory.add_path "version1" *}
   144 (*>*)
   144 (*>*)
   145 constdefs
   145 constdefs
   146   xor :: "bool \<Rightarrow> bool \<Rightarrow> bool"    (infixl "\<oplus>" 60)
   146   xor :: "bool \<Rightarrow> bool \<Rightarrow> bool"    (infixl "\<oplus>" 60)
   147   "A \<oplus> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)"
   147   "A \<oplus> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)"
   148 (*<*)
   148 (*<*)
   162   consider the following hybrid declaration of @{text xor}:
   162   consider the following hybrid declaration of @{text xor}:
   163 *}
   163 *}
   164 
   164 
   165 (*<*)
   165 (*<*)
   166 hide const xor
   166 hide const xor
   167 ML_setup {* Context.>> (Theory.add_path "version2") *}
   167 setup {* Theory.add_path "version2" *}
   168 (*>*)
   168 (*>*)
   169 constdefs
   169 constdefs
   170   xor :: "bool \<Rightarrow> bool \<Rightarrow> bool"    (infixl "[+]\<ignore>" 60)
   170   xor :: "bool \<Rightarrow> bool \<Rightarrow> bool"    (infixl "[+]\<ignore>" 60)
   171   "A [+]\<ignore> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)"
   171   "A [+]\<ignore> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)"
   172 
   172