source: git/Tst/BuchDL/Sol_Exe_2.tst @ ba5e9e

spielwiese
Last change on this file since ba5e9e was 9558c5f, checked in by Hans Schönemann <hannes@…>, 19 years ago
*hannes/lossen: very long examples from DL-Book git-svn-id: file:///usr/local/Singular/svn/trunk@8762 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.9 KB
Line 
1LIB "tst.lib";
2tst_init();
3
4
5//======================  Exercise 2.1 =============================
6ring R = 0, (x,y), dp;
7poly f1, f2, f3 = x2+y2, x2y2, x3y-xy3;
8if (not(defined(algDependent))) { LIB "algebra.lib"; }
9def L = algDependent(ideal(f1,f2,f3));
10L[1];
11def S = L[2];
12setring S;
13ker;
14
15setring R;
16poly g, g1, g2 = x4+y4, x+y, xy;
17L = algebra_containment(g,ideal(g1,g2),1);
18def S2 = L[2];
19setring S2;
20check;
21
22ring T = 0, x(1..3), dp;
23qring Q = groebner(x(1)*x(2)*x(3)-1);
24map phi = Q, x(2)*x(3), x(1)*x(3), x(1)*x(2);
25is_bijective(phi,Q);
26//-> 1
27
28
29kill R,Q,S,S2,T,L;
30//======================  Exercise 2.2 =============================
31ring R = 0, (w,x,y,z), dp;
32ideal I = y-x2, z-x3;
33ideal SI = groebner(I);
34ideal Ih = homog(SI,w);          // generators are homogenized
35Ih;
36
37ideal J = homog(I,w);            // generators are homogenized
38size(reduce(J,groebner(Ih),1));  // J is contained in Ih
39size(reduce(Ih,groebner(J),1));  // Ih is not contained in J
40if (not(defined(sat))){ LIB "elim.lib"; }
41ideal Iinf = sat(J,Ih)[1];
42Iinf;
43
44
45kill R;
46//======================  Exercise 2.3 =============================
47ring S = 0, (y,x), dp;
48ideal I = maxideal(3),maxideal(2),x,y,1;
49ring R = 0, (x,y,a(1..10)), (dp(2),dp(10));
50ideal I = imap(S,I);
51matrix A[10][1] = a(1..10);
52poly f = (matrix(I)*A)[1,1];
53ideal J = f, diff(f,x), diff(f,y);
54J = groebner(J);
55// check for generators for J that do not depend on x,y
56ideal JJ;
57for (int i=1; i<=size(J); i++)
58{
59  if (J[i][1]<y) { JJ = JJ,J[i]; }
60}
61JJ = simplify(JJ,2);             // erase zero generators
62size(JJ);
63//-> 1
64homog(JJ);
65//-> 1
66poly D = JJ[1];
67deg(D); size(D);
68//-> 12
69//-> 2040
70
71
72kill i,R,S;
73//======================  Exercise 2.4 =============================
74//======== Procedures are stored in the library file sol.lib =======
75//==================================================================
76LIB "sol.lib";
77example ideal_intersect;
78example ideal_quotient;
79example saturate;
80
81tst_status(1);$
82
Note: See TracBrowser for help on using the repository browser.