Changeset 6f4f9c in git for Singular/LIB/chern.lib


Ignore:
Timestamp:
Aug 15, 2019, 5:02:21 PM (5 years ago)
Author:
Sachin <sachinkm308@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
d08c429701793a3ea40aacddaa1284f49fbf6167
Parents:
a910024f22f240ce40b16d4375550fdd82c28a29
git-author:
Sachin <sachinkm308@gmail.com>2019-08-15 17:02:21+02:00
git-committer:
Sachin <sachinkm308@gmail.com>2019-08-27 15:42:13+02:00
Message:
replacing execute with create_ring (6)- using for loops
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/chern.lib

    ra91002 r6f4f9c  
    190190  def br@=basering; // remember the base ring
    191191  // add additional variables to the base ring
    192   execute("ring r@= ("+ charstr(basering) +"),("+varstr(basering)+",c@(1..nV),A@(1..nV)), dp;" );
     192  int ii;
     193  list l2 = ringlist(basering)[2];
     194  for (ii = 1; ii <= nV; ii++)
     195  {
     196   l2[size(l2)+1] = "c@("+string(ii)+")";
     197  }
     198    for (ii = 1; ii <= nV; ii++)
     199  {
     200   l2[size(l2)+1] = "A@("+string(ii)+")";
     201  }
     202  ring r@ = create_ring(ringlist(basering)[1], l2, "dp", "no_minpoly");
    193203  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    194204  ideal V=F(V);
     
    688698    def br@=basering; // remember the base ring
    689699    // add additional variables c@, a@(1..n) to the base ring
    690     execute("ring r@= (" + charstr(basering) + "),(c@,"+varstr(basering)+", a@(1..n)), lp;" );
     700    list l3 = "c@";
     701    l3 = l3+ ringlist(basering)[2];
     702    for (int ii = 1; ii <= n; ii++)
     703    {
     704     l3[size(l3)+1] = "a@("+string(ii)+")";
     705    }
     706    ring r@ = create_ring(ringlist(basering)[1], l3, "lp", "no_minpoly");
    691707    execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    692708    list c=F(c); // embed c in the bigger ring
     
    10181034  def br@=basering; // remember the base ring
    10191035  // add additional variables a@(1..r), b@(1..R), x@ to the base ring
    1020   execute("ring r@=("+ charstr(basering) +"),(x@,"+varstr(basering)+",a@(1..r),b@(1..R)), lp;");
     1036  int ii;
     1037  list l4 = "x@";
     1038  l4 = l4+ ringlist(basering)[2];
     1039  for (ii = 1; ii <= r; ii++)
     1040  {
     1041   l4[size(l4)+1] = "a@("+string(ii)+")";
     1042  }
     1043  for (ii = 1; ii <= R; ii++)
     1044  {
     1045   l4[size(l4)+1] = "b@("+string(ii)+")";
     1046  }
     1047  ring r@ = create_ring(ringlist(basering)[1], l4, "lp", "no_minpoly");
    10211048  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    10221049  list c=F(c); // embed c in the bigger ring
     
    11011128  def br@=basering; // remember the base ring
    11021129  // add  additional variables to the base ring
    1103   execute("ring r@=("+charstr(basering)+"), ("+varstr(basering)+", t@, c@(1..r), C@(1..R)), dp;");
     1130  int ii;
     1131  list l5 = ringlist(basering)[2]; 
     1132  l5[size(l5)+1] = "t@";
     1133  for (ii = 1; ii <= r; ii++)
     1134  {
     1135   l5[size(l5)+1] = "c@("+string(ii)+")";
     1136  }
     1137  for (ii = 1; ii <= R; ii++)
     1138  {
     1139   l5[size(l5)+1] = "C@("+string(ii)+")";
     1140  }
     1141  ring r@ = create_ring(ringlist(basering)[1], l5, "dp", "no_minpoly");
    11041142  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    11051143  list c, C;
     
    12351273  def br@=basering; // remember the base ring
    12361274  // add  additional variables to the base ring
    1237   execute("ring r@=("+charstr(basering)+"), ("+varstr(basering)+", t@, c@(1..r), C@(1..R)), dp;");
     1275  int ii;
     1276  list l6 = ringlist(basering)[2]; 
     1277  l6[size(l6)+1] = "t@";
     1278  for (ii = 1; ii <= r; ii++)
     1279  {
     1280   l6[size(l6)+1] = "c@("+string(ii)+")";
     1281  }
     1282  for (ii = 1; ii <= R; ii++)
     1283  {
     1284   l6[size(l6)+1] = "C@("+string(ii)+")";
     1285  }
     1286  ring r@ = create_ring(ringlist(basering)[1], l6, "dp", "no_minpoly");
    12381287  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    12391288  list c, C;
     
    15711620  def br@=basering; // remember the base ring
    15721621  // add additional variables to the base ring
    1573   execute("ring r@=(" + charstr(basering) +  "),(x@,"+varstr(basering)+", a@(1..r)), lp;" );
     1622  int ii;
     1623  list l7 = "x@";
     1624  l7 = l7+ ringlist(basering)[2];
     1625  for (ii = 1; ii <= r; ii++)
     1626  {
     1627   l7[size(l7)+1] = "a@("+string(ii)+")";
     1628  }
     1629  ring r@ = create_ring(ringlist(basering)[1], l7, "lp", "no_minpoly");
    15741630  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    15751631  list c=F(c); // embed c into the bigger ring
     
    16971753  def br@=basering; // remember the base ring
    16981754  // add  additional variables to the base ring
    1699   execute("ring r@=(" + charstr(basering) +  "), ("+varstr(basering)+", t@, c@(1..r)), dp;" );
     1755  list l8 = ringlist(basering)[2]; 
     1756  l8[size(l8)+1] = "t@";
     1757  for (int ii = 1; ii <= r; ii++)
     1758  {
     1759   l8[size(l8)+1] = "c@("+string(ii)+")";
     1760  }
     1761  ring r@ = create_ring(ringlist(basering)[1], l8, "dp", "no_minpoly");
    17001762  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    17011763  list c;
     
    18631925  def br@=basering; // remember the base ring
    18641926  // add additional variables a@(1..r), x@ to the base ring
    1865   execute("ring r@= (" + charstr(basering) + "), (x@,"+varstr(basering)+", a@(1..r)), lp;" );
     1927  list l9 = "x@";
     1928  l9 = l9+ ringlist(basering)[2];
     1929  for (int ii = 1; ii <= r; ii++)
     1930  {
     1931   l9[size(l9)+1] = "a@("+string(ii)+")";
     1932  }
     1933  ring r@ = create_ring(ringlist(basering)[1], l9, "lp", "no_minpoly");
    18661934  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    18671935  list c = F(c); // embed c into the bigger ring
     
    19912059  def br@=basering; // remember the base ring
    19922060  // add  additional variables to the base ring
    1993   execute("ring r@=(" + charstr(basering) +  "), ("+varstr(basering)+", t@, c@(1..r)), dp;" );
     2061  list l10 = ringlist(basering)[2]; 
     2062  l10[size(l10)+1] = "t@";
     2063  for (int ii = 1; ii <= r; ii++)
     2064  {
     2065   l10[size(l10)+1] = "c@("+string(ii)+")";
     2066  }
     2067  ring r@ = create_ring(ringlist(basering)[1], l10, "dp", "no_minpoly");
    19942068  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    19952069  list c;
     
    21132187    def br@=basering; // remember the base ring
    21142188    // add  additional variables to the base ring
    2115     execute("ring r@=(" + charstr(basering) +  "), ("+varstr(basering)+", a@, c@(1..n)), dp;" );
     2189    list l11 = ringlist(basering)[2]; 
     2190    l11[size(l11)+1] = "a@";
     2191    for (int ii = 1; ii <= n; ii++)
     2192    {
     2193     l11[size(l11)+1] = "c@("+string(ii)+")";
     2194    }
     2195    ring r@ = create_ring(ringlist(basering)[1], l11, "dp", "no_minpoly");
    21162196    execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    21172197    list c=F(c); // embed c into the bigger ring
     
    21952275    def br@=basering; // remember the base ring
    21962276    // add additional variables a@(1..n), x@ to the base ring
    2197     execute("ring r@=(" + charstr(basering) + "), (x@,"+varstr(basering)+", a@(1..n)), lp;" );
     2277    list l12 = "x@";
     2278    l12 = l12+ ringlist(basering)[2];
     2279    for (int ii = 1; ii <= n; ii++)
     2280    {
     2281     l12[size(l12)+1] = "a@("+string(ii)+")";
     2282    }
     2283    ring r@ = create_ring(ringlist(basering)[1], l12, "lp", "no_minpoly");
    21982284    execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    21992285    list c=F(c); // embed c into the bigger ring
     
    30763162  def br@=basering; // remember the base ring
    30773163  // add additional variables t@(1), ... , t@(sz) and u@ to the base ring
    3078   execute("ring r@=("+ charstr(basering) +"),("+varstr(basering)+",t@(1..sz),u@), dp;");
     3164  list l13 = ringlist(basering)[2];
     3165  for (int ii = 1; ii <= sz; ii++)
     3166  {
     3167   l13[size(l13)+1] = "t@("+string(ii)+")";
     3168  }
     3169  l13[size(l13)+1] = "u@";
     3170  ring r@ = create_ring(ringlist(basering)[1], l13, "dp", "no_minpoly");
    30793171  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    30803172  ideal I=F(I); // the ideal generated by I in the new ring
     
    31703262  def br@=basering; // remember the base ring
    31713263  // add additional variables t@(1), ... , t@(sz) and u@ to the base ring
    3172   execute("ring r@=("+ charstr(basering) +"),("+varstr(basering)+",t@(1..sz),u@), dp;");
     3264  list l14 = ringlist(basering)[2];
     3265  for (int ii = 1; ii <= sz; ii++)
     3266  {
     3267   l14[size(l14)+1] = "t@("+string(ii)+")";
     3268  }
     3269  l14[size(l14)+1] = "u@";
     3270  ring r@ = create_ring(ringlist(basering)[1], l14, "dp", "no_minpoly");
    31733271  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    31743272  ideal I=F(I); // the ideal generated by I in the new ring
     
    38833981  int sz=ncols(I);
    38843982  def br@=basering; // remember the base ring
    3885   execute("ring r@=("+ charstr(basering) +"),("+varstr(basering)+",t@(1..sz),u@), dp;");
     3983  list l15 = ringlist(basering)[2];
     3984  for (int ii = 1; ii <= sz; ii++)
     3985  {
     3986   l15[size(l15)+1] = "t@("+string(ii)+")";
     3987  }
     3988  l15[size(l15)+1] = "u@";
     3989  ring r@ = create_ring(ringlist(basering)[1], l15, "dp", "no_minpoly");
    38863990  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    38873991  ideal I=F(I);
Note: See TracChangeset for help on using the changeset viewer.