source: git/Tst/Manual/Polar_curves.tst @ 6fb723

spielwiese
Last change on this file since 6fb723 was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 3.1 KB
Line 
1LIB "tst.lib"; tst_init();
2  LIB "elim.lib";
3  LIB "sing.lib";
4  // Affine polar curve:
5  ring R = 0,(x,z,t),dp;              // global ordering dp
6  poly f = z5+xz3+x2-tz6;
7  dim_slocus(f);                      // dimension of singular locus
8  ideal j = diff(f,x),diff(f,z);
9  dim(std(j));                        // dim V(j)
10  dim(std(j+ideal(f)));               // V(j,f) also 1-dimensional
11  // j defines a curve, but to get the polar curve we must remove the
12  // branches contained in f=0 (they exist since dim V(j,f) = 1). This
13  // gives the polar curve set theoretically. But for the structure we
14  // may take either j:f or j:f^k for k sufficiently large. The first is
15  // just the ideal quotient, the second the iterated ideal quotient
16  // or saturation. In our case both coincide.
17  ideal q = quotient(j,ideal(f));     // ideal quotient
18  ideal qsat = sat(j,f)[1];           // saturation, proc from elim.lib
19  ideal sq = std(q);
20  dim(sq);
21  // 1-dimensional, hence q defines the affine polar curve
22  //
23  // to check that q and qsat are the same, we show both inclusions, i.e.,
24  // both reductions must give the 0-ideal
25  size(reduce(qsat,sq));
26  size(reduce(q,std(qsat)));
27  qsat;
28  // We see that the affine polar curve does not pass through the origin,
29  // hence we expect the local polar "curve" to be empty
30  // ------------------------------------------------
31  // Local polar curve:
32  ring r = 0,(x,z,t),ds;              // local ordering ds
33  poly f = z5+xz3+x2-tz6;
34  ideal j = diff(f,x),diff(f,z);
35  dim(std(j));                        // V(j) 1-dimensional
36  dim(std(j+ideal(f)));               // V(j,f) also 1-dimensional
37  ideal q = quotient(j,ideal(f));     // ideal quotient
38  q;
39  // The local polar "curve" is empty, i.e., V(j) is contained in V(f)
40  // ------------------------------------------------
41  // Projective polar curve: (we need "sing.lib" and "elim.lib")
42  ring P = 0,(x,z,t,y),dp;            // global ordering dp
43  poly f = z5y+xz3y2+x2y4-tz6;
44                                      // but consider t as parameter
45  dim_slocus(f);              // projective 1-dimensional singular locus
46  ideal j = diff(f,x),diff(f,z);
47  dim(std(j));                        // V(j), projective 1-dimensional
48  dim(std(j+ideal(f)));               // V(j,f) also projective 1-dimensional
49  ideal q = quotient(j,ideal(f));
50  ideal qsat = sat(j,f)[1];           // saturation, proc from elim.lib
51  dim(std(qsat));
52  // projective 1-dimensional, hence q and/or qsat define the projective
53  // polar curve. In this case, q and qsat are not the same, we needed
54  // 2 quotients.
55  // Let us check both reductions:
56  size(reduce(qsat,std(q)));
57  size(reduce(q,std(qsat)));
58  // Hence q is contained in qsat but not conversely
59  q;
60  qsat;
61  //
62  // Now consider again the affine polar curve,
63  // homogenize it with respect to y (deg t=0) and compare:
64  // affine polar curve:
65  ideal qa = 12zt+3z-10,5z2+12xt+3x,-144xt2-72xt-9x-50z;
66  // homogenized:
67  ideal qh = 12zt+3z-10y,5z2+12xyt+3xy,-144xt2-72xt-9x-50z;
68  size(reduce(qh,std(qsat)));
69  size(reduce(qsat,std(qh)));
70  // both ideals coincide
71tst_status(1);$
Note: See TracBrowser for help on using the repository browser.