src/HOL/Set.thy
changeset 81595 ed264056f5dc
parent 81545 6f8a56a6b391
equal deleted inserted replaced
81594:7e1b66416b7f 81595:ed264056f5dc
   154   where "{} \<equiv> bot"
   154   where "{} \<equiv> bot"
   155 
   155 
   156 definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
   156 definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
   157   where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
   157   where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
   158 
   158 
       
   159 open_bundle set_enumeration_syntax
       
   160 begin
       
   161 
   159 syntax
   162 syntax
   160   "_Finset" :: "args \<Rightarrow> 'a set"  (\<open>(\<open>indent=1 notation=\<open>mixfix set enumeration\<close>\<close>{_})\<close>)
   163   "_Finset" :: "args \<Rightarrow> 'a set"  (\<open>(\<open>indent=1 notation=\<open>mixfix set enumeration\<close>\<close>{_})\<close>)
   161 syntax_consts
   164 syntax_consts
   162   "_Finset" \<rightleftharpoons> insert
   165   "_Finset" \<rightleftharpoons> insert
   163 translations
   166 translations
   164   "{x, xs}" \<rightleftharpoons> "CONST insert x {xs}"
   167   "{x, xs}" \<rightleftharpoons> "CONST insert x {xs}"
   165   "{x}" \<rightleftharpoons> "CONST insert x {}"
   168   "{x}" \<rightleftharpoons> "CONST insert x {}"
       
   169 
       
   170 end
   166 
   171 
   167 
   172 
   168 subsection \<open>Subsets and bounded quantifiers\<close>
   173 subsection \<open>Subsets and bounded quantifiers\<close>
   169 
   174 
   170 abbreviation subset :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
   175 abbreviation subset :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"