src/HOL/Library/FSet.thy
changeset 76305 44b0b22f4e2e
parent 76281 457f1cba78fb
child 78102 f40bc75b2a3f
equal deleted inserted replaced
76300:5836811fe549 76305:44b0b22f4e2e
   170   "{|x, xs|}" == "CONST finsert x {|xs|}"
   170   "{|x, xs|}" == "CONST finsert x {|xs|}"
   171   "{|x|}"     == "CONST finsert x {||}"
   171   "{|x|}"     == "CONST finsert x {||}"
   172 
   172 
   173 lift_definition fmember :: "'a \<Rightarrow> 'a fset \<Rightarrow> bool" (infix "|\<in>|" 50) is Set.member
   173 lift_definition fmember :: "'a \<Rightarrow> 'a fset \<Rightarrow> bool" (infix "|\<in>|" 50) is Set.member
   174   parametric member_transfer .
   174   parametric member_transfer .
       
   175 
       
   176 lemma fmember_iff_member_fset: "x |\<in>| A \<longleftrightarrow> x \<in> fset A"
       
   177   by (rule fmember.rep_eq)
   175 
   178 
   176 abbreviation notin_fset :: "'a \<Rightarrow> 'a fset \<Rightarrow> bool" (infix "|\<notin>|" 50) where "x |\<notin>| S \<equiv> \<not> (x |\<in>| S)"
   179 abbreviation notin_fset :: "'a \<Rightarrow> 'a fset \<Rightarrow> bool" (infix "|\<notin>|" 50) where "x |\<notin>| S \<equiv> \<not> (x |\<in>| S)"
   177 
   180 
   178 context includes lifting_syntax
   181 context includes lifting_syntax
   179 begin
   182 begin
   492 
   495 
   493 lemma filter_fset [simp]:
   496 lemma filter_fset [simp]:
   494   shows "fset (ffilter P xs) = Collect P \<inter> fset xs"
   497   shows "fset (ffilter P xs) = Collect P \<inter> fset xs"
   495   by transfer auto
   498   by transfer auto
   496 
   499 
   497 lemma notin_fset: "x |\<notin>| S \<longleftrightarrow> x \<notin> fset S" by (simp add: fmember.rep_eq)
   500 lemma notin_fset: "x |\<notin>| S \<longleftrightarrow> x \<notin> fset S"
       
   501   by (simp add: fmember_iff_member_fset)
   498 
   502 
   499 lemmas inter_fset[simp] = inf_fset.rep_eq
   503 lemmas inter_fset[simp] = inf_fset.rep_eq
   500 
   504 
   501 lemmas union_fset[simp] = sup_fset.rep_eq
   505 lemmas union_fset[simp] = sup_fset.rep_eq
   502 
   506