# HG changeset patch # User paulson # Date 1554999363 -3600 # Node ID f2f79726001086bcd7b513b3971c4115504beb54 # Parent 538d9854ca2f721834237bd10352e892677f28bd merge plus tidied three proofs diff -r 538d9854ca2f -r f2f797260010 src/HOL/Groups_Big.thy --- a/src/HOL/Groups_Big.thy Thu Apr 11 16:49:55 2019 +0100 +++ b/src/HOL/Groups_Big.thy Thu Apr 11 17:16:03 2019 +0100 @@ -169,16 +169,16 @@ assumes "finite I" and "\i\I. finite (A i)" and "\i\I. \j\I. i \ j \ A i \ A j = {}" shows "F g (\(A ` I)) = F (\x. F g (A x)) I" - apply (insert assms) - apply (induct rule: finite_induct) - apply simp - apply atomize - apply (subgoal_tac "\i\Fa. x \ i") - prefer 2 apply blast - apply (subgoal_tac "A x \ \(A ` Fa) = {}") - prefer 2 apply blast - apply (simp add: union_disjoint) - done + using assms +proof (induction rule: finite_induct) + case (insert i I) + then have "\j\I. j \ i" + by blast + with insert.prems have "A i \ \(A ` I) = {}" + by blast + with insert show ?case + by (simp add: union_disjoint) +qed auto lemma Union_disjoint: assumes "\A\C. finite A" "\A\C. \B\C. A \ B \ A \ B = {}" @@ -195,21 +195,17 @@ by (induct A rule: infinite_finite_induct) (simp_all add: assoc commute left_commute) lemma Sigma: - "finite A \ \x\A. finite (B x) \ F (\x. F (g x) (B x)) A = F (case_prod g) (SIGMA x:A. B x)" - apply (subst Sigma_def) - apply (subst UNION_disjoint) - apply assumption - apply simp - apply blast - apply (rule cong) - apply rule - apply (simp add: fun_eq_iff) - apply (subst UNION_disjoint) - apply simp - apply simp - apply blast - apply (simp add: comp_def) - done + assumes "finite A" "\x\A. finite (B x)" + shows "F (\x. F (g x) (B x)) A = F (case_prod g) (SIGMA x:A. B x)" + unfolding Sigma_def +proof (subst UNION_disjoint) + show "F (\x. F (g x) (B x)) A = F (\x. F (\(x, y). g x y) (\y\B x. {(x, y)})) A" + proof (rule cong [OF refl]) + show "F (g x) (B x) = F (\(x, y). g x y) (\y\B x. {(x, y)})" + if "x \ A" for x + using that assms by (simp add: UNION_disjoint) + qed +qed (use assms in auto) lemma related: assumes Re: "R \<^bold>1 \<^bold>1" @@ -386,17 +382,27 @@ qed lemma cartesian_product: "F (\x. F (g x) B) A = F (case_prod g) (A \ B)" - apply (rule sym) - apply (cases "finite A") - apply (cases "finite B") - apply (simp add: Sigma) - apply (cases "A = {}") - apply simp - apply simp - apply (auto intro: infinite dest: finite_cartesian_productD2) - apply (cases "B = {}") - apply (auto intro: infinite dest: finite_cartesian_productD1) - done +proof (cases "A = {} \ B = {}") + case True + then show ?thesis + by auto +next + case False + then have "A \ {}" "B \ {}" by auto + show ?thesis + proof (cases "finite A \ finite B") + case True + then show ?thesis + by (simp add: Sigma) + next + case False + then consider "infinite A" | "infinite B" by auto + then have "infinite (A \ B)" + by cases (use \A \ {}\ \B \ {}\ in \auto dest: finite_cartesian_productD1 finite_cartesian_productD2\) + then show ?thesis + using False by auto + qed +qed lemma inter_restrict: assumes "finite A"