Hello, all! I am having the ERROR x7 already used error in sage. I have something like this:
for i in range(0, 4): R = gen_ring(special flags, i) do_stuff_to_ring(R)
This code basically creates a ring with the variables ordered in weird ways. Like when i = 0, the order is x11, x2, x7... And the next time, the order would be x13, x7, x9, x2... or something like that, and the dimension of the ring variables is different too. The problem is that when I call gen_ring the SECOND time, when i = 1, it says that the ring already has a variable x7.
I've tried writing a special function to clear the variables, and I did reset(var) for every variable in the ring. I tried del var, and del ring, and also reset(R), but that did not work. I didn't try R = None. I will tomorrow! I am just looking for how to wipe the variables out of the namespace. If I do reset(), ALL the variables are cleared, including the special flags, and the loop counter even. Blergh!
Hopefully some one can help? This cannot be an usual thing to want to do...
Thank you! Susan