|
D.2.6.5 defrings
Procedure from library ring.lib (see ring_lib).
- Usage:
- defrings(n,[p]); n,p integers
- Create:
- Defines a ring with name Sn, characteristic p, ordering ds and n
variables x,y,z,a,b,...if n<=26 (resp. x(1..n) if n>26) and makes it
the basering (default: p=32003)
- Return:
- No return value
Example:
| LIB "ring.lib";
defrings(5,0); S5; "";
==> // basering is now: ring S5=0,(x,y,z,a,b),ds;
==> // characteristic : 0
==> // number of vars : 5
==> // block 1 : ordering ds
==> // : names x y z a b
==> // block 2 : ordering C
==>
defrings(30); S30;
==> // basering is now: ring S30=32003,x(1..30),ds;
==> // characteristic : 32003
==> // number of vars : 30
==> // block 1 : ordering ds
==> // : names x(1) x(2) x(3) x(4) x(5) x(6) x(7) x(8) x(\
9) x(10) x(11) x(12) x(13) x(14) x(15) x(16) x(17) x(18) x(19) x(20) x(21\
) x(22) x(23) x(24) x(25) x(26) x(27) x(28) x(29) x(30)
==> // block 2 : ordering C
kill S5, S30;
if(system("with","Namespaces")) {
if( nameof(Current) == "Ring" ) {
kill Top::S5,Top::S30;
} else {
kill Ring::S5,Ring::S30;
}
}
|
|