|   | 1 |  initial version  | 
This seems to work :
sage: R1.<a>=InfinitePolynomialRing(QQ)
sage: reset()
sage: R1.<a>=InfinitePolynomialRing(QQ)
sage: b=a[3]
sage: R1.varname_key(str(b))[1]
3
See R1.varname_key? for further enlightment... ;-)
HTH,
 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.
 
                
                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.