(f, g)
return None
Compute the GCD of two polynomials in trivial cases, i.e. when one
    or both polynomials are zero.
Compute the GCD of two polynomials in trivial cases, i.e. when one
    or both polynomials are zero.
Compute the GCD of two polynomials in trivial cases i . e . when one or both polynomials are zero .
def _trivial_gcd(f, g):
    """
    Compute the GCD of two polynomials in trivial cases, i.e. when one
    or both polynomials are zero.
    """
    ring = f.ring

    if not (f or g):
        return ring.zero, ring.zero, ring.zero
    elif not f:
        if g.LC < ring.domain.zero:
            return -g, ring.zero, -ring.one
        else:
            return g, ring.zero, ring.one
    elif not g:
        if f.LC < ring.domain.zero:
            return -f, -ring.one, ring.zero
        else:
            return f, ring.one, ring.zero
    return None
def _trivial_gcd ( f , g ) : ring = f . ring if not ( f or g ) : return ring . zero , ring . zero , ring . zero elif not f : if g . LC < ring . domain . zero : return - g , ring . zero , - ring . one else : return g , ring . zero , ring . one elif not g : if f . LC < ring . domain . zero : return - f , - ring . one , ring . zero else : return f , ring . one , ring . zero return None