Hi,

I'm using macaulay2.eval(""" """) to evaluate a block of text in
macaulay2.  I would like to define an ideal outside of that block of
macaulay2 code and use it inside the block of macaulay2 code. It seems
that when I define an ideal outside of the macaulay2 section, that
ideal does not have type ideal within the macaulay2 section.

Here is my code:

x=var('x')
y = var('y')
id = ideal(x^2+y^2)

print macaulay2.eval("""

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 = id;
print mult(I)

""")


When I run this code, I get the error
stdio:85:18:(3):[2]: error: no method found for applying minimalPrimes
to:
     argument   :  id (of class ScriptedFunctor)


Inside the macaulay2 block, it seems that id is not the ideal type any
more, and I don't know how I can make it an ideal. Any help?


Thanks!

Mel DUnn

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to