source: git/Singular/LIB/classifyMapGerms.lib @ 20f2239

fieker-DuValspielwiese
Last change on this file since 20f2239 was 20f2239, checked in by Hans Schoenemann <hannes@…>, 4 years ago
spelling p7
  • Property mode set to 100644
File size: 38.1 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2version="version classifyMapGerms.lib 4.1.2.0 Feb_2019 "; // $Id$
3category="Singularities";
4info="
5LIBRARY:   classifyMapGerms.lib
6AUTHORS:   Gerhard Pfister, pfister@mathematik.uni-kl.de
7           Deeba Afzal,     deebafzal@gmail.com
8           Shamsa Kanwal,   lotus_zone16@yahoo.com
9
10OVERVIEW:
11 A library for computing the standard basis of the tangent space at the orbit
12 of an algebraic group action. The tangent space is usually described as the sum
13 of two modules over different rings. It computes the standard basis using
14 modular methods and parallel modular methods. It also computes the normal form
15 of the germ given by Riegers classification.
16
17REFERENCES:
18[1] Idrees N.; Pfister, G.; Steidel, S.: Parallelization of modular algorithms.
19  J. Symbolic Comput. 46(2011), no. 6, 672-684.
20[2] Gibson,C.G; Hobbs,C.A.: Simple SIngularities of Space Curves.
21  Math.Proc. Comb.Phil.Soc.(1993),113,297.
22[3] 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[4] Rieger, J. H.: Families of maps from the plane to the plane. J. London Math.
25Soc. (2)36(1987), no. 2. 351-369.
26
27PROCEDURES:
28 coDimMap(I);    computes a bound of the A-determinacy of the map germ defined by I
29 coDim(M,N,I,b); computes the K-vectorspace dimension of A^r/M+N+maxideal(b)*A^r
30 vStd(M,N,I,b);      computes a standard basis of M+N+maxideal(b)*A^r
31 modVStd(M,N,I,b);   computes a standard basis of M+N+maxideal(bound)*A^r (modular)
32 modVStd0(M,N,I,b);  computes a standard basis of M+N+maxideal(bound)*A^r (parallel)
33 classifySimpleMaps(I);  computes the normal form of a germ in Riegers classification
34 classifySimpleMaps1(I); computes the normal form of a germ in Riegers classification
35 classifyUnimodalMaps(I); computes the normal form of a germ in Riegers classification
36";
37
38LIB "general.lib";
39LIB "modstd.lib";
40LIB "teachstd.lib";
41LIB "algebra.lib";
42
43//===================================================================================
44proc coDimMap(ideal I, list #)
45"USAGE:   coDimMap(I, #);  I=ideal, #=list
46COMPUTE:  a bound of the A-determinacy of the map germ defined by I.
47RETURN:   a list in which 1st entry gives the bound of the A-determinancy and
48          the second entry gives the codimension of the map germ defined by I.
49NOTE:     if # is empty it computes A^e-codimension(the extended codimension).
50EXAMPLE:  example coDimMap; shows an example"
51{
52   int bound=10;
53   module M=jacob(I);
54   module N=freemodule(ncols(I));
55   if(size(#)==0){return(coDim(M,N,I,bound,0));}
56   M=maxideal(1)*M;
57   N=I*N;
58   list L=coDim(M,N,I,bound,0);
59   L[2]=L[2]-nvars(basering);
60   return(L);
61}
62example
63{
64 "EXAMPLE"; echo=2;
65  ring R=0,(x,y),(c,ds);
66  poly f1=x;
67  poly f2=xy+y5+y7;
68  poly f11=f1+f2*f1;
69  poly f22=f2+f1^2;
70  map phi=basering,x+y,y+y2;
71  f1=phi(f11);
72  f2=phi(f22);
73  ideal I=f1,f2;
74  coDimMap(I);
75  coDimMap(I,1);
76}
77///////////////////////////////////////////////////////////////////////////////
78proc coDim(module M, module N, ideal I,int bound, list #)
79"USAGE:   coDim(module M, module N, ideal I,int bound, list #); M is a submodule
80          in A^r over the basering=:A, N is a submodule in R^r over the subring
81          R of the basering generated by the entries of I
82COMPUTE:  computes the K-vectorspace dimension of A^r/M+N+maxideal(bound)*A^r
83RETURN:   an integer
84NOTE:     if # is not empty the bound is corrected by computing determinacy
85EXAMPLE:  example coDim; shows an example"
86{
87//---------------------------- initialisation ---------------------------------
88   int r=nrows(M);
89   int k;
90   int oldbound=bound;
91   module M0=M;
92   module N0=N;
93   if(size(#)!=0)
94   {
95      if(#[1]==0)
96      {
97         k=boundK(M,N,I);
98         if(k<0){return(list(-1,-1));}
99      }
100      else
101      {
102         k=#[1];
103      }
104      bound=bound+k;
105   }
106   list S=vStd(M,N,I,bound);
107   M=S[1];
108   module L=S[2];
109   L=simplify(reduce(lead(L),std(lead(M)+maxideal(bound)*freemodule(r))),1);
110   L=simplify(L,6);
111   if(size(#)==0){
112   return(vdim(std(lead(M)+maxideal(bound)*freemodule(r)))-size(L));
113   }
114   if(correctBound(M,L,bound,oldbound))
115   {
116      int co=vdim(std(lead(M)+maxideal(bound)*freemodule(r)))-size(L);
117      return(list(bound,co));
118   }
119   bound++;
120   return(coDim(M0,N0,I,bound,k));
121}
122example
123{
124  "EXAMPLE"; echo=2;
125   ring R=0,(x,y),(c,ds);
126   poly f1=x;
127   poly f2=xy+y5+y7;
128   poly f11=f1+f2*f1;
129   poly f22=f2+f1^2;
130   map phi=basering,x+y,y+y2;
131   f1=phi(f11);
132   f2=phi(f22);
133   ideal I=f1,f2;
134   module M=maxideal(1)*jacob(I);
135   module N=I*freemodule(2);
136   coDim(M,N,I,15);
137}
138///////////////////////////////////////////////////////////////////////////////
139proc vStd(module M, module N, ideal I,int bound)
140"USAGE:    vStd(M, N, I, bound);M is a submodule  in A^r over the basering=:A,
141           N ist a submodule in R^r over the subring R of the basering generated
142           by the entries of I
143COMPUTE:  a standard basis of M+N+maxideal(bound)*A^r
144RETURN:   a list whose ist entry gives a list where each entry is a  genrator of
145          standard basis and second entry gives a list of generators after the
146          reduced echelon form
147EXAMPLE:  example vStd; shows an example"
148{
149   if(size(M)!=1)
150   {
151      M=jet(std(M+maxideal(bound)*freemodule(nrows(M))),bound);
152   }
153   if (system("version")>4033)
154   {
155     N=system("reduce_bound",N,M,bound);
156   }
157   else
158   {
159     N=myReduceM(N,M,bound);
160   }
161   N=echelon(M,N,bound);
162   module L=computeN(M,N,I,bound-1);
163   L=echelon(M,L,bound);
164   return(list(M,L));
165}
166example
167{
168  "EXAMPLE"; echo=2;
169   ring R=0,(x,y),(c,ds);
170   poly f1=x;
171   poly f2=xy+y5+y7;
172   poly f11=f1+f2*f1;
173   poly f22=f2+f1^2;
174   map phi=basering,x+y,y+y2;
175   f1=phi(f11);
176   f2=phi(f22);
177   ideal I=f1,f2;
178   module M=maxideal(1)*jacob(I);
179   module N=I*freemodule(2);
180   vStd(M,N,I,15);
181}
182///////////////////////////////////////////////////////////////////////////////
183static proc vStd_size1(module M, module N, ideal I, int bound)
184"USAGE:    vStd(M, N, I, bound);M is a submodule generated by one element in A^r over the
185           basering=:A, N ist a submodule in R^r over the subring R of the basering
186           generated by the entries of I
187COMPUTE:  a standard basis of M+N+maxideal(bound)*A^r
188RETURN:   a list whose ist entry gives a list where each entry is a  genrator of
189          standard basis and second entry gives a list of generators after the
190          reduced echelon form
191EXAMPLE:  example vStd_size1; shows an example"
192{
193   if(size(M)!=1)
194   {
195      M=jet(std(M+maxideal(bound)*freemodule(nrows(M))),bound);
196   }
197   if (system("version")>4033)
198   {
199     N=system("reduce_bound",N,M,bound);
200   }
201   else
202   {
203     N=myReduceM(N,M,bound);
204   }
205   N=echelon(M,N,bound);
206   module L=computeN(M,N,I,bound-1);
207   L=echelon(M,L,bound);
208   return(L);
209}
210example
211{
212  "EXAMPLE"; echo=2;
213   ring R=0,(x,y),(c,ds);
214   poly f1=x;
215   poly f2=xy+y5+y7;
216   poly f11=f1+f2*f1;
217   poly f22=f2+f1^2;
218   map phi=basering,x+y,y+y2;
219   f1=phi(f11);
220   f2=phi(f22);
221   ideal I=f1,f2;
222   module M=maxideal(1)*jacob(I);
223   module N=I*freemodule(2);
224   vStd_size1(M,N,I,15);
225}
226
227///////////////////////////////////////////////////////////////////////////////
228static proc boundK(module M,module N, ideal I)
229"USAGE:    boundK(M, N, I);
230COMPUTE:  Let T=freemodule(nrows(M)), computes k such that
231          maxideal(k)*T<=M+I*T+maxideal(k+1)*T
232RETURN:   an integer
233REMARk:   needed to compute the determinacy
234"
235{
236   int i;
237   module T=freemodule(nrows(M));
238   module M0=M+I*T;
239   while(1)
240   {
241      i++;
242      T=maxideal(1)*T;
243
244      M=std(jet(M0,i)+maxideal(1)*T);
245      if(size(reduce(T,M,5))==0){return(i);}
246      if(i>100){M0=std(M0);if(vdim(M0)==-1){break;}}
247   }
248   return(-1);
249}
250///////////////////////////////////////////////////////////////////////////////
251static proc correctBound(module M,module L,int bound,int oldbound)
252"USAGE:     correctBound(M, L, bound, oldbound)
253COMPUTE:    let T=freemodule(nrows(M)),test if
254            maxideal(old bound)*T<=M+L+maxideal(bound)*T
255RETURN:     0 or 1
256REMARK:     needed to compute the A-determinacy and codimension
257"
258{
259   int i;
260   L=jet(L+std(lead(M)),bound-1);
261   module T=maxideal(oldbound)*freemodule(nrows(M));
262   while(i<bound-oldbound)
263   {
264      T=jet(myReduceM(T,M,bound),bound-1);
265      if(size(reduceV(M,T,L,bound))!=0)
266      {
267         return(0);
268      }
269      T=maxideal(1)*T;
270      i++;
271   }
272   return(1);
273}
274///////////////////////////////////////////////////////////////////////////////
275static proc reduceV(module M,module T, module L,int bound)
276"USAGE:     reduceV(M, T, L, bound)
277COMPUTE:    special reduction procedure for correctBound (reduction modulo a sum
278            of modules over different rings
279RETURN:     a list
280"
281{
282   int i,j;
283   vector f,g;
284   for(i=1;i<=ncols(T);i++)
285   {
286     f=T[i];
287     while(1)
288     {
289        g=reducer(f,L);
290        if(g==0){break;}
291        f=f-leadcoef(f)/leadcoef(g)*g;
292        //f=jet(system("reduce_bound",f,M,bound),bound-1);
293        f=jet(myReduce(f,M,bound),bound-1);
294        if(f==0){break;}
295     }
296     T[i]=f;
297   }
298   return(T);
299}
300///////////////////////////////////////////////////////////////////////////////
301static proc reducer(vector f, module L)
302"USAGE:     reducer(f, module L)
303COMPUTE:    find the reductor for reduceV
304RETURN:     a vector
305"
306{
307   vector g;
308   int i;
309   for(i=1;i<=size(L);i++)
310   {
311      if(leadmonom(f)==leadmonom(L[i]))
312      {
313         g=L[i];
314         break;
315      }
316   }
317   return(g);
318}
319///////////////////////////////////////////////////////////////////////////////
320static proc computeN(module M, module N, ideal I, int bound)
321"USAGE:   computeN(M, N, I, bound) M is a submodule  in A^r over the basering=:A
322          N ist a submodule in R^r over the subring R of the basering
323          generated by the entries of I
324COMPUTE:  all products of powers of generators of I with N
325"
326{
327   I=jet(I,bound);
328   I=simplify(I,2);
329   module L;
330   int j,k;
331   int r=size(I);
332   ideal F=1;
333   ideal G;
334
335   while(F!=0)
336   {
337      for(k=1;k<=size(N);k++)
338      {
339         for(j=1;j<=size(F);j++)
340         {
341            L[size(L)+1]=jet(myReduce(F[j]*N[k],M,bound),bound);
342            //L[ncols(L)+1]=jet(system("reduce_bound",F[j]*N[k],M,bound),bound);
343         }
344      }
345      G=F;
346      F=0;
347      for(j=1;j<=size(G);j++)
348      {
349         for(k=1;k<=r;k++)
350         {
351            F=F,jet(jet(G[j],bound-ord(I[k]))*I[k],bound);
352         }
353      }
354      F=simplify(F,2);
355      F=simplify(F,4);
356      F=simplify(F,2);
357   }
358   return(L);
359}
360
361///////////////////////////////////////////////////////////////////////////////
362static proc myReduceM(module N, module M, int bound)
363"USAGE:   myReduceM(N, M, bound) M is a submodule  in A^r over the basering=:A
364          N ist a submodule in R^r over the subring R of the basering
365          generated by the entries of I
366COMPUTE:  myReduce for ideals
367"
368{
369   int i;
370   for(i=1;i<=ncols(N);i++)
371   {
372      N[i]=myReduce(N[i],M,bound);
373   }
374   return(N);
375}
376///////////////////////////////////////////////////////////////////////////////
377static proc myReduce(vector f, module M, int bound)
378{
379   f=jet(f,bound);
380   if(f==0){return(f);}
381   vector g, vv,ww;
382   poly p;
383   number c;
384   int i;
385   vector re;
386   while(f!=0)
387   {
388      for(i=1;i<=size(M);i++)
389      {
390         if(reduce(lead(f),std(lead(M[i])),5)==0)
391         {
392            c=leadcoef(f)/leadcoef(M[i]);
393            vv=lead(f);ww=lead(M[i]);
394            p=quotient(vv,ww)[1];
395            g=M[i];break;
396         }
397      }
398      while((f!=0)&&(g!=0))
399      {
400         f=f-c*p*g;
401         f=jet(f,bound);
402         if(f==0){break;}
403         g=0;
404         for(i=1;i<=size(M);i++)
405         {
406            if(reduce(lead(f),std(lead(M[i])),5)==0)
407            {
408               c=leadcoef(f)/leadcoef(M[i]);
409               vv=lead(f);ww=lead(M[i]);
410               p=quotient(vv,ww)[1];
411               g=M[i];break;
412            }
413         }
414      }
415      re=re+lead(f);
416      f=f-lead(f);
417   }
418   return(re);
419}
420///////////////////////////////////////////////////////////////////////////////
421static proc echelon(module M, module N, int b)
422"USAGE:   echelon(M, N, b)
423COMPUTE:  the echelon form of N modulo M
424RETURN:   the echelon form of N modulo M
425"
426{
427   int i,j,d;
428   N=simplify(N,4);
429   N=simplify(N,3);
430   N=sort(N)[1];
431   d=size(N);
432   i=d;
433   while(i>=2)
434   {
435      for(j=i-1;j>=1;j=j-1)
436      {
437         if(lead(N[i])==lead(N[j]))
438         {
439            N[j]=N[j]-N[i];
440
441         }
442      }
443      N=simplify(N,4);
444      N=simplify(N,3);
445      N=sort(N)[1];
446      i=i-(d-size(N))-1;
447      d=size(N);
448   }
449   N=simplify(N,6);
450   return(N);
451}
452///////////////////////////////////////////////////////////////////////////////
453static proc reduc(poly f,ideal I, int b)
454"USAGE:   reduc(f, I, b)
455COMPUTE:  the normal form of f with respect to the algebra generated by I
456"
457{
458   list L=1;
459   map psi;
460   f=jet(f,b);
461   if(f==0){return(f);}
462   while((f!=0) && (L[1]!=0))
463   {
464     L= algebra_containment(lead(f),lead(I),1);
465     if (L[1]==1)
466     {
467        def S= L[2];
468        psi= S,maxideal(1),I;
469        f=jet(f-psi(check),b);
470        kill S;
471     }
472   }
473   return (lead(f)+reduc(f-lead(f),I,b));
474}
475///////////////////////////////////////////////////////////////////////////////
476proc classifySimpleMaps(ideal I)
477"USAGE:   classifySimpleMaps(I);  I=an ideal with 2 generators in a polynomial
478         ring with 2 variables and local ordering defining a map germ C^2 to C^2
479COMPUTE:  The normal form of the germ in Riegers classification if it is
480          simple
481RETURN:   normal form of I, of type ideal
482NOTE:     If I is not simple it returns (0,0)
483EXAMPLE:  example classifySimpleMaps; shows an example"
484{
485   if(size(jet(I,1))==0){return(ideal(0,0));}
486   list L=coDimMap(I,1);
487   int determinacy=L[1];
488   int codimension=L[2];
489   if(determinacy<0){return(ideal(0,0));}
490   I=normalMap(I,determinacy);
491   poly p=lead(I[2]);
492   if(p==0){return(ideal(0,0));}
493   if(p==var(2)){return(maxideal(1));}
494   if(p==var(2)^2){return(ideal(var(1),var(2)^2));}
495   if(p==var(1)*var(2))
496   {
497      if(codimension==2){return(ideal(var(1),p+var(2)^3));}
498      if(codimension==3){return(ideal(var(1),p+var(2)^4));}
499      if(codimension==4){return(ideal(var(1),p+var(2)^5+var(2)^7));}
500      if(codimension==5){return(ideal(var(1),p+var(2)^5));}
501      return(ideal(0,0));
502   }
503   if(p==var(2)^3)
504   {
505      return(ideal(var(1),p+var(1)^(codimension-1)*var(2)));
506   }
507   if(p==var(1)*var(2)^2)
508   {
509      if(vdim(std(I))==4)
510      {
511         return(ideal(var(1),p+var(2)^4+var(2)^(2*codimension-3)));
512      }
513      if(codimension==5){return(ideal(var(1),p+var(2)^5+var(2)^6));}
514      if(codimension==6){return(ideal(var(1),p+var(2)^5+var(2)^9));}
515      if(codimension==7){return(ideal(var(1),p+var(2)^5));}
516      return(ideal(0,0));
517   }
518   if(p==var(1)^2*var(2))
519   {
520      if(codimension==3){return(ideal(var(1),p+var(2)^3));}
521      if(codimension==5){return(ideal(var(1),p+var(2)^4+var(2)^5));}
522      if(codimension==6){return(ideal(var(1),p+var(2)^4));}
523      return(ideal(0,0));
524   }
525   return(ideal(0,0));
526}
527example
528{
529  "EXAMPLE"; echo=2;
530   ring R=0,(x,y),(c,ds);
531   poly f1=x;
532   poly f2=xy+y5+y7;
533   poly f11=f1+f2*f1;
534   poly f22=f2+f1^2;
535   map phi=basering,x+y,y+y2;
536   f1=phi(f11);
537   f2=phi(f22);
538   ideal I=f1,f2;
539   classifySimpleMaps(I);
540}
541///////////////////////////////////////////////////////////////////////////////
542proc classifySimpleMaps1(ideal I)
543"USAGE:   classifySimpleMaps1(I);  I=an ideal with 2 generators in a polynomial
544         ring with 2 variables and local ordering defining a map germ C^2 to C^2
545COMPUTE:  The normal form of the germ in Riegers classification if it is
546          simple
547RETURN:   normal form of I, of type ideal
548NOTE:     If I is not simple it returns (0,0)
549EXAMPLE:  example classifySimpleMaps1; shows an example"
550{
551   if(size(jet(I,1))==0){return(ideal(0,0));}
552   list L=coDimMap(I,1);
553   int determinacy=L[1];
554   int c=L[2];
555   if(determinacy<0){return(ideal(0,0));}
556   I=normalMap(I,determinacy);
557   int m =vdim(std(I));
558   int mu=vdim(std(jacob(diff(I[2],var(2)))));
559
560   if((mu==-1)&&(m>=2)){return(ideal(0,0));}
561   if(m==1){return(maxideal(1));}
562
563   if(mu==0)
564   {
565      if(m==2){return(ideal(var(1),var(2)^2));}
566      if(m==3){return(ideal(var(1),var(1)*var(2)+var(2)^3));}
567      if(m==4){return(ideal(var(1),var(1)*var(2)+var(2)^4));}
568      if(m==5)
569      {
570        if(c==4)
571        {
572           return(ideal(var(1),var(1)*var(2)+var(2)^5+var(2)^7));
573        }
574        if(c==5)
575        {
576           return(ideal(var(1),var(1)*var(2)+var(2)^5));
577        }
578      }
579      return(ideal(0,0));
580   }
581   if(mu==1)
582   {
583      if(m==3){return(ideal(var(1),var(1)^2*var(2)+var(2)^3));}
584      if(m==4){return(ideal(var(1),var(1)*var(2)^2+var(2)^4+var(2)^(2*c-3)));}
585      if(m==5)
586      {
587        if(c==5)
588        {
589           return(ideal(var(1),var(1)*var(2)^2+var(2)^5+var(2)^6));
590        }
591        if(c==6)
592        {
593           return(ideal(var(1),var(1)*var(2)^2+var(2)^5+var(2)^9));
594        }
595        if(c==7)
596        {
597           return(ideal(var(1),var(1)*var(2)^2+var(2)^5));
598        }
599      }
600      return(ideal(0,0));
601    }
602   if(mu==2)
603   {
604      if(m==3){return(ideal(var(1),var(2)^3+var(1)^3*var(2)));}
605      if(m==4)
606      {
607        if(c==5)
608        {
609           return(ideal(var(1),var(1)^2*var(2)+var(2)^4+var(2)^5));
610        }
611        if(c==6)
612        {
613           return(ideal(var(1),var(1)^2*var(2)+var(2)^4));
614        }
615      }
616      return(ideal(0,0));
617    }
618   if(mu>2)
619   {
620      if(m==3)
621      {
622         return(ideal(var(1),var(2)^3+var(1)^(c+1)*var(2)));
623      }
624      return(ideal(0,0));
625   }
626   return(ideal(0,0));
627}
628example
629{
630  "EXAMPLE"; echo=2;
631   ring R=0,(x,y),(c,ds);
632   poly f1=x;
633   poly f2=xy+y5+y7;
634   poly f11=f1+f2*f1;
635   poly f22=f2+f1^2;
636   map phi=basering,x+y,y+y2;
637   f1=phi(f11);
638   f2=phi(f22);
639   ideal I=f1,f2;
640   classifySimpleMaps1(I);
641}
642///////////////////////////////////////////////////////////////////////////////
643proc modVStd0(module M, module N, ideal I, int bound)
644"USAGE:   modVStd0((M, N, I,bound, #); M is a submodule
645          in A^r over the basering=:A, N ist a submodule in R^r over the subring
646          R of the basering generated by the entries of I
647COMPUTE:  a standard basis of M+N+maxideal(bound)*A^r using the parallel modular
648          version
649RETURN:   a list whose ist entry gives a list where each entry is a  genrator of
650          standard basis and second entry gives a list of generators after the
651          reduced echelon form
652NOTE:     if # is not empty the bound is corrected by computing determinacy
653EXAMPLE:  example modVStd0; shows an example"
654{
655    /* call modular() */
656    if (size(M) > 1) {
657        list W = modular("vStd", list(M, N, I, bound),
658            Modular::primeTest_default, deleteUnluckyPrimesM0,
659            pTestSBM0, finalTestM0);
660        attrib(W[1], "isSB", 1);
661    }
662    else {
663        module L = modular("vStd_size1", list(M, N, I, bound),
664            Modular::primeTest_default, Modstd::deleteUnluckyPrimes_std,
665            pTestSBM0_size1, finalTestM0_size1);
666        attrib(M, "isSB", 1);
667        list W = list(M, L);
668    }
669
670    /* return the result */
671    return(W);
672}
673example
674{
675  "EXAMPLE"; echo=2;
676   ring R=0,(x,y),(c,ds);
677   poly f1=x;
678   poly f2=xy+y5+y7;
679   poly f11=f1+f2*f1;
680   poly f22=f2+f1^2;
681   map phi=basering,x+y,y+y2;
682   f1=phi(f11);
683   f2=phi(f22);
684   ideal I=f1,f2;
685   module M=maxideal(1)*jacob(I);
686   module N=I*freemodule(2);
687   modVStd0(M,N,I,15);
688}
689///////////////////////////////////////////////////////////////////////////////
690proc modVStd(module M, module N, ideal I,int bound,list #)
691"USAGE:   modVStd((M, N, I,bound, #); M is a submodule
692          in A^r over the basering=:A, N ist a submodule in R^r over the subring
693          R of the basering generated by the entries of I
694COMPUTE:  a standard basis of A^r/M+N+maxideal(bound)*A^r using modular version
695RETURN:   a list whose ist entry gives a list where each entry is a  genrator of
696          standard basis and second entry gives a list of generators after the
697          reduced echelon form
698NOTE:     if # is not empty the bound is corrected by computing determinacy
699EXAMPLE:  example modVStd; shows an example"
700{
701//---------------------------- initialisation --------------------------------
702   int np=10;
703   bigint H;
704   if(size(#)>0){np=#[1];}
705   list P=2134567879;
706   int j,cc;
707   def R0 = basering;
708   module L;
709   module M0=M;
710   module N0=N;
711   list T1,T2,L1,L2;
712   list rl = ringlist(R0);
713
714   while(1)
715   {
716      cc=timer;
717      for(j = 1; j <= np; j++)
718      {
719         P[size(P)+1]=prime(P[size(P)]-1);
720      }
721      for(j = 1; j <= size(P); j++)
722      {
723         rl[1] = P[j];
724         def @r = ring(rl);
725         setring @r;
726         ideal I  = fetch(R0,I);
727         module M = fetch(R0,M0);
728         module N = fetch(R0,N0);
729         list W = vStd(M,N,I,bound);
730         setring R0;
731         list W = fetch(@r,W);
732         T1[j]=W[1];
733         T2[j]=W[2];
734         kill W;
735         kill @r;
736      }
737      L1 = deleteUnluckyPrimesM(T1,P);
738      L2 = deleteUnluckyPrimesM(T2,P);
739      if(size(M0)>1)
740      {
741         H=1;
742         for(j = 1; j <= size(L1[2]); j++)
743         {
744            H = H*L1[2][j];
745         }
746         M=  chinrem(L1[1],L1[2]);
747         M = farey(M,H);
748         attrib(M,"isSB",1);
749      }
750      else
751      {
752         M=M0;
753      }
754      H=1;
755      for(j = 1; j <= size(L2[2]); j++)
756      {
757         H = H*L2[2][j];
758      }
759      L=  chinrem(L2[1],L2[2]);
760      L = farey(L,H);
761
762      if(pTestSBM(M0,N0,I,M,L,P,bound))
763      {
764         //int bb=timer;
765         if(finalTestM(M0,N0,I,M,L,bound))
766         {
767          // "time for final test";timer-bb;
768           return(list(M,L));
769         }
770         // "time for final test";timer-bb;
771        // "final test failed";
772      }
773     // "pTest failed";size(P);
774   }
775}
776example
777{
778  "EXAMPLE"; echo=2;
779   ring R=0,(x,y),(c,ds);
780   poly f1=x;
781   poly f2=xy+y5+y7;
782   poly f11=f1+f2*f1;
783   poly f22=f2+f1^2;
784   map phi=basering,x+y,y+y2;
785   f1=phi(f11);
786   f2=phi(f22);
787   ideal I=f1,f2;
788   module M=maxideal(1)*jacob(I);
789   module N=I*freemodule(2);
790   modVStd(M,N,I,15);
791}
792///////////////////////////////////////////////////////////////////////////////
793static proc deleteUnluckyPrimesM(list T, list L)
794{
795   int j,k,c;
796   intvec hl,hc;
797   module cT,lT,cK;
798   lT = lead(T[size(T)]);
799   attrib(lT,"isSB",1);
800      for(j = 1; j < size(T); j++)
801      {
802         cT = lead(T[j]);
803         attrib(cT,"isSB",1);
804         if(size(reduce(cT,lT,5))!=0)
805         {
806            cK = cT;
807            c++;
808         }
809         else
810         {
811           if(size(reduce(lT,cT,5))!=0)
812           {
813              cK = cT;
814              c++;
815           }
816         }
817      }
818      if(c > size(T) div 2){ lT = cK; }
819
820   int addList;
821   j = 1;
822   attrib(lT,"isSB",1);
823   while((j <= size(T))&&(c > 0))
824   {
825      cT = lead(T[j]);
826      attrib(cT,"isSB",1);
827      if((size(reduce(cT,lT,5)) != 0)||(size(reduce(lT,cT,5)) != 0))
828      {
829         T = delete(T,j);
830         if(j == 1)
831         {
832            L = L[2..size(L)];
833            if(addList == 1) { M = M[2..size(M)]; }
834         }
835         else
836         {
837            if(j == size(L))
838            {
839               L = L[1..size(L)-1];
840               if(addList == 1) { M = M[1..size(M)-1]; }
841            }
842            else
843            {
844               L = L[1..j-1],L[j+1..size(L)];
845               if(addList == 1) { M = M[1..j-1],M[j+1..size(M)]; }
846            }
847         }
848         j--;
849      }
850      j++;
851   }
852
853   for(j = 1; j <= size(L); j++)
854   {
855      L[j] = bigint(L[j]);
856   }
857
858   if(addList == 0) { return(list(T,L,lT)); }
859   if(addList == 1) { return(list(T,L,M,lT)); }
860}
861
862static proc deleteUnluckyPrimesM0(alias list modresults)
863{
864    list T1, T2;
865    int i;
866    for (i = size(modresults); i > 0; i--) {
867        T1[i] = modresults[i][1];
868        T2[i] = modresults[i][2];
869    }
870    list indices1 = Modstd::deleteUnluckyPrimes_std(T1);
871    list indices2 = Modstd::deleteUnluckyPrimes_std(T2);
872    return(indices1+indices2);
873}
874
875///////////////////////////////////////////////////////////////////////////////
876static proc pTestSBM(module M0, module N0, ideal I, module M, module L, list P,
877int bound)
878{
879   int i,j,k,p;
880   def R0 = basering;
881   list r = ringlist(R0);
882
883   while(!j)
884   {
885      j = 1;
886      p = prime(random(1000000000,2134567879));
887      for(i = 1; i <= size(P); i++)
888      {
889         if(p == P[i]) { j = 0; break; }
890      }
891
892   }
893   r[1] = p;
894   def @R = ring(r);
895   setring @R;
896   ideal I  = fetch(R0,I);
897   module M0 = fetch(R0,M0);
898   module N0 = fetch(R0,N0);
899   list W = vStd(M0,N0,I,bound);
900   module M = fetch(R0,M);
901   module L = fetch(R0,L);
902   attrib(M,"isSB",1);
903   attrib(L,"isSB",1);
904   j=size(reduce(W[1],M,5))+size(reduce(W[2],L,5));
905   setring R0;
906   return(!j);
907}
908///////////////////////////////////////////////////////////////////////////////
909static proc pTestSBM0(string command, alias list args, def result, int p)
910{
911    def R0 = basering;
912    list r = ringlist(R0);
913    r[1] = p;
914    def @R = ring(r);
915    setring @R;
916    list args = fetch(R0, args);
917    list W = vStd(args[1..4]);
918    def result = fetch(R0, result);
919    attrib(result[1],"isSB",1);
920    attrib(result[2],"isSB",1);
921    int j=size(reduce(W[1],result[1],5))+size(reduce(W[2],result[2],5));
922    setring R0;
923    return(!j);
924}
925///////////////////////////////////////////////////////////////////////////////
926
927static proc pTestSBM0_size1(string command, alias list args, def result, int p)
928{
929    // adjusted copy of pTestSBM0() for the case size(args[1]) <= 1
930    def R0 = basering;
931    list r = ringlist(R0);
932    r[1] = p;
933    def @R = ring(r);
934    setring @R;
935    list args = fetch(R0, args);
936    module L = vStd_size1(args[1..4]);
937    def result = fetch(R0, result);
938    attrib(result,"isSB",1);
939    int j = size(reduce(L, result,5));
940    setring R0;
941
942    return(!j);
943}
944///////////////////////////////////////////////////////////////////////////////
945static proc finalTestM(module M0, module N0, ideal I, module M, module L,
946int bound)
947{
948   attrib(M,"isSB",1);
949   int a=size(myReduceM(M0,M,bound));
950   int b=testSBM(M,bound);
951   int c=size(reduceV(M,myReduceM(N0,M,bound),L,bound));
952   return(!(a+b+c));
953}
954///////////////////////////////////////////////////////////////////////////////
955static proc testSBM(module M, int bound)
956{
957   int i,j;
958   vector f;
959   for(i=1;i<size(M);i++)
960   {
961      for(j=i+1;j<=size(M);j++)
962      {
963         f=jet(spoly(M[i],M[j],1),bound);
964         f=myReduce(f,M,bound);
965         if(f!=0){return(1);}
966      }
967   }
968   return(0);
969}
970///////////////////////////////////////////////////////////////////////////////
971static proc finalTestM0(string command, alias list args, def result)
972{
973    attrib(result[1], "isSB", 1);
974    if (size(myReduceM(args[1], result[1], args[4]))) {
975        return(0);
976    }
977    if(testSBM(result[1],args[4])){return(0);}
978    if (size(reduceV(result[1], myReduceM(args[2], result[1], args[4]),
979        result[2], args[4]))) {
980        return(0);
981    }
982    return(1);
983}
984///////////////////////////////////////////////////////////////////////////////
985static proc finalTestM0_size1(string command, list args, def result)
986{
987    attrib(args[1], "isSB", 1);
988    if (size(reduceV(args[1], myReduceM(args[2], args[1], args[4]),
989        result, args[4]))) {
990        return(0);
991    }
992    return(1);
993}
994///////////////////////////////////////////////////////////////////////////////
995static proc normalMap(ideal I, int bound)
996"USAGE:    normalMap(I);  I=f1,f2 in K[x,y]
997 RETURN:   (0,0) if jet(I,1)=0
998           (x,h) A-equivalent to I modulo <x,y>^bound+1
999           if ord(h)=1 then h=y
1000           if ord(h)=2 then h=xy+y^m(I)+h.o.t.if m(I)>=3 or (x,y^2)
1001           if ord(h)=3 milnor(diff(h,y))=1 and m(I)>3 then h=xy2+y^m(I)+h.o.t.
1002           if ord(h)=4 and m(I)=4 then h=y^4+a*x^3y+b*x^2y^2+h.o.t.
1003           m(I)=vdim(std(I))
1004 NOTE: the procedure is designed for simple and unimodular maps
1005"
1006{
1007   I=jet(I,bound);
1008   //the trivial cases
1009   if(size(jet(I,1))==0){return(ideal(0,0));}
1010   if(vdim(std(jet(I,1)))==1){return(maxideal(1));}
1011   if(vdim(std(I))==2){I=var(1),var(2)^2;return(I);}
1012
1013   def R=basering;
1014   map phi;
1015   poly p;
1016   int i;
1017
1018   //transformation to (x,h)
1019   if(jet(I[1],1)==0){p=I[1];I[1]=I[2];I[2]=p;}
1020   I[1]=simplify(I[1],1);
1021   if(lead(I[1])==var(2)){phi=R,var(2),var(1);}
1022   else{phi=R,var(1)-I[1][2],var(2);}
1023   I=phi(I);
1024   while(I[1]!=var(1))
1025   {
1026      phi=R,2*var(1)-I[1],var(2);
1027      I=jet(phi(I),bound);
1028   }
1029   while((leadmonom(I[2])==var(1))||(leadmonom(I[2])==var(1)^2)||(leadmonom(I[2]
1030   )==var(1)^3)||(leadmonom(I[2])==var(1)^4))
1031   {
1032      I[2]=I[2]-lead(I[2]);
1033   }
1034   I[2]=simplify(I[2],1);
1035   if(deg(lead(I[2]))>=5){return(I);}
1036
1037   //special treatment of h
1038   //the case ord(h)=4
1039   if(deg(lead(I[2]))==4)
1040   {
1041      if(vdim(std(I))>4){return(I);}
1042      def S=changevar("var(2),var(1)",R);
1043      setring S;
1044      map psi=R,var(2),var(1);
1045      ideal I=psi(I);
1046      I[2]=simplify(I[2],1);
1047      if(leadmonom(I[2][2])==var(1)^3*var(2))
1048      {
1049         map sigma=S,var(1)-1/4*leadcoef(I[2][2])*var(2),var(2);
1050         I=sigma(I);
1051         setring R;
1052         map lambda=S,var(2),var(1);
1053         I=lambda(I);
1054         if(leadmonom(I[2])==var(1)^4){I[2]=I[2]-lead(I[2]);}
1055         return(I);
1056      }
1057      else
1058      {
1059         setring R;
1060         return(I);
1061      }
1062   }
1063
1064   //the case ord(h)=3
1065   if(deg(lead(I[2]))==3)
1066   {
1067      phi=R,var(1),var(2)-leadcoef(I[2])/(2*leadcoef(I[2][2]))*var(1);
1068      I=phi(I);
1069   }
1070   while((leadmonom(I[2])==var(1))||(leadmonom(I[2])==var(1)^2)||(leadmonom(I[2]
1071   )==var(1)^3)||(leadmonom(I[2])==var(1)^4))
1072   {
1073      I[2]=I[2]-lead(I[2]);
1074   }
1075   I[2]=simplify(I[2],1);
1076   if(leadmonom(I[2])==var(1)*var(2)^2)
1077   {
1078      while(i<bound)
1079      {
1080         i++;
1081         p=jet(I[2]/(var(1)*var(2))-var(2),i);
1082         phi=R,var(1),var(2)-1/2*p;
1083         I=jet(phi(I),bound);
1084      }
1085   }
1086
1087   //the case ord(h)=2
1088   if(leadmonom(I[2])==var(1)*var(2))
1089   {
1090      while(i<bound)
1091      {
1092         i++;
1093         p=jet(I[2]/var(1)-var(2),i);
1094         phi=R,var(1),var(2)-p;
1095         I=jet(phi(I),bound);
1096      }
1097   }
1098
1099   //all cases
1100   p=lead(I[2])+reduc(I[2]-lead(I[2]),I,bound);
1101   I[2]=p;
1102   if((leadmonom(I[2])==var(1)*var(2))||(leadmonom(I[2])==var(1)*var(2)^2))
1103   {
1104      number a=leadcoef(I[2][2]);
1105      I=subst(I,x,a*x);
1106      I=1/a*I;
1107   }
1108   return(I);
1109}
1110example
1111{
1112  "EXAMPLE"; echo=2;
1113   ring R=0,(x,y),(c,ds);
1114   ideal I1=x,xy2+y6+y7+7y9;
1115   ideal I2=x,xy+y6+y8+77y9;
1116   ideal I3=x,3x4+2x3y+7x2y2+4xy3+11y4;
1117   map phi=R,x+7y+y2,2x+y+y3;
1118   ideal J=phi(I1);
1119   normalMap(J,10);
1120   J=phi(I2);
1121   normalMap(J,10);
1122   J=I3;
1123   normalMap(J,10);
1124}
1125///////////////////////////////////////////////////////////////////////////////
1126proc classifyUnimodalMaps(ideal I)
1127"USAGE:   classifyUnimodalMaps(I);  I an ideal with 2 generators in a polynomial
1128         ring with 2 variables and local ordering defining a map germ C^2 to C^2
1129COMPUTE:  The normal form of the germ in Riegers classification if it is
1130          simple
1131RETURN:   normal form of I, of type ideal
1132NOTE:     If I is not unimodal  it returns (0,0)
1133EXAMPLE:  example classifyUnimodalMaps; shows an example"
1134{
1135   if(size(jet(I,1))==0){return(ideal(0,0));}
1136   list L=coDimMap(I,1);
1137   int determinacy=L[1];
1138   int c=L[2];
1139   if(determinacy<0){return(ideal(0,0));}
1140   I=normalMap(I,determinacy);
1141
1142   poly g=I[2];
1143   int m =vdim(std(I));
1144   int mu=vdim(std(jacob(diff(g,var(2)))));
1145   int d=doubleFoldNumber(g);
1146
1147   if((mu==-1)||((m!=4)&&(m!=6))||(deg(lead(I[2]))>4)){return(ideal(0,0));}
1148
1149   if(m==6)
1150   {
1151      if((mu==0))
1152      {
1153         if(c==6)
1154         {
1155            g=jet(g,9);
1156            I[2]=modulus(g);
1157            return(I);
1158         }
1159         if(c==7){return(ideal(var(1),var(1)*var(2)+var(2)^6+var(2)^14));}
1160         if(c==8){return(ideal(var(1),var(1)*var(2)+var(2)^6));}
1161         return(ideal(0,0));
1162      }
1163      if((mu==1)&&(c==7))
1164      {
1165         g=jet(g,9);
1166         I[2]=modulus(g);
1167         return(I);
1168      }
1169   }
1170   if((mu==4))
1171   {
1172      if(d==3)
1173      {
1174        if(c==7)
1175        {
1176           I[2]=jet(g,4)+var(1)^3*var(2)^2;
1177           return(I);
1178        }
1179        if(c==8)
1180        {
1181           I[2]=jet(g,4)+var(1)^4*var(2)^2;
1182           return(I);
1183        }
1184        if(c==9)
1185        {
1186           I[2]=jet(g,4);
1187           return(I);
1188        }
1189      }
1190      if((c==d+3)&&(d>=4))
1191      {
1192         return(ideal(var(1),var(2)^4+var(1)^2*var(2)^2+var(1)^d*var(2)));
1193      }
1194   }
1195   if((mu==5)&&(c==7)&&(d==3))
1196   {
1197      return(ideal(var(1),var(2)^4+var(1)^3*var(2)-3/2*var(1)^2*var(2)^2+var(1)^3*var(2)^2));
1198   }
1199   if((mu==6)&&(c==8)&&(d==3))
1200   {
1201      return(ideal(var(1),var(2)^4+var(1)^3*var(2)-3/2*var(1)^2*var(2)^2+var(1)^4*var(2)^2));
1202   }
1203   if((mu==c-2)&&(c>=9)&&(d==3))
1204   {
1205      I=ideal(var(1),var(2)^4+var(1)^3*var(2)-3/2*var(1)^2*var(2)^2+var(1)^(c-3)*var(2));
1206      return(I);
1207   }
1208   if((mu==7)&&(c==d+4)&&(d>=5))
1209   {
1210      return(ideal(var(1),var(2)^4+var(1)^3*var(2)^2+var(1)^d*var(2)));
1211   }
1212   if((mu==2*d-2)&&(2*d<=c)&&(c<=3*d)&&((d==4)||(d==5)))
1213   {
1214      return(ideal(var(1),var(2)^4+var(1)^d*var(2)+var(1)^(c-d-1)*var(2)^2));
1215   }
1216   return(ideal(0,0));
1217}
1218example
1219{
1220  "EXAMPLE"; echo=2;
1221   ring R=0,(x,y),(c,ds);
1222   poly f1=x;
1223   poly f2=xy+y6+y9;
1224   poly f11=f1+f2*f1;
1225   poly f22=f2+f1^2;
1226   map phi=basering,x+y,y+y2;
1227   f1=phi(f11);
1228   f2=phi(f22);
1229   ideal I=f1,f2;
1230   classifyUnimodalMaps(I);
1231}
1232///////////////////////////////////////////////////////////////////////////////
1233static proc modulus(poly g)
1234// g=xy+y6+h.o.t. or xy2+y6+h.o.t.
1235{
1236   number a,b,c;
1237   matrix m=coef(g,var(2));
1238   if(m[1,1]==var(2)^9)
1239   {
1240      c=leadcoef(m[2,1]);
1241      if(m[1,2]==var(2)^8)
1242      {
1243         b=leadcoef(m[2,2]);
1244         if(m[1,3]==var(2)^7)
1245         {
1246            a=leadcoef(m[2,3]);
1247         }
1248      }
1249      else
1250      {
1251         if(m[1,2]==var(2)^7)
1252         {
1253           a=leadcoef(m[2,2]);
1254         }
1255      }
1256   }
1257   else
1258   {
1259      if(m[1,1]==var(2)^8)
1260      {
1261         b=leadcoef(m[2,1]);
1262         if(m[1,2]==var(2)^7)
1263         {
1264            a=leadcoef(m[2,2]);
1265         }
1266      }
1267      else
1268      {
1269         if(m[1,1]==var(2)^7)
1270         {
1271           a=leadcoef(m[2,1]);
1272         }
1273      }
1274   }
1275   if(leadmonom(g)==var(1)*var(2))
1276   {
1277      if(a!=0)
1278      {
1279         g=var(1)*var(2)+var(2)^6+(5*b-3*a^2)/(5*a^2)*var(2)^8+(25*c+14*a^3-35*a*b)/(25*a^3)*var(2)^9;
1280      }
1281   }
1282   if(leadmonom(g)==var(1)*var(2)^2)
1283   {
1284      if(a!=0)
1285      {
1286         g=var(1)*var(2)^2+var(2)^6+var(2)^7+(4*c*a-5*b)/(4*a^2)*var(2)^9;
1287      }
1288   }
1289   return(g);
1290}
1291///////////////////////////////////////////////////////////////////////////////
1292static proc doubleFoldNumber(poly g)
1293"USAGE:   doubleFoldNumber(g) , g poly of 2 variables
1294RETURN:   the double fold number of (x,g(x,y))
1295EXAMPLE:  example doubleFoldNumber; shows an example"
1296{
1297   if(nvars(basering)!=2){ERROR("designed for 2 variables");}
1298   def R=basering;
1299   ring S=0,(x,y,t),ds;
1300   map phi=R,x,y;
1301   poly g=phi(g);
1302   poly h=subst(g,y,y+t);
1303   poly f=diff(g,y);
1304   h=(h-g-t*f)/t2;
1305   ideal I=f,h,diff(h,t);
1306   int d=vdim(std(I)) div 2;
1307   setring R;
1308   return(d);
1309}
1310example
1311{
1312  "EXAMPLE"; echo=2;
1313   ring R=0,(x,y),ds;
1314   poly g=xy+y5+y7;
1315   doubleFoldNumber(g);
1316}
1317///////////////////////////////////////////////////////////////////////////////
1318/*
1319============================== examples of Rieger  ==============
1320
1321ring R=0,(x,y),(c,ds);
1322poly f1=x;
1323
1324poly f2=xy+y3;     //2
1325poly f2=y3+x2y;    //3
1326poly f2=xy+y4;     //3
1327poly f2=xy+y5+y7;  //4
1328poly f2=xy+y5;     //5
1329poly f2=xy2+y4+y5; //4
1330poly f2=xy2+y5+y6; //5
1331poly f2=xy2+y5+y9; //6
1332poly f2=xy2+y5;    //7
1333poly f2=x2y+y4+y5; //5
1334poly f2=x2y+y4;    //6
1335
1336poly f11=f1+f2*f1;
1337poly f22=f2+f1^2;
1338map phi=basering,x+y,y+y2;
1339f1=phi(f11);
1340f2=phi(f22);
1341ideal I=f1,f2;
1342coDimMap(I,1);
1343classifySimpleMaps(I);
1344
1345==================== Examples of Gibson and Hobbs =============
1346
1347ring R=0,t,(c,ds);
1348poly f1=t4;
1349poly f2=t7+t9;
1350poly f3=t17;
1351ideal I=f1,f2,f3;
1352map phi=R,t+2t2+3t3+7t4;
1353I=phi(I);
1354coDimMap(I);
1355
1356ring R=0,t,(c,ds);
1357int k=12;
1358poly f1=t4;
1359poly f2=t6+t^(2*k-7);
1360poly f3=t^(2*k+1);
1361f1=f1+f2*f3;
1362f2=f2+f3^2;
1363f3=f3+f1*f2*f3;
1364ideal I=f1,f2,f3;
1365map phi=R,t+t2+2t3+5t4;
1366I=phi(I);
1367coDimMap(I);
1368
1369ring R=0,t,(c,ds);
1370int k=8;
1371poly f1=t4;
1372poly f2=t6+t^(2*k+1);
1373f1=f1+f2*f1;
1374f2=f2+f1^2;
1375ideal I=f1,f2,0;
1376map phi=R,t+t2+3t3+5t4;
1377I=phi(I);
1378coDimMap(I);
1379
1380ring R=0,t,(c,ds);
1381int k=8;
1382poly f1=t2;
1383poly f2=t^(2*k+1);
1384f1=f1+f2*f1;
1385f2=f2+f1^2;
1386ideal I=f1,f2,0;
1387map phi=R,t+t2+3t3+5t4;
1388I=phi(I);
1389coDimMap(I);
1390
1391ring R=0,t,(c,ds);
1392int k=8;
1393int p=11;
1394poly f1=t3;
1395poly f2=t^(3*k+1)+t^(3*p+2);
1396f1=f1+f2*f1;
1397f2=f2+f1^2;
1398ideal I=f1,f2,0;
1399map phi=R,t+t2+3t3+5t4;
1400I=phi(I);
1401coDimMap(I);
1402
1403============================  more examples ======================
1404
1405ring R=0,t,(c,ds);
1406poly f1=t8;
1407poly f2=t10+t13;
1408poly f3=t12+2t15;
1409f1=f1+231*f2*f1+311*f1*f3+71*f1^2+611*f1*f2*f3;
1410f2=f2+911*f1^2+511*f2*f3+f1^2*f2^2;
1411f3=f3+731*f1*f2*f3+1171*f3^2+f2^3;
1412ideal I=f1,f2,f3;
1413map phi=R,t+t2+3t3+5t4+7t6;
1414I=phi(I);
1415coDimMap(I);
1416
1417ring R=0,t,(c,ds);
1418poly f1=t12;
1419poly f2=t20+t30+t35;
1420f1=f1+231*f2*f1+71*f1^2;
1421f2=f2+911*f1^2+f1^2*f2^2;
1422ideal I=f1,f2;
1423map phi=R,t+t2+3t3+5t4+7t6;
1424I=phi(I);
1425coDimMap(I);
1426
1427ring R=0,t,(c,ds);
1428poly f1=t16;
1429poly f2=t24+t28+t30+t35;
1430f1=f1+231*f2*f1+71*f1^2;
1431f2=f2+911*f1^2+f1^2*f2^2;
1432ideal I=f1,f2;
1433map phi=R,t+t2+3t3+5t4+7t6;
1434I=phi(I);
1435coDimMap(I);
1436
1437ring R=0,t,(c,ds);
1438int k=7;
1439poly f1=t^(8*k);
1440poly f2=t^(10*k)+t^(13*k);
1441poly f3=t^(12*k)+2t^(15*k);
1442poly f4=t101;
1443f1=f1+231*f2*f1+311*f1*f3+71*f1^2+611*f1*f2*f3;
1444f2=f2+911*f1^2+511*f2*f3+f1^2*f2^2;
1445f3=f3+731*f1*f2*f3+1171*f3^2+f2^3;
1446ideal I=f1,f2,f3,f4;
1447map phi=R,t+22t2+323t3+555t4+777t6;
1448I=phi(I);
1449module M=jacob(I);
1450module N=freemodule(ncols(I));
1451list Re=modVStd(M,N,I,250);
1452Re=modVStd0(M,N,I,250);
1453
1454ring R=0,(x,y),(c,ds);
1455ideal I=x,xy2+y5+y9;
1456map phi=R,x+xy4,y+x2+y11;
1457I=phi(I);
1458module M=maxideal(1)*jacob(I);
1459module N=I*freemodule(2);
1460list Re=modVStd(M,N,I,15);
1461
1462 ring R=0,(x,y),(c,ds);
1463 poly f1=x;
1464 poly f2=xy+y5+y7;
1465 poly f11=f1+f2*f1;
1466 poly f22=f2+f1^2;
1467 map phi=basering,x+y,y+y2;
1468 f1=phi(f11);
1469 f2=phi(f22);
1470 ideal I=f1,f2;
1471 map si=R,x+xy3+y11,y+x3+y14+xy17;
1472 I=si(I);
1473 module M=maxideal(1)*jacob(I);
1474 module N=I*freemodule(2);
1475 list Re=modVStd(M,N,I,15);
1476
1477 ring R=0,(x,y),(c,ds);
1478 ideal I=x,x2y+y4;
1479 map phi=R,x+xy4,y+x2+y11;
1480 I=phi(I);
1481 module M=maxideal(1)*jacob(I);
1482 module N=I*freemodule(2);
1483 list Re=modVStd(M,N,I,15);
1484
1485ring R=0,t,(c,ds);
1486int k=5;
1487poly f1=t^(16*k);
1488poly f2=t^(24*k)+t^(28*k)+t^(30*k)+t^(35*k);
1489poly f3=t181;
1490f1=f1+231*f2*f1+71*f1^2;
1491f2=f2+911*f1^2+f1^2*f2^2;
1492f3=f3+f1*f2;
1493ideal I=f1,f2,f3;
1494map phi=R,t+55t2+366t3+577t4+788t6;
1495I=phi(I);
1496module M=jacob(I);
1497module N=freemodule(ncols(I));
1498list Re=modVStd(M,N,I,300);
1499
1500ring R=0,t,(c,ds);
1501int k=7;
1502poly f1=t^(12*k);
1503poly f2=t^(20*k)+t^(30*k)+t^(35*k);
1504poly f3=t139;
1505f1=f1+231*f2*f1+715*f1^2;
1506f2=f2+911*f1^2+4567*f1^2*f2^2;
1507f3=f3+333*f1*f2;
1508ideal I=f1,f2;
1509map phi=R,t+22t2+333t3+544t4+755t6+567t7;
1510I=phi(I);
1511module M=jacob(I);
1512module N=freemodule(ncols(I));
1513list Re=modVStd(M,N,I,350);
1514*/
1515
Note: See TracBrowser for help on using the repository browser.