diff -r 19837257fd89 -r e7497a1de8b9 src/HOL/Divides.thy --- a/src/HOL/Divides.thy Tue Sep 13 18:56:48 2022 +0100 +++ b/src/HOL/Divides.thy Tue Sep 13 12:30:37 2022 +0000 @@ -262,8 +262,8 @@ \a mod b = r\ (is ?R) proof - from assms have \(a div b, a mod b) = (q, r)\ - by (cases b q r a rule: euclidean_relationI) - (auto simp add: division_segment_int_def ac_simps dvd_add_left_iff dest: zdvd_imp_le) + by (cases b q r a rule: euclidean_relation_intI) + (auto simp add: ac_simps dvd_add_left_iff sgn_1_pos le_less dest: zdvd_imp_le) then show ?Q and ?R by simp_all qed @@ -400,34 +400,6 @@ qed -subsubsection \Uniqueness rules\ - -lemma euclidean_relation_intI [case_names by0 divides euclidean_relation]: - \(k div l, k mod l) = (q, r)\ - if by0': \l = 0 \ q = 0 \ r = k\ - and divides': \l \ 0 \ l dvd k \ r = 0 \ k = q * l\ - and euclidean_relation': \l \ 0 \ \ l dvd k \ sgn r = sgn l - \ \r\ < \l\ \ k = q * l + r\ for k l :: int -proof (cases l q r k rule: euclidean_relationI) - case by0 - then show ?case - by (rule by0') -next - case divides - then show ?case - by (rule divides') -next - case euclidean_relation - with euclidean_relation' have \sgn r = sgn l\ \\r\ < \l\\ \k = q * l + r\ - by simp_all - from \sgn r = sgn l\ \l \ 0\ have \division_segment r = division_segment l\ - by (simp add: division_segment_int_def sgn_if split: if_splits) - with \\r\ < \l\\ \k = q * l + r\ - show ?case - by simp -qed - - subsubsection \Computing \div\ and \mod\ with shifting\ lemma div_pos_geq: