SINGULAR / Development
A Computer Algebra System for Polynomial Computations / version 2-0-0
0<
by: G.-M. Greuel, G. Pfister, H. Schoenemann \ February 2001
FB Mathematik der Universitaet, D-67653 Kaiserslautern \
// Set random number generator to avoid Singular leading to different results
// in different runs
system("--random",1018779139);
// Appendix.sing
//
// Gabor Megyesi
// Frank Sottile
// Thorsten Th eobald
//
// Started: 11 November 2001
// Current: 25 May 2002
//
///////////////////////////////////////////////////////////////////////////
//
// This file is the Singular code in the appendix
//
///////////////////////////////////////////////////////////////////////////
int T = timer;
LIB "primdec.lib";
option(redSB);
ring R = 0, (s,t,a,b,c,d,e,f,g,h,k,l), (dp(2), dp(10));
ideal I = el-g^2, ek-gf, ak-dc, ah-c^2;
matrix M[2][5] = s , 1-s , -2 , 1-t , t ,
al-d^2, 2*(bl-dg), 2*(2bk-cg-df), 2*(bh-cf), eh-f^2;
I = I + minor(M,2);
I = std(I); dim(I), mult(I);
//>> 6 8
matrix Q[4][4] = a , b , c , d ,
b , e , f , g ,
c , f , h , k ,
d , g , k , l ;
ideal E1 = std(minor(Q,2));
I = std(quotient(I,E1)); dim(I), mult(I);
//>> 5 20
ideal E2 = g, f, e, d, c, b, a; // intersection line l1
I = sat(I,E2)[1]; dim(I), mult(I);
//>> 5 10
ideal E3 = l, k, h, g, f, d, c; // intersection line l2
ideal J = sat(I,E3)[1]; dim(J), mult(J);
//>> 4 120
eliminate(J, abcdefghkl);
//>> _[1]=0
ideal L = s, t, t-1, s-1, s-t;
list F = facstd(J, L);
// Verify the factorization
int i;
ideal FF = 1;
for (i = 1; i <= size(F); i++) { FF = intersect(FF,F[i]); }
ideal V1, V2;
V1 = std(sat(sat(sat(sat(sat(FF,t)[1],s)[1],t-1)[1],s-1)[1],s-t)[1]);
V2 = std(sat(sat(sat(sat(sat(J ,t)[1],s)[1],t-1)[1],s-1)[1],s-t)[1]);
size(V1), size(V2);
//>> 162 162
if (size(V1) == size(V2)) {
int check = 1;
for (i = 1; i <= size(V1); i++) {
if (V1[i] != V2[i]) { check = 0; }
}
if (check == 1) { print("Factorization successfully verified."); }
}
//>> Factorization successfully verified.
timer-T;
//>> 353
ring S = (0,s,t), (a,b,c,d,e,f,g,h,k,l), lp; short = 0;
// Singular might produce factors which are the unit ideal in S, which we then remove.
i = 1;
ideal FS;
setring R; ideal FR;
while (i <= size(F)) {
FR = F[i];
setring S;
FS = std(imap(R, FR));
setring R;
delete(F,i);
}
else {
setring R;
i++;
}
}
//>> 1 4
//>> 2 4
//>> 2 4
//>> 2 4
//>> 2 4
//>> 2 4
//>> 2 4
setring S;
ideal JS = std(imap(R,J)); dim(JS), mult(JS);
//>> 2 24
setring R; FR = F[1]; setring S;
FS = std(imap(R,FR)); dim(FS), mult(FS);
FS[5], FS[6], FS[7], FS[8], FS[9], FS[10], FS[11];
//>> 1 4
//>> g f e d c b a
for (i = 2; i <= 7; i++) {
setring R; FR = F[i]; setring S;
FS = std(imap(R,FR)); dim(FS), mult(FS);
FS[1];
print("--------------------------------");
}
//>> 2 4
//>> (-s^2+2*s-1)*k^2+(2*s-2)*k*l+(s*t-1)*l^2
//>> --------------------------------
//>> 2 4
//>> (s-1)*k^2-2*k*l-l^2
//>> --------------------------------
//>> 2 4
//>> (s^2-2*s+1)*k^2+(-2*s+2)*k*l+(-t+1)*l^2
//>> --------------------------------
//>> 2 4
//>> (s^2-2*s+1)*k^2+(-2*s+2)*k*l+(-t+1)*l^2
//>> --------------------------------
//>> 2 4
//>> (s-1)*k^2-2*k*l-l^2
//>> --------------------------------
//>> 2 4
//>> (-s^2+2*s-1)*k^2+(2*s-2)*k*l+(s*t-1)*l^2
//>> --------------------------------
// Print the second ideal
setring R; FR = F[3]; setring S;
FS = std(imap(R,FR)); FS;
//>> FS[1]=(s-1)*k^2-2*k*l-l^2
//>> FS[2]=(s-1)*h+(2*t-2)*k+(t-1)*l
//>> FS[3]=f*l-g*k
//>> FS[4]=(s-1)*f*k-2*g*k-g*l
//>> FS[5]=(s-1)*f^2-2*f*g-g^2
//>> FS[6]=e*l-g^2
//>> FS[7]=e*k-f*g
//>> FS[8]=d+f+g
//>> FS[9]=c
//>> FS[10]=2*b+e
//>> FS[11]=a
//>> 2 4
timer-T;
quit;
//>> 430
//>> Auf Wiedersehen.
|
|