On Monday, September 29, 2014 7:44:35 AM UTC-7, Volker Braun wrote:
>
> We talked about this once, afair it is the same in Magma.
>

Except that in magma the print name of variables has no semantic value and 
can be changed at any point.
 

> Really, there is no reason for forbidding it
>

Well, there is 

sage: R.<x,x,x>=QQ[]
sage: SR(R.0+R.1)    #good! at least we get an error
TypeError: 
sage: maxima_calculus(R.0+R.1)
2*x
sage: (R.0+R.1)._singular_()
2*x
sage: (R.0+R.1)._singular_()._sage_()
ValueError: variable names must be alphanumeric, but one is '@(2)' which is 
not.
sage: (R.0+R.1)._pari_()
2*x
sage: (R.0+R.1)._pari_()._sage_() #this is just a general bug; it happens 
for any poly.
NameError: name 'x' is not defined
 

> And deep inside your own code you might want to add a variable to a 
> polynomial ring given to you by the user, and it would be inconvenient to 
> have to pick a letter that is not yet present in the user input.
>
> I agree with that, although I would expect this is more important for 
things like  QQ['x','y']['x'], where the clash as noted above would only 
manifest itself at a later stage if one tries to flatten the polynomial 
ring tower).

The end result is that sage in principle should be able to handle such 
polynomial rings, but because it's a scenario people will not normally 
count on, and does need some extra care, so in practice there will always 
be bugs arising around this--hopefully failures, but as you can see above, 
possibly wrong results.

I'm not quite sure what we should do with a misfeature like this. For 
orthogonality it is nice to not put any non-local restrictions on variable 
names, but it seems we don't have the infrastructure to enforce that such 
objects keep behaving reasonably.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to