I would be for dropping 'x' as the only "default" variable (defined at start time). Sage is unique in this sense AFAIK; there are CASes which don't require declaration of any variable, there are ones that don't have any special variables like Sage's 'x'.
On Wednesday, February 28, 2018 at 8:00:34 AM UTC, Simon King wrote: > > Hi Ralf, > > On 2018-02-28, Ralf Stephan <gtr...@gmail.com <javascript:>> wrote: > > The reason is apparently that the polynomial ring was not created by the > > user on the command line but by the charpoly() code. > > The parent of the pre-defined variable x wasn't created by the user > either, so, please don't blame polynomial rings or the > minpoly()/charpoly() code for it. > > sage: QQbar(sqrt(2)).minpoly().parent() > Univariate Polynomial Ring in x over Rational Field > sage: x.parent() > Symbolic Ring > > > > i would consider this a high priority bug. Is there a ticket? > > Not in the way you think, IMHO. > > One problem that I see is the fact that it is possible to create rings > in which one variable name occurs twice, such as here: > sage: RR['x']['x'] > Univariate Polynomial Ring in x over Univariate Polynomial Ring in x > over Real Field with 53 bits of precision > sage: RR['x'].gen()-RR['x']['x'].gen() > -x + x > sage: _==0 > False > > So, we have two x with different roles. It would make sense to disallow > the creation of such rings. > > Also, I belive it is a bug that x is pre-defined as a symbolic variable; > we should finally drop that pseudo-courtesy. Users mistake FAR too often > symbolics with polynomials; by pre-defining x, we let the users believe > that x is good for *all* computations. So, I believe it would be better > to let the user create x him/herself, for the specific application that > he/she has in mind. However, I am aware that I belong to a minority with > that opinion. > > Best regards, > Simon > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.