src/HOL/Library/DAList_Multiset.thy
changeset 63040 eb4ddd18d635
parent 61585 a9599d3d7610
child 63195 f3f08c0d4aaf
equal deleted inserted replaced
63039:1a20fd9cf281 63040:eb4ddd18d635
   311     from fn[of a n] have [simp]: "fn a n = (f a ^^ n)"
   311     from fn[of a n] have [simp]: "fn a n = (f a ^^ n)"
   312       by auto
   312       by auto
   313     have inv: "ys \<in> ?inv"
   313     have inv: "ys \<in> ?inv"
   314       using Cons(2) by auto
   314       using Cons(2) by auto
   315     note IH = Cons(1)[OF inv]
   315     note IH = Cons(1)[OF inv]
   316     def Ys \<equiv> "Abs_multiset (count_of ys)"
   316     define Ys where "Ys = Abs_multiset (count_of ys)"
   317     have id: "Abs_multiset (count_of ((a, n) # ys)) = ((op + {# a #}) ^^ n) Ys"
   317     have id: "Abs_multiset (count_of ((a, n) # ys)) = ((op + {# a #}) ^^ n) Ys"
   318       unfolding Ys_def
   318       unfolding Ys_def
   319     proof (rule multiset_eqI, unfold count)
   319     proof (rule multiset_eqI, unfold count)
   320       fix c
   320       fix c
   321       show "count_of ((a, n) # ys) c =
   321       show "count_of ((a, n) # ys) c =