src/HOL/Power.thy
changeset 16733 236dfafbeb63
parent 15251 bb6f072c8d10
child 16775 c1b87ef4a1c3
     1.1 --- a/src/HOL/Power.thy	Thu Jul 07 12:36:56 2005 +0200
     1.2 +++ b/src/HOL/Power.thy	Thu Jul 07 12:39:17 2005 +0200
     1.3 @@ -5,7 +5,7 @@
     1.4  
     1.5  *)
     1.6  
     1.7 -header{*Exponentiation and Binomial Coefficients*}
     1.8 +header{*Exponentiation*}
     1.9  
    1.10  theory Power
    1.11  imports Divides
    1.12 @@ -345,86 +345,6 @@
    1.13  apply (erule dvd_imp_le, simp)
    1.14  done
    1.15  
    1.16 -
    1.17 -subsection{*Binomial Coefficients*}
    1.18 -
    1.19 -text{*This development is based on the work of Andy Gordon and
    1.20 -Florian Kammueller*}
    1.21 -
    1.22 -consts
    1.23 -  binomial :: "[nat,nat] => nat"      (infixl "choose" 65)
    1.24 -
    1.25 -primrec
    1.26 -  binomial_0:   "(0     choose k) = (if k = 0 then 1 else 0)"
    1.27 -
    1.28 -  binomial_Suc: "(Suc n choose k) =
    1.29 -                 (if k = 0 then 1 else (n choose (k - 1)) + (n choose k))"
    1.30 -
    1.31 -lemma binomial_n_0 [simp]: "(n choose 0) = 1"
    1.32 -by (case_tac "n", simp_all)
    1.33 -
    1.34 -lemma binomial_0_Suc [simp]: "(0 choose Suc k) = 0"
    1.35 -by simp
    1.36 -
    1.37 -lemma binomial_Suc_Suc [simp]:
    1.38 -     "(Suc n choose Suc k) = (n choose k) + (n choose Suc k)"
    1.39 -by simp
    1.40 -
    1.41 -lemma binomial_eq_0 [rule_format]: "\<forall>k. n < k --> (n choose k) = 0"
    1.42 -apply (induct "n", auto)
    1.43 -apply (erule allE)
    1.44 -apply (erule mp, arith)
    1.45 -done
    1.46 -
    1.47 -declare binomial_0 [simp del] binomial_Suc [simp del]
    1.48 -
    1.49 -lemma binomial_n_n [simp]: "(n choose n) = 1"
    1.50 -apply (induct "n")
    1.51 -apply (simp_all add: binomial_eq_0)
    1.52 -done
    1.53 -
    1.54 -lemma binomial_Suc_n [simp]: "(Suc n choose n) = Suc n"
    1.55 -by (induct "n", simp_all)
    1.56 -
    1.57 -lemma binomial_1 [simp]: "(n choose Suc 0) = n"
    1.58 -by (induct "n", simp_all)
    1.59 -
    1.60 -lemma zero_less_binomial [rule_format]: "k \<le> n --> 0 < (n choose k)"
    1.61 -by (rule_tac m = n and n = k in diff_induct, simp_all)
    1.62 -
    1.63 -lemma binomial_eq_0_iff: "(n choose k = 0) = (n<k)"
    1.64 -apply (safe intro!: binomial_eq_0)
    1.65 -apply (erule contrapos_pp)
    1.66 -apply (simp add: zero_less_binomial)
    1.67 -done
    1.68 -
    1.69 -lemma zero_less_binomial_iff: "(0 < n choose k) = (k\<le>n)"
    1.70 -by (simp add: linorder_not_less [symmetric] binomial_eq_0_iff [symmetric])
    1.71 -
    1.72 -(*Might be more useful if re-oriented*)
    1.73 -lemma Suc_times_binomial_eq [rule_format]:
    1.74 -     "\<forall>k. k \<le> n --> Suc n * (n choose k) = (Suc n choose Suc k) * Suc k"
    1.75 -apply (induct "n")
    1.76 -apply (simp add: binomial_0, clarify)
    1.77 -apply (case_tac "k")
    1.78 -apply (auto simp add: add_mult_distrib add_mult_distrib2 le_Suc_eq
    1.79 -                      binomial_eq_0)
    1.80 -done
    1.81 -
    1.82 -text{*This is the well-known version, but it's harder to use because of the
    1.83 -  need to reason about division.*}
    1.84 -lemma binomial_Suc_Suc_eq_times:
    1.85 -     "k \<le> n ==> (Suc n choose Suc k) = (Suc n * (n choose k)) div Suc k"
    1.86 -by (simp add: Suc_times_binomial_eq div_mult_self_is_m zero_less_Suc
    1.87 -        del: mult_Suc mult_Suc_right)
    1.88 -
    1.89 -text{*Another version, with -1 instead of Suc.*}
    1.90 -lemma times_binomial_minus1_eq:
    1.91 -     "[|k \<le> n;  0<k|] ==> (n choose k) * k = n * ((n - 1) choose (k - 1))"
    1.92 -apply (cut_tac n = "n - 1" and k = "k - 1" in Suc_times_binomial_eq)
    1.93 -apply (simp split add: nat_diff_split, auto)
    1.94 -done
    1.95 -
    1.96  text{*ML bindings for the general exponentiation theorems*}
    1.97  ML
    1.98  {*
    1.99 @@ -477,19 +397,6 @@
   1.100  val nat_zero_less_power_iff = thm"nat_zero_less_power_iff";
   1.101  val power_le_dvd = thm"power_le_dvd";
   1.102  val power_dvd_imp_le = thm"power_dvd_imp_le";
   1.103 -val binomial_n_0 = thm"binomial_n_0";
   1.104 -val binomial_0_Suc = thm"binomial_0_Suc";
   1.105 -val binomial_Suc_Suc = thm"binomial_Suc_Suc";
   1.106 -val binomial_eq_0 = thm"binomial_eq_0";
   1.107 -val binomial_n_n = thm"binomial_n_n";
   1.108 -val binomial_Suc_n = thm"binomial_Suc_n";
   1.109 -val binomial_1 = thm"binomial_1";
   1.110 -val zero_less_binomial = thm"zero_less_binomial";
   1.111 -val binomial_eq_0_iff = thm"binomial_eq_0_iff";
   1.112 -val zero_less_binomial_iff = thm"zero_less_binomial_iff";
   1.113 -val Suc_times_binomial_eq = thm"Suc_times_binomial_eq";
   1.114 -val binomial_Suc_Suc_eq_times = thm"binomial_Suc_Suc_eq_times";
   1.115 -val times_binomial_minus1_eq = thm"times_binomial_minus1_eq";
   1.116  *}
   1.117  
   1.118  end