Changeset b24fe3 in git
- Timestamp:
- Nov 28, 2014, 11:49:45 AM (9 years ago)
- Branches:
- (u'spielwiese', 'd1b01e9d51ade4b46b745d3bada5c5f3696be3a8')
- Children:
- ba19a8a94da4931a7c4fb8ea6bc91256251c15ec
- Parents:
- 25e8609473c8b0c0bf29a493b620176e064e7790
- Location:
- Singular/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/hnoether.lib
r25e860 rb24fe3 279 279 if (size(parstr(altring))==1) { mipl=string(minpoly); } 280 280 //---- test: char = (p^k,a) (-> gcd not implemented) or (p,a) (gcd works) ---- 281 if ((char(basering)!=0) and (charstr(basering)!=string(char(basering)))) { 282 string tststr=charstr(basering); 283 tststr=tststr[1..find(tststr,",")-1]; //-> "p^k" bzw. "p" 284 gcd_ok=(tststr==string(char(basering))); 285 } 281 //if ((char(basering)!=0) and (charstr(basering)!=string(char(basering)))) 282 gcd_ok= ! hasGFCoefficient(basering); 286 283 execute("ring rsqrf = ("+charstr(altring)+"),(x,y),dp;"); 287 284 if ((gcd_ok!=0) && (mipl!="0")) { execute("minpoly="+mipl+";"); } … … 2740 2737 2741 2738 //--------- Falls Ring (p^k,a),...: Wechsel in (p,a),... + minpoly ----------- 2742 if ( (find(charstr(basering),string(char(basering)))!=1) && 2743 (charstr(basering)<>"real")&& 2744 (charstr(basering)<>"complex") ) { 2739 if ( hasGFCoefficient(basering) ) 2740 { 2745 2741 string strmip=string(minpoly); 2746 2742 string strf=string(f); … … 2907 2903 " Warning: all variables except the first two will be ignored!"); 2908 2904 } 2909 if (find(charstr(basering),string(char(basering)))!=1) { 2910 " ring of type (p^k,a) not implemented"; 2905 if (hasGFCoefficient(basering)) 2906 { 2907 ERROR(" ring of type (p^k,a) not implemented"); 2911 2908 //---------------------------------------------------------------------------- 2912 2909 // weder primitives Element noch factorize noch map "char p^k" -> "char -p" 2913 2910 // [(p^k,a)->(p,a) ground field] noch fetch 2914 2911 //---------------------------------------------------------------------------- 2915 return(list());2916 2912 } 2917 2913 //----------------- Definition eines neuen Ringes: HNEring ------------------- 2918 2914 string namex=varstr(1); string namey=varstr(2); 2919 if ( string(char(altring))==charstr(altring)) { // kein Parameter, nicht 'real'2915 if ((npars(altring)==0)&&(find(charstr(altring),"real")==0)) { // kein Parameter, nicht 'real' 2920 2916 ring HNEring = char(altring),(x,y),ls; 2921 2917 map m=altring,x,y; -
Singular/LIB/ring.lib
r25e860 rb24fe3 25 25 optionIsSet(opt) check if as a string given option is set or not. 26 26 hasFieldCoefficient check if the coefficient ring is considered a field 27 hasGFCoefficient check if the coefficient ring is GF(p,k) 27 28 hasNumericCoeffs(rng) check for use of floating point numbers 28 29 hasCommutativeVars(rng) non-commutive or commnuative polynomial ring … … 996 997 } 997 998 999 proc hasGFCoefficient(def rng ) 1000 "USAGE: hasGFCoefficient ( rng ); 1001 RETURN: 1 if the coeffcients form GF(p,k), 0 otherwise. 1002 KEYWORDS: ring coefficients 1003 EXAMPLE: example hasGFCoefficient; shows an example 1004 " 1005 { 1006 return((charstr(rng)!=string(char(rng))) && 1007 (npars(rng)==1) && 1008 (find(charstr(rng),string(char(rng)))!=1) && 1009 (charstr(basering)<>"real")&& 1010 (charstr(basering)<>"complex") ); 1011 } 1012 example 1013 { 1014 ring r1 = integer,x,dp; 1015 hasGF(r1); 1016 ring r2 = (4,a),x,dp; 1017 hasGF(r2); 1018 } 1019 998 1020 proc hasGlobalOrdering (def rng) 999 1021 "USAGE: hasGlobalOrdering ( rng );
Note: See TracChangeset
for help on using the changeset viewer.