Changeset 35f51c1 in git


Ignore:
Timestamp:
Mar 19, 2014, 9:03:08 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
c0bbad6254e42ef9e4bed7c8d91f31a7c9f7ba50
Parents:
78d77686cc4b5fc9f6f797bc4ca23dc1ca4c751c23f745157ee6c94377957e40ac2de34bd6812b90
Message:
Merge pull request #544 from mmklee/algfuncfact2

Algfuncfact2
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/tropical.lib

    r23f745 r35f51c1  
    531531  // to start all over again;
    532532  // this is controlled by the while-loop
     533  intvec ordnungskontrollvektor=N,-w[2]; // used with the option puiseux
    533534  while (size(liftrings)==0)
    534535  {
     
    540541    else // use absolute primary decomposition
    541542    {
    542       list TP=tropicalparametrise(i,w,ordnung,gfanold,findall,nogfan,puiseux,ini);
     543      list TP=tropicalparametrise(i,w,ordnung,ordnungskontrollvektor,gfanold,findall,nogfan,puiseux,ini);
    543544    }
    544545    // compute the liftrings by resubstitution
     
    731732      w=precutdownw;
    732733*/
    733       ~
     734
    734735    }
    735736  }
     
    741742  }
    742743  ///////////////////////////////////////////////////////////
    743   if (voice+printlevel>=2)
     744  if (printlevel-voice+2>=0)
    744745  {
    745746
     
    777778{
    778779   "EXAMPLE:";
     780   int oldprintlevel=printlevel;
     781   printlevel=1;
    779782   echo=2;
    780783   ////////////////////////////////////////////////////////
     
    823826   setring R;
    824827   displayTropicalLifting(LIST,"subst");
     828   printlevel=oldprintlevel;
    825829}
    826830
     
    966970RETURN:  list, where each entry of the list l describes the Newton-Puiseux
    967971@*             parametrisations of one branch of the plane curve singularity
    968 @*             at the origin defined by f; only the first n terms of each
     972@*             at the origin defined by f; only the terms up to order n of each
    969973@*             parametetrisation are computed
    970974@*             l[i][1] = is a ring
     
    979983           the new base field will have a parameter and a new minimal polynomial,
    980984           and LIFT[2] describes how the old parameter can be computed from the new one
     985@*       - if a field extension with minimal polynomial of degree k was necessary,
     986           then to the one extension produced acutally k extensions correspond by replacing
     987           the parameter a successively by all zeros of the minimal polynomial
    981988@*       - if the option subst was set l[i][3] contains the polynomial where
    982989           y has been substituted by y(t^{1/N}) as a string
     
    11551162   "EXAMPLE:";
    11561163   echo=2;
     1164   printlevel=1;
    11571165   ring r=0,(x,y),ds;
    11581166   poly f=x2-y4+x5y7;
     
    46784686        "AND HIT THE RETURN BUTTON TWICE (!!!) - NOTE, THE LAST 0 IS OMITTED";
    46794687        "IF YOU WANT wneu TO BE TESTED, THEN SET goon=0;";
    4680         ~
     4688
    46814689        // THIS IS NOT NECESSARY !!!! IF WE COMPUTE NOT ONLY THE
    46824690        // TROPICAL PREVARIETY
     
    46874695          {
    46884696            "CHOOSE A DIFFERENT RAY";
    4689             ~
     4697
    46904698          }
    46914699          else
     
    47244732      {
    47254733        "Set intvec wneu!";
    4726         ~
     4734
    47274735      }
    47284736    }
     
    55485556///////////////////////////////////////////////////////////////////////////////
    55495557
    5550 static proc tropicalparametrise (ideal i,intvec ww,int ordnung,int gfanold,int findall,int nogfan,int puiseux,list #)
     5558static proc tropicalparametrise (ideal i,intvec ww,int ordnung,intvec ordnungskontrollvektor,int gfanold,int findall,int nogfan,int puiseux,list #)
    55515559"USAGE:  tropicalparametrise(i,tw,ord,gf,fa,ng,pu[,#]); i ideal, tw intvec, ord int, gf,fa,ng,pu int, # opt. list
    55525560ASSUME:  - i is an ideal in Q[t,x_1,...,x_n,@a], tw=(w_0,w_1,...,w_n,0)
     
    56205628  list wneulist; // carries all newly computed weight vector
    56215629  intvec wneu;   // carries the newly computed weight vector
     5630  intvec okvneu; // carries the newly computed ordnungskontrollvektor
    56225631  int tweight;   // carries the weight of t
    56235632  list PARALIST; // carries the result when tropicalparametrise
     
    57225731            "AND HIT THE RETURN BUTTON - NOTE, THE LAST 0 IS OMITTED";
    57235732            "IF YOU WANT wneu TO BE TESTED, THEN SET goon=0;";
    5724             ~
     5733
    57255734            // THIS IS NOT NECESSARY !!!! IF WE COMPUTE NOT ONLY
    57265735            // THE TROPICAL PREVARIETY
     
    57315740              {
    57325741                "CHOOSE A DIFFERENT RAY";
    5733                 ~
     5742
    57345743              }
    57355744              else
     
    57935802            {
    57945803              "Set wneulist!";
    5795               ~
     5804
    57965805            }
    57975806            else
    57985807            {
    57995808              "Set intvec wneu!";
    5800               ~
     5809
    58015810              wneulist[1]=wneu;
    58025811            }
     
    58105819      // if all variables were deleted, then i=0 and thus anzahlvariablen==0
    58115820      lll=0;
    5812       if ((ordnung>1) and (anzahlvariablen>1))
     5821      if (((puiseux==0) and (ordnung>1)) or ((puiseux==1) and (ordnungskontrollvektor[2]<ordnungskontrollvektor[1]*ordnung)) and (anzahlvariablen>1))
    58135822      {
    58145823        partliftings=list(); // initialise partliftings
     
    58225831        {
    58235832          wneu=wneulist[kk];
    5824           PARALIST=tropicalparametrise(i,wneu,ordnung-1,gfanold,findall,nogfan,puiseux,anzahlvariablen,zero);
     5833          okvneu=-ordnungskontrollvektor[1]*wneu[1],-ordnungskontrollvektor[2]*wneu[1]-wneu[2];
     5834          if (puiseux==0)
     5835          {
     5836            PARALIST=tropicalparametrise(i,wneu,ordnung-1,okvneu,gfanold,findall,nogfan,puiseux,anzahlvariablen,zero);
     5837          }
     5838          else
     5839          {
     5840            PARALIST=tropicalparametrise(i,wneu,ordnung,okvneu,gfanold,findall,nogfan,puiseux,anzahlvariablen,zero);
     5841          }
    58255842          // the output will be a ring, in which the
    58265843          // parametrisation lives, and a string, which contains
  • Tst/Short.lst

    r78d776 r35f51c1  
    126126Short/bug_tr549.tst
    127127Short/bug_x_i_j.tst
     128Short/charseries.tst
    128129Short/classify_s.tst
    129130Short/cyc5_lp.tst
  • Tst/Short/ok_s.lst

    r78d776 r35f51c1  
    134134bug_x_i_j
    135135brnoeth_s
     136charseries
    136137countedref_s
    137138classify_s
  • factory/canonicalform.cc

    r78d776 r35f51c1  
    1717#include "gfops.h"
    1818#include "facMul.h"
     19#include "FLINTconvert.h"
    1920
    2021#include <factory/cf_gmp.h>
    21 
    2222
    2323#ifndef NOSTREAMIO
  • factory/libfac/charset/alg_factor.cc

    r78d776 r35f51c1  
    10301030newfactoras( const CanonicalForm & f, const CFList & as, int &success)
    10311031{
     1032  bool isRat= isOn (SW_RATIONAL);
     1033  if (!isRat)
     1034    On (SW_RATIONAL);
    10321035  Variable vf=f.mvar();
    10331036  CFListIterator i;
     
    10501053// ||( (as.length()==1) && (degree(f,vf)==3) && (degree(as.getFirst()==2)) )
    10511054    DEBDECLEVEL(CERR,"newfactoras");
     1055    if (!isRat)
     1056      Off (SW_RATIONAL);
    10521057    return CFFList(CFFactor(f,1));
    10531058  }
     
    10791084  if ( Astar.length() == 0 ){
    10801085    DEBDECLEVEL(CERR,"newfactoras");
     1086    if (!isRat)
     1087      Off (SW_RATIONAL);
    10811088    return CFFList(CFFactor(f,1));
    10821089  }
     
    11101117      CFFList result= newfactoras (Ggcd,as,success); //Ggcd is the squarefree part of f
    11111118      multiplicity (result, f, Astar);
     1119      if (!isRat)
     1120        Off (SW_RATIONAL);
    11121121      return result;
    11131122    }
     
    11161125    Fgcd= pp(Fgcd); Ggcd= pp(Ggcd);
    11171126    DEBDECLEVEL(CERR,"newfactoras");
     1127    if (!isRat)
     1128      Off (SW_RATIONAL);
    11181129    return myUnion(newfactoras(Fgcd,as,success) , newfactoras(Ggcd,as,success));
    11191130  }
    11201131  if ( getCharacteristic() > 0 )
    11211132  {
     1133    if (!isRat)
     1134      Off (SW_RATIONAL);
    11221135    // First look for extension!
    11231136    IntList degreelist;
     
    11641177    Variable vminpoly;
    11651178    Factorlist= alg_factor(f, Astar, vminpoly, oldord, as, isFunctionField);
    1166       DEBDECLEVEL(CERR,"newfactoras");
    1167       return Factorlist;
     1179    DEBDECLEVEL(CERR,"newfactoras");
     1180    if (!isRat)
     1181      Off (SW_RATIONAL);
     1182    return Factorlist;
    11681183  }
    11691184
     
    11751190newcfactor(const CanonicalForm & f, const CFList & as, int & success )
    11761191{
    1177   On (SW_RATIONAL);
     1192  bool isRat= isOn (SW_RATIONAL);
     1193  if (!isRat)
     1194    On (SW_RATIONAL);
    11781195  CFFList Output, output, Factors= factorize(f);
    11791196  if (Factors.getFirst().factor().inCoeffDomain())
     
    11821199  if ( as.length() == 0 )
    11831200  {
     1201    if (!isRat)
     1202      Off (SW_RATIONAL);
    11841203    success=1;
    11851204    return Factors;
     
    11871206  if ( cls(f) <= cls(as.getLast()) )
    11881207  {
     1208    if (!isRat)
     1209      Off (SW_RATIONAL);
    11891210    success=1;
    11901211    return Factors;
     
    11981219      Output = myappend(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp()));
    11991220  }
     1221
     1222  if (!isRat)
     1223    Off (SW_RATIONAL);
    12001224  return Output;
    12011225}
  • kernel/feread.cc

    r23f745 r35f51c1  
    5151*   start at the top of the list.
    5252*/
     53#include <Singular/ipid.h>
    5354extern "C"
    5455char *command_generator (char *text, int state)
    5556{
    5657  static int list_index, len;
    57   char *name;
     58  static idhdl h;
     59  const char *name;
    5860
    5961  /* If this is a new word to complete, initialize now.  This includes
     
    6466    list_index = 1;
    6567    len = strlen (text);
     68    h=basePack->idroot;
    6669  }
    6770
     
    7477      return (strdup(name));
    7578  }
    76 
     79  if (len>1)
     80  {
     81    while (h!=NULL)
     82    {
     83      name=h->id;
     84      h=h->next;
     85      if (strncmp (name, text, len) == 0)
     86        return (strdup(name));
     87    }
     88  }
    7789  /* If no names matched, then return NULL. */
    7890  return ((char *)NULL);
Note: See TracChangeset for help on using the changeset viewer.