# HG changeset patch # User wenzelm # Date 1723410663 -7200 # Node ID 81da5938a7bebc40c551e209cc9a4e040ea1f021 # Parent daa604a0049196dd90a9faf5d2f8b5f1cfba35cc# Parent 3b6d84c32bfd6fef74da70f239c22d44634b5082 merged diff -r 3b6d84c32bfd -r 81da5938a7be src/HOL/Set_Interval.thy --- a/src/HOL/Set_Interval.thy Sun Aug 11 20:20:05 2024 +0200 +++ b/src/HOL/Set_Interval.thy Sun Aug 11 23:11:03 2024 +0200 @@ -1697,6 +1697,34 @@ by simp qed +lemma finite_countable_subset: + assumes "finite A" and A: "A \ (\i::nat. B i)" + obtains n where "A \ (\ix. x \ A \ x \ B(f x)" + by (metis in_mono UN_iff A) + define n where "n = Suc (Max (f`A))" + have "finite (f ` A)" + by (simp add: \finite A\) + then have "A \ (\ii::nat. B i)" + obtains n where "A = (\i (\i \ (range B)" + by (force simp: assms) + qed (use assms in auto) + with that show ?thesis + by (force simp: assms) +qed + subsection \Lemmas useful with the summation operator sum\ text \For examples, see Algebra/poly/UnivPoly2.thy\