# # jython examples for jas. from jas import Module from jas import SubModule # Armbruster module example r = Module( "Rat(u,v,l) L" ); print "Module: " + str(r); print; ps = """ ( ( ( 1 ), ( 2 ), ( 0 ), ( l^2 ) ), ( ( 0 ), ( l + 3 v ), ( 0 ), ( u ) ), ( ( 1 ), ( 0 ), ( 0 ), ( l^2 ) ), ( ( l + v ), ( 0 ), ( 0 ), ( u ) ), ( ( l^2 ), ( 0 ), ( 0 ), ( v ) ), ( ( u ), ( 0 ), ( 0 ), ( v l + v^2 ) ), ( ( 1 ), ( 0 ), ( l + 3 v ), ( 0 ) ), ( ( l^2 ), ( 0 ), ( 2 u ), ( v ) ), ( ( 0 ), ( 1 ), ( l + v ), ( 0 ) ), ( ( 0 ), ( l^2 ), ( u ), ( 0 ) ), ( ( 0 ), ( v ), ( u l^2 ), ( 0 ) ), ( ( 0 ), ( v l + v^2 ), ( u^2 ), ( 0 ) ) ) """; f = SubModule( r, ps );
print "s9 = " + str(s9); s10 = s9 - s7; print "s10 = " + str(s10); print; print "------- SubModule(PolyRing(QQ(),\"u, v, l\",PolyRing.lex) ---------"; p = PolyRing(QQ(),"u, v, l",PolyRing.lex); print "p = " + str(p); [one,u,v,l] = p.gens(); print "one = " + str(one); print "u = " + str(u); print "v = " + str(v); print "l = " + str(l); m = Module(ring=p,cols=4); print "m = " + str(m); for g in m.gens(): print "g =", str(g); m1 = ( 0, 1, l + v, 0 ) m2 = ( 0, v, u * l**2, 0 ) m3 = ( 0, l + 3 * v, 0, u ) m4 = ( 0, v * l + v**2, u**2, 0 ) m5 = ( 0, l**2, u, 0 ) m6 = ( 1, 0, 0, l**2 ) m7 = ( 1, 0, l + 3 * v, 0 ) m8 = ( 1, 2, 0, l**2 ) m9 = ( u, 0, 0, v * l + v**2 ) m10 = ( l + v, 0, 0, u ) m11 = ( l**2, 0, 0, v )
# # jython examples for jas. from jas import PolyRing, QQ, Module #, SubModule # module example p = PolyRing(QQ(),"u,v,l", PolyRing.lex); #r = Module( "Rat(u,v,l) L", cols=4 ); r = Module( "", p, cols=4 ); print "Module: " + str(r); print; G = r.gens(); print "gens() = ", [str(e) for e in G]; L = [ e.elem.val for e in G ] print "gens() = ", [str(e) for e in L]; M = r.submodul( list=L ); print "M = ", M; P = M.mset.getPolynomialList(); print "P = ", P.toScript(); print "M.isGB(): ", M.isGB();
# # jython examples for jas. from jas import PolyRing, QQ, Module # , SubModule # module example p = PolyRing(QQ(), "u,v,l", PolyRing.lex) # r = Module( "Rat(u,v,l) L", cols=4 ); r = Module("", p, cols=4) print "Module: " + str(r) print G = r.gens() print "gens() = ", [str(e) for e in G] L = [e.elem.val for e in G] print "gens() = ", [str(e) for e in L] M = r.submodul(list=L) print "M = ", M P = M.mset.getPolynomialList() print "P = ", P.toScript() print "M.isGB(): ", M.isGB()