#10483: Deprecate the misuse of symbolic variables as polynomial variable
-----------------------------------+----------------------------------------
Reporter: SimonKing | Owner: AlexGhitza
Type: defect | Status: needs_info
Priority: major | Milestone: sage-4.6.1
Component: basic arithmetic | Keywords: deprecation symbolic
polynomial variable
Author: Simon King | Upstream: N/A
Reviewer: Karl-Dieter Crisman | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
Changes (by kcrisman):
* status: needs_review => needs_info
Comment:
Upon further reflection, I think that one would have to change a lot more
of the doctests where `x` is used. This is because even though changing
things so that they use `SR['x']` instead of `SR[x]` is good, the same
potential for confusion remains. The very first example in the patch
provides the opportunity for this:
{{{
sage: R = SR['x']
sage: f = R([1/sqrt(2), 1/(4*sqrt(2))])
sage: f
1/8*sqrt(2)*x + 1/2*sqrt(2)
sage: type(f)
<class
'sage.rings.polynomial.polynomial_element_generic.Polynomial_generic_dense_field'>
sage: type(1/8*sqrt(2)*x + 1/2*sqrt(2))
<type 'sage.symbolic.expression.Expression'>
sage: type(x)
<type 'sage.symbolic.expression.Expression'>
sage: type(R.gen())
<class
'sage.rings.polynomial.polynomial_element_generic.Polynomial_generic_dense_field'>
}}}
I don't think we want to actually prohibit this - x is so conventional -
but the doctests should all definitely be changed so that some variable
other than the ''one default variable actually pre-defined by Sage'' is
used with polynomial rings! And we might want to put more warnings about
this in the polynomial ring generator docs anyway. Not to mention the
tutorial :)
So putting 'needs info' until we think about what the best course of
action is. But I don't want to just change these doctests, because it
hides the real ambiguity, since 'x' is predefined as a variable when Sage
initializes - which it should.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10483#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.