src/HOL/Library/Multiset.thy
changeset 48008 846ff14337a4
parent 47429 ec64d94cbf9c
child 48009 9b9150033b5a
     1.1 --- a/src/HOL/Library/Multiset.thy	Mon May 28 20:51:23 2012 +0200
     1.2 +++ b/src/HOL/Library/Multiset.thy	Tue May 29 10:08:31 2012 +0200
     1.3 @@ -79,7 +79,7 @@
     1.4  
     1.5  text {* Multiset enumeration *}
     1.6  
     1.7 -instantiation multiset :: (type) "{zero, plus}"
     1.8 +instantiation multiset :: (type) cancel_comm_monoid_add
     1.9  begin
    1.10  
    1.11  lift_definition zero_multiset :: "'a multiset" is "\<lambda>a. 0"
    1.12 @@ -91,7 +91,8 @@
    1.13  lift_definition plus_multiset :: "'a multiset => 'a multiset => 'a multiset" is "\<lambda>M N. (\<lambda>a. M a + N a)"
    1.14  by (rule union_preserves_multiset)
    1.15  
    1.16 -instance ..
    1.17 +instance
    1.18 +by default (transfer, simp add: fun_eq_iff)+
    1.19  
    1.20  end
    1.21  
    1.22 @@ -118,9 +119,6 @@
    1.23  lemma count_union [simp]: "count (M + N) a = count M a + count N a"
    1.24    by (simp add: plus_multiset.rep_eq)
    1.25  
    1.26 -instance multiset :: (type) cancel_comm_monoid_add
    1.27 -  by default (simp_all add: multiset_eq_iff)
    1.28 -
    1.29  
    1.30  subsubsection {* Difference *}
    1.31