Changeset d610dc in git for Singular/LIB/finvar.lib


Ignore:
Timestamp:
Jan 30, 2007, 12:05:10 PM (17 years ago)
Author:
Simon King <king@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
c1d38666da061feb6b0500e6b192b79f8589f326
Parents:
39c40f9402956fa6907f5f3f869d9402506f6a9b
Message:
Bugfix in finvar.lib, functions (irred_)secondary_char0 and
secondary_charp and secondary_no_molien.


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/finvar.lib

    r39c40f rd610dc  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: finvar.lib,v 1.56 2007-01-27 15:03:55 Singular Exp $"
     2version="$Id: finvar.lib,v 1.57 2007-01-30 11:05:10 king Exp $"
    33category="Invariant theory";
    44info="
     
    47144714        { "There are irreducible secondary invariants in degree ", i-1," !";
    47154715        }
    4716         if (i>IrrSwitch)  // use sparse algorithm
    4717         { mon = kbase(sP,i-1);
    4718 //          mon = ideal(mon[ncols(mon)..1]);
    4719           if (counter==0 && ncols(mon)==int(dimmat[i,1])) // then we can use all of mon
     4716        mon = kbase(sP,i-1);
     4717//        mon = ideal(mon[ncols(mon)..1]);
     4718        ii = ncols(mon);
     4719        if ((i>IrrSwitch) or (ii>200)) // use sparse algorithm
     4720        { if (counter==0 && ii==int(dimmat[i,1])) // then we can use all of mon
    47204721          { B=normalize(evaluate_reynolds(REY,mon));
    47214722            IS=IS+B;
    4722             saveAttr = attrib(SSort[i-1][i-1],"size")+int(dimmat[i,1]);
     4723            saveAttr = attrib(SSort[i-1][i-1],"size")+ii;
    47234724            SSort[i-1][i-1] = SSort[i-1][i-1] + B;
    47244725            attrib(SSort[i-1][i-1],"size", saveAttr);
     
    47354736            j=0;                         // j goes through all of mon -
    47364737            // Compare the comments on the computation of reducible sec. inv.!
    4737             while (int(dimmat[i,1])<>counter)
     4738            while (counter <> int(dimmat[i,1]))
    47384739            { if ((j mod MonStep) == 0)
    4739               { if ((j+MonStep) <= ncols(mon))
    4740                 { B[j+1..j+MonStep] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
    4741                   ReducedCandidates[j+1..j+MonStep] = reduce(ideal(B[j+1..j+MonStep]),sP);
    4742                   Indicator[j+1..j+MonStep] = reduce(ideal(ReducedCandidates[j+1..j+MonStep]),SaveRed);
     4740              { if ((j+MonStep) <= ii)
     4741                { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
     4742                  B[j+1..j+MonStep] = tmp[1..MonStep];
     4743                  tmp = reduce(tmp,sP);
     4744                  ReducedCandidates[j+1..j+MonStep] = tmp[1..MonStep];
     4745                  tmp = reduce(tmp,SaveRed);
     4746                  Indicator[j+1..j+MonStep] = tmp[1..MonStep];
     4747                  kill tmp;
    47434748                }
    47444749                else
    4745                 { B[j+1..ncols(mon)] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ncols(mon)])));
    4746                   ReducedCandidates[j+1..ncols(mon)] = reduce(ideal(B[j+1..ncols(mon)]),sP);
    4747                   Indicator[j+1..ncols(mon)] = reduce(ideal(ReducedCandidates[j+1..ncols(mon)]),SaveRed);
     4750                { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ii])));
     4751                  B[j+1..ii] = tmp[1..ii-j];
     4752                  tmp = reduce(tmp,sP);
     4753                  ReducedCandidates[j+1..ii] = tmp[1..ii-j];
     4754                  tmp = reduce(tmp,SaveRed);
     4755                  Indicator[j+1..ii] = tmp[1..ii-j];
     4756                  kill tmp;
    47484757                }
    47494758              }
     
    50615070// work with their reduction modulo sP --- this allows to detect a secondary invariant
    50625071// without to actually compute it!
    5063       for (k=1;k<i-1;k++)
     5072      for (k=1;k<i-1;k++) 
    50645073      { if (int(dimmat[i,1])==counter)
    50655074        { break;
     
    50725081        }
    50735082        if ((int(dimmat[i-k,1])>0) && (Mul1[1]<>0))
    5074         { for (minD=k;minD<i-k;minD++)
     5083        { for (minD=i-k-1;minD>0;minD--)   
    50755084          { if (int(dimmat[i,1])==counter)
    50765085            { break;
     
    51525161        { "There are irreducible secondary invariants in degree ", i-1," !";
    51535162        }
    5154         if (i>IrrSwitch)  // use sparse algorithm
    5155         { mon = kbase(sP,i-1);
    5156 //          mon = ideal(mon[ncols(mon)..1]);
    5157           if (counter==0 && ncols(mon)==int(dimmat[i,1])) // then we can use all of mon
     5163        mon = kbase(sP,i-1);
     5164        ii = ncols(mon);
     5165        if ((i>IrrSwitch) or (ii>200))  // use sparse algorithm
     5166        { if (counter==0 && ii==int(dimmat[i,1])) // then we can use all of mon
    51585167          { B=normalize(evaluate_reynolds(REY,mon));
    51595168            IS=IS+B;
    5160             saveAttr = attrib(RedSSort[i-1][i-1],"size")+int(dimmat[i,1]);
     5169            saveAttr = attrib(RedSSort[i-1][i-1],"size")+ii;
    51615170            RedSSort[i-1][i-1] = RedSSort[i-1][i-1] + NF(B,sP);
    51625171            attrib(RedSSort[i-1][i-1],"size", saveAttr);
     
    51755184            while (int(dimmat[i,1])<>counter)
    51765185            { if ((j mod MonStep) == 0)
    5177               { if ((j+MonStep) <= ncols(mon))
    5178                 { B[j+1..j+MonStep] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
    5179                   ReducedCandidates[j+1..j+MonStep] = reduce(ideal(B[j+1..j+MonStep]),sP);
    5180                   Indicator[j+1..j+MonStep] = reduce(ideal(ReducedCandidates[j+1..j+MonStep]),SaveRed);
     5186              { if ((j+MonStep) <= ii)
     5187                { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
     5188                  B[j+1..j+MonStep] = tmp[1..MonStep];
     5189                  tmp = reduce(tmp,sP);
     5190                  ReducedCandidates[j+1..j+MonStep] = tmp[1..MonStep];
     5191                  tmp = reduce(tmp,SaveRed);
     5192                  Indicator[j+1..j+MonStep] = tmp[1..MonStep];
     5193                  kill tmp;
    51815194                }
    51825195                else
    5183                 { B[j+1..ncols(mon)] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ncols(mon)])));
    5184                   ReducedCandidates[j+1..ncols(mon)] = reduce(ideal(B[j+1..ncols(mon)]),sP);
    5185                   Indicator[j+1..ncols(mon)] = reduce(ideal(ReducedCandidates[j+1..ncols(mon)]),SaveRed);
     5196                { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ii])));
     5197                  B[j+1..ii] = tmp[1..ii-j];
     5198                  tmp = reduce(tmp,sP);
     5199                  ReducedCandidates[j+1..ii] = tmp[1..ii-j];
     5200                  tmp = reduce(tmp,SaveRed);
     5201                  Indicator[j+1..ii] = tmp[1..ii-j];
     5202                  kill tmp;
    51865203                }
    51875204              }
     
    58275844        { "There are irreducible secondary invariants in degree ", i-1," !";
    58285845        }
    5829         if (i>IrrSwitch)  // use sparse algorithm
    5830         { mon = kbase(sP,i-1);
    5831 //          mon = ideal(mon[ncols(mon)..1]);
    5832           if (counter==0 && ncols(mon)==deg_dim_vec[i]) // then we can use all of mon
     5846        mon = kbase(sP,i-1);
     5847        ii = ncols(mon);
     5848//        mon = ideal(mon[ncols(mon)..1]);
     5849        if ((i>IrrSwitch) or (ii>200)) // use sparse algorithm
     5850        { if (counter==0 && ncols(mon)==deg_dim_vec[i]) // then we can use all of mon
    58335851          { B=normalize(evaluate_reynolds(REY,mon));
    58345852            IS=IS+B;
     
    58505868            while (deg_dim_vec[i]<>counter)
    58515869            { if ((j mod MonStep) == 0)
    5852               { if ((j+MonStep) <= ncols(mon))
    5853                 { B[j+1..j+MonStep] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
    5854                   ReducedCandidates[j+1..j+MonStep] = reduce(ideal(B[j+1..j+MonStep]),sP);
    5855                   Indicator[j+1..j+MonStep] = reduce(ideal(ReducedCandidates[j+1..j+MonStep]),SaveRed);
     5870              { if ((j+MonStep) <= ii)
     5871                { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
     5872                  B[j+1..j+MonStep] = tmp[1..MonStep];
     5873                  tmp = reduce(tmp,sP);
     5874                  ReducedCandidates[j+1..j+MonStep] = tmp[1..MonStep];
     5875                  tmp = reduce(tmp,SaveRed);
     5876                  Indicator[j+1..j+MonStep] = tmp[1..MonStep];
     5877                  kill tmp;
    58565878                }
    58575879                else
    5858                 { B[j+1..ncols(mon)] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ncols(mon)])));
    5859                   ReducedCandidates[j+1..ncols(mon)] = reduce(ideal(B[j+1..ncols(mon)]),sP);
    5860                   Indicator[j+1..ncols(mon)] = reduce(ideal(ReducedCandidates[j+1..ncols(mon)]),SaveRed);
     5880                { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ii])));
     5881                  B[j+1..ii] = tmp[1..ii-j];
     5882                  tmp = reduce(tmp,sP);
     5883                  ReducedCandidates[j+1..ii] = tmp[1..ii-j];
     5884                  tmp = reduce(tmp,SaveRed);
     5885                  Indicator[j+1..ii] = tmp[1..ii-j];
     5886                  kill tmp;
    58615887                }
    58625888              }
     
    61396165      { "  Searching in degree "+string(i)+"...";
    61406166      }
    6141       if (i>IrrSwitch)  // use sparse algorithm
    6142       { mon = kbase(sP,i);
    6143         ii = ncols(mon);
    6144         j=0;                         // j goes through all of mon -
     6167      mon = kbase(sP,i);
     6168      ii = ncols(mon);
     6169      if ((i>IrrSwitch) or (ii>200)) // use sparse algorithm
     6170      { j=0;                         // j goes through all of mon -
    61456171        // Compare the comments on the computation of reducible sec. inv.!
    61466172        while ((j<ii) and (counter < max))
     
    61496175            { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
    61506176              B[j+1..j+MonStep] = tmp[1..MonStep];
    6151               tmp = reduce(ideal(B[j+1..j+MonStep]),sP);
     6177              tmp = reduce(tmp,sP);
    61526178              ReducedCandidates[j+1..j+MonStep] = tmp[1..MonStep];
    6153               tmp = reduce(ideal(ReducedCandidates[j+1..j+MonStep]),SaveRed);
     6179              tmp = reduce(tmp,SaveRed);
    61546180              Indicator[j+1..j+MonStep] = tmp[1..MonStep];
    6155               kill tmp;
     6181              kill tmp;
    61566182            }
    61576183            else
    6158             { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ncols(mon)])));
    6159               B[j+1..ncols(mon)] = tmp[1..ncols(mon)-j];
    6160               tmp = reduce(ideal(B[j+1..ncols(mon)]),sP);
    6161               ReducedCandidates[j+1..ncols(mon)] = tmp[1..ncols(mon)-j];
    6162               tmp = reduce(ideal(ReducedCandidates[j+1..ncols(mon)]),SaveRed);
    6163               Indicator[j+1..ncols(mon)] = tmp[1..ncols(mon)-j];
    6164               kill tmp;
     6184            { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ii])));
     6185              B[j+1..ii] = tmp[1..ii-j];
     6186              tmp = reduce(tmp,sP);
     6187              ReducedCandidates[j+1..ii] = tmp[1..ii-j];
     6188              tmp = reduce(tmp,SaveRed);
     6189              Indicator[j+1..ii] = tmp[1..ii-j];
     6190              kill tmp;
    61656191            }
    61666192          }
     
    61716197            S[counter] = B[j];
    61726198            if (v)
    6173             { "  We found "+string(counter)+" sec. inv. in degree "+string(i);
     6199            { "  We found sec. inv. number "+string(counter)+" in degree "+string(i);
    61746200            }
    61756201            if (counter == max) {break;}
     
    65096535        { "Looking for irreducible secondary invariants in degree ", i-1;
    65106536        }
    6511         if (i>IrrSwitch)  // use sparse algorithm
    6512         { mon = kbase(sP,i-1);
    6513 //          mon = ideal(mon[ncols(mon)..1]);
    6514           ii = ncols(mon);
    6515           irrcounter=0;
     6537        mon = kbase(sP,i-1);
     6538//        mon = ideal(mon[ncols(mon)..1]);
     6539        ii = ncols(mon);
     6540        if ((i>IrrSwitch) or (ii>200)) // use sparse algorithm
     6541        { irrcounter=0;
    65166542          j=0;                         // j goes through all of mon -
    65176543          // Compare the comments on the computation of reducible sec. inv.!
     
    65196545          { if ((j mod MonStep) == 0)
    65206546            { if ((j+MonStep) <= ii)
    6521               { B[j+1..j+MonStep] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
    6522                 ReducedCandidates[j+1..j+MonStep] = reduce(ideal(B[j+1..j+MonStep]),sP);
    6523                 Indicator[j+1..j+MonStep] = reduce(ideal(ReducedCandidates[j+1..j+MonStep]),SaveRed);
     6547              { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep])));
     6548                B[j+1..j+MonStep] = tmp[1..MonStep];
     6549                tmp = reduce(tmp,sP);
     6550                ReducedCandidates[j+1..j+MonStep] = tmp[1..MonStep];
     6551                tmp = reduce(tmp,SaveRed);
     6552                Indicator[j+1..j+MonStep] = tmp[1..MonStep];
     6553                kill tmp;
    65246554              }
    65256555              else
    6526               { B[j+1..ii] = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ii])));
    6527                 ReducedCandidates[j+1..ii] = reduce(ideal(B[j+1..ii]),sP);
    6528                 Indicator[j+1..ii] = reduce(ideal(ReducedCandidates[j+1..ii]),SaveRed);
     6556              { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..ii])));
     6557                B[j+1..ii] = tmp[1..ii-j];
     6558                tmp = reduce(tmp,sP);
     6559                ReducedCandidates[j+1..ii] = tmp[1..ii-j];
     6560                tmp = reduce(tmp,SaveRed);
     6561                Indicator[j+1..ii] = tmp[1..ii-j];
     6562                kill tmp;
    65296563              }
    65306564            }
Note: See TracChangeset for help on using the changeset viewer.