src/HOL/GCD.thy
changeset 31730 d74830dc3e4a
parent 31729 b9299916d618
child 31734 a4a79836d07b
     1.1 --- a/src/HOL/GCD.thy	Sat Jun 20 01:53:39 2009 +0200
     1.2 +++ b/src/HOL/GCD.thy	Sat Jun 20 13:34:54 2009 +0200
     1.3 @@ -283,6 +283,18 @@
     1.4    apply auto
     1.5  done
     1.6  
     1.7 +lemma dvd_gcd_D1_nat: "k dvd gcd m n \<Longrightarrow> (k::nat) dvd m"
     1.8 +by(metis nat_gcd_dvd1 dvd_trans)
     1.9 +
    1.10 +lemma dvd_gcd_D2_nat: "k dvd gcd m n \<Longrightarrow> (k::nat) dvd n"
    1.11 +by(metis nat_gcd_dvd2 dvd_trans)
    1.12 +
    1.13 +lemma dvd_gcd_D1_int: "i dvd gcd m n \<Longrightarrow> (i::int) dvd m"
    1.14 +by(metis int_gcd_dvd1 dvd_trans)
    1.15 +
    1.16 +lemma dvd_gcd_D2_int: "i dvd gcd m n \<Longrightarrow> (i::int) dvd n"
    1.17 +by(metis int_gcd_dvd2 dvd_trans)
    1.18 +
    1.19  lemma nat_gcd_le1 [simp]: "a \<noteq> 0 \<Longrightarrow> gcd (a::nat) b \<le> a"
    1.20    by (rule dvd_imp_le, auto)
    1.21  
    1.22 @@ -1386,7 +1398,7 @@
    1.23    using prems apply auto
    1.24  done
    1.25  
    1.26 -lemma nat_lcm_dvd1 [iff]: "(m::nat) dvd lcm m n"
    1.27 +lemma nat_lcm_dvd1: "(m::nat) dvd lcm m n"
    1.28  proof (cases m)
    1.29    case 0 then show ?thesis by simp
    1.30  next
    1.31 @@ -1407,7 +1419,7 @@
    1.32    qed
    1.33  qed
    1.34  
    1.35 -lemma int_lcm_dvd1 [iff]: "(m::int) dvd lcm m n"
    1.36 +lemma int_lcm_dvd1: "(m::int) dvd lcm m n"
    1.37    apply (subst int_lcm_abs)
    1.38    apply (rule dvd_trans)
    1.39    prefer 2
    1.40 @@ -1415,27 +1427,27 @@
    1.41    apply auto
    1.42  done
    1.43  
    1.44 -lemma nat_lcm_dvd2 [iff]: "(n::nat) dvd lcm m n"
    1.45 +lemma nat_lcm_dvd2: "(n::nat) dvd lcm m n"
    1.46    by (subst nat_lcm_commute, rule nat_lcm_dvd1)
    1.47  
    1.48 -lemma int_lcm_dvd2 [iff]: "(n::int) dvd lcm m n"
    1.49 +lemma int_lcm_dvd2: "(n::int) dvd lcm m n"
    1.50    by (subst int_lcm_commute, rule int_lcm_dvd1)
    1.51  
    1.52 -lemma dvd_lcm_if_dvd1_nat: "(k::nat) dvd m \<Longrightarrow> k dvd lcm m n"
    1.53 +lemma dvd_lcm_I1_nat[simp]: "(k::nat) dvd m \<Longrightarrow> k dvd lcm m n"
    1.54  by(metis nat_lcm_dvd1 dvd_trans)
    1.55  
    1.56 -lemma dvd_lcm_if_dvd2_nat: "(k::nat) dvd n \<Longrightarrow> k dvd lcm m n"
    1.57 +lemma dvd_lcm_I2_nat[simp]: "(k::nat) dvd n \<Longrightarrow> k dvd lcm m n"
    1.58  by(metis nat_lcm_dvd2 dvd_trans)
    1.59  
    1.60 -lemma dvd_lcm_if_dvd1_int: "(i::int) dvd m \<Longrightarrow> i dvd lcm m n"
    1.61 +lemma dvd_lcm_I1_int[simp]: "(i::int) dvd m \<Longrightarrow> i dvd lcm m n"
    1.62  by(metis int_lcm_dvd1 dvd_trans)
    1.63  
    1.64 -lemma dvd_lcm_if_dvd2_int: "(i::int) dvd n \<Longrightarrow> i dvd lcm m n"
    1.65 +lemma dvd_lcm_I2_int[simp]: "(i::int) dvd n \<Longrightarrow> i dvd lcm m n"
    1.66  by(metis int_lcm_dvd2 dvd_trans)
    1.67  
    1.68  lemma nat_lcm_unique: "(a::nat) dvd d \<and> b dvd d \<and>
    1.69      (\<forall>e. a dvd e \<and> b dvd e \<longrightarrow> d dvd e) \<longleftrightarrow> d = lcm a b"
    1.70 -  by (auto intro: dvd_anti_sym nat_lcm_least)
    1.71 +  by (auto intro: dvd_anti_sym nat_lcm_least nat_lcm_dvd1 nat_lcm_dvd2)
    1.72  
    1.73  lemma int_lcm_unique: "d >= 0 \<and> (a::int) dvd d \<and> b dvd d \<and>
    1.74      (\<forall>e. a dvd e \<and> b dvd e \<longrightarrow> d dvd e) \<longleftrightarrow> d = lcm a b"