Changeset bb08d5 in git
- Timestamp:
- Mar 17, 2011, 7:42:35 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 96e408150a3505f749f97e0e806d6e654d0269bd
- Parents:
- e7463f6a2c8fb0cc7abe50aa54f387c997fec2d8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/multigrading.lib
re7463f rbb08d5 46 46 47 47 isSublattice(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.48 imageLattice(P,L); computes an integral basis for P(L) 49 49 intRank(A); computes the rank of the intmat A 50 50 kernelLattice(P); computes an integral basis for the kernel of the linear map P. 51 latticeBasis(B); compute an integral basis of the lattice B51 latticeBasis(B); computes an integral basis of the lattice B 52 52 preimageLattice(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.53 projectLattices(B); computes a linear map of lattices having the primitive span of B as its kernel. 54 intersectLattices(A,B); computes an integral basis for the intersection of the lattices A and B. 55 55 isIntegralSurjective(P); test whether the map P of lattices is surjective. 56 56 isPrimitiveSublattice(A); test whether A generates a primitive sublattice. 57 intInverse(A); compute the integral inverse matrix of the intmat A57 intInverse(A); computes the integral inverse matrix of the intmat A 58 58 intAdjoint(A,i,j); delete row i and column j of the intmat A. 59 59 integralSection(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).60 primitiveSpan(A); computes a basis for the minimal primitive sublattice that contains the given vectors (by A). 61 61 62 62 factorgroup(G,H); create the group G mod H … … 328 328 329 329 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 331 337 332 338 attrib(G, isGroup, (1==1)); // mark it "a group" … … 413 419 " 414 420 { 421 ERROR("areIsomorphicGroups: Not yet implemented!"); 415 422 return (1); // TRUE 416 423 } … … 436 443 // if( !defined(a) ) { return(0); } 437 444 // 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); } 442 449 if( typeof(G[1]) != "intmat" ){ return(0); } 443 450 if( typeof(G[2]) != "intmat" ){ return(0); } 444 451 if( nrows(G[1]) != nrows(G[2]) ){ return(0); } 445 452 446 return(1 ==1);453 return(1); 447 454 } 448 455 … … 825 832 if( (!defined(M)) or (typeof(M) != "intmat") ) 826 833 { 827 M = hermiteNormalForm(T); 834 if( size(G) > 2 ) 835 { 836 M = G[3]; 837 } else 838 { 839 M = hermiteNormalForm(T); 840 } 828 841 } 829 842 return (M); … … 835 848 if( (!defined(M)) or (typeof(M) != "intmat") ) 836 849 { 837 M = smithNormalForm(T); 850 if( size(G) > 2 ) 851 { 852 M = G[4]; 853 } else 854 { 855 M = smithNormalForm(T); 856 } 838 857 } 839 858 return (M); … … 4806 4825 4807 4826 // 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] 4809 4828 intmat U = projectLattice(B); 4810 4829 … … 4936 4955 } 4937 4956 4938 C[i,j] = d * s * intDet(Ad); // mult by d is equal to div by det4957 C[i,j] = d * s * det(Ad); // mult by d is equal to div by det 4939 4958 } 4940 4959 } … … 5063 5082 5064 5083 // 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] 5066 5085 intmat U = integralSection(P); 5067 5086
Note: See TracChangeset
for help on using the changeset viewer.