Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just in case this is helpful for anyone else, here is the functional code answering my original question:

R.<y1, y2> = PolynomialRing(GF(3))   
I = R.ideal(y1^3, y2^3)
S = R.quotient_ring(I)

# group action
def transform(poly):
    return S(poly.lift().subs(y1=y1 + 1, y2=y2 - y1^2 - y1))

#iterating the group action
def right_iterate(n, g, poly):
    gg = poly
    for k in range(n):
        gg = g(gg)
    return gg 

#defining the basis
E = list(map(S, [1, y1, y1^2, y1*y2, y2, y2^2, y1^2*y2, y1*y2^2, y1^2*y2^2]))
indices = {monom: i for i, monom in enumerate(E)}

for poly in E:
    mat = []
    for i in range(9):
        v = [0]*len(E)
        image = right_iterate(i,transform,poly).lift()
        for c, m in zip(image.coefficients(), image.monomials()):
            v[indices[m]] = c
        mat.append(v)
    mat = matrix(mat).transpose()
    print("__")
    print(poly)
    print(mat.echelon_form())

Just in case this is helpful for anyone else, here is the functional code answering my original question:

R.<y1, y2> = PolynomialRing(GF(3))   
I = R.ideal(y1^3, y2^3)
S = R.quotient_ring(I)

# group action
def transform(poly):
    return S(poly.lift().subs(y1=y1 + 1, y2=y2 - y1^2 - y1))

#iterating the group action
def right_iterate(n, g, poly):
    gg = poly
    for k in range(n):
        gg = g(gg)
    return gg 

#defining the basis
E = list(map(S, [1, y1, y1^2, y1*y2, y2, y2^2, y1^2*y2, y1*y2^2, y1^2*y2^2]))
indices = {monom: i for i, monom in enumerate(E)}

for poly in E:
    mat = []
    for i in range(9):
        v = [0]*len(E)
        image = right_iterate(i,transform,poly).lift()
        for c, m in zip(image.coefficients(), image.monomials()):
            v[indices[m]] = c
        mat.append(v)
    mat = matrix(mat).transpose()
    print("__")
    print(poly)
    print(mat.echelon_form())
print(mat.echelon_form().row_space())