src/HOL/Library/Primes.thy
changeset 29667 53103fc8ffa3
parent 28952 15a4b2cf8c34
child 30042 31039ee583fa
child 30240 5b25fee0362c
equal deleted inserted replaced
29549:7187373c6cb1 29667:53103fc8ffa3
   202   moreover 
   202   moreover 
   203   {assume az: "a\<noteq> 0" 
   203   {assume az: "a\<noteq> 0" 
   204     from z have z': "?g > 0" by simp
   204     from z have z': "?g > 0" by simp
   205     from bezout_gcd_strong[OF az, of b] 
   205     from bezout_gcd_strong[OF az, of b] 
   206     obtain x y where xy: "a*x = b*y + ?g" by blast
   206     obtain x y where xy: "a*x = b*y + ?g" by blast
   207     from xy a b have "?g * a'*x = ?g * (b'*y + 1)" by (simp add: ring_simps)
   207     from xy a b have "?g * a'*x = ?g * (b'*y + 1)" by (simp add: algebra_simps)
   208     hence "?g * (a'*x) = ?g * (b'*y + 1)" by (simp add: mult_assoc)
   208     hence "?g * (a'*x) = ?g * (b'*y + 1)" by (simp add: mult_assoc)
   209     hence "a'*x = (b'*y + 1)"
   209     hence "a'*x = (b'*y + 1)"
   210       by (simp only: nat_mult_eq_cancel1[OF z']) 
   210       by (simp only: nat_mult_eq_cancel1[OF z']) 
   211     hence "a'*x - b'*y = 1" by simp
   211     hence "a'*x - b'*y = 1" by simp
   212     with coprime_bezout[of a' b'] have ?thesis by auto}
   212     with coprime_bezout[of a' b'] have ?thesis by auto}