arguments: a:ringelem b:ringelem >> g:ringelem x:ringelem y:ringelem
Return the greatest common divisor, g, of a and b, if gcd's are defined over this ring. The following is satisfied: ax+by = g.