758 |
754 |
759 lemma funion_empty[simp]: |
755 lemma funion_empty[simp]: |
760 shows "S |\<union>| {||} = S" |
756 shows "S |\<union>| {||} = S" |
761 by (lifting append_Nil2) |
757 by (lifting append_Nil2) |
762 |
758 |
763 lemma funion_sym: |
759 thm sup.commute[where 'a="'a fset"] |
764 shows "S |\<union>| T = T |\<union>| S" |
760 |
765 by (lifting funion_sym_pre) |
761 thm sup.assoc[where 'a="'a fset"] |
766 |
|
767 lemma funion_assoc: |
|
768 shows "S |\<union>| T |\<union>| U = S |\<union>| (T |\<union>| U)" |
|
769 by (lifting append_assoc) |
|
770 |
762 |
771 lemma singleton_union_left: |
763 lemma singleton_union_left: |
772 "{|a|} |\<union>| S = finsert a S" |
764 "{|a|} |\<union>| S = finsert a S" |
773 by simp |
765 by simp |
774 |
766 |
775 lemma singleton_union_right: |
767 lemma singleton_union_right: |
776 "S |\<union>| {|a|} = finsert a S" |
768 "S |\<union>| {|a|} = finsert a S" |
777 by (subst funion_sym) simp |
769 by (subst sup.commute) simp |
778 |
770 |
779 section {* Induction and Cases rules for finite sets *} |
771 section {* Induction and Cases rules for finite sets *} |
780 |
772 |
781 lemma fset_strong_cases: |
773 lemma fset_strong_cases: |
782 "S = {||} \<or> (\<exists>x T. x |\<notin>| T \<and> S = finsert x T)" |
774 "S = {||} \<or> (\<exists>x T. x |\<notin>| T \<and> S = finsert x T)" |