Changeset f054d7f in git


Ignore:
Timestamp:
Feb 21, 2023, 1:12:34 PM (15 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
ede789c230c363f25cabc9b86289353362a7e251
Parents:
0bb60db105363114233b0a88c89897236f812275
Message:
fix: remove some execute from ainvar, brnoeth, chern.lib
Location:
Singular/LIB
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ainvar.lib

    r0bb60d rf054d7f  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="version ainvar.lib 4.1.2.0 Feb_2019 "; // $Id$
     2version="version ainvar.lib 4.3.1.3 Feb_2023 "; // $Id$
    33category="Invariant theory";
    44info="
     
    6464"
    6565{
    66   execute (typeof(id)+ " j;");
    6766  ideal I = ideal(id);
    6867  matrix mh=matrix(jacob(I))*m;
    69   if(typeof(j)=="poly")
    70   { j = mh[1,1];
     68  if(typeof(id)=="poly")
     69  { poly j = mh[1,1];
    7170  }
    7271  else
    73   { if (typeof(j)=="vector") { j = mh[1]; /*the first column*/ }
    74     else { j = ideal(mh[1]);}
     72  { if (typeof(id)=="vector") { vector j = mh[1]; /*the first column*/ }
     73    else { ideal j = ideal(mh[1]);}
    7574  }
    7675  return(j);
     
    422421  def br=basering;
    423422  ideal su;
     423  list @l;
    424424  for (i=1; i<=z; i++)
    425425  {
    426426    su[i]=subst(id[i],q,0);
     427    @l[i]="y("+string(i)+")";
    427428  }
    428429  // -- define the map phi : r1 ---> br defined by y(i) ---> id[i](q=0) --
    429   execute ("ring r1="+charstr(basering)+",(y(1..z)),dp;");
     430  def r1=ring(list(ring_list(br)[1],@l,list(list("dp",1:z)),ideal(0)));
    430431  setring br;
    431432  map phi=r1,su;
  • Singular/LIB/brnoeth.lib

    r0bb60d rf054d7f  
    141141    s=size(facts);
    142142    poly g;
    143     string sg;
    144143    for (i=1;i<=s;i=i+1)
    145144    {
    146145      g=facts[i];
    147       sg=string(g);
    148146      setring raux1;
    149       execute("G="+sg+";");
     147      G=imap(raux2,g);
    150148      G=subst(G,@a,y);
    151149      setring BR;
     
    246244    export(CHI);
    247245    kill embpol;
    248     string s=string(subst(CHI,z,1));
     246    poly s=subst(CHI,z,1);
    249247    setring aff_r;
    250     execute("poly CHI="+s+";");
     248    poly CHI=imap(Proj_R,s);
    251249    export(CHI);
    252250    ideal Aff_SLocus=s_locus(CHI);
     
    580578  // computes the residual degree of the basering with respect to its prime
    581579  //   field
    582   // warning : minpoly must depend on a parameter called "a"
    583580  int ext;
    584581  string s_m=string(minpoly);
     
    589586  else
    590587  {
    591     ring auxr=char(basering),a,lp;
    592     execute("poly minp="+s_m+";");
    593     ext=deg(minp);
     588    ext=pardeg(minpoly);
    594589  }
    595590  return(ext);
     
    781776  else
    782777  {
    783     if (old_m<>string(0))
     778    if (old_m<>"0")
    784779    {
    785780      ring auxring=char(basering),(a,x),lp;
  • Singular/LIB/chern.lib

    r0bb60d rf054d7f  
    11////////////////////////////////////////////////////////////////
    2 version = "version chern.lib 4.1.3.0 Apr_2020 "; // $Id$
     2version = "version chern.lib 4.3.1.3 Feb_2023 "; // $Id$
    33category = "Chern classes";
    44info="
     
    258258  setring br@; // come back to the initial base ring
    259259  // define the specialization homomorphism
    260   execute("map FF = r@,"+varstr(br@)+",c[1..nV], V[1..nV];");
     260  map FF = r@,maxideal(1),c[1..nV], V[1..nV];
    261261  return( list( FF(rez1), FF(rez2) ) );
    262262}
     
    726726    }
    727727    ring r@ = create_ring(ring_list(basering)[1], l3, "lp", "no_minpoly");
    728     execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    729     list c=F(c); // embed c in the bigger ring
     728    // define the corresponding inclusion of rings: imap
     729    list c=imap(br@,c); // embed c in the bigger ring
    730730    poly rez;
    731731    list A=a@(1..n);
     
    742742    rez = -subst(I[1], c@, 0);
    743743    setring br@; // come back to the initial base ring
    744     execute( "map FF= r@,0,"+varstr(br@)+";" ); // define the specialization homomorphism
     744    map FF= r@,0,maxideal(1); // define the specialization homomorphism
    745745    poly rez=FF(rez); // bring the result to the base ring
    746746    return( (1/factorial(n))*rez);
     
    10671067  }
    10681068  ring r@ = create_ring(ring_list(basering)[1], l4, "lp", "no_minpoly");
    1069   execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    1070   list c=F(c); // embed c in the bigger ring
    1071   list C=F(C); // embed C in the bigger ring
     1069  // define the corresponding inclusion of rings: imap
     1070  list c=imap(br@,c); // embed c in the bigger ring
     1071  list C=imap(br@,C); // embed C in the bigger ring
    10721072  list A=a@(1..r); // list of Chern roots of the first vector bundle
    10731073  list syma = symm(A); // symmetric functions in the Chern roots of the first vector bundles
     
    10981098  }
    10991099  setring br@; // come back to the initial base ring
    1100   execute( "map FF= r@, 0,"+varstr(br@)+";" ); // define the specialization homomorphism t@=0
     1100  map FF= r@, 0,maxideal(1); // define the specialization homomorphism t@=0
    11011101  list rez=FF(rez); // bring the result to the base ring
    11021102  return(rez); // return the corresponding Chern classes
     
    11611161  }
    11621162  ring r@ = create_ring(ring_list(basering)[1], l5, "dp", "no_minpoly");
    1163   execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    11641163  list c, C;
    11651164  int i;
     
    11821181  setring br@; // come back to the initial base ring
    11831182  // define the specialization homomorphism
    1184   execute("map FF = r@,"+varstr(br@)+",0, c[1..r], C[1..R];");
     1183  map FF = r@,maxideal(1),0, c[1..r], C[1..R];
    11851184  return( FF( rez ) ); // bring the result to the initial ring
    11861185}
     
    13061305  }
    13071306  ring r@ = create_ring(ring_list(basering)[1], l6, "dp", "no_minpoly");
    1308   execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    13091307  list c, C;
    13101308  int i;
     
    13271325  setring br@; // come back to the initial base ring
    13281326  // define the specialization homomorphism
    1329   execute("map FF = r@,"+varstr(br@)+",0, c[1..r], C[1..R];");
     1327  map FF = r@,maxideal(1),0, c[1..r], C[1..R];
    13301328  return( FF( rez ) ); // bring the result to the initial ring
    13311329}
     
    16491647  }
    16501648  ring r@ = create_ring(ring_list(basering)[1], l7, "lp", "no_minpoly");
    1651   execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    1652   list c=F(c); // embed c into the bigger ring
     1649  // define the corresponding inclusion of rings: imap
     1650  list c=imap(br@,c); // embed c into the bigger ring
    16531651  list rez; // the Chern classes of the symmetric power are going to be written here
    16541652  poly E = product( list( a@(1..r ) )  ); // product of the Chern roots
     
    17251723  // define the specialization homomorphism,
    17261724  // evaluate the formulas for the Chern classes on their given values
    1727   execute( "map FF = r@,0,"+varstr(br@)+";" );
     1725  map FF = r@,0,maxideal(1);
    17281726  list rez=FF( rez ); // bring the result back to the initial ring
    17291727  return( list( N, rez  ) ); // return the result together with the rank of the symmetric power
     
    17811779  }
    17821780  ring r@ = create_ring(ring_list(basering)[1], l8, "dp", "no_minpoly");
    1783   execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    17841781  list c;
    17851782  for(i=1;i<=r;i++)
     
    17961793  }
    17971794  setring br@; // come back to the initial base ring
    1798   execute("map FF = r@,"+varstr(br@)+",0, c[1..r];"); // define the specialization homomorphism
     1795  map FF = r@,maxideal(1),0, c[1..r]; // define the specialization homomorphism
    17991796  return( list(N, FF( rez )) ); // bring the result to the initial ring
    18001797}
     
    19531950  }
    19541951  ring r@ = create_ring(ring_list(basering)[1], l9, "lp", "no_minpoly");
    1955   execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    1956   list c = F(c); // embed c into the bigger ring
     1952  // define the corresponding inclusion of rings: imap
     1953  list c = imap(br@,c); // embed c into the bigger ring
    19571954  list rez; // the result should be computed here
    19581955  poly E = product( list( a@(1..r ) )  ); // product of the Chern roots to be eliminaned
     
    20312028  // define the specialization homomorphism,
    20322029  // evaluate the formulas for the Chern classes on their given values
    2033   execute( "map FF = r@,0,"+varstr(br@)+";" );
     2030  map FF = r@,0,maxideal(1);
    20342031  list rez=FF( rez ); // bring the result back to the initial ring
    20352032  return( list( N, rez  ) ); //return the rank and the Chern classes of the exterior product
     
    20872084  }
    20882085  ring r@ = create_ring(ring_list(basering)[1], l10, "dp", "no_minpoly");
    2089   execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    20902086  list c;
    20912087  for(i=1;i<=r;i++)
     
    21022098  }
    21032099  setring br@; // come back to the initial base ring
    2104   execute("map FF = r@,"+varstr(br@)+",0, c[1..r];"); // define the specialization homomorphism
     2100  map FF = r@,maxideal(1),0, c[1..r]; // define the specialization homomorphism
    21052101  return( list(N, FF( rez )) ); // bring the result to the initial ring
    21062102}
     
    22152211    }
    22162212    ring r@ = create_ring(ring_list(basering)[1], l11, "dp", "no_minpoly");
    2217     execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    2218     list c=F(c); // embed c into the bigger ring
     2213    // define the corresponding inclusion of rings: imap
     2214    list c=imap(br@,c); // embed c into the bigger ring
    22192215    list prev;
    22202216    list next;
     
    22512247    next = delete(next, 1); // throw away the zeroth term which is always equal to 1
    22522248    setring br@; // come back to the initial base ring
    2253     execute("map FF = r@,"+varstr(br@)+",0, c[1..n];"); // define the specialization homomorphism
     2249    map FF = r@,maxideal(1),0, c[1..n]; // define the specialization homomorphism
    22542250    return( FF( next ) ); // bring the result to the initial ring
    22552251  }
     
    23032299    }
    23042300    ring r@ = create_ring(ring_list(basering)[1], l12, "lp", "no_minpoly");
    2305     execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    2306     list c=F(c); // embed c into the bigger ring
     2301    // define the corresponding inclusion of rings: imap
     2302    list c=imap(br@,c); // embed c into the bigger ring
    23072303    int j;
    23082304    int k;
     
    23322328    setring br@; // come back to the initial base ring
    23332329    // define the specialization homomorphism (all added variables are set to zero)
    2334     execute( "map FF = r@,0, "+varstr(br@)+";" );
     2330    map FF = r@,0,maxideal(1);
    23352331    poly rez=FF( rez ); // bring the result back to the initial base ring
    23362332    return(rez);
Note: See TracChangeset for help on using the changeset viewer.