Changeset eb726a2 in git for Singular/LIB/freegb.lib


Ignore:
Timestamp:
Feb 23, 2008, 9:14:12 PM (16 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c1d4a79cef5604c9608af4eb2e48128ef65c70fb
Parents:
51e69e6599c603806d7fea8cc97d5e9f1bec09e9
Message:
*levandov: test files and advanced functions


git-svn-id: file:///usr/local/Singular/svn/trunk@10604 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/freegb.lib

    r51e69e reb726a2  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: freegb.lib,v 1.5 2008-02-15 17:12:41 levandov Exp $";
     2version="$Id: freegb.lib,v 1.6 2008-02-23 20:14:12 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    11651165  A;
    11661166}
     1167
     1168static proc checkCeq()
     1169{
     1170  ring r = 0,(x,y),Dp;
     1171  def A = freegbRing(4);
     1172  setring A;
     1173  A;
     1174  // I = x2-xy
     1175  ideal I = x(1)*x(2) - x(1)*y(2), x(2)*x(3) - x(2)*y(3), x(3)*x(4) - x(3)*y(4);
     1176  ideal C = x(2)-x(1),x(3)-x(2),x(4)-x(3),y(2)-y(1),y(3)-y(2),y(4)-y(3);
     1177  ideal K = I,C;
     1178  groebner(K);
     1179}
     1180
     1181
     1182proc exHom1()
     1183{
     1184  // we start with
     1185  // z*y - x, z*x - y, y*x - z
     1186  LIB "freegb.lib";
     1187  LIB "elim.lib";
     1188  ring r = 0,(x,y,z,h),dp;
     1189  list L;
     1190  module M;
     1191  M = [1,z,y],[-1,x,h]; // zy - xh
     1192  L[1] = M;
     1193  M = [1,z,x],[-1,y,h]; // zx - yh
     1194  L[2] = M;
     1195  M = [1,y,x],[-1,z,h]; // yx - zh
     1196  L[3] = M;
     1197  lst2str(L);
     1198  def U = crs(L,4);
     1199  setring U;
     1200  I = I,
     1201    y(2)*h(3)+z(2)*x(3),     y(3)*h(4)+z(3)*x(4),
     1202    y(2)*x(3)-z(2)*h(3),     y(3)*x(4)-z(3)*h(4);
     1203  I = simplify(I,2);
     1204  ring r2 = 0,(x(0..4),y(0..4),z(0..4),h(0..4)),dp;
     1205  ideal J = imap(U,I);
     1206  //  ideal K = homog(J,h);
     1207  option(redSB);
     1208  option(redTail);
     1209  ideal L = groebner(J); //(K);
     1210  ideal LL = sat(L,ideal(h))[1];
     1211  ideal M = subst(LL,h,1);
     1212  M = simplify(M,2);
     1213  setring U;
     1214  ideal M = imap(r2,M);
     1215  lst2str(U);
     1216}
     1217
     1218static proc test1()
     1219{
     1220  LIB "freegb.lib";
     1221  ring r = 0,(x,y),Dp;
     1222  int d = 10; // degree
     1223  def R = freegbRing(d);
     1224  setring R;
     1225  ideal I = x(1)*x(2) - y(1)*y(2);
     1226  option(prot);
     1227  option(teach);
     1228  ideal J = system("freegb",I,d,2);
     1229  J;
     1230}
     1231
     1232static proc test2()
     1233{
     1234  LIB "freegb.lib";
     1235  ring r = 0,(x,y),Dp;
     1236  int d = 10; // degree
     1237  def R = freegbRing(d);
     1238  setring R;
     1239  ideal I = x(1)*x(2) - x(1)*y(2);
     1240  option(prot);
     1241  option(teach);
     1242  ideal J = system("freegb",I,d,2);
     1243  J;
     1244}
     1245
     1246static proc test3()
     1247{
     1248  LIB "freegb.lib";
     1249  ring r = 0,(x,y,z),dp;
     1250  int d =5; // degree
     1251  def R = freegbRing(d);
     1252  setring R;
     1253  ideal I = x(1)*y(2), y(1)*x(2)+z(1)*z(2);
     1254  option(prot);
     1255  option(teach);
     1256  ideal J = system("freegb",I,d,3);
     1257}
Note: See TracChangeset for help on using the changeset viewer.