(symbols, domain, order=lex)
return (_ring, _ring.gens)
Construct a polynomial ring returning ``(ring, (x_1, ..., x_n))``.

    Parameters
    ----------
    symbols : str, Symbol/Expr or sequence of str, Symbol/Expr (non-empty)
    domain : :class:`Domain` or coercible
    order : :class:`Order` or coercible, optional, defaults to ``lex``

    Examples
    --------
    >>> from sympy.polys.rings import xring
    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.orderings import lex

    >>> R, (x, y, z) = xring("x,y,z", ZZ, lex)
    >>> R
    Polynomial ring in x, y, z over ZZ with lex order
    >>> x + y + z
    x + y + z
    >>> type(_)
    <class 'sympy.polys.rings.PolyElement'>
Construct a polynomial ring returning ``(ring, (x_1, ..., x_n))``.
Construct a polynomial ring returning ( ring ( x_1 ... x_n )) .
def xring(symbols, domain, order=lex):
    """Construct a polynomial ring returning ``(ring, (x_1, ..., x_n))``.

    Parameters
    ----------
    symbols : str, Symbol/Expr or sequence of str, Symbol/Expr (non-empty)
    domain : :class:`Domain` or coercible
    order : :class:`Order` or coercible, optional, defaults to ``lex``

    Examples
    --------
    >>> from sympy.polys.rings import xring
    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.orderings import lex

    >>> R, (x, y, z) = xring("x,y,z", ZZ, lex)
    >>> R
    Polynomial ring in x, y, z over ZZ with lex order
    >>> x + y + z
    x + y + z
    >>> type(_)
    <class 'sympy.polys.rings.PolyElement'>

    """
    _ring = PolyRing(symbols, domain, order)
    return (_ring, _ring.gens)
def xring ( symbols , domain , order = lex ) : _ring = PolyRing ( symbols , domain , order ) return ( _ring , _ring . gens )