I have constructed the following ideal

J={0, x*y*z - x*y - x*z + y*z - x + y - z, x*z - y*z - x + y - 1, x*y*z + x*y + x*z + y*z - z - 1, x*y + x*z + x - y + z, -x*y*z - x*y + x*z - y*z - x - y - z, ....}

in the ring R=F[X,Y,Z]/<x^2-1,y^2-1,z^2-1>, where x (resp; y,z) is the residue class of X (resp. Y,Z) modulo the ideal <x^2-1,y^2-1,z^2-1>. By its construction, the set J is indeed an ideal, containing 2187 elements, so it is hard to write or copy all its elements. I want to find a Groebner basis of J, by writing

B =J.groebner_basis(J)

but sage doesn' t know that J is the above ideal. It returns

TypeError: R must be a commutative ring,

I must copy all the elements of J and copy them in the brackets

B= J.groebner_basis(ideal(0, x*y*z - x*y - x*z + y*z - x + y - z, x*z - y*z - x + y - 1, x*y*z + x*y + x*z + y*z - z - 1, x*y + x*z + x - y + z, -x*y*z - x*y + x*z - y*z - x - y - z, ....)),
which, as I said above, is difficult.

Therefore I'd like to know whether there is another way to the task, without copying all the elements of J, and declaring the ideal of these elements, in the argument of the method groebner_basis(). Is there a way to convert a set of elements in a ring (which is an ideal) to the ideal ot the same set ?