source: git/Tst/Short/primdecint_some_special_cases.tst @ fdda546

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 
1LIB "tst.lib";
2tst_init();
3echo = 1;
4
5LIB("primdecint.lib");
6
7proc 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
18proc coefPrimeZW(ideal I)
19{
20   return(Primdecint::coefPrimeZ(I));
21}
22proc specialPowerZW(ideal I, int m)
23{
24    return(Primdecint::specialPowerZ(I,m));
25}
26proc quotientZW(I,J)
27{
28   return(Primdecint::quotientZ(I,J));
29}
30proc reduceZW(poly f,ideal I)
31{
32   return(Primdecint::reduceZ(f,I));
33}
34
35ring rng = integer,(x,y),dp;
36ideal I = 0,5*x-3;
37ideal J = 0,y-5;
38ideal sumIJ = addIdealZ(I,J);
39I+J;
40
41ASSUME(0, idealsEqual(I+J, sumIJ) );
42
43ideal P = 0,5;
44
45def res = coefPrimeZW(P);
46ASSUME(0, size(res)>0 );
47
48
49ASSUME(0, idealsEqual( specialPowerZW(I,2), I^2 ) );
50
51
52I = 0,x-3;
53J = 0,x;
54
55ASSUME(0, idealsEqual( quotientZW(I,J), x-3 ) );
56
57reduceZW( x,ideal(0,x) );  // would produce an error if reduceZ is not patched.
58
59
60tst_status(1); $
Note: See TracBrowser for help on using the repository browser.