src/HOL/IntDiv.thy
changeset 32553 bf781ef40c81
parent 32075 e8e0fb5da77a
child 32960 69916a850301
equal deleted inserted replaced
32548:b4119bbb2b79 32553:bf781ef40c81
  1099   {assume "n \<noteq> m*h" hence "k* n \<noteq> k* (m*h)" using kz by simp
  1099   {assume "n \<noteq> m*h" hence "k* n \<noteq> k* (m*h)" using kz by simp
  1100     with h have False by (simp add: mult_assoc)}
  1100     with h have False by (simp add: mult_assoc)}
  1101   hence "n = m * h" by blast
  1101   hence "n = m * h" by blast
  1102   thus ?thesis by simp
  1102   thus ?thesis by simp
  1103 qed
  1103 qed
  1104 
       
  1105 
       
  1106 theorem ex_nat: "(\<exists>x::nat. P x) = (\<exists>x::int. 0 <= x \<and> P (nat x))"
       
  1107 apply (simp split add: split_nat)
       
  1108 apply (rule iffI)
       
  1109 apply (erule exE)
       
  1110 apply (rule_tac x = "int x" in exI)
       
  1111 apply simp
       
  1112 apply (erule exE)
       
  1113 apply (rule_tac x = "nat x" in exI)
       
  1114 apply (erule conjE)
       
  1115 apply (erule_tac x = "nat x" in allE)
       
  1116 apply simp
       
  1117 done
       
  1118 
  1104 
  1119 theorem zdvd_int: "(x dvd y) = (int x dvd int y)"
  1105 theorem zdvd_int: "(x dvd y) = (int x dvd int y)"
  1120 proof -
  1106 proof -
  1121   have "\<And>k. int y = int x * k \<Longrightarrow> x dvd y"
  1107   have "\<And>k. int y = int x * k \<Longrightarrow> x dvd y"
  1122   proof -
  1108   proof -