source: git/Singular/LIB/classify_aeq.lib @ 5ce25c

spielwiese
Last change on this file since 5ce25c was 5ce25c, checked in by Hans Schoenemann <hannes@…>, 11 years ago
fix: classifyci::Semigroup (example) from master
  • Property mode set to 100644
File size: 46.3 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2version="version classify_aeq.lib 4.0.0.0 Jun_2013 ";
3category="Singularities";
4info="
5LIBRARY: classifyAeq.lib         Simple Space Curve singularities in characteristic 0
6
7AUTHORS: Faira Kanwal Janjua     fairakanwaljanjua@gmail.com
8         Gerhard Pfister         pfister@mathematik.uni-kl.de
9
10OVERVIEW: A library for classifying the simple singularities
11          with respect to A equivalence in characteristic 0.
12  Simple Surface singularities in characteristic O have been classified by Bruce and Gaffney [4] resp.
13  Gibson and Hobbs [1] with respect to A equivalence. If the input is one of the simple singularities in
14  [1] it returns a normal form otherwise a zero ideal(i.e not simple).
15
16REFERENCES:
17  [1] Gibson,C.G; Hobbs,C.A.:Simple SIngularities of Space Curves.
18  Math.Proc. Comb.Phil.Soc.(1993),113,297.
19  [2] Hefez,A;Hernandes,M.E.:Standard bases for local rings of branches and their modules of differentials.
20  Journal of Symbolic Computation 42(2007) 178-191.
21  [3] Hefez,A;Hernandes,M.E.:The Analytic Classification Of Plane Branches. Bull.Lond Math Soc.43.(2011) 2,289-298.
22  [4] Bruce, J.W.,Gaffney, T.J.: Simple singularities of mappings (C, 0) ->(C2,0).
23  J. London Math. Soc. (2) 26 (1982), 465-474.
24
25PROCEDURES:
26          sagbiAlg(G);    Compute the Sagbi-basis of the Algebra.
27          sagbiMod(I,A);  Compute the Sagbi- basis of the Module.
28          semiGroup(G);   Compute the Semi-Group of the Algebra provided the input is Sagbi Bases of the Algebra.
29          semiMod(I,A);   Compute the Semi-Module provided that the input are the Sagbi Bases of the Algebra resp.Module.
30          planeCur(I);    Compute the type of the Simple Plane Curve singularity.
31          spaceCur(I);    Compute the type of the simple Space Curve singularity.
32";
33LIB "algebra.lib";
34LIB "curvepar.lib";
35///////////////////////////////////////////////////////////////////////////////
36proc planeCur(ideal I)
37"USAGE":  planeCur(I);  I ideal
38RETURN: An ideal.Ideal is one of the singularity in the list of Bruce and Gaffney [4]
39EXAMPLE: example planeCur;  shows an example
40"
41{
42   def R=basering;
43   I=sortMOD(I);
44   list M;
45   list K;
46   if(I==0)
47   {return(I);}
48   ideal G=sagbiAlg(I);
49   list L=semiGroup(G);
50   ideal J=diff(G,var(1));
51   J=sagbiMod(J,G);
52   M=semiMod(J,G);
53   int C=L[2];
54   ideal Z=0,0;
55   if(L[1][1]>4)
56   {
57      return(Z);
58   }
59   if(L[1][1]==1)
60   {
61        ideal A=var(1);
62        K=Guess(A);
63        if(CompareList(M,K,6)!=0)
64        {
65              return(A);
66        }
67        else
68        {
69            return(Z);
70        }
71    }
72    if(L[1][1]==2)
73    {
74         ideal A=var(1)^2,var(1)^(L[2]+1);
75         K=Guess(A);
76         if(CompareList(M,K,6)!=0)
77         {
78            return(A);
79         }
80         else
81         {
82            return(Z);
83         }
84    }
85    if(L[1][1]==4)
86    {
87          if(L[1][2]==5)
88          {
89                intvec q=4,5;
90                if((L[1]==q)&&(L[2]==12)&&(size(L[3])==7))
91                {
92                   intvec q1=3,4; intvec q2=3,4,10;
93                   if((M[4]==q1)&&(M[5]==11)&&(size(M[6])==6))
94                   {
95                       ideal A=var(1)^4,var(1)^5;
96                        K=Guess(A);
97                       if(CompareList(M,K,6)!=0)
98                       {
99                           return(A);
100                       }
101                   }
102                   if((M[4]==q2)&&(M[5]==7)&&(size(M[6])==3))
103                   {
104                       ideal A=var(1)^4,var(1)^5+var(1)^7;
105                       K=Guess(A);
106                       if(CompareList(M,K,6)!=0)
107                       {
108                         return(A);
109                       }
110                   }
111                   else
112                   {
113                      return(Z);
114                   }
115                }
116                else
117                {
118                   return(Z);
119                }
120          }
121          if(L[1][2]==6)
122          {
123                ideal A=var(1)^4,var(1)^6+var(1)^(L[1][3]-6);
124                K=Guess(A);
125                if(L[1][3] mod 2 !=0)
126                {
127                   ideal S=t4,t6+t^(M[2]-9);
128                   if(CompareList(M,K,6)!=0)
129                   {
130                      return(S);
131                   }
132                   if(CompareList(M,K,6)==0)
133                   {
134                      int m=size(K[4])+1;
135                      if(size(M[4])==m)
136                      {
137                        return(S);
138                      }
139                      else{return(Z);}
140                   }
141                }
142                else
143                {
144                   return(Z);
145                }
146          }
147          if(L[1][2]==7)
148          {
149                intvec q=4,7;list K;
150                ideal A=var(1)^4,var(1)^7;
151                ideal B=var(1)^4,var(1)^7+var(1)^9;
152                ideal T=var(1)^4,var(1)^7+var(1)^10;
153                list Q=A,B,T;
154                for(int i=1;i<=3;i++)
155                {    K=Guess(Q[i]);
156                     if(CompareList(M,K,6)!=0)
157                     {
158                        if(i==1)
159                        {
160                            return(A);
161                            break;
162                        }
163                        if(i==2)
164                        {
165                          return(B);
166                          break;
167                        }
168                        if(i==3)
169                        {
170                           return(T);
171                           break;
172                        }
173                     }
174                }
175                else
176                {
177                     return(Z);
178                }
179        }
180        else
181        {
182             return(Z);
183        }
184   }
185   if(L[1][1]==3)
186   {
187          int k=L[1][2]-1;
188          int p=L[1][2]-2;
189          if(k mod 3 ==0)
190          {
191              if(size(M[4])==2)
192              {
193                  ideal A=var(1)^3,var(1)^L[1][2];
194                  ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
195                  list Q=A,B;
196                  for(int i=1;i<=2;i++)
197                  {  K=Guess(Q[i]);
198                     if(CompareList(M,K,6)!=0)
199                     {
200                        return(Q[i]);
201                     }
202                  }
203              }
204              if(size(M[4])==3)
205              {
206                  ideal A=var(1)^3,var(1)^L[1][2];
207                  ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
208                  list Q=A,B;
209                  for(int i=1;i<=2;i++)
210                  {  K=Guess(Q[i]);
211                     if(CompareList(M,K,6)!=0)
212                     {
213                          return(Q[i]);
214                     }
215                  }
216              }
217              else
218              {
219                  return(Z);
220              }
221          }
222          if(p mod 3 ==0)
223          {
224               if(size(M[4])==2)
225               {
226                    ideal A=var(1)^3,var(1)^L[1][2];
227                    ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
228                    list Q=A,B;
229                    for(int i=1;i<=2;i++)
230                    {    K=Guess(Q[i]);
231                         if(CompareList(M,K,6)!=0)
232                         {
233                            return(Q[i]);
234                         }
235                     }
236                }
237                if(size(M[4])==3)
238                {
239                     ideal A=var(1)^3,var(1)^L[1][2];
240                     ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
241                     list Q=A,B;
242                     for(int i=1;i<=2;i++)
243                     {    K=Guess(Q[i]);
244                          if(CompareList(M,K,6)!=0)
245                          {
246                              return(Q[i]);
247                          }
248                     }
249                }
250                else
251                {
252                      return(Z);
253                }
254           }
255           else
256           {
257                 return(Z)
258           }
259   }
260}
261example
262{
263"EXAMPLE:"; echo=2;
264  ring R=0,t,Ds;
265  ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t7+7t8+22t9+51t10+113t11+219t12+366t13+589t14+876t15+1170t16+1514t17
266+1828t18+2011t19+2165t20+2163t21+1982t22+1806t23+1491t24+1141t25+889t26+588t27+379t28+252t29+120t30+72t31+36t32+9t33+9t34+t36;
267  planeCur(I);
268}
269
270////////////////////////////////////////////////////////////////////////////////
271proc spaceCur(ideal I)
272"USAGE":  spaceCur(I);  I ideal
273RETURN: an ideal. Ideal is one of the singularity  in the list of C.G.Gibson and C.A.Hobbs.
274EXAMPLE: example spaceCur;  shows an example
275"
276{
277   def R=basering;
278   I=sortMOD(I);
279   list M;
280   list K;
281   if(I==0)
282   {return(I);}
283   ideal G=sagbiAlg(I);
284   if(size(G)<=2){return(planeCur(G));}
285   list L=semiGroup(G);
286   ideal J=diff(G,var(1));
287   J=sagbiMod(J,G);
288   M=semiMod(J,G);
289   int C=L[2];
290   ideal Z=0,0,0;
291   if(L[1][1]>5)
292   {
293      return(Z);
294   }
295   if(L[1][1]==3)
296   {
297          int k=L[1][2]-1;
298          int p=L[1][2]-2;
299          if(k mod 3 ==0)
300          {
301               poly q=var(1)*(J[2])-G[2];
302               if(leadexp(q)!=leadexp(J[3]))
303               {
304                  if(size(M[4])!=3)
305                  {
306                     ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
307                     return(B);
308                  }
309                  if(size(M[4])==3)
310                  {
311                     ideal I1=G[1],G[2];
312                     I1=sortMOD(I1);
313                     ideal T=sagbiAlg(I1);
314                     ideal J1=diff(T,var(1));
315                     J1=sagbiMod(J1,T);
316                     K=semiMod(J1,T);
317                     if(size(K[4])!=2)
318                     {
319                           ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
320                          return(B);
321                     }
322                     if(size(K[4])==2)
323                     {
324                         ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
325                          return(A);
326                     }
327                  }
328               }
329               if(leadexp(q)==leadexp(J[3]))
330               {
331                  if(size(M[4])!=3)
332                  {
333                      ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
334                      return(B);
335                  }
336                  if(size(M[4])==3)
337                  {
338                      ideal I1=G[1],G[2];
339                      I1=sortMOD(I1);
340                      ideal T=sagbiAlg(I1);
341                      ideal J1=diff(T,var(1));
342                      J1=sagbiMod(J1,T);
343                      K=semiMod(J1,T);
344                      if(size(K[4])!=2)
345                      {
346                            ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
347                            return(B);
348                      }
349                      if(size(K[4])==2)
350                      {
351                           ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
352                           return(A);
353                      }
354                  }
355               }
356          }
357          if(p mod 3 ==0)
358          {
359                poly q=var(1)^3*(J[2])-var(1)^2*(G[2]);
360               if(leadexp(q)!=leadexp(J[3]))
361               {
362                  if(size(M[4])!=3)
363                  {
364                     ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
365                     return(B);
366                  }
367                  if(size(M[4])==3)
368                  {
369                       ideal I1=G[1],G[2];
370                       I1=sortMOD(I1);
371                       ideal T=sagbiAlg(I1);
372                       ideal J1=diff(T,var(1));
373                       J1=sagbiMod(J1,T);
374                       K=semiMod(J1,T);
375                       if(size(K[4])!=2)
376                       {
377                           ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
378                           return(B);
379                       }
380                       if(size(K[4])==2)
381                       {
382                           ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
383                           return(A);
384                       }
385                 }
386              }
387              if(leadexp(q)==leadexp(J[3]))
388              {
389                  if(size(M[4])!=3)
390                  {
391                        ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
392                        return(B);
393                  }
394                  if(size(M[4])==3)
395                  {
396                       ideal I1=G[1],G[2];
397                       ideal T=sagbiAlg(I1);
398                       ideal J1=diff(T,var(1));
399                       J1=sagbiMod(J1,T);
400                       K=semiMod(J1,T);
401                       if(size(K[4])!=2)
402                       {
403                           ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
404                           return(B);
405                       }
406                       if(size(K[4])==2)
407                       {
408                           ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
409                           return(A);
410                       }
411                  }
412             }
413           }
414           else
415           {
416                 return(Z);
417           }
418   }
419   if(L[1][1]==4)
420   {
421      if(L[1][2]==5)
422      {
423         if(L[1][3]==11)
424         {
425             ideal A=var(1)^4,var(1)^5,var(1)^11;
426             ideal B=var(1)^4,var(1)^5+var(1)^7,var(1)^11;
427             list Q=A,B;
428             ideal Ij=jet(I,10);
429             Ij=simplify(Ij,2);
430             ideal Gj=sagbiAlg(Ij);
431             list Lj=semiGroup(Gj);
432             ideal Jj=diff(Gj,var(1));
433             Jj=sagbiMod(Jj,Gj);
434             list Mj=semiMod(Jj,Gj);
435             if(size(Mj[4])==2)
436             {
437                 K=Guess(Q[1]);
438                 if(CompareList(M,K,6)!=0)
439                 {
440                    return(Q[1]);
441                 }
442             }
443             if(size(Mj[4])==3)
444             {
445                 K=Guess(Q[2]);
446                 if(CompareList(M,K,6)!=0)
447                 {
448                    return(Q[2]);
449                 }
450             }
451         }
452         if(L[1][3]!=11)
453         {
454              ideal A=var(1)^4,var(1)^5,var(1)^6;
455              ideal B=var(1)^4,var(1)^5,var(1)^7;
456              list Q=A,B;
457              for(int i=1;i<=2;i++)
458              {
459                 K=Guess(Q[i]);
460                 if(CompareList(M,K,6)!=0)
461                 {
462                    return(Q[i]);
463                    break;
464                 }
465              }
466         }
467         else
468         {return(Z);
469         }
470      }
471      if(L[1][2]==6)
472      {
473          if(size(L[1])==3)
474          {
475               if(size(M[4])==3)
476               {
477                   ideal A=var(1)^4,var(1)^6,var(1)^L[1][3];
478                   K=Guess(A);
479                   if(CompareList(M,K,6)!=0)
480                   {
481                       return(A);
482                   }
483                   else
484                   {
485                       return(Z);
486                   }
487               }
488               if(size(M[4])==4)
489               {
490                   ideal A=var(1)^4,var(1)^6+var(1)^(L[1][3]-2),var(1)^L[1][3];
491                   K=Guess(A);
492                   if(CompareList(M,K,6)!=0)
493                   {
494                          return(A);
495                   }
496                   else
497                   {
498                       return(Z);
499                   }
500               }
501          }
502          if(size(L[1])==4)
503          {
504               if(size(M[4])==4)
505               {
506                   ideal A=var(1)^4,var(1)^6+var(1)^(L[1][3]-4),var(1)^L[1][3];
507                   K=Guess(A);
508                   if(CompareList(M,K,6)!=0)
509                   {
510                       return(A);
511                   }
512                   else
513                   {
514                       return(Z);
515                   }
516               }
517               if(size(M[4])==5)
518               {
519                   ideal A=var(1)^4,var(1)^6+var(1)^(L[1][4]-8),var(1)^L[1][4];
520                   K=Guess(A);
521                   if(CompareList(M,K,6)!=0)
522                   {
523                          return(A);
524                   }
525                   else
526                   {
527                       return(Z);
528                   }
529               }
530          }
531          else
532          {
533              return(Z);
534          }
535      }
536      if(L[1][2]==7)
537      {
538          if(L[1][3]==9)
539          {
540               ideal A=var(1)^4,var(1)^7,var(1)^9+var(1)^10;
541               ideal B=var(1)^4,var(1)^7,var(1)^9;
542               list Q=A,B;
543               for(int i=1;i<=2;i++)
544               {
545                  K=Guess(Q[i]);
546                  if(CompareList(M,K,6)!=0)
547                  {
548                     return(Q[i]);
549                     break;
550                  }
551               }
552          }
553          if(L[1][3]==10)
554          {
555               ideal A=var(1)^4,var(1)^7,var(1)^10;
556               ideal B=var(1)^4,var(1)^7+var(1)^9,var(1)^10;
557               list Q=A,B;
558               for(int i=1;i<=2;i++)
559               {
560                    K=Guess(Q[i]);
561                   if(CompareList(M,K,6)!=0)
562                   {
563                      return(Q[i]);
564                      break;
565                   }
566               }
567          }
568          if(L[1][3]==13)
569          {
570               ideal A=var(1)^4,var(1)^7,var(1)^13;
571               ideal B=var(1)^4,var(1)^7+var(1)^9,var(1)^13;
572               list Q=A,B;
573               ideal Ij=jet(I,12);
574               Ij=simplify(Ij,2);
575               ideal Gj=sagbiAlg(Ij);
576               list Lj=semiGroup(Gj);
577               ideal Jj=diff(Gj,var(1));
578               Jj=sagbiMod(Jj,Gj);
579               Jj=jet(Jj,12);
580               Jj=simplify(Jj,2);
581               list Mj=semiMod(Jj,Gj);
582               if(size(Jj)==2)
583               {
584                    K=Guess(Q[1]);
585                    if(CompareList(M,K,6)!=0)
586                    {
587                       return(A);
588                       break;
589                    }
590               }
591               if(size(Jj)==3)
592               {
593                    K=Guess(Q[2]);
594                    if(CompareList(M,K,6)!=0)
595                    {
596                       return(B);
597                       break;
598                    }
599                }
600          }
601          if(L[1][3]==17)
602          {
603                ideal A=var(1)^4,var(1)^7,var(1)^17;
604                ideal B=var(1)^4,var(1)^7+var(1)^9,var(1)^17;
605                ideal T=var(1)^4,var(1)^7+var(1)^10,var(1)^17;
606                list Q=A,B,T;
607                for(int i=1;i<=3;i++)
608                {
609                    K=Guess(Q[i]);
610                    if(CompareList(M,K,6)!=0)
611                    {
612                        if(i==2)
613                        {
614                           return(Q[i]);
615                           break;
616                        }
617                        else
618                        {
619                             ideal Ij=jet(I,16);
620                             Ij=simplify(Ij,2);
621                             ideal Gj=sagbiAlg(Ij);
622                             list Lj=semiGroup(Gj);
623                             ideal Jj=diff(Gj,var(1));
624                             Jj=sagbiMod(Jj,Gj);
625                             Jj=jet(Jj,16);
626                             Jj=simplify(Jj,2);
627                             list Mj=semiMod(Jj,Gj);
628                             if(size(Jj)==2)
629                             {
630                                 if(CompareList(M,K,6)!=0)
631                                 {
632                                    return(A);
633                                    break;
634                                 }
635                             }
636                             if(size(Jj)==3)
637                             {
638                                 if(CompareList(M,K,6)!=0)
639                                 {
640                                    return(T);
641                                    break;
642                                 }
643                             }
644                        }
645                    }
646                }
647          }
648          else
649          {
650              return(Z);
651          }
652      }
653   }
654}
655example
656{
657  "EXAMPLE:"; echo=2;
658   ring R=0,t,Ds;
659ideal I=t3+3t4+3t5+t6,t13+14t14+92t15+377t16+1079t17+2288t18+3718t19+4719t20+4719t21+3718t22+2288t23+1079t24+377t25+92t26+14t27+t28,t17+17t18+136t19+680t20+2380t21+6188t22+12376t23+19448t24+24310t25+24310t26+19448t27+12376t28+6188t29+2380t30+680t31+136t32+17t33+t34;
660  spaceCur(I);
661}
662
663////////////////////////////////////////////////////////////////////////////////
664proc sagbiAlg(ideal I)
665"USAGE":  sagbiAlg(I);  I ideal
666RETURN: An ideal.The sagbi bases of I.
667EXAMPLE: example sagbiAlg;  shows an example
668{
669    def R=basering;
670    def O=changeord(list(list("Ds",nvars(R))));
671    setring O;
672    ideal I=imap(R,I);
673    ideal L;
674    poly h;
675    int z,n;
676
677    if(size(I)==0){return(I);}
678    int b=ConductorBound(I);
679
680  // int b=200;
681  //   b=correctBound(I,b);
682   ideal S=interReduceSagbi(I,b) ;
683  // b=correctBound(S,b);
684   while(size(S)!=n)
685   {
686       n=size(S);
687       L=sagbiSP(S);
688       for (z=1;z<=size(L);z++)
689       {
690             h=sagbiNF(L[z],S,b);
691             if(h!=0)
692             {
693                  S=insertOne(h,S,b);
694             }
695        }
696   }
697   setring R;
698   ideal S=imap(O,S);
699   return(S);
700}
701
702example
703{
704  "EXAMPLE:"; echo=2;
705ring R=0,t,ds;
706ideal I=t8,t10+t13,t12+t15;
707sagbiAlg(I);
708I=t8,t10+t13,t12+2t15;
709sagbiAlg(I);
710}
711
712////////////////////////////////////////////////////////////////////////////////
713proc sagbiMod(ideal I,ideal G)
714"USAGE":  sagbiMod(I,G);  I an ideal module and ideal G being the sagbi bases of the Algebra
715RETURN: An ideal. the sagbi bases for the differential module.
716EXAMPLE: example sagbiMod;  shows an example
717{
718  def R=basering;//up till now the ordering of the base ring is ds
719  def O=changeord(list(list("Ds",nvars(R))));
720  setring O;
721  ideal I=imap(R,I);
722  ideal G=imap(R,G);
723  int n=ncols(G);poly h;
724  if(I==0)
725  { return(I);}
726  ideal S,J,M;
727  I=sortMOD(I);
728  if(deg(lead(I[1]))<=1)
729  { setring R;
730    return(imap(O,I));}
731  int b=ConductorBound(lead(G))+deg(lead(I[1]));
732  list P;int i;
733  P=createP(I);
734  while(size(P)!=0)
735  {
736      J=P[1][1],P[1][2];
737      P=delete(P,1);
738      S=SpolyMOD(J,G);
739      for(i=1;i<=size(S);i++)
740      {
741         h=sagbiNFMOD(S[i],G,I,b);
742         if(h!=0)
743         {
744             h=simplify(h,1);
745             P=enlargeP(h,P,I);
746             I[size(I)+1]=h;
747         }
748      }
749  }
750  I=sortMOD(I);
751  setring R;
752  ideal K=imap(O,I);
753  return(K);
754}
755example
756{
757  "EXAMPLE:"; echo=2;
758  ring r=0,t,Ds;
759  ideal G=t8,t10+t13,t12+t15,t23-t29,t27;
760  ideal I=diff(G,t);
761  sagbiMod(I,G);
762}
763
764////////////////////////////////////////////////////////////////////////////////
765proc semiGroup(ideal I)
766"USAGE": semiGroup(I);  I ideal the sagbi bases of Algebra.
767RETURN: list L; list with three entries associated to the algebra generated by
768   the sagbi basis:
769   generators of the semigroup
770   the conductor
771    the semigroup
772EXAMPLE: example planeCur;  shows an example
773{
774   list M;
775   if(deg(I[1])<=1)
776   {
777      M[1]=intvec(1);
778      M[2]=1;
779      M[3]=intvec(0,1);
780   }
781   else
782   {
783      ideal J=lead(I);
784      int b=ConductorBound(J);
785      int i;
786      list L=J[1];
787      for(i=2;i<=size(J);i++)
788      {
789         L[i]=J[i];
790      }
791      M=WSemigroup(L,b);
792      intvec v=0,M[3];
793      M[3]=cutAfterConductor(v);
794      M[2]=findConductor(M[3]);
795   }
796   return(M);
797}
798
799example
800{
801 "EXAMPLE:"; echo=2;
802ring R=0,t,ds;
803ideal I=t8,t10+t13,t12+t15,t23-t29,t27;
804semiGroup(I);
805I=t8,t10+t13,t12+2t15,t27-3t33,t29;
806semiGroup(I);
807}
808
809////////////////////////////////////////////////////////////////////////////////
810proc semiMod(ideal I,ideal G)
811"USAGE":  semiMod(I,G);  I ideal,G ideal;I and G are the sagbi bases of the differential module resp.Algebra.
812RETURN: list K;
813      K[1]min generators of the semialgebra.
814      K[2]conductor of the algebra.
815      K[3]genrators for the semialgebra.
816      K[4]min generators of the module.
817      K[5]conductor of the module.
818      K[6]semigroup of the module.
819EXAMPLE: example semiMod;  shows an example
820{
821     list L=semiGroup(G);
822     intvec M;
823     list C;intvec S;
824     int j; int k; int b;
825     for(int i=1;i<=size(I);i++)
826     {
827         M[size(M)+1]=ord(I[i]);
828     }
829     M=M[2..size(M)];
830     for(i=1;i<=size(M);i++)
831     {
832         C[size(C)+1]=M[i]+L[3];
833     }
834     int a=M[1]+L[2];
835     for(j=1;j<=size(M);j++)
836     {
837        for(i=0;i<=a;i++)
838        {
839           for(k=1;k<=size(L[3]);k++)
840           {
841               if(i==C[j][k])
842               {
843                  S[size(S)+1]=i;
844               }
845           }
846        }
847      }
848      S=S[2..size(S)];
849      list K;
850      K[1]=L[1];//generators of the semialgebra.
851      K[2]=L[2];//conductor of the algebra.
852      K[3]=L[3];//semi group of the algebra.
853      K[4]=M;// generators of the semimodule.
854      K[5]=findConductor(sortIntvec(S)); //conductor of the module.
855      K[6]=cutAfterConductor(sortIntvec(S));//semigroup of the module.
856      return(K);
857}
858example
859{
860  "EXAMPLE:"; echo=2;
861  ring r=0,t,Ds;
862  ideal G=t4,t7+t10;
863  ideal I=diff(G,t);
864  ideal k=sagbiMod(I,G);
865  semiMod(k,G);
866}
867////////////////////////////////////////////////////////////////////////////////
868static proc sagbiNF(poly f,ideal I,int b)
869{
870//computes the Sagbi normal form
871   list L=1;
872   map psi;
873   f=jet(f,b);
874   if(f==0){return(f);}
875   while((f!=0) && (L[1]!=0))
876   {
877     L= algebra_containment(lead(f),lead(I),1);
878     if (L[1]==1)
879     {
880        def S= L[2];
881        psi= S,maxideal(1),I;
882        f=jet(f-psi(check),b);
883        kill S;
884     }
885   }
886   return (lead(f)+sagbiNF(f-lead(f),I,b));
887}
888
889/*
890ring R=0,t,ds;
891
892ideal I=t5+t7,t4;
893
894sagbiNF(t7+2t9+3t11+t14+t13+6t15+t17,I,20);
895
896*/
897////////////////////////////////////////////////////////////////////////////////
898static proc sagbiSP(ideal I)
899{
900//computes the set of Sagbi-s-polys
901   if(I==0){ return(I); }
902   list L=algDependent(lead(I));
903
904   def S= L[2];
905   map phi= S,maxideal(1),I;
906   return(simplify(phi(ker),2));
907}
908
909/*
910
911ring R=0,t,ds;
912
913ideal I=t4+t5,t7+t11,t9+t20;
914
915sagbiSP(I);
916
917*/
918
919////////////////////////////////////////////////////////////////////////////////
920static proc sortSagbi(ideal I)
921{
922    //sorts, makes input monic and removes zeros
923    I=simplify(I,2+1);
924    int i;
925    int n=1;
926    poly p;
927    while(n)
928    {
929       n=0;
930       for(i=1;i<size(I);i++)
931       {
932           if(deg(lead(I[i]))>deg(lead(I[i+1])))
933           {
934                n=1;
935                p=I[i];
936                I[i]=I[i+1];
937               I[i+1]=p;
938               break;
939            }
940       }
941    }
942   return(I);
943}
944
945/*
946
947ring R=0,t,ds;
948
949ideal I=3t5,7t2+t7,6t3+t8,3t+t7;
950
951sortSagbi(I);
952
953*/
954
955////////////////////////////////////////////////////////////////////////////////
956static proc insertOne(poly p, ideal I, int b)
957{
958   //assume I is sorted, inserts p at the correct place
959     int i,j;
960     poly q;
961     for(i=1;i<=size(I);i++)
962     {
963              if(deg(lead(p))<deg(lead(I[i])))
964              {
965                  break;
966              }
967     }
968     if(i==size(I)+1)
969     {
970        I=I,simplify(p,1);
971     }
972     else
973     {
974         for(j=size(I)+1;j>i;j--)
975         {
976              I[j]=I[j-1];
977         }
978         I[i]=simplify(p,1);
979     }
980     if(i<size(I))
981     {
982           I=interReduceSagbi(I,b);
983     }
984     return(I);
985}
986
987/*
988
989ring R=0,t,ds;
990
991ideal I=t8,t10+t13,t12+t15;
992
993insertOne(t17,I,20);
994
995I=t8,t10+t13,t12+t15,t23-t29;
996
997insertOne(-2t27,I,40);
998
999*/
1000
1001////////////////////////////////////////////////////////////////////////////////
1002static proc interReduceSagbi(ideal I, int b)
1003{
1004// reduces the elements of the dial against each other
1005     I=sortSagbi(I);
1006     ideal J;
1007     int n=1;
1008   int i;
1009     poly h;
1010     while(n)
1011     {
1012          n=0;
1013          i=1;
1014          while(i<size(I))
1015          {
1016              i++;
1017              J=I[1..i-1];
1018              h=sagbiNF(I[i],J,b);
1019              h=simplify(h,1);
1020              if(h!=I[i])
1021              {
1022                   n=1;
1023                   I[i]=h;
1024                   I=sortSagbi(I);
1025                   break;
1026              }
1027           }
1028      }
1029      return(I);
1030}
1031
1032/*
1033
1034    ring R=0,t,ds;
1035
1036    ideal I=t8,t8+t10+t13,t8+t12+t15;
1037
1038    interReduceSagbi(I,20);
1039
1040*/
1041////////////////////////////////////////////////////////////////////////////////
1042
1043static proc correctBound(ideal I, int b)
1044{
1045  //computes the conductor c of the semigroup associated to K[I]
1046  //if b>=c
1047   list L;
1048   int i;
1049   for(i=1;i<=size(I);i++)
1050   {
1051       L[i]=I[i];
1052   }
1053   list M=WSemigroup(L,b);
1054   if(b>M[2])
1055   {b=M[2]+1;}
1056   return(b);
1057}
1058
1059/*
1060
1061ring R=0,t,ds;
1062
1063ideal I=t8,t10+t13,t12+t15;
1064
1065correctBound(I,40);
1066
1067I=t8,t10+t13,t12+2t15;
1068
1069correctBound(I,40);
1070
1071*/
1072////////////////////////////////////////////////////////////////////////////////
1073static proc sortMinord(ideal I)
1074{
1075    //input an ideal
1076    //output a list L[1]=minimal order,
1077    //              L[2]=poly having the minimal order,
1078    //              L[3]=the k suchthat I[k] has the minimal order,
1079    //              L[4]=ideal I sorted in a way that minimal degree polynomial
1080
1081    //appears as the last polynomial of the ideal.ie I[size(I)]=I[k].
1082    int i;
1083    int n=1;
1084    list L;
1085    poly p;
1086    while(n)
1087    {
1088       n=0;
1089       for(i=1;i<size(I);i++)
1090       {
1091           if(ord(I[i])<ord(I[i+1]))
1092           {
1093                n=1;
1094                p=I[i];
1095                I[i]=I[i+1];
1096                I[i+1]=p;
1097                break;
1098            }
1099       }
1100    }
1101    L[1]=ord(I[size(I)]);
1102    L[2]=I[size(I)];
1103    L[3]=size(I);
1104    L[4]=I;
1105    return(L);
1106}
1107/*
1108ring r=0,t,Ds;
1109ideal I=t3,t6,t8,t4,t5,t9,t11,t3;
1110sortMinord(I);
1111*/
1112
1113////////////////////////////////////////////////////////////////////////////////
1114static proc inversP(poly p,int b)
1115{
1116  //computes the inverse of p upto the bound b
1117  if(size(p)==1)
1118  {
1119   return(p);
1120  }
1121  number c=leadcoef(p);
1122  p=p/c;
1123  poly q=1;
1124  poly s=1;
1125  while(deg(lead(q))<b)
1126  {
1127      q=q*(1-p);
1128      s=s+q;
1129  }
1130  s=1/c*jet(s,b);
1131  return(s);
1132}
1133
1134////////////////////////////////////////////////////////////////////////////////
1135static proc ConductorBound(ideal I)
1136{
1137    //input an ideal
1138    // output an integer which gives the bound of the semigroup conductor
1139    list M,L;
1140    int c,i,b;
1141    ideal J;
1142    poly p;
1143    if(size(I)<=1)
1144    {return(2);}
1145    while(1)
1146    {
1147        b=b+5;
1148        J=I;
1149        L=sortMinord(J);
1150        M[size(M)+1]=L[1];
1151        while((M[size(M)]!=1)&&(size(L[4])>1))
1152        {
1153             p=L[2]/var(1)^L[1];
1154             J=L[4];
1155             for(i=1;i<=L[3]-1;i++)
1156             {
1157               J[i]=J[i]/var(1)^L[1]*inversP(p,b);
1158               if(deg(lead(J[i]))==0){J[i]=J[i]-lead(J[i]);}
1159             }
1160             J=simplify(J,2);
1161             L=sortMinord(J);
1162             M[size(M)+1]=L[1];
1163        }
1164        if(M[size(M)]==1){break;}
1165    }
1166    for(i=1;i<=size(M)-1;i++)
1167    {
1168       c=c+M[i]*(M[i]-1);
1169    }
1170    return(c+1);
1171}
1172/*
1173ring r=0,t,Ds;
1174ideal I=t3+3t7,t8+5t9;
1175ConductorBound(I);
1176*/
1177////////////////////////////////////////////////////////////////////////////////
1178static proc sortMOD(ideal I)
1179{
1180    //sorts, makes input monic and removes zeros
1181    I=simplify(I,2);
1182    I=simplify(I,1);
1183    int i;
1184    int n=1;
1185    poly p;
1186    while(n)
1187    {
1188       n=0;
1189       for(i=1;i<size(I);i++)
1190       {
1191           if(deg(lead(I[i]))>deg(lead(I[i+1])))
1192           {
1193                n=1;
1194                p=I[i];
1195                I[i]=I[i+1];
1196                I[i+1]=p;
1197                break;
1198            }
1199       }
1200    }
1201   return(I);
1202}
1203////////////////////////////////////////////////////////////////////////////////
1204static proc SpolyMOD(ideal S,ideal P)
1205{
1206     //Assume that the basering is a ring in one variable.
1207    //input two ideals ideal S=<s_1,s_2> generators of the module and ideal P=<p_1,p_2,..,p_n> the sagbi basis of the algebra
1208    //output is an ideal generated by Q[p_1,p_2,...p_n]s_1-R[p_1,p_2,...p_n]s_2 for generators of
1209    //Q[lead(p_1),lead(p_2),.,lead(p_n)]lead(s_1)-R[lead(p_1),lead(p_2),.,lead(p_n)]lead(s_2)=0 .
1210   def br=basering;
1211   int n=ncols(P);
1212   ideal P1=lead(P);
1213   ideal S1=lead(S);
1214   execute
1215    ("ring T=("+charstr(br)+",x(1),z(1..n)),(y(1..2)),dp;");
1216    poly q;
1217    execute
1218   ("ring R=("+charstr(br)+"),(x(1),y(1..2),z(1..n)),(lp(3),dp(n));");
1219   map phi=br,x(1);
1220   ideal G=phi(P1);
1221   ideal I=phi(S1);
1222   ideal K,J;
1223   int d,o,s,j;
1224   poly q=I[1];
1225   if(deg(I[1])>deg(I[2]))
1226   {
1227       o=1;
1228       q=I[2];
1229   }
1230   I=I/q;
1231   for(int i=1;i<=2;i++)
1232   {
1233     K[i]=I[i]-y(i);
1234   }
1235   for(i=1;i<=n;i++)
1236   {
1237     K[2+i]=G[i]-z(i);
1238   }
1239   option(redSB);
1240   K=std(K);
1241   for(i=1;i<=size(K);i++)
1242   {
1243         if((K[i]/x(1)==0)&&((diff(K[i],y(1))!=0)||(diff(K[i],y(2))!=0)))
1244         {
1245                q=K[i];
1246                for(j=1;j<=2;j++)
1247                {
1248                    q=subst(q,y(j),0);
1249                }
1250                K[i]=K[i]-q+q*y(o+1);
1251                q=K[i];
1252                setring T;
1253                q=imap(R,q);
1254                s=deg(q);
1255                setring R;
1256                if(s==1){J[size(J)+1]=simplify(q,1);}
1257         }
1258   }
1259   setring br;
1260   map phi=R,maxideal(1),S,P;
1261   return(phi(J));
1262}
1263/*
1264ring r=0,t,dp;
1265ideal I=4t3,7t6+10t9;
1266ideal J=t4,t7+t10;
1267sortSagbi(SpolyMOD(I,J));
1268*/
1269////////////////////////////////////////////////////////////////////////////////
1270static proc sagbiNFMODO(poly p, ideal G, ideal I,int b)
1271{
1272    //input a poly ideal G ideal I int b is a bound
1273    //output an ideal K such that in each K[i] generators of I appear in linear.
1274    def br=basering;
1275    p=jet(p,b);
1276    if(p==0){return(p);}
1277    int n=ncols(G);
1278    int m=ncols(I);
1279    ideal G1=lead(G);
1280    ideal I1=lead(I);
1281     poly p1=lead(p);
1282    //create new ring with extra variables -
1283    execute
1284    ("ring T=("+charstr(br)+",x(1),z(1..n)),(x(2),y(1..m)),dp;");
1285    execute
1286    ("ring R=("+charstr(br)+"),(x(1..2),y(1..m),z(1..n)),(lp(m+2),dp(n));");
1287     map phi = br,x(1);
1288     ideal P = phi(G1);
1289     ideal S = phi(I1);
1290     poly check = phi(p1);
1291     poly keep=S[1];
1292     S=S/keep;
1293
1294     check=check/keep;
1295     ideal M;
1296     poly q;
1297     for (int i=1;i<=m;i=i+1)
1298     {
1299         M[i]=S[i]-y(i);
1300     }
1301     for (i=1;i<=n;i=i+1)
1302     {
1303        M[m+i]=P[i]-z(i);
1304     }
1305     M[size(M)+1]=check-x(2);
1306     check=check*keep;
1307     option(redSB);
1308     M=std(M);
1309     int j,s;
1310     for(i=1;i<=size(M);i++)
1311     {
1312         if((deg(M[i]/x(2))==0)&&(M[i]/x(1)==0))
1313         {
1314               q=subst(M[i],x(2),0);
1315               for(j=1;j<=m;j++)
1316               {
1317                  q=subst(q,y(j),0);
1318               }
1319               M[i]=M[i]-q+q*y(1);
1320             q=M[i];
1321               setring T;
1322               poly q=imap(R,q);
1323             s=deg(q);
1324               setring R;
1325               if(s==1){check=simplify(q,1);break;}
1326         }
1327     }
1328     setring br;
1329     map psi=R,maxideal(1),p,I,G;
1330     return(psi(check));
1331}
1332////////////////////////////////////////////////////////////////////////////////
1333
1334static proc sagbiNFMOD(poly p, ideal G, ideal I, int b)
1335{
1336    poly f=jet(p,b);
1337    if(f==0){return(f);}
1338    poly h;
1339    while(f!=h)
1340    {
1341         h=f;
1342         f=sagbiNFMODO(f,G,I,b);
1343    }
1344    if(f==0){return(f);}
1345    return(lead(f)+sagbiNFMOD(f-lead(f),G,I,b));
1346}
1347////////////////////////////////////////////////////////////////////////////////
1348static proc createP(ideal I)
1349{
1350   list P;
1351   int i=1;
1352   int j;
1353   while(i<=size(I)-1)
1354   {
1355      j=i+1;
1356      while(j<=size(I))
1357      {
1358          P[size(P)+1]=list(I[i],I[j]);
1359          j++;
1360      }
1361      i++;
1362   }
1363   return(P);
1364}
1365////////////////////////////////////////////////////////////////////////////////
1366static proc enlargeP(poly h,list P,ideal I)
1367{
1368    int i;
1369    for(i=1;i<=size(I);i++)
1370    {
1371         P[size(P)+1]=list(I[i],h);
1372    }
1373    return(P);
1374}
1375/*
1376ring r=0,t,Ds;
1377ideal I=4t3,7t6+10t9;
1378ideal G=t4,t7+t10;
1379sagbiMod(I,G,18);
1380*/
1381
1382////////////////////////////////////////////////////////////////////////////////
1383static proc sortIntvec(intvec L)
1384{
1385    //input: intvec L.
1386    //output: L sorted, multiple elements canceled.
1387    int i;
1388    int j;
1389    int n=1;
1390    intvec M;
1391    while(n)
1392    {
1393        for(i=1;i<=size(L);i++)
1394        {
1395            for(j=i+1;j<=size(L);j++)
1396            {
1397                 if(L[i]==L[j])
1398                 {
1399                    L[j]=0;
1400                 }
1401             }
1402         }
1403         n=0;
1404     }
1405     for(i=1;i<=size(L);i++)
1406     {
1407         if((L[i]!=0)||(i==1))
1408         {
1409            M[size(M)+1]=L[i];
1410         }
1411     }
1412     int m=1;int p;
1413     while(m)
1414     {
1415        m=0;
1416        for(i=1;i<size(M);i++)
1417        {
1418           if(M[i]>M[i+1])
1419           {
1420                m=1;
1421                p=M[i];
1422                M[i]=M[i+1];
1423               M[i+1]=p;
1424               break;
1425            }
1426         }
1427      }
1428     M=M[2..size(M)];
1429     return(M);
1430}
1431////////////////////////////////////////////////////////////////////////////////
1432static proc findConductor(intvec L)
1433{
1434     //input a intvec L
1435     //output is an integer which came before the gap from right to left.
1436     int i;int j; list K;
1437     int c;
1438     for(i=size(L);i>=2;i--)
1439     {
1440        if(L[i]!=L[i-1]+1)
1441        {
1442            c=L[i];
1443            break;
1444        }
1445     }
1446     if(c==0){c=1;}
1447     return(c);
1448}
1449////////////////////////////////////////////////////////////////////////////////
1450static proc cutAfterConductor(intvec L)
1451{
1452     //input an integer vector
1453     //output cut all the integers in the intvec which came after the conductor
1454     int i;int j; intvec K;
1455     int c=findConductor(L);
1456     for(i=1;i<=size(L);i++)
1457     {
1458         if(L[i]==c)
1459         {
1460            K[1..i]=L[1..i];
1461         }
1462     }
1463     return(K);
1464}
1465////////////////////////////////////////////////////////////////////////////////
1466static proc CompareList(list L,list M,int n)
1467{
1468      //input two list L,M with the same size n
1469      //out put 0 if not equal 1 if equal.
1470      for(int i=1;i<=n;i++)
1471      {
1472           if(L[i]!=M[i])
1473           {
1474               i=0;
1475               break;
1476           }
1477      }
1478      return(i);
1479}
1480////////////////////////////////////////////////////////////////////////////////
1481static proc Guess(ideal I)
1482{
1483  // comput the sagbi basis of the module
1484  //which we guess .
1485   I=sagbiAlg(I);
1486   ideal H=diff(I,var(1));
1487   H=sagbiMod(H,I);
1488   list K=semiMod(H,I);
1489   return(K);
1490}
1491////////////////////////////////////////////////////////////////////////////////
1492/*
1493===============================   Examples==========================================
1494ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t7+7t8+22t9+51t10+113t11+219t12+366t13+589t14+876t15+1170t16+1514t17+1828t1
14958+2011t19+2165t20+2163t21+1982t22+1806t23+1491t24+1141t25+889t26+588t27+379t28+2
149652t29+120t30+72t31+36t32+9t33+9t34+t36;
1497planeCur(I);
1498//=============================
1499ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t7+7t8+21t9+42t10+77t11+126t12+168t13+211t14+252t15+252t16+245t17+231t18+17
15005t19+140t20+105t21+56t22+42t23+21t24+7t25+7t26+t28
1501planeCur(I);
1502//===============================
1503ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t5+5t6+11t7+22t8+46t9+73t10+107t11+161t12+198t13+231t14+272t15+262t16+250t1
15047+236t18+175t19+141t20+105t21+56t22+42t23+21t24+7t25+7t26+t28
1505planeCur(I);
1506//===============================
1507ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t6+7t7+22t8+47t9+87t10+143t11+202t12+258t13+307t14+332t15+327t16+305t17+266
1508t18+205t19+155t20+111t21+62t22+42t23+22t24+7t25+7t26+t28
1509planeCur(I);
1510//===============================
1511ideal I=t2+2t3+t4+2t5+2t6+t8,t+t2+t4;
1512planeCur(I);
1513//===============================
1514ideal I=t2+2t3+t4+2t5+2t6+t8,t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12;
1515planeCur(I);
1516//===============================
1517ideal I=t2+2t3+t4+2t5+2t6+t8,t5+5t6+10t7+15t8+25t9+31t10+30t11+35t12+30t13+20t14+20t15+10t16+5t17+5t18+t
151820;
1519planeCur(I);
1520//================================================================
1521ideal I=t2+2t3+t4+2t5+2t6+t8,t11+11t12+55t13+176t14+440t15+957t16+1837t17+3135t18+4917t19+7150t20+9581t2
15221+12046t22+14300t23+15851t24+16665t25+16687t26+15642t27+14025t28+12012t29+9570t3
15230+7392t31+5412t32+3630t33+2442t34+1485t35+825t36+495t37+220t38+110t39+55t40+11t4
15241+11t42+t44
1525planeCur(I);
1526//===============================
1527ideal I=t2+2t3+t4+2t5+2t6+t8,t45+45t46+990t47+14235t48+150975t49+1264329t50+8742030t51+51530985t52+26531
15287525t53+1216052255t54+5037384726t55+19091253735t56+66860434260t57+218159032410t5
15298+667743178590t59+1928258130018t60+5278946615910t61+13758022145340t62+3425642198
15301760t63+81743054778990t64+187438301870193t65+413998043743845t66+882643063827960t
153167+1819834573178925t68+3634672399863945t69+7042671464388093t70+13256726980146210
1532t71+24271349963247255t72+43270648586469315t73+75192560924341905t74+1274795590273
153339134t75+211037186585880765t76+341404127193205395t77+540109313678250885t78+83615
15342328502076770t79+1267494306126371433t80+1882391473790147350t81+27403488768330021
153560t82+3912426884928977910t83+5480608823069934180t84+7535946071701345419t85+10175
1536247273088233765t86+13496177050168252770t87+17590776929351920305t88+2253760903474
15379950330t89+28392934993342165732t90+35181553858703840610t91+42888103580926417860t
153892+51449748796644626670t93+60751205041524651720t94+70622965899108523296t95+80843
1539398349265488310t96+91145062374529367655t97+101225220090613564275t98+110760068529
1540877638960t99+119421810187582522995t100+126897320456330125725t101+132906930278955
1541392505t102+137221752614812709130t103+139678059865381605315t104+14018746206071963
15425683t105+138742016728357115865t106+135413875517988518550t107+1303495836626693311
154325t108+123759636437037165840t109+115904304930914703126t110+107077029168089360280
1544t111+97586814544772570280t112+87741050370279892245t113+77830012377996062865t114+
154568114044171037561004t115+58814074232856531765t116+50105762317964865600t117+42117
1546223130580686220t118+34929979773602146200t119+28582581501297657240t120+2307618932
15479698326690t121+18381388272325750530t122+14445518786710710480t123+111999120315284
154853530t124+8566543884036576384t125+6463772035817658320t126+4810966835075093880t12
15497+3531977599087147320t128+2557482632962404180t129+1826346112628778972t130+128615
15501054039308160t131+893096793855988260t132+611445912380539110t133+4126879484894709
155190t134+274559737461674588t135+180030436220988810t136+116328756134241090t137+7406
15521684381355110t138+46450833440621940t139+28695217633493598t140+17456561066064945t
1553141+10455665532950385t142+6164429567615550t143+3576677924170795t144+204174682346
15548917t145+1146414046643415t146+632953124099190t147+343522434444255t148+1832093883
155547205t149+95981896978935t150+49375510221510t151+24930700142535t152+1234956944936
15560t153+5998779092790t154+2855797655022t155+1331635383390t156+607860009900t157+271
1557401068250t158+118455934740t159+50498441136t160+20999419155t161+8518084355t162+33
155861582620t163+1290701115t164+481780299t165+173664315t166+61087950t167+20511645t16
15598+6704775t169+2115729t170+610170t171+191565t172+42570t173+15180t174+1980t175+990
1560t176+45t177+45t178+t180
1561planeCur(I);
1562//===============================
1563ideal I=t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12,t2+2t3+t4+2t5+2t6+t8
1564planeCur(I);
1565//===============================
1566 ideal I=t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12,t5+5t6+10t7+15t8+25t9+31t10+30t11+35t12+30t13+20t14+20t15+10t16+5t17+5t18+t20
1567 planeCur(I);
1568//===============================
1569ideal I=t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12,t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16
1570 planeCur(I);
1571//==========================================================================
1572 ring r=0,t,Ds;
1573 ideal I=t3,t10+t14;
1574 planeCur(I);
1575//===============================
1576ideal I=t3+3t4+3t5+t6,t10+10t11+45t12+120t13+211t14+266t15+301t16+484t17+1046t18+2012t19+3004t20+
15773432t21+3003t22+2002t23+1001t24+364t25+91t26+14t27+t28
1578planeCur(I);
1579//=======================================
1580ideal I=t3+3t4+3t5+t6,t10+10t11+45t12+120t13+210t14+252t15+210t16+120t17+45t18+10t19+t20
1581 planeCur(I);
1582//===============================
1583ring r=0,t,Ds;
1584ideal I=t3+3t4+3t5+t6,t13+14t14+92t15+377t16+1079t17+2288t18+3718t19+4719t20+4719t21+3718t22+2288
1585t23+1079t24+377t25+92t26+14t27+t28,t20+20t21+190t22+1140t23+4845t24+15504t25+38760t26+77520t27+125970t28+16796
15860t29+184756t30+167960t31+125970t32+77520t33+38760t34+15504t35+4845t36+1140t37+19
15870t38+20t39+t40
1588spaceCur(I);
1589//=====================================================
1590ideal I=t3+3t4+3t5+t6,t13+14t14+92t15+377t16+1079t17+2288t18+3718t19+4719t20+4719t21+3718t22+2288
1591t23+1079t24+377t25+92t26+14t27+t28,t17+17t18+136t19+680t20+2380t21+6188t22+12376t23+19448t24+24310t25+24310t26
1592+19448t27+12376t28+6188t29+2380t30+680t31+136t32+17t33+t34
1593spaceCur(I);
1594//========================================================
1595ideal I=t3,t16,t14;
1596spaceCur(I);
1597//=============================================
1598ideal I=t3,t19,t14;
1599spaceCur(I);
1600//==============================================
1601ideal I=t3,t14+t16,t19;
1602spaceCur(I);
1603//===============================================
1604ideal I=t3,t14+t16,t25;
1605spaceCur(I);
1606//=======================================
1607ideal I=t3+3t4+3t5+t6,t14+14t15+91t16+364t17+1001t18+2002t19+3003t20+3432t21+3004t22+2024t23+1232
1608t24+1904t25+7406t26+26348t27+74614t28+170544t29+319770t30+497420t31+646646t32+70
16095432t33+646646t34+497420t35+319770t36+170544t37+74613t38+26334t39+7315t40+1540t4
16101+231t42+22t43+t44,t25+25t26+300t27+2300t28+12650t29+53130t30+177100t31+480700t32+1081575t33+2
1611042975t34+3268760t35+4457400t36+5200300t37+5200300t38+4457400t39+3268760t40+2042
1612975t41+1081575t42+480700t43+177100t44+53130t45+12650t46+2300t47+300t48+25t49+t50
1613spaceCur(I);
1614//=========================================================
1615ideal I=t3+3t4+3t5+t6,t14+14t15+91t16+364t17+1001t18+2003t19+3022t20+3603t21+3972t22+5878t23+1262
16169t24+27496t25+50479t26+75596t27+92379t28+92378t29+75582t30+50388t31+27132t32+116
161728t33+3876t34+969t35+171t36+19t37+t38,t25+25t26+300t27+2300t28+12650t29+53130t30+177100t31+480700t32+1081575t33+2
1618042975t34+3268760t35+4457400t36+5200300t37+5200300t38+4457400t39+3268760t40+2042
1619975t41+1081575t42+480700t43+177100t44+53130t45+12650t46+2300t47+300t48+25t49+t50
1620spaceCur(I);
1621//==============================================================
1622ideal I=t3+3t4+3t5+t6,t14+14t15+92t16+380t17+1121t18+2562t19+4823t20+7800t21+11011t22+13442t23+13
1623871t24+11804t25+8099t26+4382t27+1821t28+560t29+120t30+16t31+t32,t19+19t20+171t21+969t22+3876t23+11628t24+27132t25+50388t26+75582t27+92378t2
16248+92378t29+75582t30+50388t31+27132t32+11628t33+3876t34+969t35+171t36+19t37+t38
1625spaceCur(I);
1626//======================================================================
1627ideal I=t3+3t4+3t5+t6,t14+14t15+92t16+380t17+1121t18+2562t19+4823t20+7800t21+11011t22+13442t23+13
1628871t24+11804t25+8099t26+4382t27+1821t28+560t29+120t30+16t31+t32,t25+25t26+300t27+2300t28+12650t29+53130t30+177100t31+480700t32+1081575t33+2
1629042975t34+3268760t35+4457400t36+5200300t37+5200300t38+4457400t39+3268760t40+2042
1630975t41+1081575t42+480700t43+177100t44+53130t45+12650t46+2300t47+300t48+25t49+t50
1631spaceCur(I);
1632//================================================================
1633ideal I=t3+3t4+3t5+t6,t16+16t17+120t18+560t19+1820t20+4368t21+8008t22+11440t23+12870t24+11440t25+
16348008t26+4368t27+1820t28+560t29+120t30+16t31+t32
1635,t14+14t15+91t16+364t17+1001t18+2002t19+3003t20+3432t21+3003t22+2002t23+1001
1636t24+364t25+91t26+14t27+t28
1637spaceCur(I);
1638//===========================================================================================
1639*/
Note: See TracBrowser for help on using the repository browser.