| 1 | initial version |
Would the following 'flatten' function do the job?
def flatten(R):
v = []
while True:
g = R.gens()
if g[0].is_unit():
break
v.extend(g)
R = R.base_ring()
return PolynomialRing(R,v)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.