|
D.2.6.7 extendring
Procedure from library ring.lib (see ring_lib).
- Usage:
extendring(na,n,va,o[iv,i,r]); na,va,o=strings,
n,i=integers, r=ring, iv=intvec of positive integers or iv=0
- Create:
Define a ring with name ‘na‘ which extends the ring r by adding n new
variables in front of [after, if i!=0] the old variables and make it
the basering [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 (, say va="x(", the new
variables are x(1),...,x(n).
– The ordering is the product ordering between the ordering of r and
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 an intvec iv !=0 is given, iv[1],iv[2],... is 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
- Return:
No return value
- 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, let the local names of your proc
start with @ (see the file HelpForProc)
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;
extendring("R1",t,"a","dp"); //t global: "dp" -> "dp(5)"
→ // basering is now R1
show(R1); "";
→ // ring: (0),(a,b,c,d,e,x,y,z),(dp(5),ds(3),C);
→ // minpoly = 0
→ // objects belonging to this ring:
→
extendring("R2",4,"T(","c,dp",1,r); //"dp" -> "c,..,dp(4)"
→ // basering is now R2
show(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:
extendring("R3",4,"T(","dp(2)",0,r); // "dp(2)" -> "dp(2)"
→ // basering is now R3
show(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;
extendring("R4",10,"A","ds,ws,Dp,dp",v,0,r);
→ // basering is now R4
//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;
if(system("with","Namespaces")) {
if( nameof(Current) == "Ring" ) {
kill Top::R1,Top::R2,Top::R3,Top::R4;
} else {
kill Ring::R1,Ring::R2,Ring::R3,Ring::R4;
}
}
|
|