(G, ring)
return True
Check if G is a Groebner basis.
Check if G is a Groebner basis.
Check if G is a Groebner basis .
def is_groebner(G, ring):
    """
    Check if G is a Groebner basis.
    """
    for i in xrange(len(G)):
        for j in xrange(i + 1, len(G)):
            s = spoly(G[i], G[j])
            s = s.rem(G)
            if s:
                return False

    return True
def is_groebner ( G , ring ) : for i in xrange ( len ( G ) ) : for j in xrange ( i + 1 , len ( G ) ) : s = spoly ( G [ i ] , G [ j ] ) s = s . rem ( G ) if s : return False return True