(self, J)
return self._union(J)
Compute the ideal generated by the union of ``self`` and ``J``.

        >>> from sympy.abc import x
        >>> from sympy import QQ
        >>> QQ.old_poly_ring(x).ideal(x**2 - 1).union(QQ.old_poly_ring(x).ideal((x+1)**2)) == QQ.old_poly_ring(x).ideal(x+1)
        True
Compute the ideal generated by the union of ``self`` and ``J``.
Compute the ideal generated by the union of self and J .
def union(self, J):
        """
        Compute the ideal generated by the union of ``self`` and ``J``.

        >>> from sympy.abc import x
        >>> from sympy import QQ
        >>> QQ.old_poly_ring(x).ideal(x**2 - 1).union(QQ.old_poly_ring(x).ideal((x+1)**2)) == QQ.old_poly_ring(x).ideal(x+1)
        True
        """
        self._check_ideal(J)
        return self._union(J)
def union ( self , J ) : self . _check_ideal ( J ) return self . _union ( J )