equal
deleted
inserted
replaced
547 |
547 |
548 lemma append_Nil2 [simp]: "xs @ [] = xs" |
548 lemma append_Nil2 [simp]: "xs @ [] = xs" |
549 by (induct xs) auto |
549 by (induct xs) auto |
550 |
550 |
551 interpretation semigroup_append: semigroup_add ["op @"] |
551 interpretation semigroup_append: semigroup_add ["op @"] |
552 by unfold_locales simp |
552 proof qed simp |
553 interpretation monoid_append: monoid_add ["[]" "op @"] |
553 interpretation monoid_append: monoid_add ["[]" "op @"] |
554 by unfold_locales (simp+) |
554 proof qed simp+ |
555 |
555 |
556 lemma append_is_Nil_conv [iff]: "(xs @ ys = []) = (xs = [] \<and> ys = [])" |
556 lemma append_is_Nil_conv [iff]: "(xs @ ys = []) = (xs = [] \<and> ys = [])" |
557 by (induct xs) auto |
557 by (induct xs) auto |
558 |
558 |
559 lemma Nil_is_append_conv [iff]: "([] = xs @ ys) = (xs = [] \<and> ys = [])" |
559 lemma Nil_is_append_conv [iff]: "([] = xs @ ys) = (xs = [] \<and> ys = [])" |
3832 |
3832 |
3833 lemma map_filter_conv [simp]: |
3833 lemma map_filter_conv [simp]: |
3834 "map_filter f P xs = map f (filter P xs)" |
3834 "map_filter f P xs = map f (filter P xs)" |
3835 by (induct xs) auto |
3835 by (induct xs) auto |
3836 |
3836 |
3837 lemma lenght_remdups_length_unique [code inline]: |
3837 lemma length_remdups_length_unique [code inline]: |
3838 "length (remdups xs) = length_unique xs" |
3838 "length (remdups xs) = length_unique xs" |
3839 by (induct xs) simp_all |
3839 by (induct xs) simp_all |
3840 |
3840 |
3841 hide (open) const length_unique |
3841 hide (open) const length_unique |
3842 |
3842 |