Changes between Version 1 and Version 20 of Ticket #13360


Ignore:
Timestamp:
12/06/13 14:13:44 (8 years ago)
Author:
jdemeyer
Comment:

One problem with your solution 3) is that the symbolic polynomial is not given in expanded form. I'm wondering if there is a proper way to evaluate a polynomial at a symbolic argument and get the symbolic polynomial in expanded form. I don't want to use expand(), because maybe I only want to expand the polynomial, not the argument in case the argument is something complicated.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13360

    • Property Status changed from new to needs_review
    • Property Milestone changed from sage-5.11 to sage-5.12
  • Ticket #13360 – Description

    v1 v20  
    3333namely just substituting a symbolic variable:
    3434{{{
    35   sage: R.<t> = PolynomialRing(ZZ,'t')
    36   sage: f = t^2 - t
    37   sage: t = var('t')
    38   sage: f(t)
    39   t^2 - t
    40   sage: f(t).parent()
    41   Symbolic Ring
     35sage: R.<t> = PolynomialRing(ZZ,'t')
     36sage: f = t^2 - t
     37sage: t = var('t')
     38sage: f(t)
     39(t - 1)*t
     40sage: f(t).parent()
     41Symbolic Ring
    4242}}}
    43   This has the advantage that the conversion is explicit.
     43This has the advantage that the conversion is explicit.
    4444
    45454) Philosophically, I would say that the name of the variable is just a display label, but as it is, it has the side effect of determining what variable to coerce to. Then if you want to return a polynomial from a library routine, you can't be sure that it won't collide with a user-defined variable upon coercion.