That just leaves the question of inventing a new variable name given
any n names already defined...

I think the plan you suggested was reasonable. I suggest determining if all names have a common prefix, then seeing if each suffix is an integer. If yes, take the next largest integer suffix, so x1, x2, x3 - > x4, etc. If no, a unique name is certainly given by concatenating all the existing names. It will be ugly, but it will be unique.

Nick
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to