src/HOL/Quotient_Examples/FSet.thy
changeset 36352 f71978e47cd5
parent 36280 c4f5823f282d
child 36465 15e834a03509
equal deleted inserted replaced
36351:85ee44388f7b 36352:f71978e47cd5
   385   apply (induct x)
   385   apply (induct x)
   386   apply (simp_all add: memb_def)
   386   apply (simp_all add: memb_def)
   387   apply (simp add: memb_def[symmetric] memb_finter_raw)
   387   apply (simp add: memb_def[symmetric] memb_finter_raw)
   388   by (auto simp add: memb_def)
   388   by (auto simp add: memb_def)
   389 
   389 
   390 instantiation fset :: (type) "{bot,distrib_lattice}"
   390 instantiation fset :: (type) "{bounded_lattice_bot,distrib_lattice}"
   391 begin
   391 begin
   392 
   392 
   393 quotient_definition
   393 quotient_definition
   394   "bot :: 'a fset" is "[] :: 'a list"
   394   "bot :: 'a fset" is "[] :: 'a list"
   395 
   395 
   920 lemma fin_fcard_not_0: "a |\<in>| A \<Longrightarrow> fcard A \<noteq> 0"
   920 lemma fin_fcard_not_0: "a |\<in>| A \<Longrightarrow> fcard A \<noteq> 0"
   921   by (lifting memb_card_not_0)
   921   by (lifting memb_card_not_0)
   922 
   922 
   923 text {* funion *}
   923 text {* funion *}
   924 
   924 
   925 lemma funion_simps[simp]:
   925 lemmas [simp] =
   926   shows "{||} |\<union>| S = S"
   926   sup_bot_left[where 'a="'a fset"]
   927   and   "finsert x S |\<union>| T = finsert x (S |\<union>| T)"
   927   sup_bot_right[where 'a="'a fset"]
   928   by (lifting append.simps)
   928 
   929 
   929 lemma funion_finsert[simp]:
   930 lemma funion_empty[simp]:
   930   shows "finsert x S |\<union>| T = finsert x (S |\<union>| T)"
   931   shows "S |\<union>| {||} = S"
   931   by (lifting append.simps(2))
   932   by (lifting append_Nil2)
       
   933 
   932 
   934 lemma singleton_union_left:
   933 lemma singleton_union_left:
   935   "{|a|} |\<union>| S = finsert a S"
   934   "{|a|} |\<union>| S = finsert a S"
   936   by simp
   935   by simp
   937 
   936