equal
deleted
inserted
replaced
929 apply (rule range_eqI Abs_fset_inverse[symmetric] CollectI)+ |
929 apply (rule range_eqI Abs_fset_inverse[symmetric] CollectI)+ |
930 . |
930 . |
931 |
931 |
932 lemma rel_fset_aux: |
932 lemma rel_fset_aux: |
933 "(\<forall>t \<in> fset a. \<exists>u \<in> fset b. R t u) \<and> (\<forall>u \<in> fset b. \<exists>t \<in> fset a. R t u) \<longleftrightarrow> |
933 "(\<forall>t \<in> fset a. \<exists>u \<in> fset b. R t u) \<and> (\<forall>u \<in> fset b. \<exists>t \<in> fset a. R t u) \<longleftrightarrow> |
934 ((BNF_Util.Grp {a. fset a \<subseteq> {(a, b). R a b}} (fimage fst))\<inverse>\<inverse> OO |
934 ((BNF_Def.Grp {a. fset a \<subseteq> {(a, b). R a b}} (fimage fst))\<inverse>\<inverse> OO |
935 BNF_Util.Grp {a. fset a \<subseteq> {(a, b). R a b}} (fimage snd)) a b" (is "?L = ?R") |
935 BNF_Def.Grp {a. fset a \<subseteq> {(a, b). R a b}} (fimage snd)) a b" (is "?L = ?R") |
936 proof |
936 proof |
937 assume ?L |
937 assume ?L |
938 def R' \<equiv> "the_inv fset (Collect (split R) \<inter> (fset a \<times> fset b))" (is "the_inv fset ?L'") |
938 def R' \<equiv> "the_inv fset (Collect (split R) \<inter> (fset a \<times> fset b))" (is "the_inv fset ?L'") |
939 have "finite ?L'" by (intro finite_Int[OF disjI2] finite_cartesian_product) (transfer, simp)+ |
939 have "finite ?L'" by (intro finite_Int[OF disjI2] finite_cartesian_product) (transfer, simp)+ |
940 hence *: "fset R' = ?L'" unfolding R'_def by (intro fset_to_fset) |
940 hence *: "fset R' = ?L'" unfolding R'_def by (intro fset_to_fset) |