Changeset c99fd4 in git for Singular/LIB/mregular.lib


Ignore:
Timestamp:
Oct 6, 2008, 7:04:28 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
886b0dae50b58b9f8b0863c63abf2f0ddacf9a26
Parents:
100025a806c37776e35dd4b839e192304f203af8
Message:
*hannes/gmg: elim, select, nselect, select1


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/mregular.lib

    r100025 rc99fd4  
    11// IB/PG/GMG, last modified:  15.10.2004
    22//////////////////////////////////////////////////////////////////////////////
    3 version = "$Id: mregular.lib,v 1.8 2005-05-06 14:38:47 hannes Exp $";
     3version = "$Id: mregular.lib,v 1.9 2008-10-06 17:04:27 Singular Exp $";
    44category="Commutative Algebra";
    55info="
     
    9191//----- If the ideal i is not proper:
    9292   if ( d == -1 )
    93      {
    94        dbprint(printlevel-voice+2,
    95                "// The ideal i is (1)!
     93   {
     94     dbprint(printlevel-voice+2,
     95             "// The ideal i is (1)!
    9696// Its Castelnuovo-Mumford regularity is:");
    97        return (0);
    98      }
     97     return (0);
     98   }
    9999//----- If the ideal i is 0:
    100100   if ( size(I) == 0 )
    101      {
    102        dbprint(printlevel-voice+2,
    103                "// The ideal i is (0)!
     101   {
     102     dbprint(printlevel-voice+2,
     103             "// The ideal i is (0)!
    104104// Its Castelnuovo-Mumford regularity is:");
    105        return (0);
    106      }
     105     return (0);
     106   }
    107107//----- When the ideal i is 0-dimensional:
    108108   if ( d == 0 )
    109      {
    110        H=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
    111        time=rtimer-time;
    112        // Additional information:
    113        dbprint(printlevel-voice+2,
    114                "// Dimension of S/i : 0");
    115        dbprint(printlevel-voice+2,
    116                "// Time for computing regularity: " + string(time) + " sec.");
    117        dbprint(printlevel-voice+2,
     109   {
     110     H=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
     111     time=rtimer-time;
     112     // Additional information:
     113     dbprint(printlevel-voice+2,
     114             "// Dimension of S/i : 0");
     115     dbprint(printlevel-voice+2,
     116             "// Time for computing regularity: " + string(time) + " sec.");
     117     dbprint(printlevel-voice+2,
    118118"// The Castelnuovo-Mumford regularity of i coincides with its satiety, and
    119119 // with the regularity of the Hilbert function of S/i. Its value is:");
    120        return (H);
    121      }
     120     return (H);
     121   }
    122122//----- Determine the situation: NT, or NP, or nothing.
    123123//----- Choose the method depending on the situation, on the
     
    125125//----- in order to get the mon. ideal of nested type associated to i
    126126   if ( e == 1 )
    127      {
    128        ch=0;
    129      }
     127   { ch=0; }
    130128   NPtest=is_NP(I);
    131129   if ( NPtest == 1 )
    132      {
    133        nesttest=is_nested(I);
    134      }
     130   {
     131     nesttest=is_nested(I);
     132   }
    135133   if ( ch != 0 )
    136      {
     134   {
     135     if ( NPtest == 0 )
     136     {
     137       N=d*n-d*(d-1)/2;
     138       s = "ring rtr = (ch,t(1..N)),x(0..n),dp;";
     139       execute(s);
     140       ideal chcoord,m,i,I;
     141       poly P;
     142       map phi;
     143       i=imap(r1,i);
     144       chcoord=select1(maxideal(1),1..(n-d+1));
     145       acc=0;
     146       for ( ii = 1; ii<=d; ii++ )
     147       {
     148         matrix trex[1][n-d+ii+1]=t((1+acc)..(n-d+ii+acc)),1;
     149         m=select1(maxideal(1),1..(n-d+1+ii));
     150         for ( jj = 1; jj<=n-d+ii+1; jj++ )
     151         {
     152           P=P+trex[1,jj]*m[jj];
     153         }
     154         chcoord[n-d+1+ii]=P;
     155         P=0;
     156         acc=acc+n-d+ii;
     157         kill trex;
     158       }
     159       phi=rtr,chcoord;
     160       I=simplify(lead(std(phi(i))),1);
     161       setring r1;
     162       I=imap(rtr,I);
     163       attrib(I,"isSB",1);
     164     }
     165     else
     166     {
     167       if ( nesttest == 0 )
     168       {
     169         N=d*(d-1)/2;
     170         s = "ring rtr = (ch,t(1..N)),x(0..n),dp;";
     171         execute(s);
     172         ideal chcoord,m,i,I;
     173         poly P;
     174         map phi;
     175         i=imap(r1,i);
     176         chcoord=select1(maxideal(1),1..(n-d+2));
     177         acc=0;
     178         for ( ii = 1; ii<=d-1; ii++ )
     179         {
     180           matrix trex[1][ii+1]=t((1+acc)..(ii+acc)),1;
     181           m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
     182           for ( jj = 1; jj<=ii+1; jj++ )
     183           {
     184             P=P+trex[1,jj]*m[jj];
     185           }
     186           chcoord[n-d+2+ii]=P;
     187           P=0;
     188           acc=acc+ii;
     189           kill trex;
     190         }
     191         phi=rtr,chcoord;
     192         I=simplify(lead(std(phi(i))),1);
     193         setring r1;
     194         I=imap(rtr,I);
     195         attrib(I,"isSB",1);
     196       }
     197     }
     198   }
     199   else
     200   {
     201     if ( NPtest == 0 )
     202     {
     203       while ( nl < 30 )
     204       {
     205         chcoord=select1(maxideal(1),1..(n-d+1));
     206         nl=nl+1;
     207         for ( ii = 1; ii<=d; ii++ )
     208         {
     209           ran=random(100,1,n-d+ii);
     210           ran=intmat(ran,1,n-d+ii+1);
     211           ran[1,n-d+ii+1]=1;
     212           m=select1(maxideal(1),1..(n-d+1+ii));
     213           for ( jj = 1; jj<=n-d+ii+1; jj++ )
     214           {
     215             P=P+ran[1,jj]*m[jj];
     216           }
     217           chcoord[n-d+1+ii]=P;
     218           P=0;
     219         }
     220         phi=r1,chcoord;
     221         dbprint(printlevel-voice+2,"// (1 random change of coord.)");
     222         I=simplify(lead(std(phi(i))),1);
     223         attrib(I,"isSB",1);
     224         NPtest=is_NP(I);
     225         if ( NPtest == 1 )
     226         {
     227           break;
     228         }
     229       }
    137230       if ( NPtest == 0 )
    138          {
    139            N=d*n-d*(d-1)/2;
    140            s = "ring rtr = (ch,t(1..N)),x(0..n),dp;";
    141            execute(s);
    142            ideal chcoord,m,i,I;
    143            poly P;
    144            map phi;
    145            i=imap(r1,i);
    146            chcoord=select1(maxideal(1),1,(n-d+1));
    147            acc=0;
    148            for ( ii = 1; ii<=d; ii++ )
    149              {
    150                matrix trex[1][n-d+ii+1]=t((1+acc)..(n-d+ii+acc)),1;
    151                m=select1(maxideal(1),1,(n-d+1+ii));
    152                for ( jj = 1; jj<=n-d+ii+1; jj++ )
    153                  {
    154                    P=P+trex[1,jj]*m[jj];
    155                  }
    156                chcoord[n-d+1+ii]=P;
    157                P=0;
    158                acc=acc+n-d+ii;
    159                kill trex;
    160              }
    161                phi=rtr,chcoord;
    162                I=simplify(lead(std(phi(i))),1);
    163                setring r1;
    164                I=imap(rtr,I);
    165                attrib(I,"isSB",1);
    166          }
    167        else
    168          {
    169            if ( nesttest == 0 )
    170              {
    171                N=d*(d-1)/2;
    172                s = "ring rtr = (ch,t(1..N)),x(0..n),dp;";
    173                execute(s);
    174                ideal chcoord,m,i,I;
    175                poly P;
    176                map phi;
    177                i=imap(r1,i);
    178                chcoord=select1(maxideal(1),1,(n-d+2));
    179                acc=0;
    180                for ( ii = 1; ii<=d-1; ii++ )
    181                  {
    182                    matrix trex[1][ii+1]=t((1+acc)..(ii+acc)),1;
    183                     m=select1(maxideal(1),(n-d+2),(n-d+2+ii));
    184                    for ( jj = 1; jj<=ii+1; jj++ )
    185                      {
    186                        P=P+trex[1,jj]*m[jj];
    187                      }
    188                    chcoord[n-d+2+ii]=P;
    189                    P=0;
    190                    acc=acc+ii;
    191                    kill trex;
    192                  }
    193                phi=rtr,chcoord;
    194                I=simplify(lead(std(phi(i))),1);
    195                setring r1;
    196                I=imap(rtr,I);
    197                attrib(I,"isSB",1);
    198              }
    199          }
    200      }
    201    else
    202      {
    203        if ( NPtest == 0 )
    204          {
    205            while ( nl < 30 )
    206              {
    207                chcoord=select1(maxideal(1),1,(n-d+1));
    208                nl=nl+1;
    209                for ( ii = 1; ii<=d; ii++ )
    210                  {
    211                    ran=random(100,1,n-d+ii);
    212                    ran=intmat(ran,1,n-d+ii+1);
    213                    ran[1,n-d+ii+1]=1;
    214                    m=select1(maxideal(1),1,(n-d+1+ii));
    215                    for ( jj = 1; jj<=n-d+ii+1; jj++ )
    216                      {
    217                        P=P+ran[1,jj]*m[jj];
    218                      }
    219                    chcoord[n-d+1+ii]=P;
    220                    P=0;
    221                  }
    222                phi=r1,chcoord;
    223                dbprint(printlevel-voice+2,"// (1 random change of coord.)");
    224                I=simplify(lead(std(phi(i))),1);
    225                attrib(I,"isSB",1);
    226                NPtest=is_NP(I);
    227                if ( NPtest == 1 )
    228                  {
    229                    break;
    230                  }
    231              }
    232            if ( NPtest == 0 )
    233              {
     231       {
    234232       "// WARNING from proc regIdeal from lib mregular.lib:
    235233// The procedure has entered in 30 loops and could not put the variables
     
    237235// of coordinates may enter an infinite loop when the field is finite.
    238236// Try removing this optional argument.";
    239        return (-1);
    240              }
    241            i=phi(i);
    242            nesttest=is_nested(I);
    243          }
     237         return (-1);
     238       }
     239       i=phi(i);
     240       nesttest=is_nested(I);
     241     }
     242     if ( nesttest == 0 )
     243     {
     244       while ( nl < 30 )
     245       {
     246         chcoord=select1(maxideal(1),1..(n-d+2));
     247         nl=nl+1;
     248         for ( ii = 1; ii<=d-1; ii++ )
     249         {
     250           ran=random(100,1,ii);
     251           ran=intmat(ran,1,ii+1);
     252           ran[1,ii+1]=1;
     253           m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
     254           for ( jj = 1; jj<=ii+1; jj++ )
     255           {
     256             P=P+ran[1,jj]*m[jj];
     257           }
     258           chcoord[n-d+2+ii]=P;
     259           P=0;
     260         }
     261         phi=r1,chcoord;
     262         dbprint(printlevel-voice+2,"// (1 random change of coord.)");
     263         I=simplify(lead(std(phi(i))),1);
     264         attrib(I,"isSB",1);
     265         nesttest=is_nested(I);
     266         if ( nesttest == 1 )
     267         {
     268           break;
     269         }
     270       }
    244271       if ( nesttest == 0 )
    245          {
    246            while ( nl < 30 )
    247              {
    248                chcoord=select1(maxideal(1),1,(n-d+2));
    249                nl=nl+1;
    250                for ( ii = 1; ii<=d-1; ii++ )
    251                  {
    252                    ran=random(100,1,ii);
    253                    ran=intmat(ran,1,ii+1);
    254                    ran[1,ii+1]=1;
    255                    m=select1(maxideal(1),(n-d+2),(n-d+2+ii));
    256                    for ( jj = 1; jj<=ii+1; jj++ )
    257                      {
    258                        P=P+ran[1,jj]*m[jj];
    259                      }
    260                    chcoord[n-d+2+ii]=P;
    261                    P=0;
    262                  }
    263                phi=r1,chcoord;
    264                dbprint(printlevel-voice+2,"// (1 random change of coord.)");
    265                I=simplify(lead(std(phi(i))),1);
    266                attrib(I,"isSB",1);
    267                nesttest=is_nested(I);
    268                if ( nesttest == 1 )
    269                  {
    270                    break;
    271                  }
    272              }
    273            if ( nesttest == 0 )
    274              {
     272       {
    275273       "// WARNING from proc regIdeal from lib mregular.lib:
    276274// The procedure has entered in 30 loops and could not find a monomial
     
    279277// infinite loop when the field is finite.
    280278// Try removing this optional argument.";
    281        return (-1);
    282              }
    283          }
    284      }
     279         return (-1);
     280       }
     281     }
     282   }
    285283//
    286284// At this stage, we have obtained a monomial ideal I of nested type
     
    289287//----- When S/i is Cohen-Macaulay:
    290288   for ( ii = n-d+2; ii <= n+1; ii++ )
    291      {
    292        K=K+select(I,ii);
    293      }
     289   {
     290     K=K+select(I,ii);
     291   }
    294292   if ( size(K) == 0 )
    295      {
    296        s="ring nr = ",charstr(r0),",x(0..n-d),dp;";
    297        execute(s);
    298        ideal I;
    299        I = imap(r1,I);
    300        H=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
    301        time=rtimer-time;
    302        // Additional information:
    303        dbprint(printlevel-voice+2,
     293   {
     294     s="ring nr = ",charstr(r0),",x(0..n-d),dp;";
     295     execute(s);
     296     ideal I;
     297     I = imap(r1,I);
     298     H=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
     299     time=rtimer-time;
     300     // Additional information:
     301     dbprint(printlevel-voice+2,
    304302               "// S/i is Cohen-Macaulay");
    305        dbprint(printlevel-voice+2,
     303     dbprint(printlevel-voice+2,
    306304               "// Dimension of S/i ( = depth(S/i) ): "+string(d));
    307        dbprint(printlevel-voice+2,
     305     dbprint(printlevel-voice+2,
    308306               "// Regularity attained at the last step of m.g.f.r. of i: YES");
    309        dbprint(printlevel-voice+2,
     307     dbprint(printlevel-voice+2,
    310308               "// Regularity of the Hilbert function of S/i: " + string(H-d));
    311        dbprint(printlevel-voice+2,
     309     dbprint(printlevel-voice+2,
    312310               "// Time for computing regularity: " + string(time) + " sec.");
    313        dbprint(printlevel-voice+2,
     311     dbprint(printlevel-voice+2,
    314312               "// The Castelnuovo-Mumford regularity of i is:");
    315        return(H);
    316      }
     313     return(H);
     314   }
    317315//----- When d=1:
    318316   if ( d == 1 )
    319      {
    320        H=maxdeg1(simplify(reduce(quotient(I,maxideal(1)),I),2))+1;
    321        sat=H;
    322        J=subst(I,x(n),1);
    323        s = "ring nr = ",charstr(r0),",x(0..n-1),dp;";
    324        execute(s);
    325        ideal J=imap(r1,J);
    326        attrib(J,"isSB",1);
    327        h=maxdeg1(minbase(quotient(J,maxideal(1))))+1;
    328        time=rtimer-time;
    329        if ( h > H )
    330          {
    331            H=h;
    332          }
    333        // Additional information:
    334        dbprint(printlevel-voice+2,
     317   {
     318     H=maxdeg1(simplify(reduce(quotient(I,maxideal(1)),I),2))+1;
     319     sat=H;
     320     J=subst(I,x(n),1);
     321     s = "ring nr = ",charstr(r0),",x(0..n-1),dp;";
     322     execute(s);
     323     ideal J=imap(r1,J);
     324     attrib(J,"isSB",1);
     325     h=maxdeg1(minbase(quotient(J,maxideal(1))))+1;
     326     time=rtimer-time;
     327     if ( h > H )
     328     {
     329       H=h;
     330     }
     331     // Additional information:
     332     dbprint(printlevel-voice+2,
    335333               "// Dimension of S/i: 1");
    336        dbprint(printlevel-voice+2,
     334     dbprint(printlevel-voice+2,
    337335               "// Depth of S/i: 0");
    338        dbprint(printlevel-voice+2,
     336     dbprint(printlevel-voice+2,
    339337               "// Satiety of i: "+string(sat));
    340        dbprint(printlevel-voice+2,
     338     dbprint(printlevel-voice+2,
    341339               "// Upper bound for the a-invariant of S/i: end(H^1(S/i)) <= "+
    342340               string(h-2));
    343        if ( H == sat )
    344          {
    345            dbprint(printlevel-voice+2,
     341     if ( H == sat )
     342     {
     343       dbprint(printlevel-voice+2,
    346344                   "// Regularity attained at the last step of m.g.f.r. of i: YES");
    347            dbprint(printlevel-voice+2,
     345       dbprint(printlevel-voice+2,
    348346                   "// Regularity of the Hilbert function of S/i: "+string(H));
    349          }
    350        else
    351          {
    352            dbprint(printlevel-voice+2,
     347     }
     348     else
     349     {
     350       dbprint(printlevel-voice+2,
    353351                   "// Regularity attained at the last step of m.g.f.r. of i: NO");
    354          }
    355            dbprint(printlevel-voice+2,
     352     }
     353     dbprint(printlevel-voice+2,
    356354                   "// Time for computing regularity: "+ string(time) + " sec.");
    357            dbprint(printlevel-voice+2,
     355     dbprint(printlevel-voice+2,
    358356                   "// The Castelnuovo-Mumford regularity of i is:");
    359            return(H);
    360      }
     357     return(H);
     358   }
    361359//----- Now d>1 and S/i is not Cohen-Macaulay:
    362360//
    363361//----- First, determine the last variable really occuring
    364        lastv=n-d;
    365        h=n;
    366        while ( lastv == n-d and h > n-d )
    367          {
    368            K=select(I,h+1);
    369            if ( size(K) == 0 )
    370              {
    371                h=h-1;
    372              }
    373            else
    374              {
    375                lastv=h;
    376              }
    377          }
     362   lastv=n-d;
     363   h=n;
     364   while ( lastv == n-d and h > n-d )
     365   {
     366     K=select(I,h+1);
     367     if ( size(K) == 0 )
     368     {
     369       h=h-1;
     370     }
     371     else
     372     {
     373       lastv=h;
     374     }
     375   }
    378376//----- and compute Castelnuovo-Mumford regularity:
    379        s = "ring nr = ",charstr(r0),",x(0..lastv),dp;";
    380        execute(s);
    381        ideal I,K,KK,LL;
    382        I=imap(r1,I);
    383        attrib(I,"isSB",1);
    384        K=simplify(reduce(quotient(I,maxideal(1)),I),2);
    385        H=maxdeg1(K)+1;
    386        firstind=H;
    387        KK=minbase(subst(I,x(lastv),1));
    388        for ( ii = n-lastv; ii<=d-2; ii++ )
    389          {
    390            LL=minbase(subst(I,x(n-ii-1),1));
    391            attrib(LL,"isSB",1);
    392            s = "ring mr = ",charstr(r0),",x(0..n-ii-1),dp;";
    393            execute(s);
    394            ideal K,KK;
    395            KK=imap(nr,KK);
    396            attrib(KK,"isSB",1);
    397            K=simplify(reduce(quotient(KK,maxideal(1)),KK),2);
    398            h=maxdeg1(K)+1;
    399            if ( h > H )
    400              {
    401                H=h;
    402              }
    403            setring nr;
    404            kill mr;
    405            KK=LL;
    406          }
    407        // We must determine one more sat. index:
    408        s = "ring mr = ",charstr(r0),",x(0..n-d),dp;";
    409        execute(s);
    410        ideal KK,K;
    411        KK=imap(nr,KK);
    412        attrib(KK,"isSB",1);
    413        K=simplify(reduce(quotient(KK,maxideal(1)),KK),2);
    414        h=maxdeg1(K)+1;
    415        lastind=h;
    416        if ( h > H )
    417          {
    418            H=h;
    419          }
    420        setring nr;
    421        kill mr;
    422        time=rtimer-time;
    423        // Additional information:
    424        dbprint(printlevel-voice+2,
     377   s = "ring nr = ",charstr(r0),",x(0..lastv),dp;";
     378   execute(s);
     379   ideal I,K,KK,LL;
     380   I=imap(r1,I);
     381   attrib(I,"isSB",1);
     382   K=simplify(reduce(quotient(I,maxideal(1)),I),2);
     383   H=maxdeg1(K)+1;
     384   firstind=H;
     385   KK=minbase(subst(I,x(lastv),1));
     386   for ( ii = n-lastv; ii<=d-2; ii++ )
     387   {
     388     LL=minbase(subst(I,x(n-ii-1),1));
     389     attrib(LL,"isSB",1);
     390     s = "ring mr = ",charstr(r0),",x(0..n-ii-1),dp;";
     391     execute(s);
     392     ideal K,KK;
     393     KK=imap(nr,KK);
     394     attrib(KK,"isSB",1);
     395     K=simplify(reduce(quotient(KK,maxideal(1)),KK),2);
     396     h=maxdeg1(K)+1;
     397     if ( h > H )
     398     {
     399       H=h;
     400     }
     401     setring nr;
     402     kill mr;
     403     KK=LL;
     404   }
     405   // We must determine one more sat. index:
     406   s = "ring mr = ",charstr(r0),",x(0..n-d),dp;";
     407   execute(s);
     408   ideal KK,K;
     409   KK=imap(nr,KK);
     410   attrib(KK,"isSB",1);
     411   K=simplify(reduce(quotient(KK,maxideal(1)),KK),2);
     412   h=maxdeg1(K)+1;
     413   lastind=h;
     414   if ( h > H )
     415   {
     416     H=h;
     417   }
     418   setring nr;
     419   kill mr;
     420   time=rtimer-time;
     421   // Additional information:
     422   dbprint(printlevel-voice+2,
    425423               "// Dimension of S/i: "+string(d));
    426        dbprint(printlevel-voice+2,
     424   dbprint(printlevel-voice+2,
    427425               "// Depth of S/i: "+string(n-lastv));
    428        dbprint(printlevel-voice+2,
     426   dbprint(printlevel-voice+2,
    429427               "// end(H^"+string(n-lastv)+"(S/i)) = "
    430428               +string(firstind-n+lastv-1));
    431        dbprint(printlevel-voice+2,
     429   dbprint(printlevel-voice+2,
    432430               "// Upper bound for the a-invariant of S/i: end(H^"
    433431               +string(d)+"(S/i)) <= "+string(lastind-d-1));
    434        if ( H == firstind )
    435          {
    436            dbprint(printlevel-voice+2,
     432   if ( H == firstind )
     433   {
     434     dbprint(printlevel-voice+2,
    437435                   "// Regularity attained at the last step of m.g.f.r. of i: YES");
    438            dbprint(printlevel-voice+2,
     436     dbprint(printlevel-voice+2,
    439437                   "// Regularity of the Hilbert function of S/i: "
    440438                   +string(H-n+lastv));
    441          }
    442        else
    443          {
    444            dbprint(printlevel-voice+2,
     439   }
     440   else
     441   {
     442     dbprint(printlevel-voice+2,
    445443                   "// Regularity attained at the last step of m.g.f.r. of i: NO");
    446          }
    447        dbprint(printlevel-voice+2,
     444   }
     445   dbprint(printlevel-voice+2,
    448446               "// Time for computing regularity: "+ string(time) + " sec.");
    449        dbprint(printlevel-voice+2,
     447   dbprint(printlevel-voice+2,
    450448               "// The Castelnuovo-Mumford regularity of i is:");
    451        return(H);
     449   return(H);
    452450}
    453451example
     
    648646           map phi;
    649647           i=imap(r1,i);
    650            chcoord=select1(maxideal(1),1,(n-d+1));
     648           chcoord=select1(maxideal(1),1..(n-d+1));
    651649           acc=0;
    652650           for ( ii = 1; ii<=d; ii++ )
    653651             {
    654652               matrix trex[1][n-d+ii+1]=t((1+acc)..(n-d+ii+acc)),1;
    655                m=select1(maxideal(1),1,(n-d+1+ii));
     653               m=select1(maxideal(1),1..(n-d+1+ii));
    656654               for ( jj = 1; jj<=n-d+ii+1; jj++ )
    657655                 {
     
    680678               map phi;
    681679               i=imap(r1,i);
    682                chcoord=select1(maxideal(1),1,(n-d+2));
     680               chcoord=select1(maxideal(1),1..(n-d+2));
    683681               acc=0;
    684682               for ( ii = 1; ii<=d-1; ii++ )
    685683                 {
    686684                   matrix trex[1][ii+1]=t((1+acc)..(ii+acc)),1;
    687                     m=select1(maxideal(1),(n-d+2),(n-d+2+ii));
     685                    m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
    688686                   for ( jj = 1; jj<=ii+1; jj++ )
    689687                     {
     
    709707           while ( nl < 30 )
    710708             {
    711                chcoord=select1(maxideal(1),1,(n-d+1));
     709               chcoord=select1(maxideal(1),1..(n-d+1));
    712710               nl=nl+1;
    713711               for ( ii = 1; ii<=d; ii++ )
     
    716714                   ran=intmat(ran,1,n-d+ii+1);
    717715                   ran[1,n-d+ii+1]=1;
    718                    m=select1(maxideal(1),1,(n-d+1+ii));
     716                   m=select1(maxideal(1),1..(n-d+1+ii));
    719717                   for ( jj = 1; jj<=n-d+ii+1; jj++ )
    720718                     {
     
    750748           while ( nl < 30 )
    751749             {
    752                chcoord=select1(maxideal(1),1,(n-d+2));
     750               chcoord=select1(maxideal(1),1..(n-d+2));
    753751               nl=nl+1;
    754752               for ( ii = 1; ii<=d-1; ii++ )
     
    757755                   ran=intmat(ran,1,ii+1);
    758756                   ran[1,ii+1]=1;
    759                    m=select1(maxideal(1),(n-d+2),(n-d+2+ii));
     757                   m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
    760758                   for ( jj = 1; jj<=ii+1; jj++ )
    761759                     {
     
    10301028           while ( nl < 30 )
    10311029             {
    1032                chcoord=select1(maxideal(1),1,(n-d+1));
     1030               chcoord=select1(maxideal(1),1..(n-d+1));
    10331031               nl=nl+1;
    10341032               for ( ii = 1; ii<=d; ii++ )
     
    10371035                   ran=intmat(ran,1,n-d+ii+1);
    10381036                   ran[1,n-d+ii+1]=1;
    1039                    m=select1(maxideal(1),1,(n-d+1+ii));
     1037                   m=select1(maxideal(1),1..(n-d+1+ii));
    10401038                   for ( jj = 1; jj<=n-d+ii+1; jj++ )
    10411039                     {
     
    10711069           while ( nl < 30 )
    10721070             {
    1073                chcoord=select1(maxideal(1),1,(n-d+2));
     1071               chcoord=select1(maxideal(1),1..(n-d+2));
    10741072               nl=nl+1;
    10751073               for ( ii = 1; ii<=d-1; ii++ )
     
    10781076                   ran=intmat(ran,1,ii+1);
    10791077                   ran[1,ii+1]=1;
    1080                    m=select1(maxideal(1),(n-d+2),(n-d+2+ii));
     1078                   m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
    10811079                   for ( jj = 1; jj<=ii+1; jj++ )
    10821080                     {
     
    15361534   while ( nl < 30 )
    15371535   {
    1538      chcoord=select1(maxideal(1),1,(n-d+1));
     1536     chcoord=select1(maxideal(1),1..(n-d+1));
    15391537     nl=nl+1;
    15401538     for ( ii = 1; ii<=d; ii++ )
     
    15431541       ran=intmat(ran,1,n-d+ii+1);
    15441542       ran[1,n-d+ii+1]=1;
    1545        m=select1(maxideal(1),1,(n-d+1+ii));
     1543       m=select1(maxideal(1),1..(n-d+1+ii));
    15461544       for ( jj = 1; jj<=n-d+ii+1; jj++ )
    15471545       {
Note: See TracChangeset for help on using the changeset viewer.