|
D.2.11.13 ringweights
Procedure from library ring.lib (see ring_lib).
- Usage:
- ringweights(P); P=name of an existing ring (true name, not a string)
- Return:
- intvec consisting of the weights of the variables of P, as they
appear when typing P;.
- Note:
- This is useful when enlarging P but keeping the weights of the old
variables.
Example:
| LIB "ring.lib";
ring r0 = 0,(x,y,z),dp;
ringweights(r0);
==> 1,1,1
ring r1 = 0,x(1..5),(ds(3),wp(2,3));
ringweights(r1);"";
==> 1,1,1,2,3
==>
// an example for enlarging the ring, keeping the first weights:
intvec v = ringweights(r1),6,2,3,4,5;
ring R = 0,x(1..10),(a(v),dp);
ordstr(R);
==> a(1,1,1,2,3,6,2,3,4,5),dp(10),C
|
|