This took me a fair while to track down.
sage:
m=matrix(GF(3),[[0,1,0,0,0,0],[0,0,1,0,0,0],[0,0,0,1,0,0],[0,0,0,0,1,0],[0,0,0,0,0,1],[2,2,0,1,0,0]])
# random 6x6 matrix
sage: g=m.charpoly('x')
sage: g
x^6 + x^3 + 2*x + 2
[I've just build a degree 6 poly. Now let's build a degree 12 one]
sage: h=expand((g.subs(x+2/x))*x^6)
[easy check shows that this will have degree 12]
sage: h
2*x^5 + x^3 + 1
[gaargh]
Am I some sort of a victim of some secret property of the letter 'x'? I
wanted to use x rather than another letter because that would save me from
having to define the ring GF(3)[x,1/x] which would have involved some
thinking on my part ;-)
PS change x+2/x to x+GF(3)(2)/x and it works fine ;-)
Kevin
--
You received this message because you are subscribed to the Google Groups
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.