Changeset bb08d5 in git


Ignore:
Timestamp:
Mar 17, 2011, 7:42:35 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
96e408150a3505f749f97e0e806d6e654d0269bd
Parents:
e7463f6a2c8fb0cc7abe50aa54f387c997fec2d8
Message:
FIX: intDet -> det!
FIX: hermite/smith NFs are stored as list entries as well as attribues due to Singular inablility to handle attribs of attrib :(
FIX: updated isGroup

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@14013 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/multigrading.lib

    re7463f rbb08d5  
    4646
    4747isSublattice(A,B);        test whether A is a sublattice of B
    48 imageLattice(P,L);        computes an integral basis for the image of the lattice L under the linear map P.
     48imageLattice(P,L);        computes an integral basis for P(L)
    4949intRank(A);               computes the rank of the intmat A
    5050kernelLattice(P);         computes an integral basis for the kernel of the linear map P.
    51 latticeBasis(B);          compute an integral basis of the lattice B
     51latticeBasis(B);          computes an integral basis of the lattice B
    5252preimageLattice(P,L);     computes an integral basis for the preimage of the lattice L under the linear map P.
    53 projectLattices(B);       compute a linear map of lattices having the primitive span of B as its kernel.
    54 intersectLattices(A,B);   compute an integral basis for the intersection of the lattices A and B.
     53projectLattices(B);       computes a linear map of lattices having the primitive span of B as its kernel.
     54intersectLattices(A,B);   computes an integral basis for the intersection of the lattices A and B.
    5555isIntegralSurjective(P);  test whether the map P of lattices is surjective.
    5656isPrimitiveSublattice(A); test whether A generates a primitive sublattice.
    57 intInverse(A);            compute the integral inverse matrix of the intmat A
     57intInverse(A);            computes the integral inverse matrix of the intmat A
    5858intAdjoint(A,i,j);        delete row i and column j of the intmat A.
    5959integralSection(P);       for a given linear surjective map P of lattices this procedure returns an integral section of P.
    60 primitiveSpan(A);         compute a basis for the minimal primitive sublattice that contains the given vectors (by A).
     60primitiveSpan(A);         computes a basis for the minimal primitive sublattice that contains the given vectors (by A).
    6161
    6262factorgroup(G,H);         create the group G mod H
     
    328328
    329329  list G; // Please, note the order: Generators + Relations:
    330   G[1] = S; G[2] = L;
     330  G[1] = S;
     331  G[2] = L;
     332  // And now a quick-and-dirty fix of Singular inability to handle attribs of attribs:
     333  // For the use of a group as an attribute for multigraded rings
     334  G[3] = attrib(L, attrGroupHNF);
     335  G[4] = attrib(L, attrGroupSNF);
     336 
    331337
    332338  attrib(G, isGroup, (1==1)); // mark it "a group"
     
    413419"
    414420{
     421  ERROR("areIsomorphicGroups: Not yet implemented!");
    415422  return (1); // TRUE
    416423}
     
    436443//  if( !defined(a) ) { return(0); }
    437444//  if( typeof(a) != "int" ) { return(0); }
    438 //  if( !a ){ return(0); }
    439 
    440 
    441   if( size(G) != 2 ){ return(0); }
     445  if( defined(a) ){ if(typeof(a) == "int") { return(a); } }
     446
     447
     448  if( (size(G) != 2) && (size(G) != 4) ){ return(0); }
    442449  if( typeof(G[1]) != "intmat" ){ return(0); }
    443450  if( typeof(G[2]) != "intmat" ){ return(0); }
    444451  if( nrows(G[1]) != nrows(G[2]) ){ return(0); }
    445452
    446   return(1==1);
     453  return(1);
    447454}
    448455
     
    825832      if( (!defined(M)) or (typeof(M) != "intmat") )
    826833      {
    827         M = hermiteNormalForm(T);
     834        if( size(G) > 2 )
     835        {
     836          M = G[3];
     837        } else
     838        {
     839          M = hermiteNormalForm(T);
     840        }
    828841      }
    829842      return (M);
     
    835848      if( (!defined(M)) or (typeof(M) != "intmat") )
    836849      {
    837         M = smithNormalForm(T);
     850        if( size(G) > 2 )
     851        {
     852          M = G[4];
     853        } else
     854        {
     855          M = smithNormalForm(T);
     856        }
    838857      }
    839858      return (M);
     
    48064825
    48074826  // should result in a (2x4)-matrix with columns
    4808   // [-1, 2], [2, −3], [-1, 0] and [0, 1].
     4827  // [-1, 2], [2, -3], [-1, 0] and [0, 1]
    48094828  intmat U = projectLattice(B);
    48104829
     
    49364955      }
    49374956
    4938       C[i,j] = d * s * intDet(Ad); // mult by d is equal to div by det
     4957      C[i,j] = d * s * det(Ad); // mult by d is equal to div by det
    49394958    }
    49404959  }
     
    50635082
    50645083  // should be a matrix with two columns
    5065   // for example: [−2, 1, 0, 0], [3, −3, 0, 1]
     5084  // for example: [-2, 1, 0, 0], [3, -3, 0, 1]
    50665085  intmat U = integralSection(P);
    50675086
Note: See TracChangeset for help on using the changeset viewer.