Changeset d610dc in git
- Timestamp:
- Jan 30, 2007, 12:05:10 PM (16 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- c1d38666da061feb6b0500e6b192b79f8589f326
- Parents:
- 39c40f9402956fa6907f5f3f869d9402506f6a9b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/finvar.lib
r39c40f rd610dc 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: finvar.lib,v 1.5 6 2007-01-27 15:03:55 SingularExp $"2 version="$Id: finvar.lib,v 1.57 2007-01-30 11:05:10 king Exp $" 3 3 category="Invariant theory"; 4 4 info=" … … 4714 4714 { "There are irreducible secondary invariants in degree ", i-1," !"; 4715 4715 } 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 4720 4721 { B=normalize(evaluate_reynolds(REY,mon)); 4721 4722 IS=IS+B; 4722 saveAttr = attrib(SSort[i-1][i-1],"size")+i nt(dimmat[i,1]);4723 saveAttr = attrib(SSort[i-1][i-1],"size")+ii; 4723 4724 SSort[i-1][i-1] = SSort[i-1][i-1] + B; 4724 4725 attrib(SSort[i-1][i-1],"size", saveAttr); … … 4735 4736 j=0; // j goes through all of mon - 4736 4737 // Compare the comments on the computation of reducible sec. inv.! 4737 while ( int(dimmat[i,1])<>counter)4738 while (counter <> int(dimmat[i,1])) 4738 4739 { 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; 4743 4748 } 4744 4749 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; 4748 4757 } 4749 4758 } … … 5061 5070 // work with their reduction modulo sP --- this allows to detect a secondary invariant 5062 5071 // without to actually compute it! 5063 for (k=1;k<i-1;k++) 5072 for (k=1;k<i-1;k++) 5064 5073 { if (int(dimmat[i,1])==counter) 5065 5074 { break; … … 5072 5081 } 5073 5082 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--) 5075 5084 { if (int(dimmat[i,1])==counter) 5076 5085 { break; … … 5152 5161 { "There are irreducible secondary invariants in degree ", i-1," !"; 5153 5162 } 5154 if (i>IrrSwitch) // use sparse algorithm5155 { 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 mon5163 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 5158 5167 { B=normalize(evaluate_reynolds(REY,mon)); 5159 5168 IS=IS+B; 5160 saveAttr = attrib(RedSSort[i-1][i-1],"size")+i nt(dimmat[i,1]);5169 saveAttr = attrib(RedSSort[i-1][i-1],"size")+ii; 5161 5170 RedSSort[i-1][i-1] = RedSSort[i-1][i-1] + NF(B,sP); 5162 5171 attrib(RedSSort[i-1][i-1],"size", saveAttr); … … 5175 5184 while (int(dimmat[i,1])<>counter) 5176 5185 { 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; 5181 5194 } 5182 5195 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; 5186 5203 } 5187 5204 } … … 5827 5844 { "There are irreducible secondary invariants in degree ", i-1," !"; 5828 5845 } 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 5833 5851 { B=normalize(evaluate_reynolds(REY,mon)); 5834 5852 IS=IS+B; … … 5850 5868 while (deg_dim_vec[i]<>counter) 5851 5869 { 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; 5856 5878 } 5857 5879 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; 5861 5887 } 5862 5888 } … … 6139 6165 { " Searching in degree "+string(i)+"..."; 6140 6166 } 6141 if (i>IrrSwitch) // use sparse algorithm6142 { mon = kbase(sP,i);6143 ii = ncols(mon);6144 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 - 6145 6171 // Compare the comments on the computation of reducible sec. inv.! 6146 6172 while ((j<ii) and (counter < max)) … … 6149 6175 { ideal tmp = normalize(evaluate_reynolds(REY,ideal(mon[j+1..j+MonStep]))); 6150 6176 B[j+1..j+MonStep] = tmp[1..MonStep]; 6151 tmp = reduce( ideal(B[j+1..j+MonStep]),sP);6177 tmp = reduce(tmp,sP); 6152 6178 ReducedCandidates[j+1..j+MonStep] = tmp[1..MonStep]; 6153 tmp = reduce( ideal(ReducedCandidates[j+1..j+MonStep]),SaveRed);6179 tmp = reduce(tmp,SaveRed); 6154 6180 Indicator[j+1..j+MonStep] = tmp[1..MonStep]; 6155 6181 kill tmp; 6156 6182 } 6157 6183 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 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; 6165 6191 } 6166 6192 } … … 6171 6197 S[counter] = B[j]; 6172 6198 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); 6174 6200 } 6175 6201 if (counter == max) {break;} … … 6509 6535 { "Looking for irreducible secondary invariants in degree ", i-1; 6510 6536 } 6511 if (i>IrrSwitch) // use sparse algorithm6512 { mon = kbase(sP,i-1);6513 // mon = ideal(mon[ncols(mon)..1]);6514 ii = ncols(mon);6515 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; 6516 6542 j=0; // j goes through all of mon - 6517 6543 // Compare the comments on the computation of reducible sec. inv.! … … 6519 6545 { if ((j mod MonStep) == 0) 6520 6546 { 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; 6524 6554 } 6525 6555 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; 6529 6563 } 6530 6564 }
Note: See TracChangeset
for help on using the changeset viewer.