equal
deleted
inserted
replaced
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" |