source: git/Tst/Buch/Example_2_6_15.tst @ bf8015

spielwiese
Last change on this file since bf8015 was 8c62c7, checked in by Hans Schönemann <hannes@…>, 20 years ago
*hannes: updated from 2-0: NTL, -s .... git-svn-id: file:///usr/local/Singular/svn/trunk@7039 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.6 KB
Line 
1LIB "tst.lib";
2tst_init();
3
4proc extendedNormalForm(matrix M)
5{
6   intvec v=1..nrows(M);
7   intvec w=nrows(M)+1..nrows(M)+ncols(M);
8   matrix N=concat(freemodule(nrows(M)),M);
9   N=transpose(interred(transpose(N)));
10   matrix C=submat(N,v,v);
11   C=lift(C,freemodule(nrows(C))); //the inverse matrix of C
12   matrix D=submat(N,v,w);
13   D=transpose(interred(D));
14   list Re=C,D;
15   return(Re); 
16}
17
18option(redSB);
19ring R=0,(x),(C,dp);
20LIB"matrix.lib";
21
22matrix M[5][5]=1, 1,0,0,0,
23              -2,-1,0,0,0,
24               0, 0,2,1,0,
25               0, 0,0,2,0,
26               0, 0,0,0,2;
27
28matrix N[5][5]=1,2, 2, 2,-1,
29               1,1, 2, 1, 1,
30              -1,1, 2,-1, 2,
31              -1,1, 1,-1, 2,
32               1,2,-1, 2, 1;
33M=lift(N,freemodule(nrows(N)))*M*N;
34print(M);
35
36matrix A=M-x*freemodule(5);
37
38list L= extendedNormalForm(A);
39
40print(L[1]);
41
42print(L[2]);
43
44matrix V1[5][4]=concat(L[1][1],M*L[1][1],M*M*L[1][1],M*M*M*L[1][1]);
45matrix V2[5][1]=L[1][2];
46
47list F=factorize(L[2][1,1]);
48F;
49
50proc polyOfEndo(matrix B,poly p)
51{
52  int i;
53  int d=nrows(B);
54  matrix A=coeffs(p,var(1));
55  matrix E[d][d]=freemodule(d);
56  matrix C[d][d]=A[1,1]*E;
57  for(i=2;i<=nrows(A);i++)
58  {
59     E=E*B;
60     C=C+A[i,1]*E;
61  }
62  return(C);
63}
64
65matrix S=polyOfEndo(M,F[1][2]^2);
66matrix V11=std(S*V1);
67print(V11);
68
69S=polyOfEndo(M,F[1][3]);
70matrix V12=std(S*V1);
71print(V12);
72
73matrix B=concat(V11,V12,V2);
74det(B);                 
75
76reduce(M*V11,std(V11)); 
77reduce(M*V12,std(V12));
78reduce(M*V2,std(V2));
79
80matrix C=lift(B,M*B); 
81print(C);   
82
83matrix v[5][1]=V12[1];   
84B=concat(V11,M*v-2*v,v,V2);
85C=lift(B,M*B);
86print(C); 
87
88tst_status(1);$
Note: See TracBrowser for help on using the repository browser.