Hi!

My impression is that relatively often questions on sage-support are
about people accidentally mixing symbolics and polynomials. For
example
    sage: z = var('z')
    sage: R = QQ[z]
and then believing that z is the generator of R.

I think it would avoid trouble if one would print a big warning
message in those cases.
For example:
    sage: z = var('z')
    sage: R = QQ[z]
    WARNING: The globally defined symbolic expression z is *not* a
generator of Univariate Polynomial Ring in z over Rational Field

I think such warning would be useful.

If you agree, we should think about some details.

* Should the polynomial ring constructor check for any given variable
name whether there is a symbolic variable of that name in globals()?
That might be too slow, and it would be annoying to always get a
warning for ZZ['x'].

* Should the warning only be given when a symbolic variable is passed
as an argument to the polynomial ring constructor? Hence, R=QQ[z]
would trigger the warning, but R.<z>=QQ[] would be without warning,
because here only the string 'z' is passed to the ring constructor. In
that case, the warning might better read "WARNING: The given argument
'z' is a symbolic expression; this is not the same as a generator of
Univariate Polynomial Ring in z over Rational Field".

I am in favour of the second scenario: It would be a quick test and
should prevent some typical misuses.

Best regards,
Simon

-- 
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