Changeset 738208 in git
- Timestamp:
- Dec 20, 2013, 2:07:40 PM (10 years ago)
- Branches:
- (u'spielwiese', 'd1b01e9d51ade4b46b745d3bada5c5f3696be3a8')
- Children:
- 3e032aa23883008eaeb717bed37aa560c44de867e33e5f31dc44bc1a57ac4a6531b88cfaa8486004
- Parents:
- 4e4e24bd5220c690dc16529b1fb431b5ef67482c
- git-author:
- Jakob Kröker <kroeker@math.uni-hannover.de>2013-12-20 14:07:40+01:00
- git-committer:
- Jakob Kroeker <kroeker@uni-math.gwdg.de>2014-01-28 02:12:51+01:00
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/ring.lib
r4e4e24b r738208 849 849 r; 850 850 } 851 852 853 854 855 proc isQuotientRing( rng ) 856 "USAGE: isQuotientRing ( rng ); 857 RETURN: 1 if rng is a quotient ring, 0 otherwise. 858 PURPOSE: check if typeof a rng "qring" 859 KEYWORDS: qring ring ideal 'factor ring' 860 EXAMPLE: example isQuotientRing ; shows an example 861 " 862 { 863 return ( size(ideal(rng)) != 0 ); 864 } 865 example 866 { 867 ring rng = 0,x,dp; 868 isQuotientRing(rng); //no 869 // if a certain method does not support quotient rings, 870 // then a parameter test could be performed: 871 ASSUME( 0, 0==isQuotientRing(basering)); 872 873 qring q= ideal(x); // constructs rng/ideal(x) 874 isQuotientRing(q); // yes 875 } 876 877 static proc testIsQuotientRing() 878 { 879 ring rng = real,x,dp; 880 ASSUME(0, 0== isQuotientRing(rng) ) ; 881 882 qring qrng = 1; 883 ASSUME(0, isQuotientRing(qrng) ) ; 884 885 ring rng2 = integer,x,dp; 886 ASSUME(0, 0 == isQuotientRing(rng2) ) ; 887 888 qring qrng2=0; 889 ASSUME(0, isQuotientRing(qrng2) ) ; 890 891 ring rng3 = 0,x,dp; 892 ASSUME(0, 0 == isQuotientRing(rng3) ) ; 893 894 qring qrng3=1; 895 ASSUME(0, isQuotientRing(qrng3) ) ; 896 } 897 898 899 900 901 902 proc hasIntegerCoefficientRing( rng ) 903 "USAGE: hasIntegerCoefficientRing ( rng ); 904 RETURN: 1 if rng is has integer ring coefficients, 0 otherwise. 905 KEYWORDS: integer ring coefficients 906 EXAMPLE: example hasIntegerCoefficientRing ; shows an example 907 " 908 proc hasIntegerCoefficientRing(rng) 909 { 910 def rl = ringlist(rng); 911 if ( not (typeof(rl[1][1])=="string") ) { return (0); } 912 return ( rl[1][1]=="integer" ); 913 } 914 example 915 { 916 ring rng = integer,x,dp; 917 hasIntegerCoefficientRing(rng); //yes 918 // if a certain method supports only rings with integer coefficients, 919 // then a parameter test could be performed: 920 ASSUME( 0, hasIntegerCoefficientRing(basering)); //ok 921 922 ring rng2 = 0, x, dp; 923 hasIntegerCoefficientRing(rng2); // no 924 } 925 926 927 static proc testHasIntegerCoefficientRing() 928 { 929 ring rng = integer,x,dp; 930 ASSUME(0, hasIntegerCoefficientRing( rng ) ); 931 932 qring q = ideal(x); 933 ASSUME(0, hasIntegerCoefficientRing( q ) ); 934 935 ring rng2 = 0,x,dp; 936 ASSUME(0, 0==hasIntegerCoefficientRing( rng2 ) ); 937 938 ring rng3 = (0,a),x,dp; 939 ASSUME(0, 0==hasIntegerCoefficientRing( rng3 ) ); 940 941 ring rng4 = (real,a),x,dp; 942 ASSUME(0, 0==hasIntegerCoefficientRing( rng4 ) ); 943 944 ring rng5 = (real),x,dp; 945 ASSUME(0, 0==hasIntegerCoefficientRing( rng5 ) ); 946 } 947 948 949 950 -
Singular/LIB/sing.lib
r4e4e24b r738208 362 362 /////////////////////////////////////////////////////////////////////////////// 363 363 364 proc slocus 364 proc slocus(ideal i) 365 365 "USAGE: slocus(i); i ideal 366 RETURN: ideal of singular locus of i 366 RETURN: ideal of singular locus of i. Quotient rings and rings with integer coefficients are currently not supported. 367 367 EXAMPLE: example slocus; shows an example 368 368 " 369 369 { 370 // quotient rings currently not supported 371 ASSUME( 0, 0==isQuotientRing(basering) ); 372 // integer coefficient rings currently not supported 373 ASSUME( 0, 0==hasIntegerCoefficientRing(basering) ); 374 375 370 376 def R=basering; 371 377 int j,k; … … 415 421 { 416 422 ideal ist=std(i); 417 if(deg(ist[1])==0){return(ist);} 418 int cod = nvars(basering)-dim(ist); 419 i = i+minor(jacob(i),cod); 423 if ( size(ist)==0 ) // we have a zero ideal 424 { 425 // the zero locus of the zero ideal is nonsingular 426 return( ideal(1) ) ; 427 } 428 if( deg( ist[1] ) == 0 ) // the ideal has a constant generator 429 { 430 return(ist); 431 } 432 int cod = nvars(basering) - dim(ist); 433 i = i + minor( jacob(i), cod ); 420 434 return(i); 421 435 } -
Tst/Short.lst
r4e4e24b r738208 51 51 Short/bug_51.tst 52 52 Short/bug_52.tst 53 Short/bug_526.tst 53 54 Short/bug_53.tst 54 55 Short/bug_54.tst … … 229 230 Short/ringmodn.tst 230 231 Short/ringsum.tst 232 Short/ringutils_s.tst 231 233 Short/ringz.tst 232 234 Short/rInit.tst
Note: See TracChangeset
for help on using the changeset viewer.