Top
Back: D.2.6.3 changevar
Forward: D.2.6.5 defrings
FastBack: D. SINGULAR libraries
FastForward: E. Release Notes
Up: D.2.6 ring_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

D.2.6.4 defring

Procedure from library ring.lib (see ring_lib).

Usage:

defring(s1,s2,n,s3,s4); s1..s4=strings, n=integer

Create:

Define a ring with name ’s1’, characteristic ’s2’, ordering ’s4’ and n variables with names derived from s3 and make it the basering. If s3 is a single letter, say s3="a", and if n<=26 then a and the following n-1 letters from the alphabet (cyclic order) are taken as variables. If n>26 or if s3 is a single letter followed by (, say s3="T(", the variables are T(1),...,T(n).

Return:

No return value

Note:

This proc is useful for defining a ring in a procedure. This proc uses ’execute’ or calls a procedure using ’execute’. If you use it in your own proc, let the local names of your proc start with @.

Example:

 
LIB "ring.lib";
defring("r","0",5,"u","ls"); r; "";
→ // basering is now: r
→ //   characteristic : 0
→ //   number of vars : 5
→ //        block   1 : ordering ls
→ //                  : names    u v w x y 
→ //        block   2 : ordering C
→ 
defring("R","2,A",10,"x(","dp(3),ws(1,2,3),ds"); R;
→ // basering is now: R
→ //   characteristic : 2
→ //   1 parameter    : A 
→ //   minpoly        : 0
→ //   number of vars : 10
→ //        block   1 : ordering dp
→ //                  : names    x(1) x(2) x(3) 
→ //        block   2 : ordering ws
→ //                  : names    x(4) x(5) x(6) 
→ //                  : weights     1    2    3 
→ //        block   3 : ordering ds
→ //                  : names    x(7) x(8) x(9) x(10) 
→ //        block   4 : ordering C
kill r,R;
if(system("with","Namespaces")) {
if( nameof(Current) == "Ring" ) {
kill Top::r,Top::R;
} else {
kill Ring::r,Ring::R;
}
}

Top Back: D.2.6.3 changevar Forward: D.2.6.5 defrings FastBack: D. SINGULAR libraries FastForward: E. Release Notes Up: D.2.6 ring_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.