Perhaps I should clarify a couple more things: I have figured out how to do simple Macaulay 2 commands inside a sage script as follows:
macaulay2("S = ZZ/101[t_1 .. t_9, u_1 .. u_9]") However, many of my commands are not working. The code in Macaulay2 which I would like to execute from sage looks like this: mult = I -> ( minPrimes := minimalPrimes I; monomialFreeMinPrimes := select(minPrimes, P -> saturate(P, product gens S) =!= ideal (1_(ring(I)))); sum apply(monomialFreeMinPrimes, P -> degree(I : saturate(I,P))) ) S = QQ[x,y,z] I = ideal(y-x^2, y^2-x*z) mult(I) When I try to define the mult function using the macaulay2() command, I get a syntax error because of the arrow (->). macaulay2( mult = I -> ( minPrimes := minimalPrimes I; monomialFreeMinPrimes := select(minPrimes, P -> saturate(P, product gens S) =!= ideal (1_(ring(I)))); sum apply(monomialFreeMinPrimes, P - > degree(I : saturate(I,P))) ) Also, when I type I=macaulay2(ideal(x^2+y)) I get "error: syntax error at 'of' " Anyway, I know this is a lot of things to ask about, but any help would be appreciated. Thanks! -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org