Changeset 2211fc in git


Ignore:
Timestamp:
May 24, 2000, 1:02:18 AM (24 years ago)
Author:
Gert-Martin Greuel <greuel@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b21a664aa22dc6e196223af8a74ad4885e83547c')
Children:
eb0b4c8af87cb38343360f1fafc036023011f2d0
Parents:
9f9f2c54671e5059a4bae3993a694f7029e712da
Message:
* GMG: neue proc  ord_test eingefuegt


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ring.lib

    r9f9f2c r2211fc  
    1 // $Id: ring.lib,v 1.11 2000-05-12 12:17:17 krueger Exp $
     1// $Id: ring.lib,v 1.12 2000-05-23 23:02:18 greuel Exp $
    22//(GMG, last modified 03.11.95)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: ring.lib,v 1.11 2000-05-12 12:17:17 krueger Exp $";
     5version="$Id: ring.lib,v 1.12 2000-05-23 23:02:18 greuel Exp $";
    66info="
    77LIBRARY:  ring.lib      PROCEDURES FOR MANIPULATING RINGS AND MAPS
     
    1818 imapall(R[,str]);      imap all objects of ring R to basering
    1919 mapall(R,i[,str]);     map all objects of ring R via ideal i to basering
     20 ord_test(R);           test wether ordering of R is global, local or mixed
    2021 ringtensor(\"R\",s,t,..);create ring R, tensor product of rings s,t,...
    2122           (parameters in square brackets [] are optional)
     
    625626///////////////////////////////////////////////////////////////////////////////
    626627
     628proc ord_test (r)
     629"USAGE:   ord_test(r);  r ring
     630RETURN:  int 1 (resp. -1, resp. 0) if ordering of r is global (resp. local,
     631         resp. mixed)
     632EXAMPLE: example ord_test; shows an example
     633"
     634{
     635   if (typeof(r) != "ring")
     636   {
     637      "// ord_test requires a ring as input";
     638      return();
     639   }
     640   def BAS = basering;
     641   setring r;
     642   poly f;
     643   int n,o,u = nvars(r),1,1;
     644   int ii;
     645   for ( ii=1; ii<=n; ii++ )
     646   {
     647      f = 1+var(ii);
     648      o = o*(lead(f) == var(ii));
     649      u = u*(lead(f) == 1);
     650   }
     651   setring BAS;
     652   if ( o==1 ) { return(1); }
     653   if ( u==1 ) { return(-1); }
     654   else { return(0); }
     655}
     656example
     657{ "EXAMPLE:"; echo = 2;
     658   ring R = 0,(x,y),dp;
     659   ring S = 0,(u,v),ls;
     660   ord_test(R);
     661   ord_test(S);
     662   ord_test(R+S);   
     663}
     664///////////////////////////////////////////////////////////////////////////////
     665
    627666proc ringtensor (string s, list #)
    628667"USAGE:   ringtensor(s,r1,r2,...); s=string, r1,r2,...=rings
Note: See TracChangeset for help on using the changeset viewer.