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