jengelh-datetimespielwiese
Last change
on this file since e070751 was
3f5d6f,
checked in by Oleksandr Motsak <motsak@…>, 11 years ago
|
FIX: printing vs. typing of a quotient ring
ADD: tests for printing vs typing for qrings & non-commutative algebras
|
-
Property mode set to
100644
|
File size:
671 bytes
|
Line | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | |
---|
3 | proc TestRingPrinting(def r, string n) |
---|
4 | { |
---|
5 | def save = basering; |
---|
6 | |
---|
7 | setring r; |
---|
8 | |
---|
9 | "VVVVVVVVVVVV[", n, "]VVVVVVVVVVVV"; |
---|
10 | |
---|
11 | "r == currRing (the following type and print should yield the same output!): "; |
---|
12 | "type: "; r; |
---|
13 | "print(ring): "; print(r); |
---|
14 | |
---|
15 | ring @temp = 2,@a,ds; setring @temp; |
---|
16 | |
---|
17 | "r != currRing (the following type and print may be different!): "; |
---|
18 | "type: "; r; |
---|
19 | "print(ring): "; print(r); |
---|
20 | |
---|
21 | "^^^^^^^^^^^^[", n, "]^^^^^^^^^^^^"; |
---|
22 | kill @temp; |
---|
23 | |
---|
24 | setring save; |
---|
25 | } |
---|
26 | |
---|
27 | ring r; |
---|
28 | |
---|
29 | TestRingPrinting(r, "default commutative polynomial ring"); |
---|
30 | |
---|
31 | qring q = std(ideal(x2)); |
---|
32 | |
---|
33 | TestRingPrinting(q, "quotient ring"); |
---|
34 | |
---|
35 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.