# HG changeset patch # User haftmann # Date 1329662458 -3600 # Node ID 87d4e49584769c9c08a02b3b6f0ad938d39fded0 # Parent 50a7e97fe6539947c42b884e4bc0d3749d809861 tuned proof diff -r 50a7e97fe653 -r 87d4e4958476 src/HOL/Big_Operators.thy --- a/src/HOL/Big_Operators.thy Sun Feb 19 15:30:35 2012 +0100 +++ b/src/HOL/Big_Operators.thy Sun Feb 19 15:40:58 2012 +0100 @@ -786,15 +786,13 @@ by (simp only: card_def setsum_def) lemma card_UN_disjoint: - "finite I ==> (ALL i:I. finite (A i)) ==> - (ALL i:I. ALL j:I. i \ j --> A i Int A j = {}) - ==> card (UNION I A) = (\i\I. card(A i))" -apply (simp add: card_eq_setsum del: setsum_constant) -apply (subgoal_tac - "setsum (%i. card (A i)) I = setsum (%i. (setsum (%x. 1) (A i))) I") -apply (simp add: setsum_UN_disjoint del: setsum_constant) -apply simp -done + assumes "finite I" and "\i\I. finite (A i)" + and "\i\I. \j\I. i \ j \ A i \ A j = {}" + shows "card (UNION I A) = (\i\I. card(A i))" +proof - + have "(\i\I. card (A i)) = (\i\I. \x\A i. 1)" by simp + with assms show ?thesis by (simp add: card_eq_setsum setsum_UN_disjoint del: setsum_constant) +qed lemma card_Union_disjoint: "finite C ==> (ALL A:C. finite A) ==>