I am having problems simply defining a multivariate polynomial. I have
a slightly modified excerpt from a very helpful python script I was
given that looks like

#!/opt/sage-4.3.3-linux-32bit-ubuntu_9.10-i686-Linux/sage -python

import sys
from sage.all import *

from polybori.blocks import declare_ring
from polybori.blocks import HigherOrderBlock

index1_range=range(2)
index2_range=range(2)
index3_range=range(3)
size=(len(index1_range),len(index2_range),len(index3_range))
declare_ring([HigherOrderBlock("alpha",size),HigherOrderBlock("beta",size),HigherOrderBlock("gamma",size)],
globals())
def delta(a,b,c,d,i,j,k):
    if b==c and i==a and j==d:
        return 1
    else:
        return 0

ideal=[ sum([alpha(a,b,k)*beta(c,d,k)*gamma(i,j,k) for k in
index3_range]) + delta(a,b,c,d,i,j,k) for  a in index1_range\
    for b in index2_range for c in index1_range\
    for d in index2_range for i in index1_range for j in
index2_range ]


I would like "ideal" to be an ideal so I can do things like
ideal.groebner_basis() . Sorry for the dim question but how do I do
that?

Raphael

-- 
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

Reply via email to