Home Online Manual
Top
Back: defringp
Forward: fetchall
FastBack: random_lib
FastForward: Linear algebra
Up: ring_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.8.7 extendring

Procedure from library ring.lib (see ring_lib).

Usage:
extendring(n,va,o[,iv,i,r]); va,o=strings, n,i=integers, r=ring, iv=intvec of positive integers or iv=0

Return:
ring R, which extends the ring r by adding n new variables in front of (resp. after, if i!=0) the old variables.
[default: (i,r)=(0,basering)].
-- The characteristic is the characteristic of r.
-- The new vars are derived from va. If va is a single letter, say va="T", and if n<=26 then T and the following n-1 letters from T..Z..T (resp. T(1..n) if n>26) are taken as additional variables. If va is a single letter followed by a bracket, say va="x(", the new variables are x(1),...,x(n).
-- The ordering is the product ordering of the ordering of r and of an ordering derived from `o` [and iv].
- If o contains a 'c' or a 'C' in front resp. at the end, this is taken for the whole ordering in front, resp. at the end. If o does not contain a 'c' or a 'C' the same rule applies to ordstr(r).
- If no intvec iv is given, or if iv=0, o may be any allowed ordstr, like "ds" or "dp(2),wp(1,2,3),Ds(2)" or "ds(a),dp(b),ls" if a and b are globally (!) defined integers and if a+b+1<=n. If, however, a and b are local to a proc calling extendring, the intvec iv must be used to let extendring know the values of a and b
- If a non-zero intvec iv is given, iv[1],iv[2],... are taken for the 1st, 2nd,... block of o, if o contains no substring "w" or "W" i.e. no weighted ordering (in the above case o="ds,dp,ls" and iv=a,b).
If o contains a weighted ordering (only one (!) weighted block is allowed) iv[1] is taken as size for the weight-vector, the next iv[1] values of iv are taken as weights and the remaining values of iv as block size for the remaining non-weighted blocks. e.g. o="dp,ws,Dp,ds", iv=3,2,3,4,2,5 creates the ordering dp(2),ws(2,3,4),Dp(5),ds

Note:
This proc is useful for adding deformation parameters.
This proc uses 'execute' or calls a procedure using 'execute'. If you use it in your own proc, it may be advisable to let the local names of your proc start with a @

Example:
 
LIB "ring.lib";
ring r=0,(x,y,z),ds;
show(r);"";
==> // ring: (0),(x,y,z),(ds(3),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> 
// blocksize is derived from no of vars:
int t=5;
def R1=extendring(t,"a","dp");         //t global: "dp" -> "dp(5)"
show(R1); setring R1; "";
==> // ring: (0),(a,b,c,d,e,x,y,z),(dp(5),ds(3),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> 
def R2=extendring(4,"T(","c,dp",1,r);    //"dp" -> "c,..,dp(4)"
show(R2); setring R2; "";
==> // ring: (0),(x,y,z,T(1),T(2),T(3),T(4)),(c,ds(3),dp(4));
==> // minpoly = 0
==> // objects belonging to this ring:
==> 
// no intvec given, blocksize given: given blocksize is used:
def R3=extendring(4,"T(","dp(2)",0,r);   // "dp(2)" -> "dp(2)"
show(R3); setring R3; "";
==> // ring: (0),(T(1),T(2),T(3),T(4),x,y,z),(dp(2),ds(5),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> 
// intvec given: weights and blocksize is derived from given intvec
// (no specification of a blocksize in the given ordstr is allowed!)
// if intvec does not cover all given blocks, the last block is used
// for the remaining variables, if intvec has too many components,
// the last ones are ignored
intvec v=3,2,3,4,1,3;
def R4=extendring(10,"A","ds,ws,Dp,dp",v,0,r);
// v covers 3 blocks: v[1] (=3) : no of components of ws
// next v[1] values (=v[2..4]) give weights
// remaining components of v are used for the remaining blocks
show(R4);
==> // ring: (0),(A,B,C,D,E,F,G,H,I,J,x,y,z),(ds(1),ws(2,3,4),Dp(3),dp(3),ds(\
   3),C);
==> // minpoly = 0
==> // objects belonging to this ring:
kill r,R1,R2,R3,R4;