Changeset 5a87b3 in git


Ignore:
Timestamp:
Feb 6, 2017, 12:00:33 PM (6 years ago)
Author:
Janko Boehm <boehm@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
917287cccce32f4b5c018bb33c440a246cbc6aae
Parents:
1381ff1450a5fd15c955cc5228ed66ccb449294d
git-author:
Janko Boehm <boehm@mathematik.uni-kl.de>2017-02-06 12:00:33+01:00
git-committer:
Yue Ren <ren@mathematik.uni-kl.de>2017-06-08 18:10:27+02:00
Message:
Determine orbits in Singular
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/gitfan.lib

    r1381ff1 r5a87b3  
    66LIBRARY:   gitfan.lib       Compute GIT-fans.
    77
    8 AUTHORS: Janko Boehm,   boehm@mathematik.uni-kl.de @*
    9          Simon Keicher, keicher@mail.mathematik.uni-tuebingen.de @*
    10          Yue Ren,       ren@mathematik.uni-kl.de @*
     8AUTHORS: Janko Boehm, boehm at mathematik.uni-kl.de @*
     9         Simon Keicher, keicher at mail.mathematik.uni-tuebingen.de @*
     10         Yue Ren, ren at mathematik.uni-kl.de @*
    1111
    1212OVERVIEW:
     
    3434
    3535PROCEDURES (not using group action):
    36   isAface(ideal,intvec);                      Checks whether the given face is an a-face.
    37   afaces(ideal);                               Returns a list of intvecs that correspond to the set of all a-faces, optionally for given list of simplex faces.
    38   fullDimImages(list,intmat);                  Finds the afaces which have a full-dimensional projection.
    39   minimalAfaces(list);                         Computes the minimal a-faces among the a-faces with full dimensional projection.
    40   orbitCones(list,intmat);                    Returns the list of all orbit cones.
    41   GITcone(list,bigintmat);                    Returns the GIT-cone containing the given weight vector.
    42   GITfan(ideal,intmat);                        Computes the GIT-fan.
    43   GITfanFromOrbitCones(list,intmat,cone);      Computes the GIT-fan from orbit cones.
    44   GITfanParallel(list,intmat,cone);            Computes the GIT-fan in parallel from orbit cones.
    45   GKZfan(intmat);                              Returns the GKZ-fan of the matrix Q.
    46   movingCone(intmat);                          Computes the moving cone.
     36  isAface(ideal, intvec); Checks whether the given face is an a-face.
     37  afaces(ideal); Returns a list of intvecs that correspond to the set of all a-faces, optionally for given list of simplex faces.
     38  fullDimImages(list, intmat); Finds the afaces which have a full-dimensional projection.
     39  minimalAfaces(list); compute the minimal a-faces among the a-faces with full dimensional projection.
     40  orbitCones(list, intmat); Returns the list of all orbit cones.
     41  GITcone(list, bigintmat); Returns the GIT-cone containing the given weight vector.
     42  GITfan(ideal, intmat); Compute GIT-fan.
     43  GITfanFromOrbitCones(list, intmat, cone); Compute GIT-fan from orbit cones.
     44  GITfanParallel(list, intmat, cone); Compute GIT-fan in parallel from orbit cones.
     45  GKZfan(intmat); Returns the GKZ-fan of the matrix Q.
     46  movingCone(intmat); Compute the moving cone.
    4747
    4848PROCEDURES (using group action):
    49   computeAfaceOrbits(list,list);               Computes orbits of a-faces under a permutation group action.
    50   minimalAfaceOrbits(list);                    Finds the minimal a-face orbits.
    51   orbitConeOrbits(list,intmat);                Projects the a-face orbits to orbit cone orbits.
    52   minimalOrbitConeOrbits(list);                Finds the minimal orbit cone orbits.
    53   intersectOrbitsWithMovingCone(list,cone);    Intersects orbit cone orbits with moving cone.
    54   groupActionOnQImage(list,intmat);            Determines the induced group action in the target of the grading matrix.
    55   groupActionOnHashes(list,list);              Determines the induced group action on the set of orbit cones.
    56   storeActionOnOrbitConeIndices(list,string);  Writes the group action on the set of orbit cones to a file.
    57   permutationFromIntvec(intvec);               Creates a permutation from an intvec of images.
    58   permutationToIntvec(permutation);            Returns the intvec of images.
    59   evaluateProduct(list,list);                  Evaluates a list of products of group elements in terms of a given representation of the elements as permutations.
    60   GITfanSymmetric(list,intmat,cone,list);      Computes GIT-fan from orbit cones by determining a minimal representing set for the orbits of maximal dimensional GIT-cones.
    61   GITfanParallelSymmetric(list,intmat,cone,list); Compute GIT-fan in parallel from orbit cones by determining a minimal representing set for the orbits of maximal dimensional GIT-cones.
    62   bigintToBinary(bigint,int);                  Convert bigint into a sparse binary represenation specifying the indices of the one-entries
    63   binaryToBigint(intvec);                      Convert sparse binary represenation specifying the indices of the one-entries to bigint
    64   applyPermutationToIntvec(intvec,permutation);Apply permutation to a set of integers represented as an intvec
    65   hashToCone(bigint,list);                    Convert a bigint hash to a GIT-cone
    66   hashesToFan(list,list);                      Compute fan from hashes of cones and orbit cones
     49  computeAfaceOrbits(list, list); Compute orbits of a-faces under a permutation group action.
     50  minimalAfaceOrbits(list); Find the minimal a-face orbits.
     51  orbitConeOrbits(list, intmat); Project the a-face orbits to orbit cone orbits.
     52  minimalOrbitConeOrbits(list); Find the minimal orbit cone orbits.
     53  intersectOrbitsWithMovingCone(list, cone); Intersect orbit cone orbits with moving cone.
     54  groupActionOnQImage(list, intmat); Determine the induced group action in the target of the grading matrix.
     55  groupActionOnHashes(list, list); Determine the induced group action on the set of orbit cones.
     56  storeActionOnOrbitConeIndices(list, string); Write the group action on the set of orbit cones to a file.
     57  permutationFromIntvec(intvec); Create a permutation from an intvec of images.
     58  permutationToIntvec(permutation); Return the intvec of images.
     59  evaluateProduct(list,list); Evaluate a list of products of group elements in terms of a given representation of the elements as permutations.
     60  GITfanSymmetric(list, intmat, cone, list); Compute GIT-fan from orbit cones by determining a minimal representing set for the orbits of maximal dimensional GIT-cones.
     61  GITfanParallelSymmetric(list, intmat, cone, list); Compute GIT-fan in parallel from orbit cones by determining a minimal representing set for the orbits of maximal dimensional GIT-cones.
     62  bigintToBinary(bigint, int); Convert bigint into a sparse binary represenation specifying the indices of the one-entries
     63  binaryToBigint(intvec); Convert sparse binary represenation specifying the indices of the one-entries to bigint
     64  applyPermutationToIntvec(intvec, permutation); Apply permutation to a set of integers represented as an intvec
     65  hashToCone(bigint, list); Convert a bigint hash to a GIT-cone
     66  hashesToFan(list hashes, list OC)
    6767
    6868KEYWORDS: library, gitfan, GIT, geometric invariant theory, quotients
     
    7575LIB "parallel.lib";
    7676
    77 static proc mod_init()
    78 {
    79   LIB "gfanlib.so";
    80   LIB "gitfan.so";
     77proc mod_init()
     78{
     79  LIB "~ren/murrumesh/gfanlib.so";
     80  LIB "~ren/murrumesh/gitfan.so";
    8181  newstruct("permutation","intvec image");
    8282  system("install","permutation","*",composePermutations,2);
     
    24562456
    24572457
    2458 proc GITfan(ideal J, intmat Q)
    2459 "USAGE: GITfan(J,Q); J:ideal, Q:intmat
    2460 PURPOSE: Computes the GIT fan associated to J and Q.
     2458proc GITfan(ideal J, intmat Q, list #)
     2459"USAGE: GITfan(J,Q [, G]); J:ideal, Q:intmat, G:list
     2460PURPOSE: Computes the GIT fan associated to J and Q. Optionally a symmetry group action on the column space of Q can be specified.
    24612461RETURN: a fan, the GIT fan.
    2462 NOTE: The proceduce uses parallel computation for the construction of the GIT-cones. The a-faces are not computed in parallel. This can be done by calling the aface procedure specifying a list of simplex faces.
     2462NOTE: The proceduce uses parallel computation for the construction of the GIT-cones. The a-faces are not computed in parallel. This can be done by calling the aface procedure specifying a list of simplex faces. If used with the optional argument G, the orbit decomposition of the simplex of columns of Q is computed. Refer to the Singular documentation how to do this more efficiently using GAP.
    24632463EXAMPLE: example GITfan; shows an example
    24642464"
    24652465{
     2466  list GIT;
     2467  list OC;
     2468  if (size(#)>0){
     2469      (GIT,OC) = GITfanWrapperWithSymmetry(J,Q,#);
     2470  } else {
    24662471  list AF= afaces(J,nrows(Q));
    24672472  AF=fullDimImages(AF,Q);
     
    24702475  cone Qgamma = coneViaPoints(transpose(Q));
    24712476  list GIT = GITfanParallel(OC,Q,Qgamma);
     2477  }
    24722478  fan Sigma = hashesToFan(GIT,OC);
    24732479  return(Sigma);
     
    24912497    0, 0, 1, 1, -1, 0, 0, 0, 0, 1;
    24922498  fan GIT = GITfan(J,Q);
     2499
     2500  intmat Q[5][10] =
     2501    1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
     2502    1, 0, 0, 0, 1, 1, 1, 0, 0, 0,
     2503    0, 1, 1, 0, 0, 0, -1, 1, 0, 0,
     2504    0, 1, 0, 1, 0, -1, 0, 0, 1, 0,
     2505    0, 0, 1, 1, -1, 0, 0, 0, 0, 1;
     2506  list simplexSymmetryGroup = G25Action();
     2507  fan GIT2 = GITfan(J,Q,simplexSymmetryGroup);
     2508
    24932509}
    24942510
     
    26142630/////////////////////////////////////
    26152631
    2616 proc GKZfan(intmat Q)
    2617 "USAGE: GKZfan(Q); a: ideal, Q:intmat
     2632proc gkzFan(intmat Q)
     2633"USAGE: gkzFan(Q); a: ideal, Q:intmat
    26182634PURPOSE: Returns the GKZ-fan of the matrix Q.
    26192635RETURN: a fan.
    2620 EXAMPLE: example GKZfan; shows an example
     2636EXAMPLE: example gkzFan; shows an example
    26212637"
    26222638{
     
    26392655    0,0,1,1;
    26402656
    2641   GKZfan(Q);
     2657  gkzFan(Q);
    26422658}
    26432659
     
    28382854
    28392855
    2840 proc findOrbits(list G, int d)
    2841 "USAGE: findOrbits(G,d); G list of permutations in a subgroup of the symmetric group; d int minimum cardinality of simplices to be considered
     2856proc findOrbits(list G, int #)
     2857"USAGE: findOrbits(G [,d]); G list of permutations in a subgroup of the symmetric group; d int minimum cardinality of simplices to be considered; if d is not specified all orbits are computed.
    28422858PURPOSE: Computes the orbit decomposition of the action of G.
    28432859RETURN: list of intvec.
     
    28452861"
    28462862{
     2863int d;
     2864if (size(#)>0){d=#;}
    28472865int n = size(permutationToIntvec(G[1]));
    28482866list listOrbits;
     
    29022920}
    29032921
     2922
     2923
     2924static proc GITfanWrapperWithSymmetry(ideal J, intmat Q, list simplexSymmetryGroup){
     2925  list orb = findOrbits(simplexSymmetryGroup,nrows(Q));
     2926  list simplexOrbitRepresentatives;
     2927  for (int i=1;i<=size(orb);i++){simplexOrbitRepresentatives[i]=orb[i][1];}
     2928  list afaceOrbitRepresentatives=afaces(J,simplexOrbitRepresentatives);
     2929  list fulldimAfaceOrbitRepresentatives=fullDimImages(afaceOrbitRepresentatives,Q);
     2930  list afaceOrbits=computeAfaceOrbits(fulldimAfaceOrbitRepresentatives,simplexSymmetryGroup);
     2931  list minAfaceOrbits = minimalAfaceOrbits(afaceOrbits);
     2932  list listOfOrbitConeOrbits = orbitConeOrbits(minAfaceOrbits,Q);
     2933  list listOfMinimalOrbitConeOrbits = minimalOrbitConeOrbits(listOfOrbitConeOrbits);
     2934  list Asigma = groupActionOnQImage(simplexSymmetryGroup,Q);
     2935  list actionOnOrbitconeIndices = groupActionOnHashes(Asigma,listOfOrbitConeOrbits);
     2936  list OClist = listOfOrbitConeOrbits[1];
     2937  for (i =2;i<=size(listOfOrbitConeOrbits);i++){
     2938    OClist = OClist + listOfOrbitConeOrbits[i];
     2939  }
     2940  cone mov = coneViaPoints(transpose(Q));
     2941  mov = canonicalizeCone(mov);
     2942  list Sigma = GITfanParallelSymmetric(OClist, Q, mov, actionOnOrbitconeIndices);
     2943  return(Sigma, OClist);
     2944}
Note: See TracChangeset for help on using the changeset viewer.