Hey everyone:
So, it turns out that Macaulay2 has an inbuilt function to convert it's
ascii output of exponents into a normal string. It can be seen at the end
this example:
reset()
macaulay2.eval("""
K = toField(QQ[zet]/(zet^6 + zet^3 + 1))
A=matrix{{zet^1,0},{0,zet^8}}
needsPackage "InvariantRing"
G=generateGroup({A},K)
P = molienSeries G
X = toString P
""")
sage:
PolynomialRing
| zet 0 |
| 0 -zet^5-zet^2 |
2 2
Matrix K <--- K
InvariantRing
Package
{| 1 0 |, | zet 0 |, | zet^5 0 |, | -zet^3-1 0 |, |
-zet^4-zet 0 |, | zet^3 0 |, | zet^4 0 |, | -zet^5-zet^2 0 |,
| zet^2 0 |}
| 0 1 | | 0 -zet^5-zet^2 | | 0 zet^4 | | 0 zet^3 | | 0
zet^2 | | 0 -zet^3-1 | | 0 zet^5 | | 0 zet | | 0
-zet^4-zet |
List
2 3 4 5 6 7 8
1 - T + T - T + T - T + T - T + T
----------------------------------------
3 6 2 2
(1 + T + T )(1 - T) (1 + T + T )
Expression of class Divide
(1-T+T^2-T^3+T^4-T^5+T^6-T^7+T^8)/((1+T^3+T^6)*(1-T)^2*(1+T+T^2))
So, I want to be able to take that string output and define a Sage function
from it, and then ideally be able to take its Taylor series. here is what
I'm trying:
var('T')
str(T) = macaulay2('X')
str(1)
sage:T
sage:(1-T+T^2-T^3+T^4-T^5+T^6-T^7+T^8)/((1+T^3+T^6)*(1-T)^2*(1+T+T^2))
For some reason, it won't recognize T as a variable and won't let me make a
function out of it. Would anyone have any tricks on making this work?
--
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 https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.