'Compute a reduced Groebner basis for a system of polynomials.'

def __new__(cls, F, *gens, **args):

    options.allowed_flags(args, ['polys', 'method'])
    try:
        (polys, opt) = parallel_poly_from_expr(F, *gens, **args)
    except PolificationFailed as exc:
        raise ComputationFailed('groebner', len(F), exc)
    from sympy.polys.rings import PolyRing
    ring = PolyRing(opt.gens, opt.domain, opt.order)
    polys = [ring.from_dict(poly.rep.to_dict()) for poly in polys if poly]
    G = _groebner(polys, ring, method=opt.method)
    G = [Poly._from_dict(g, opt) for g in G]
    return cls._new(G, opt)
