obj getRing rr ring rr; getRing obtains the ring structure from obj. If obj is a polynomial, it returns the ring structure associated to the polynomial. If obj is an array, it recursively looks for the ring structure.