You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even if there are identical generator and variable names there should not be a problem to convert from a univariate polynomial with symbolic coefficients to a symbolic expression, but:
sage: S.<y> = PolynomialRing(SR)
sage: p = y^2 + pi*y + 1
sage: p.coefficients()
[1, pi, 1]
sage: ex = SR(p)
...
TypeError: not a constant polynomial
I think we'll get more mileage out of educating users how to define the morphisms they need than trying to stuff every possible operation into conversion (although the one you propose here wouldn't necessarily be a problem by itself. You'll just have that S(SR(p)) != p, which will be a little surprising (and the fact that S(..) maps elements of SR to constants will be very hard to change, or at least cause big problems down the line if you do)
Even if there are identical generator and variable names there should not be a problem to convert from a univariate polynomial with symbolic coefficients to a symbolic expression, but:
See #20453 and #20312 for motivation.
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/20454
The text was updated successfully, but these errors were encountered: