even more appropriate fact name
authorhaftmann
Sun Jun 16 16:40:57 2019 +0000 (4 weeks ago)
changeset 703537aa64296b9b0
parent 70352 ce3c1d8791eb
child 70354 9497a6334a26
even more appropriate fact name
src/HOL/Parity.thy
src/HOL/ex/Bit_Lists.thy
     1.1 --- a/src/HOL/Parity.thy	Sun Jun 16 16:40:57 2019 +0000
     1.2 +++ b/src/HOL/Parity.thy	Sun Jun 16 16:40:57 2019 +0000
     1.3 @@ -541,7 +541,7 @@
     1.4    "n mod 2 \<noteq> Suc 0 \<longleftrightarrow> n mod 2 = 0"
     1.5    using not_mod_2_eq_1_eq_0 [of n] by simp
     1.6  
     1.7 -lemma nat_parity_induct [case_names zero even odd]:
     1.8 +lemma nat_bit_induct [case_names zero even odd]:
     1.9    "P n" if zero: "P 0"
    1.10      and even: "\<And>n. P n \<Longrightarrow> n > 0 \<Longrightarrow> P (2 * n)"
    1.11      and odd: "\<And>n. P n \<Longrightarrow> P (Suc (2 * n))"
    1.12 @@ -720,7 +720,7 @@
    1.13  lemma even_nat_iff: "0 \<le> k \<Longrightarrow> even (nat k) \<longleftrightarrow> even k"
    1.14    by (simp add: even_of_nat [of "nat k", where ?'a = int, symmetric])
    1.15  
    1.16 -lemma int_parity_induct [case_names zero minus even odd]:
    1.17 +lemma int_bit_induct [case_names zero minus even odd]:
    1.18    "P k" if zero_int: "P 0"
    1.19      and minus_int: "P (- 1)"
    1.20      and even_int: "\<And>k. P k \<Longrightarrow> k \<noteq> 0 \<Longrightarrow> P (k * 2)"
    1.21 @@ -731,7 +731,7 @@
    1.22    with True have "k = int n"
    1.23      by simp
    1.24    then show "P k"
    1.25 -  proof (induction n arbitrary: k rule: nat_parity_induct)
    1.26 +  proof (induction n arbitrary: k rule: nat_bit_induct)
    1.27      case zero
    1.28      then show ?case
    1.29        by (simp add: zero_int)
    1.30 @@ -754,7 +754,7 @@
    1.31    with False have "k = - int n - 1"
    1.32      by simp
    1.33    then show "P k"
    1.34 -  proof (induction n arbitrary: k rule: nat_parity_induct)
    1.35 +  proof (induction n arbitrary: k rule: nat_bit_induct)
    1.36      case zero
    1.37      then show ?case
    1.38        by (simp add: minus_int)
     2.1 --- a/src/HOL/ex/Bit_Lists.thy	Sun Jun 16 16:40:57 2019 +0000
     2.2 +++ b/src/HOL/ex/Bit_Lists.thy	Sun Jun 16 16:40:57 2019 +0000
     2.3 @@ -61,12 +61,12 @@
     2.4  
     2.5  lemma not_last_bits_of_nat [simp]:
     2.6    "\<not> last (bits_of (of_nat n))"
     2.7 -  by (induction n rule: nat_parity_induct)
     2.8 +  by (induction n rule: nat_bit_induct)
     2.9      (use of_nat_neq_0 in \<open>simp_all add: algebra_simps\<close>)
    2.10  
    2.11  lemma of_unsigned_bits_of_nat:
    2.12    "of_unsigned (bits_of (of_nat n)) = of_nat n"
    2.13 -  by (induction n rule: nat_parity_induct)
    2.14 +  by (induction n rule: nat_bit_induct)
    2.15      (use of_nat_neq_0 in \<open>simp_all add: algebra_simps\<close>)
    2.16  
    2.17  end
    2.18 @@ -106,7 +106,7 @@
    2.19  
    2.20  lemma last_bits_of_neg_of_nat [simp]:
    2.21    "last (bits_of (- 1 - of_nat n))"
    2.22 -proof (induction n rule: nat_parity_induct)
    2.23 +proof (induction n rule: nat_bit_induct)
    2.24    case zero
    2.25    then show ?case
    2.26      by simp
    2.27 @@ -132,7 +132,7 @@
    2.28    "of_signed (bits_of (- 1 - of_nat n)) = - 1 - of_nat n"
    2.29  proof -
    2.30    have "of_unsigned (map Not (bits_of (- 1 - of_nat n))) = of_nat n"
    2.31 -  proof (induction n rule: nat_parity_induct)
    2.32 +  proof (induction n rule: nat_bit_induct)
    2.33      case zero
    2.34      then show ?case
    2.35        by simp