# HG changeset patch # User paulson # Date 1660564224 -3600 # Node ID 62c64e3e47410964cb6f82ea08f75513b5f0c43c # Parent 3842556b757c755af4fa339ad8cbb7da7e217fe9 The same, without adding a new simprule diff -r 3842556b757c -r 62c64e3e4741 src/HOL/Binomial.thy --- a/src/HOL/Binomial.thy Sun Aug 14 23:51:47 2022 +0100 +++ b/src/HOL/Binomial.thy Mon Aug 15 12:50:24 2022 +0100 @@ -1066,7 +1066,8 @@ assumes "k \ n" shows "(of_nat :: (nat \ ('a :: field_char_0))) (n choose k) = of_nat (n + 1 - k) / of_nat (n + 1) * of_nat (Suc n choose k)" proof (cases k) - case 0 then show ?thesis by simp + case 0 then show ?thesis + using of_nat_neq_0 by auto next case (Suc l) have "of_nat (n + 1) * (\i=0.. 'a)) (n + 1 - k) * (\i=0.. 'a)) (n + 1 - k) * (\i=0..i=0.. 'a)) (n + 1 - k) / of_nat (n + 1) * (\i=0.. (0::'a::{semiring_char_0,semiring_no_zero_divisors})" - apply (induct n) - apply auto - using of_nat_eq_0_iff - apply fastforce - done + using of_nat_0_neq by (induct n) auto lemma fact_mono_nat: "m \ n \ fact m \ (fact n :: nat)" by (induct n) (auto simp: le_Suc_eq) diff -r 3842556b757c -r 62c64e3e4741 src/HOL/Nat.thy --- a/src/HOL/Nat.thy Sun Aug 14 23:51:47 2022 +0100 +++ b/src/HOL/Nat.thy Mon Aug 15 12:50:24 2022 +0100 @@ -1768,14 +1768,6 @@ lemma of_nat_eq_iff [simp]: "of_nat m = of_nat n \ m = n" by (auto intro: inj_of_nat injD) -lemma one_plus_of_nat_neq_zero [simp]: - "1 + of_nat n \ 0" -proof - - have "of_nat (Suc n) \ of_nat 0" - unfolding of_nat_eq_iff by simp - then show ?thesis by simp -qed - text \Special cases where either operand is zero\ lemma of_nat_0_eq_iff [simp]: "0 = of_nat n \ 0 = n"