#14403: Symbolic charpoly broken
-----------------------------+--------------------------
Reporter: nbruin | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-5.11
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Dependencies:
Stopgaps: |
-----------------------------+--------------------------
Comment (by nbruin):
Replying to [comment:9 gagern]:
> I must confess I don't understand the difference. In my understanding,
both the approach via `coefficients` and the one via
`expression.polynomial` are intended to turn an expression representation
of a polynomial into an element of the polynomial ring.
Just look up the source code of `expression.polynomial`; you'll quickly
see it's not a routine you want to call unless you really have to. The
difference is that we already know with respect to which variable we want
to collect the terms. The routine `polynomial` tries to recognize the
thing as a polynomial in whatever variables (hence the problems with
`y^(1/2)`)
> Sounds like there were a central store of assigned variables, which I
hadn't anticipated. Haven't looked at the SR sources yet.
Correct. This is the case in both maxima and in SR and necessarily
permanently so in the translation layer between them (we cannot monitor
the lifetime in both simultaneously)
> There is no strong reason to use the same name in the maxima computation
and for the symbolic ring. The original ticket used `'crazy_varname'` for
one and `var` for the other. On the other hand, I don't feel like relying
on the fact that `'crazy_varname'` will be unlikely to occur in the
matrix.
How about `do_not_use_this_name_in_a_matrix_youll_compute_a_charpol_of`
then? It saves you digging through all the variables occurring in the
matrix unnecessarily.
> I feel safer using a variable name which is certainly unique. And if I
do the work to find such a vriable name, I might as well use the same for
the computation in maxima and for the presentation as a polynomial. After
all, ''always'' using `x` as the variable name by default feels plain
wrong if the matrix itself does contain an `x`. That kind of overloading
is bound to cause confusion.
For me, explicit is better than implicit: If I'm going to do something
with a charpol, I need to know in what variable it has been expressed, so
the system choosing a relatively unpredictable name is no good.
--
Ticket URL: <http://trac.sagemath.org/ticket/14403#comment:10>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.