Changeset e372e5a in git


Ignore:
Timestamp:
May 7, 2013, 6:00:08 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
47fff556be2c2414e0228fdd969a7369db9d35fd
Parents:
6387507201165a90fa7face76757ff5d55772233
Message:
chg: new version of grobcov.lib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/grobcov.lib

    r638750 re372e5a  
    1313          \"Groebner Bases for Polynomial Systems with parameters\".
    1414          Journal of Symbolic Computation 45 (2010) 1391-1425.
     15          The locus algorithm and definitions will be
     16          published in a forthcoming paper by Abanades, Botana, Montes, Recio:
     17          \''Geometrical locus of points using the Groebner cover\''.
    1518
    1619          The central routine is grobcov. Given a parametric
     
    117120                   Normal, Special, Accumulation point, Degenerate.
    118121                   The output are the components given in P-canonical form
    119                    of at most 4 constructible sets: Normal, Special, Accumulation,
    120                    Degenerate.
     122                   of two constructible sets: Normal, and Non-Normal
     123                   The Normal Set has Normal and Special components
     124                   The Non-Normal set has Accumulation and Degenerate components.
    121125                   The description of the algorithm and definitions will be
    122                    given in a forthcoming paper by Abanades, Botana, Montes Recio.
     126                   given in a forthcoming paper by Abanades, Botana, Montes, Recio:
     127                   ''Geometrical locus of points using the Groebner cover''
    123128
    124129locusto:    Transforms the output of locus to a string that
     
    18941899      if(tes==0){break;}
    18951900      m++;
    1896     }    //"T_BB="; BB;
     1901    }
    18971902    crep=PtoCrep(prep);
    18981903    if(tes==0)
     
    38193824// AddCons: given a set of locally closed components of a selection of
    38203825//       segments of the Grobner cover, it builds the canonical P-representation
    3821 //       of the whole set.
     3826//       of the corresponding constructible set, including levels it they are
    38223827// input: a list L of a selection of segments of the Groebner cover
    38233828//       given a a set of components of the form
     
    38283833  // First step: Selecting the top varieties
    38293834  list L1; list L2; list LL; int i; int j; int t;
    3830   //"T_before first step L="; L;
    38313835  list Lend;
    38323836  for(i=1;i<=size(L);i++)
     
    38393843        if(containedideal(L[j][1],L[i][1])==1)
    38403844        {t=0;
    3841          // "l'ideal "; L[j][1]; "esta contingut a l'ideal "; L[i][1];
     3845         // "the ideal "; L[j][1]; "is contained in ideal "; L[i][1];
    38423846          j=size(L);
    38433847        }
     
    38623866   {
    38633867     LL=addtolocalclosed(L1,L2);
    3864      //"T_LL="; LL;
    38653868     for(i=1;i<=size(LL[1]);i++)
    38663869     {
     
    39593962     {alreadyadded=sort(elimrepeatedvl(alreadyadded))[1];}
    39603963     if(Added==intvec(0)){Added=alreadyadded;}
    3961      else{Added=sort(elimrepeatedvl(Added,alreadyadded))[1];}
     3964     else{
     3965       Added=Added,alreadyadded;
     3966       Added=sort(elimrepeatedvl(Added))[1];
     3967     }
    39623968     h=1,1;
    39633969     while((h[1]==1) and (Added!=intvec(0)))
     
    40164022
    40174023// locus(G):  Special routine for determining the locus of points
    4018 //                   of  objects. Given a parametric ideal J with
    4019 //                   parameters (a_1,..a_m) and variables (x_1,..,xn),
    4020 //                   representing the system determining
    4021 //                   the locus of points (a_1,..,a_m)) who verify certain
    4022 //                   properties, computing the grobcov G of
    4023 //                   J and applying to it locus, determines the different
    4024 //                   classes of locus components. They can be
    4025 //                   Normal, Special, Accumulation point, Degenerate.
    4026 //                   The output are the components given in P-canonical form
    4027 //                   of at most 4 constructible sets: Normal, Special, Accumulation,
    4028 //                   Degenerate.
    4029 //                   The description of the algorithm and definitions will be
    4030 //                   given in a forthcoming paper by Abanades, Botana, Montes Recio.
    4031 
    4032 // input:
     4024//                of  objects. Given a parametric ideal J with
     4025//                parameters (a_1,..a_m) and variables (x_1,..,xn),
     4026//                representing the system determining
     4027//                the locus of points (a_1,..,a_m)) who verify certain
     4028//                properties, computing the grobcov G of
     4029//                J and applying to it locus, determines the different
     4030//                classes of locus components. They can be
     4031//                Normal, Special, Accumulation point, Degenerate.
     4032//                The output are the components given in P-canonical form
     4033//                of at most 4 constructible sets: Normal, Special, Accumulation,
     4034//                Degenerate.
     4035//                The description of the algorithm and definitions will be
     4036//                given in a forthcoming paper by Abanades, Botana, Montes Recio.
     4037
     4038// input:      The output G of the grobcov (in generic representation, which is the default)
     4039//                It allows an extra  pair of arguments as option: locus(G,"minus",N)
     4040//                where N is the ideal representing some excluded point of the mover
     4041//                if there is some point that the mover should avoid.
    40334042// output:
    4034 //    list, the canonical P-representation of the 4 types of the locus:
     4043//         list, the canonical P-representation of the Normal and Non-Normal locus:
     4044//              The Normal locus has two kind of components: Normal and Special.
     4045//              The Non-normal locus has two kind of components: Accumulation and Degenerate.
    40354046//              Normal components: for each point in the component,
    40364047//              the number of solutions in the variables is finite, and
     
    40464057//         The output components are given as
    40474058//              ((p1,(p11,..p1s_1),type_1,level_1),..,(pk,(pk1,..pks_k),type_k,level_k)
    4048 //         The components are given in four groups: normal, special, accumulation, degenerate
    4049 //              and each of these groups represent the canonical P-representation of the subset.
     4059//         The components are given in canonical P-representation of the subset.
    40504060//              If all levels of a class of locus are 1, then the set is locally closed. Otherwise the level
    40514061//              gives the depth of the component.
    4052 proc locus(list G)
     4062proc locus(list GG,list #)
    40534063"USAGE:   locus(G);
    40544064               The input must be the grobcov  of a parametrical ideal
    4055 RETURN:   The  locus.
    4056           The output components are given as a list of  (pi,(pi1,..pis_i),type_i,level_i) varying i.
    4057 NOTE: It can only be called after computing the grobcov of the
    4058           parametrical ideal in generic representation ('ext',0),
    4059           which is the default.
    4060           The basering R, must be of the form Q[a_1,..,a_m][x_1,..,x_n].
     4065RETURN:  The  locus.
     4066               The output are the components of two constructible subsets of the locus
     4067               of the parametrical system.: Normal and Non-normal.
     4068               These components are
     4069               given as a list of  (pi,(pi1,..pis_i),type_i,level_i) varying i,
     4070               where the p's are prime ideals, the type can be: Normal, Special,
     4071               Accumulation, Degenerate.
     4072NOTE:      It can only be called after computing the grobcov of the
     4073               parametrical ideal in generic representation ('ext',0),
     4074               which is the default.
     4075               The basering R, must be of the form Q[a_1,..,a_m][x_1,..,x_n].
    40614076KEYWORDS: geometrical locus, locus, loci.
    40624077EXAMPLE:  locus; shows an example"
    40634078{
    40644079  int t1=1; int t2=1;
     4080  list Opc=#;
    40654081  def R=basering;
    40664082  setglobalrings();
    40674083  string ty;
    40684084  list G1; list G2;
    4069   int i; int d; int j; int k;
     4085  int i; int d; int j; int k; int i0=1; ideal minu; int te;
     4086  for(i=1;i<=size(Opc) div 2;i++)
     4087  {
     4088      if(Opc[2*i-1]=="minus")
     4089      {
     4090        minu=Opc[2*i];
     4091        setring(@RP);
     4092        list nGP;
     4093        def GP=imap(R,GG);
     4094        ideal BP;
     4095        def minup=imap(R,minu);
     4096        for(j=1;j<=size(GP);j++)
     4097        {
     4098          te=1; k=1;
     4099          BP=std(GP[j][2]);
     4100          while((te==1) and (k<=size(minup)))
     4101          {
     4102            if((reduce(minup[k],BP))!=0){te=0;}
     4103            k++;
     4104          }
     4105          if(te==0){nGP[size(nGP)+1]=GP[j];}
     4106        }
     4107        setring(R);
     4108        GG=imap(@RP,nGP);
     4109     }
     4110  }
     4111  list G;
     4112  for(i=i0;i<=size(GG);i++)
     4113  {
     4114    G[i+1-i0]=GG[i];
     4115  }
    40704116  for(i=1;i<=size(G);i++)
    40714117  {
     
    40954141     {
    40964142       attrib(G1RP[i][3][k][1],"IsSB",1);
    4097        G1RP[i][3][k][1]=std(G1RP[i][3][k][1]);       //"T_G1RP[i][2]="; G1RP[i][2];
     4143       G1RP[i][3][k][1]=std(G1RP[i][3][k][1]);
    40984144       for(j=1;j<=size(G1RP[i][2]);j++)
    40994145       {
     
    41234169  }
    41244170  setring @P;
     4171  // CANVIAR
    41254172  if(t1==1)
    41264173  {
    4127     def P1P=imap(R,P1);
    4128     list CN; list CS;
    4129     for(i=1;i<=size(P1P);i++)
    4130     {
    4131       d=dim(std(P1P[i][1]));
    4132       if(d==0){P1P[i][3]="Normal";}
    4133       if(P1P[i][3]=="Normal"){CN[size(CN)+1]=P1P[i];}
    4134       else {CS[size(CS)+1]=P1P[i];}
    4135     }
    4136     def LN=AddCons(CN);
    4137     def LS=AddCons(CS);
    4138   }
    4139   else{list P1P; list CN; list CS; list C2; list LN; list LS;}
     4174    def C1=imap(R,P1);
     4175    def L1=AddCons(C1);
     4176   }
     4177  else{list C1; list L1; kill P1; list P1;}
    41404178  if(t2==1)
    41414179  {
     
    41434181    def L2=AddCons(C2);
    41444182  }
    4145   else{list L2; list C2; list P2;}
    4146   list LA; list LD;
    4147 
     4183  else{list L2; list C2; kill P2; list P2;}
    41484184    for(i=1;i<=size(L2);i++)
    41494185    {
     
    41524188      {
    41534189        L2[i][3]=string("Accumulation,",L2[i][3]);
    4154         LA[size(LA)+1]=L2[i];
    4155       }
    4156       else{L2[i][3]=string("Degenerate,",L2[i][3]); LD[size(LD)+1]=L2[i];}
    4157     }
    4158 
    4159   if(t1==0){list LN;}
    4160   else{for(i=1;i<=size(LS);i++){LN[size(LN)+1]=LS[i];}}
     4190      }
     4191      else{L2[i][3]=string("Degenerate,",L2[i][3]);}
     4192    }
     4193  list LN;
     4194  if(t1==1)
     4195  {
     4196    for(i=1;i<=size(L1);i++){LN[size(LN)+1]=L1[i];}
     4197  }
    41614198  if(t2==1)
    41624199  {
    4163     for(i=1;i<=size(LA);i++){LN[size(LN)+1]=LA[i];}
    4164     for(i=1;i<=size(LD);i++){LN[size(LN)+1]=LD[i];}
     4200    for(i=1;i<=size(L2);i++){LN[size(LN)+1]=L2[i];}
    41654201  }
    41664202  setring(R);
    41674203  def L=imap(@P,LN);
     4204  for(i=1;i<=size(L);i++){if(size(L[i][2])==0){L[i][2]=ideal(1);}}
    41684205  kill @R; kill @RP; kill @P;
    41694206  return(L);
     
    41744211  short=0;
    41754212  ideal H=x^2+y^2-4,(b-2)*x-a*y+2*a,(a-x)^2+(b-y)^2-1;
     4213  "System H = "; H; " ";
    41764214  def G=grobcov(H);
    4177   "grobcov(H)="; G; " ";
    4178   def Gp=locus(G);
    4179   "locus(G)="; Gp;
     4215  //"grobcov(H)="; G; " ";
     4216  def L=locus(G);
     4217  "locus(G)="; L; " ";
     4218  kill R;
     4219  ring R=(0,x5,x6),(x1,x2,x3,x4),dp;
     4220  ideal S=(x1-3)^2+(x2-1)^2-9,
     4221             (4-x2)*(x3-3)+(x1-3)*(x4-1),
     4222             (3-x1)*(x3-x1)+(4-x2)*(x4-x2),
     4223             (4-x4)*x5+(x3-3)*x6+3*x4-4*x3,
     4224             (x5-x1)^2+(x6-x2)^2-(x1-x3)^2-(x2-x4)^2;
     4225 "System S="; S;" ";
     4226 def G=grobcov(S);
     4227// "grobcov(S)="; G;
     4228 ideal N=x1-3,x2-4;
     4229 "N="; N;" ";
     4230  def L=locus(G,"minus",N);
     4231 "locus(G,minus,N)="; L;" ";
    41804232}
    41814233
Note: See TracChangeset for help on using the changeset viewer.