Ignore:
Timestamp:
Sep 20, 2014, 1:53:38 AM (10 years ago)
Author:
Yue Ren <ren@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
4664b33f793e7e511d9722557720dd523ec89856
Parents:
b71400abefd0c9c66c0009063f40ddd5b1f1c4c7
git-author:
Yue Ren <ren@mathematik.uni-kl.de>2014-09-20 01:53:38+02:00
git-committer:
Yue Ren <ren@mathematik.uni-kl.de>2015-02-06 13:47:05+01:00
Message:
chg: status update 20.09.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/gfanlib/startingCone.cc

    rb71400a rdffd154  
    336336{
    337337  ring r = currentStrategy.getStartingRing();
    338   const ideal I = currentStrategy.getStartingIdeal();
     338  ideal I = currentStrategy.getStartingIdeal();
     339  currentStrategy.reduce(I,r);
    339340  if (currentStrategy.isConstantCoefficientCase())
    340341  {
     
    389390    // copy the data, so that it be deleted when passed to the loop
    390391    // s <- r
    391     // inI <- I
     392    // inJ <- I
    392393    ring s = rCopy(r);
    393     int k = idSize(I); ideal inI = idInit(k);
     394    int k = idSize(I); ideal inJ = idInit(k);
    394395    nMapFunc identityMap = n_SetMap(r->cf,s->cf);
    395396    for (int i=0; i<k; i++)
    396       inI->m[i] = p_PermPoly(I->m[i],NULL,r,s,identityMap,NULL,0);
     397      inJ->m[i] = p_PermPoly(I->m[i],NULL,r,s,identityMap,NULL,0);
    397398
    398399    // and check whether the dimension of its homogeneity space
    399400    // equals the dimension of the tropical variety
    400     gfan::ZCone zc = linealitySpaceOfGroebnerFan(inI,s);
     401    gfan::ZCone zc = linealitySpaceOfGroebnerFan(inJ,s);
    401402    if (zc.dimension()==currentStrategy.getExpectedDimension())
    402403    { // this shouldn't happen as trivial cases should be caught beforehand
    403404      // this is the case that the tropical variety consists soely out of the lineality space
    404       groebnerCone startingCone(I,inI,s,currentStrategy);
    405       id_Delete(&inI,s);
     405      groebnerCone startingCone(I,inJ,s,currentStrategy);
     406      id_Delete(&inJ,s);
    406407      rDelete(s);
    407408      return startingCone;
     
    410411    // compute a point in the tropical variety outside the lineality space
    411412    // compute the initial ideal with respect to the weight
    412     std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(inI,s,currentStrategy);
     413    std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(inJ,s,currentStrategy);
    413414    gfan::ZVector startingPoint = startingData.first;
    414415    groebnerCone ambientMaximalCone = groebnerCone(startingData.second);
    415     id_Delete(&inI,s); rDelete(s);
    416     inI = ambientMaximalCone.getPolynomialIdeal();
     416    id_Delete(&inJ,s); rDelete(s);
     417    inJ = ambientMaximalCone.getPolynomialIdeal();
    417418    s = ambientMaximalCone.getPolynomialRing();
    418     inI = sloppyInitial(inI,s,startingPoint);
    419     zc = linealitySpaceOfGroebnerFan(inI,s);
     419    inJ = sloppyInitial(inJ,s,startingPoint);
     420    ideal inI = initial(I,r,startingPoint);
     421    zc = linealitySpaceOfGroebnerFan(inJ,s);
    420422
    421423    // and check whether the dimension of its homogeneity space
     
    424426    { // this case shouldn't happen as trivial cases should be caught beforehand
    425427      // this is the case that the tropical variety has a one-codimensional lineality space
    426       ideal J = lift(I,r,inI,s);
    427       groebnerCone startingCone(J,inI,s,currentStrategy);
    428       id_Delete(&inI,s);
     428      ideal J = lift(I,r,inJ,s);
     429      groebnerCone startingCone(J,inJ,s,currentStrategy);
     430      id_Delete(&inJ,s);
    429431      id_Delete(&J,s);
    430432      return startingCone;
    431433    }
    432434
    433     // from this point on, inI contains the uniformizing parameter,
     435    // from this point on, inJ contains the uniformizing parameter,
    434436    // hence it contains a monomial if and only if its residue over the residue field does.
    435437    // so we will switch to the residue field
     
    439441    rComplete(rShortcut);
    440442    rTest(rShortcut);
    441     k = idSize(inI);
    442     ideal inIShortcut = idInit(k);
     443    k = idSize(inJ);
     444    ideal inJShortcut = idInit(k);
    443445    nMapFunc takingResidues = n_SetMap(s->cf,rShortcut->cf);
    444446    for (int i=0; i<k; i++)
    445       inIShortcut->m[i] = p_PermPoly(inI->m[i],NULL,s,rShortcut,takingResidues,NULL,0);
    446     idSkipZeroes(inIShortcut);
    447     id_Delete(&inI,s);
    448 
    449     // we are interested in a maximal cone of the tropical variety of inIShortcut
     447      inJShortcut->m[i] = p_PermPoly(inJ->m[i],NULL,s,rShortcut,takingResidues,NULL,0);
     448    idSkipZeroes(inJShortcut);
     449    id_Delete(&inJ,s);
     450
     451    // we are interested in a maximal cone of the tropical variety of inJShortcut
    450452    // this basically equivalent to the case without valuation (or constant coefficient case)
    451453    // except that our ideal is still only homogeneous in the later variables,
    452454    // hence we set the optional parameter completelyHomogeneous as 'false'
    453     tropicalStrategy shortcutStrategy(inIShortcut,rShortcut,false);
     455    tropicalStrategy shortcutStrategy(inJShortcut,rShortcut,false);
    454456    groebnerCone startingConeShortcut = tropicalStartingCone(shortcutStrategy);
    455     id_Delete(&inIShortcut,rShortcut); rDelete(rShortcut);
    456 
    457     // now we need to obtain the initial of the residue of inI
     457    id_Delete(&inJShortcut,rShortcut); rDelete(rShortcut);
     458
     459    // now we need to obtain the initial of the residue of inJ
    458460    // with respect to a weight in the tropical cone,
    459     // and obtain the initial of inI with respect to the same weight
     461    // and obtain the initial of inJ with respect to the same weight
    460462    ring sShortcut = startingConeShortcut.getPolynomialRing();
    461     inIShortcut = startingConeShortcut.getPolynomialIdeal();
     463    inJShortcut = startingConeShortcut.getPolynomialIdeal();
    462464    gfan::ZCone zd = startingConeShortcut.getPolyhedralCone();
    463465    gfan::ZVector interiorPoint = startingConeShortcut.getInteriorPoint();
    464     inIShortcut = sloppyInitial(inIShortcut,sShortcut,interiorPoint);
     466    inJShortcut = sloppyInitial(inJShortcut,sShortcut,interiorPoint);
     467    inI = initial(inI,r,interiorPoint);
    465468
    466469    s = rCopy0(sShortcut); // s will be a ring over the valuation ring
     
    470473    rTest(s);
    471474
    472     k = idSize(inIShortcut); // inI will be overwritten with initial of inI
    473     inI = idInit(k+1);
    474     inI->m[0] = p_One(s);    // with respect to that weight
     475    k = idSize(inJShortcut); // inJ will be overwritten with initial of inJ
     476    inJ = idInit(k+1);
     477    inJ->m[0] = p_One(s);    // with respect to that weight
    475478    identityMap = n_SetMap(r->cf,s->cf); // first element will obviously be p
    476     p_SetCoeff(inI->m[0],identityMap(currentStrategy.getUniformizingParameter(),r->cf,s->cf),s);
     479    p_SetCoeff(inJ->m[0],identityMap(currentStrategy.getUniformizingParameter(),r->cf,s->cf),s);
    477480    nMapFunc findingRepresentatives = n_SetMap(sShortcut->cf,s->cf);
    478481    for (int i=0; i<k; i++)              // and then come the rest
    479       inI->m[i+1] = p_PermPoly(inIShortcut->m[i],NULL,sShortcut,s,findingRepresentatives,NULL,0);
    480 
    481     ideal J = lift(I,r,inI,s);
     482      inJ->m[i+1] = p_PermPoly(inJShortcut->m[i],NULL,sShortcut,s,findingRepresentatives,NULL,0);
     483
     484    ideal J = currentStrategy.computeLift(inJ,s,inI,I,r);
    482485    // currentStrategy.reduce(J,s);
    483     groebnerCone startingCone(J,inI,s,currentStrategy);
    484     id_Delete(&inI,s);
     486    groebnerCone startingCone(J,inJ,s,currentStrategy);
     487    id_Delete(&inJ,s);
    485488    id_Delete(&J,s);
    486489    rDelete(s);
     490    id_Delete(&inI,r);
    487491
    488492    assume(checkContainmentInTropicalVariety(startingCone));
Note: See TracChangeset for help on using the changeset viewer.