spielwiese
Last change
on this file since fdda546 was
75f460,
checked in by Hans Schoenemann <hannes@…>, 9 years ago
|
format
|
-
Property mode set to
100644
|
File size:
920 bytes
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | echo = 1; |
---|
4 | |
---|
5 | LIB("primdecint.lib"); |
---|
6 | |
---|
7 | proc addIdealZ(ideal I,ideal J) |
---|
8 | { |
---|
9 | int i; |
---|
10 | for(i=1; i<=ncols(J); i++) |
---|
11 | { |
---|
12 | I[ncols(I)+1] = J[i]; |
---|
13 | } |
---|
14 | return(I); |
---|
15 | } |
---|
16 | |
---|
17 | |
---|
18 | proc coefPrimeZW(ideal I) |
---|
19 | { |
---|
20 | return(Primdecint::coefPrimeZ(I)); |
---|
21 | } |
---|
22 | proc specialPowerZW(ideal I, int m) |
---|
23 | { |
---|
24 | return(Primdecint::specialPowerZ(I,m)); |
---|
25 | } |
---|
26 | proc quotientZW(I,J) |
---|
27 | { |
---|
28 | return(Primdecint::quotientZ(I,J)); |
---|
29 | } |
---|
30 | proc reduceZW(poly f,ideal I) |
---|
31 | { |
---|
32 | return(Primdecint::reduceZ(f,I)); |
---|
33 | } |
---|
34 | |
---|
35 | ring rng = integer,(x,y),dp; |
---|
36 | ideal I = 0,5*x-3; |
---|
37 | ideal J = 0,y-5; |
---|
38 | ideal sumIJ = addIdealZ(I,J); |
---|
39 | I+J; |
---|
40 | |
---|
41 | ASSUME(0, idealsEqual(I+J, sumIJ) ); |
---|
42 | |
---|
43 | ideal P = 0,5; |
---|
44 | |
---|
45 | def res = coefPrimeZW(P); |
---|
46 | ASSUME(0, size(res)>0 ); |
---|
47 | |
---|
48 | |
---|
49 | ASSUME(0, idealsEqual( specialPowerZW(I,2), I^2 ) ); |
---|
50 | |
---|
51 | |
---|
52 | I = 0,x-3; |
---|
53 | J = 0,x; |
---|
54 | |
---|
55 | ASSUME(0, idealsEqual( quotientZW(I,J), x-3 ) ); |
---|
56 | |
---|
57 | reduceZW( x,ideal(0,x) ); // would produce an error if reduceZ is not patched. |
---|
58 | |
---|
59 | |
---|
60 | tst_status(1); $ |
---|
Note: See
TracBrowser
for help on using the repository browser.