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 | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | ================================= example B.5.10 ========================== |
---|
5 | ring R=2,(z,x,y),lp; |
---|
6 | poly f=x2+x+1; //minimal polynomial of the field |
---|
7 | //extension |
---|
8 | poly g=z2+z+1; //polynomial to factorize |
---|
9 | resultant(f,g,x); |
---|
10 | resultant(f,subst(g,z,z+x),x); |
---|
11 | |
---|
12 | poly h=y5+y3+y2+y+1; //the minimal polynomial for the new |
---|
13 | //field extension |
---|
14 | poly G=subst(g,z,z+xy); //the transformed polynomial |
---|
15 | poly r=resultant(f,G,x); |
---|
16 | r; //the norm r of the transformed |
---|
17 | //polynomial |
---|
18 | |
---|
19 | |
---|
20 | poly s=resultant(h,r,y); |
---|
21 | s; //the norm of r |
---|
22 | |
---|
23 | factorize(s); |
---|
24 | |
---|
25 | ring S=(2,y),(z,x),lp; |
---|
26 | minpoly=y5+y3+y2+y+1; |
---|
27 | poly r=imap(R,r); |
---|
28 | poly f1=gcd(r,z10+z9+z7+z6+z3+z2+1); //the gcd with the first |
---|
29 | //factor |
---|
30 | f1; |
---|
31 | f1=simplify(f1,1); //we normalize f1 |
---|
32 | f1; |
---|
33 | poly f2=gcd(r,z10+z9+z7+z5+z2+z+1); //the gcd with the second |
---|
34 | //factor |
---|
35 | f2=simplify(f2,1); |
---|
36 | f2; |
---|
37 | |
---|
38 | r-f1*f2; //test the result |
---|
39 | |
---|
40 | f1=subst(f1,z,z+x*y); //the inverse transformation |
---|
41 | f1=simplify(f1,1); |
---|
42 | f1; |
---|
43 | f2=subst(f2,z,z+x*y); //the inverse transformation |
---|
44 | f2=simplify(f2,1); |
---|
45 | f2; |
---|
46 | |
---|
47 | setring R; |
---|
48 | ideal I=std(ideal(f,h)); |
---|
49 | qring T=I; |
---|
50 | option(redSB); |
---|
51 | poly f1=imap(S,f1); |
---|
52 | poly f2=imap(S,f2); |
---|
53 | poly g=imap(R,g); |
---|
54 | std(ideal(f1,g)); //gcd of g with the first factor |
---|
55 | |
---|
56 | std(ideal(f2,g)); //gcd of g with the second factor |
---|
57 | |
---|
58 | std((x+z+1)*(x+z)); //test the result |
---|
59 | |
---|
60 | tst_status(1);$ |
---|
61 | |
---|
Note: See
TracBrowser
for help on using the repository browser.