up previous next
IsCoprime    --    checks if two elements are coprime


Syntax
IsCoprime(F: INT, G: INT): BOOL
IsCoprime(F: RINGELEM, G: RINGELEM): BOOL

Description
IsCoprime applies to two integers says whether they are coprime. It can also be applied to two ring elements, which must belong to the same ring. It works in the following situations: - they are elements of ZZ - they are power-products in a polynomial ring - they are in a polynomial ring whose coeff ring is a field. For polynomials over the integers, please compute the gcd , and check the result (via IsInvertible or IsConstant ).

Example
/**/ use QQ[x,y,z];
/**/ IsCoprime(x*y, y*z);
false
/**/ IsCoprime(x*y, z);
true

See Also