# HG changeset patch # User haftmann # Date 1645126936 0 # Node ID f3fcc7c5a0db9c9c6054e94cb86a258f7e85b495 # Parent 4cc719621825ff87e140a529bbf63346e30cae6b Avoid overaggresive splitting. diff -r 4cc719621825 -r f3fcc7c5a0db NEWS --- a/NEWS Thu Feb 17 19:42:15 2022 +0000 +++ b/NEWS Thu Feb 17 19:42:16 2022 +0000 @@ -15,6 +15,9 @@ *** HOL *** +* Rule split_of_bool_asm is not split any longer, analogously to +split_if_asm. INCOMPATIBILITY. + * Theory "HOL.Bit_Operations": rule bit_0 is not default [simp] any longer. INCOMPATIBILITY. diff -r 4cc719621825 -r f3fcc7c5a0db src/HOL/Library/Indicator_Function.thy --- a/src/HOL/Library/Indicator_Function.thy Thu Feb 17 19:42:15 2022 +0000 +++ b/src/HOL/Library/Indicator_Function.thy Thu Feb 17 19:42:16 2022 +0000 @@ -208,6 +208,6 @@ lemma indicator_UN_disjoint: "finite A \ disjoint_family_on f A \ indicator (\(f ` A)) x = (\y\A. indicator (f y) x)" by (induct A rule: finite_induct) - (auto simp: disjoint_family_on_def indicator_def split: if_splits) + (auto simp: disjoint_family_on_def indicator_def split: if_splits split_of_bool_asm) end diff -r 4cc719621825 -r f3fcc7c5a0db src/HOL/Library/Word.thy --- a/src/HOL/Library/Word.thy Thu Feb 17 19:42:15 2022 +0000 +++ b/src/HOL/Library/Word.thy Thu Feb 17 19:42:16 2022 +0000 @@ -1581,7 +1581,7 @@ lemma mod_word_one [simp]: \1 mod w = 1 - w * of_bool (w = 1)\ for w :: \'a::len word\ - using div_mult_mod_eq [of 1 w] by simp + using div_mult_mod_eq [of 1 w] by auto lemma div_word_by_minus_1_eq [simp]: \w div - 1 = of_bool (w = - 1)\ for w :: \'a::len word\ @@ -1589,9 +1589,17 @@ lemma mod_word_by_minus_1_eq [simp]: \w mod - 1 = w * of_bool (w < - 1)\ for w :: \'a::len word\ - apply (cases \w = - 1\) - apply (auto simp add: word_order.not_eq_extremum) - using div_mult_mod_eq [of w \- 1\] by simp +proof (cases \w = - 1\) + case True + then show ?thesis + by simp +next + case False + moreover have \w < - 1\ + using False by (simp add: word_order.not_eq_extremum) + ultimately show ?thesis + by (simp add: mod_word_less) +qed text \Legacy theorems:\ diff -r 4cc719621825 -r f3fcc7c5a0db src/HOL/Rings.thy --- a/src/HOL/Rings.thy Thu Feb 17 19:42:15 2022 +0000 +++ b/src/HOL/Rings.thy Thu Feb 17 19:42:16 2022 +0000 @@ -114,7 +114,7 @@ lemma split_of_bool [split]: "P (of_bool p) \ (p \ P 1) \ (\ p \ P 0)" by (cases p) simp_all -lemma split_of_bool_asm [split]: "P (of_bool p) \ \ (p \ \ P 1 \ \ p \ \ P 0)" +lemma split_of_bool_asm: "P (of_bool p) \ \ (p \ \ P 1 \ \ p \ \ P 0)" by (cases p) simp_all lemma of_bool_eq_0_iff [simp]: