source: git/Tst/Manual/Rings_associated_to_monomial_orderings.tst @ 0d6b7fc

spielwiese Release-4-3-2p2
Last change on this file since 0d6b7fc 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: 1.1 KB
Line 
1LIB "tst.lib"; tst_init();
2ring R = 0,(x,y,z),dp;     // polynomial ring (global ordering)
3poly f = y4z3+2x2y2z2+4z4+5y2+1;
4f;                         // display f in a degrevlex-ordered way
5short=0;                   // avoid short notation
6f;
7short=1;
8leadmonom(f);              // leading monomial
9
10ring r = 0,(x,y,z),ds;     // local ring (local ordering)
11poly f = fetch(R,f);
12f;                         // terms of f sorted by degree
13leadmonom(f);              // leading monomial
14
15// Now we implement more "advanced" examples of rings:
16//
17// 1)   (K[y]_<y>)[x]
18//
19int n,m=2,3;
20ring A1 = 0,(x(1..n),y(1..m)),(dp(n),ds(m));
21poly f  = x(1)*x(2)^2+1+y(1)^10+x(1)*y(2)^5+y(3);
22leadmonom(f);
23leadmonom(1+y(1));         // unit
24leadmonom(1+x(1));         // no unit
25
26//
27// 2)  some ring in between (K[x]_<x>)[y] and K[x,y]_<x>
28//
29ring A2 = 0,(x(1..n),y(1..m)),(ds(n),dp(m));
30leadmonom(1+x(1));       // unit
31leadmonom(1+x(1)*y(1));  // unit
32leadmonom(1+y(1));       // no unit
33
34//
35// 3)  K[x,y]_<x>
36//
37ring A4 = (0,y(1..m)),(x(1..n)),ds;
38leadmonom(1+y(1));       // in ground field
39leadmonom(1+x(1)*y(1));  // unit
40leadmonom(1+x(1));       // unit
41
42tst_status(1);$
Note: See TracBrowser for help on using the repository browser.