fieker-DuValspielwiese
Last change
on this file since 052b6f2 was
891438c,
checked in by Gerhard Pfister <pfister@…>, 23 years ago
|
*GP: initial release
git-svn-id: file:///usr/local/Singular/svn/trunk@5579 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | proc normalForm(matrix M) |
---|
5 | { |
---|
6 | int n=nrows(M); |
---|
7 | int m=ncols(M); |
---|
8 | matrix N[n][m]; |
---|
9 | M=transpose(interred(transpose(interred(M)))); |
---|
10 | N[1..nrows(M),1..ncols(M)]=M; |
---|
11 | return(N); |
---|
12 | } |
---|
13 | |
---|
14 | option(redSB); |
---|
15 | ring R=0,(x),(C,dp); |
---|
16 | |
---|
17 | matrix M0[5][5]=1, 1,0,0,0, |
---|
18 | -2,-1,0,0,0, |
---|
19 | 0, 0,2,1,0, |
---|
20 | 0, 0,0,2,0, |
---|
21 | 0, 0,0,0,3; |
---|
22 | matrix N[5][5]=1, 1, -1, 1,-1, |
---|
23 | 2, 2, 1, 1, 0, |
---|
24 | -1, 2, 2, 1, 1, |
---|
25 | -2, 1, 1, -1, 0, |
---|
26 | 1, 2, -2, 1, 1; |
---|
27 | matrix M=lift(N,freemodule(nrows(N)))*M0*N-x*freemodule(5); |
---|
28 | print(M); |
---|
29 | |
---|
30 | N=normalForm(M); |
---|
31 | print(N); |
---|
32 | |
---|
33 | factorize(N[1,1]); |
---|
34 | |
---|
35 | LIB"matrix.lib"; |
---|
36 | |
---|
37 | proc extendedNormalForm(matrix M) |
---|
38 | { |
---|
39 | intvec v=1..nrows(M); |
---|
40 | intvec w=nrows(M)+1..nrows(M)+ncols(M); |
---|
41 | matrix N=concat(freemodule(nrows(M)),M); |
---|
42 | N=transpose(interred(transpose(N))); |
---|
43 | matrix C=submat(N,v,v); |
---|
44 | C=lift(C,freemodule(nrows(C))); //the inverse matrix of C |
---|
45 | matrix D=submat(N,v,w); |
---|
46 | D=transpose(interred(D)); |
---|
47 | list Re=C,D; |
---|
48 | return(Re); |
---|
49 | } |
---|
50 | |
---|
51 | matrix M1[2][2]=x2+1,0, |
---|
52 | 0, x-1; |
---|
53 | matrix N1[2][2]=1, 1, |
---|
54 | 1, 2; |
---|
55 | matrix N2[2][2]=0,-1, |
---|
56 | 1, 1; |
---|
57 | |
---|
58 | M=N1*M1*N2; |
---|
59 | print(M); |
---|
60 | |
---|
61 | list L=extendedNormalForm(M); |
---|
62 | print(L[1]); |
---|
63 | |
---|
64 | print(L[2]); |
---|
65 | |
---|
66 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.