src/HOL/Library/Multiset.thy
changeset 68990 a319e3c522ba
parent 68988 93546c85374a
child 68992 8f7d3241ed68
equal deleted inserted replaced
68989:d6d5fb521896 68990:a319e3c522ba
  1888 done
  1888 done
  1889 
  1889 
  1890 lemma union_mset_compl[simp]: "\<forall>x. P x = (\<not> Q x) \<Longrightarrow> filter_mset P M + filter_mset Q M = M"
  1890 lemma union_mset_compl[simp]: "\<forall>x. P x = (\<not> Q x) \<Longrightarrow> filter_mset P M + filter_mset Q M = M"
  1891 by (induction M) simp_all
  1891 by (induction M) simp_all
  1892 
  1892 
  1893 lemma mset_compl_union: "mset [x\<leftarrow>xs. P x] + mset [x\<leftarrow>xs. \<not>P x] = mset xs"
       
  1894   by (induct xs) auto
       
  1895 
       
  1896 lemma nth_mem_mset: "i < length ls \<Longrightarrow> (ls ! i) \<in># mset ls"
  1893 lemma nth_mem_mset: "i < length ls \<Longrightarrow> (ls ! i) \<in># mset ls"
  1897 proof (induct ls arbitrary: i)
  1894 proof (induct ls arbitrary: i)
  1898   case Nil
  1895   case Nil
  1899   then show ?case by simp
  1896   then show ?case by simp
  1900 next
  1897 next