|
D.2.6.1 changechar
Procedure from library ring.lib (see ring_lib).
- Usage:
changechar(newr,c[,r]); newr,c=strings, r=ring
- Create:
create a new ring with name ‘newr‘ and make it the basering if r is
an existing ring [default: r=basering].
The new ring differs from the old ring only in the characteristic.
If, say, (newr,c) = ("R","0,A") and the ring r exists, the new
basering will have name R, characteristic 0 and one parameter A.
- Return:
No return value
- Note:
Works for qrings if map from old_char to new_char is implemented
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";
ring r=0,(x,y,u,v),(dp(2),ds);
changechar("R","2,A"); R;"";
→ // basering is now R
→ // characteristic : 2
→ // 1 parameter : A
→ // minpoly : 0
→ // number of vars : 4
→ // block 1 : ordering dp
→ // : names x y
→ // block 2 : ordering ds
→ // : names u v
→ // block 3 : ordering C
→
changechar("R1","32003",R); R1;
→ // basering is now R1
→ // characteristic : 32003
→ // number of vars : 4
→ // block 1 : ordering dp
→ // : names x y
→ // block 2 : ordering ds
→ // : names u v
→ // block 3 : ordering C
kill R,R1;
if(system("with","Namespaces")) {
if( nameof(Current) == "Ring" ) {
kill Top::R,Top::R1;
} else {
kill Ring::R,Ring::R1;
}
}
|
|