# source:git/Tst/Buch/Example_B_5_10.tst@a7efa79

spielwiese
Last change on this file since a7efa79 was a7efa79, checked in by Hans Schönemann <hannes@…>, 16 years ago
*hannes: new book version git-svn-id: file:///usr/local/Singular/svn/trunk@10182 2c84dea3-7e68-4137-9b89-c4e89433aadc
• Property mode set to `100644`
File size: 1.5 KB
Line
1LIB "tst.lib";
2tst_init();
3
4================================= example B.5.10 ==========================
5ring R=2,(z,x,y),lp;
6poly f=x2+x+1;          //minimal polynomial of the field
7                        //extension
8poly g=z2+z+1;          //polynomial to factorize
9resultant(f,g,x);
10resultant(f,subst(g,z,z+x),x);
11
12poly h=y5+y3+y2+y+1;    //the minimal polynomial for the new
13                        //field extension
14poly G=subst(g,z,z+xy); //the transformed polynomial
15poly r=resultant(f,G,x);
16r;                      //the norm r of the transformed
17                        //polynomial
18
19
20poly s=resultant(h,r,y);
21s;                      //the norm of r
22
23factorize(s);
24
25ring S=(2,y),(z,x),lp;
26minpoly=y5+y3+y2+y+1;
27poly r=imap(R,r);
28poly f1=gcd(r,z10+z9+z7+z6+z3+z2+1); //the gcd with the first
29                                     //factor
30f1;
31f1=simplify(f1,1);                   //we normalize f1
32f1;
33poly f2=gcd(r,z10+z9+z7+z5+z2+z+1); //the gcd with the second
34                                    //factor
35f2=simplify(f2,1);
36f2;
37
38r-f1*f2;                  //test the result
39
40f1=subst(f1,z,z+x*y);     //the inverse transformation
41f1=simplify(f1,1);
42f1;
43f2=subst(f2,z,z+x*y);     //the inverse transformation
44f2=simplify(f2,1);
45f2;
46
47setring R;
48ideal I=std(ideal(f,h));
49qring T=I;
50option(redSB);
51poly f1=imap(S,f1);
52poly f2=imap(S,f2);
53poly g=imap(R,g);
54std(ideal(f1,g));       //gcd of g with the first factor
55
56std(ideal(f2,g));       //gcd of g with the second factor
57
58std((x+z+1)*(x+z));     //test the result
59
60tst_status(1);\$
61
Note: See TracBrowser for help on using the repository browser.