src/HOL/Number_Theory/Cong.thy
changeset 63092 a949b2a5f51d
parent 62429 25271ff79171
child 63167 0909deb8059b
equal deleted inserted replaced
63091:54f16a0a3069 63092:a949b2a5f51d
   339 lemma cong_gcd_eq_int: "[(a::int) = b] (mod m) \<Longrightarrow> gcd a m = gcd b m"
   339 lemma cong_gcd_eq_int: "[(a::int) = b] (mod m) \<Longrightarrow> gcd a m = gcd b m"
   340   by (metis cong_int_def gcd_red_int)
   340   by (metis cong_int_def gcd_red_int)
   341 
   341 
   342 lemma cong_gcd_eq_nat:
   342 lemma cong_gcd_eq_nat:
   343     "[(a::nat) = b] (mod m) \<Longrightarrow>gcd a m = gcd b m"
   343     "[(a::nat) = b] (mod m) \<Longrightarrow>gcd a m = gcd b m"
   344   by (metis assms cong_gcd_eq_int [transferred])
   344   by (metis cong_gcd_eq_int [transferred])
   345 
   345 
   346 lemma cong_imp_coprime_nat: "[(a::nat) = b] (mod m) \<Longrightarrow> coprime a m \<Longrightarrow> coprime b m"
   346 lemma cong_imp_coprime_nat: "[(a::nat) = b] (mod m) \<Longrightarrow> coprime a m \<Longrightarrow> coprime b m"
   347   by (auto simp add: cong_gcd_eq_nat)
   347   by (auto simp add: cong_gcd_eq_nat)
   348 
   348 
   349 lemma cong_imp_coprime_int: "[(a::int) = b] (mod m) \<Longrightarrow> coprime a m \<Longrightarrow> coprime b m"
   349 lemma cong_imp_coprime_int: "[(a::int) = b] (mod m) \<Longrightarrow> coprime a m \<Longrightarrow> coprime b m"