prop_egcd x y = let (p,q) = egcd x y in abs (p*x + q*y) == gcd x y egcd :: Integer -> Integer -> ( Integer, Integer ) egcd x y = if y == 0 then ??? else let (d,m) = divMod x y (p,q) = egcd y m in ???