diff -r e10ef4f9c848 -r 1b9388e6eb75 src/HOL/Complex.thy --- a/src/HOL/Complex.thy Sun Sep 24 15:55:42 2023 +0200 +++ b/src/HOL/Complex.thy Mon Sep 25 17:06:05 2023 +0100 @@ -769,6 +769,14 @@ lemma Im_sum[simp]: "Im (sum f s) = (\x\s. Im(f x))" by (induct s rule: infinite_finite_induct) auto +lemma Rats_complex_of_real_iff [iff]: "complex_of_real x \ \ \ x \ \" +proof - + have "\a b. \0 < b; x = complex_of_int a / complex_of_int b\ \ x \ \" + by (metis Rats_divide Rats_of_int Re_complex_of_real Re_divide_of_real of_real_of_int_eq) + then show ?thesis + by (auto simp: elim!: Rats_cases') +qed + lemma sum_Re_le_cmod: "(\i\I. Re (z i)) \ cmod (\i\I. z i)" by (metis Re_sum complex_Re_le_cmod)