Changeset 617dbc in git for factory/facFqBivar.cc


Ignore:
Timestamp:
Jun 19, 2012, 3:16:35 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
53273d8bcb24900118b9a5adfd3b2e5353f82175
Parents:
773d281c087d1388ff04cd6c70faccb93fe0fc03
git-author:
Martin Lee <martinlee84@web.de>2012-06-19 15:16:35+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-07-31 11:48:49+02:00
Message:
chg: better reconstruction of symmetric polynomials
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    r773d28 r617dbc  
    42594259                               CanonicalForm& bufF, CFList& factors, int& l,
    42604260                               int& factorsFound, bool beenInThres, CFMatrix& M,
    4261                                CFArray& Pi, CFList& diophant
     4261                               CFArray& Pi, CFList& diophant, bool symmetric,
     4262                               const CanonicalForm& evaluation
    42624263                              )
    42634264{
     
    43294330    while ((degree (F,y)/4)*i + 4 <= smallFactorDeg)
    43304331      i++;
    4331     while (i < 4)
    4332     {
    4333       dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*(i+1)+4);
     4332    while (i < 5)
     4333    {
     4334      dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*i+4);
    43344335      if (l < dummy)
    43354336      {
     
    43374338        henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M);
    43384339        l= dummy;
     4340        if (i == 1 && degree (F)%4==0 && symmetric && factors.length() == 2 &&
     4341            LC (F,1).inCoeffDomain() &&
     4342           (degree (factors.getFirst(), 1) == degree (factors.getLast(),1)))
     4343        {
     4344          Variable x= Variable (1);
     4345          CanonicalForm g, h, gg, hh, multiplier1, multiplier2, check1, check2;
     4346          int m= degree (F)/4+1;
     4347          g= factors.getFirst();
     4348          h= factors.getLast();
     4349          g= mod (g, power (y,m));
     4350          h= mod (h, power (y,m));
     4351          g= g (y-evaluation, y);
     4352          h= h (y-evaluation, y);
     4353          gg= mod (swapvar (g,x,y),power (x,m));
     4354          gg= gg (y + evaluation, y);
     4355          multiplier1= factors.getLast()[m-1][0]/gg[m-1][0];
     4356          gg= div (gg, power (y,m));
     4357          gg= gg*power (y,m);
     4358          hh= mod (swapvar (h,x,y),power (x,m));
     4359          hh= hh (y + evaluation, y);
     4360          multiplier2= factors.getFirst()[m-1][0]/hh[m-1][0];
     4361          hh= div (hh, power (y,m));
     4362          hh= hh*power (y,m);
     4363          gg= multiplier1*gg+mod (factors.getLast(), power (y,m));
     4364          hh= multiplier2*hh+mod (factors.getFirst(), power (y,m));
     4365          check1= gg (y-evaluation,y);
     4366          check2= hh (y-evaluation,y);
     4367          check1= swapvar (check1, x, y);
     4368          if (check1/Lc (check1) == check2/Lc (check2))
     4369          {
     4370            result.append (gg);
     4371            result.append (hh);
     4372            delete [] liftPre;
     4373            delete [] factorsFoundIndex;
     4374            return result;
     4375          }
     4376        }
    43394377      }
    43404378      else
    43414379      {
    43424380        i++;
    4343         if (i < 4)
     4381        if (i < 5)
    43444382          continue;
    43454383      }
     
    44354473    while ((degree (F,y)/4)*i + 4 <= smallFactorDeg)
    44364474      i++;
    4437     while (i < 4)
    4438     {
    4439       dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*(i+1)+4);
     4475    while (i < 5)
     4476    {
     4477      dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*i+4);
    44404478      if (l < dummy)
    44414479      {
     
    44474485      {
    44484486        i++;
    4449         if (i < 4)
     4487        if (i < 5)
    44504488          continue;
    44514489      }
     
    45464584    while ((degree (F,y)/4)*i + 4 <= smallFactorDeg)
    45474585      i++;
    4548     while (i < 4)
    4549     {
    4550       dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*(i+1)+4);
     4586    while (i < 5)
     4587    {
     4588      dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*i+4);
    45514589      if (l < dummy)
    45524590      {
     
    45584596      {
    45594597        i++;
    4560         if (i < 4)
     4598        if (i < 5)
    45614599          continue;
    45624600      }
     
    46754713CFList
    46764714henselLiftAndLatticeRecombi (const CanonicalForm& G, const CFList& uniFactors,
    4677                              const Variable& alpha, const DegreePattern& degPat
     4715                             const Variable& alpha, const DegreePattern& degPat,
     4716                             bool symmetric, const CanonicalForm& evaluation
    46784717                            )
    46794718{
     
    50055044    result= earlyReconstructionAndLifting (F, NTLN, bufF, bufUniFactors, l,
    50065045                                           factorsFound, beenInThres, M, Pi,
    5007                                            diophant
     5046                                           diophant, symmetric, evaluation
    50085047                                          );
    50095048
     
    51435182    }
    51445183    return Union (result, henselLiftAndLatticeRecombi (bufF, bufUniFactors,
    5145                                                        alpha, degs
     5184                                                       alpha, degs, symmetric,
     5185                                                       evaluation
    51465186                                                      )
    51475187                 );
     
    52735313    delete [] bounds;
    52745314    return Union (result, henselLiftAndLatticeRecombi (F, bufUniFactors, alpha,
    5275                                                        degs
     5315                                                       degs,symmetric, evaluation
    52765316                                                      )
    52775317                 );
     
    59335973
    59345974  bool fail= false;
    5935   CanonicalForm Aeval, evaluation, bufAeval, bufEvaluation, buf;
     5975  CanonicalForm Aeval, evaluation, bufAeval, bufEvaluation, buf, tmp;
    59365976  CFList uniFactors, list, bufUniFactors;
    59375977  DegreePattern degs;
     
    59515991  int subCheck1= substituteCheck (A, x);
    59525992  int subCheck2= substituteCheck (A, y);
     5993  bool symmetric= false;
    59535994  for (int i= 0; i < factorNums; i++)
    59545995  {
     
    59575998    if (!derivXZero && !fail2)
    59585999    {
    5959       buf= swapvar (A, x, y);
     6000      if (i == 0)
     6001      {
     6002        buf= swapvar (A, x, y);
     6003        symmetric= (A/Lc (A) == buf/Lc (buf));
     6004      }
    59606005      bufAeval2= buf;
    59616006      bufEvaluation2= evalPoint (buf, bufAeval2, alpha, list2, GF, fail2);
     
    59706015        subCheck2= subCheck1;
    59716016        subCheck1= dummy;
     6017        tmp= A;
    59726018        A= buf;
     6019        buf= tmp;
    59736020        bufAeval= bufAeval2;
    59746021        swap2= true;
     
    62006247    else if (alpha.level() == 1 && !GF)
    62016248    {
    6202       CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs);
     6249      CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs,
     6250                                               symmetric, evaluation);
    62036251      factors= Union (lll, factors);
    62046252    }
    62056253    else if (!extension && (alpha != x || GF))
    62066254    {
    6207       CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs);
     6255      CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs,
     6256                                               symmetric, evaluation);
    62086257      factors= Union (lll, factors);
    62096258    }
Note: See TracChangeset for help on using the changeset viewer.