'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'

def union(self, J):

    self._check_ideal(J)
    return self._union(J)
