File: mark.py

package info (click to toggle)
jas 2.7.200-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,732 kB
  • sloc: java: 164,370; python: 14,882; ruby: 14,509; xml: 583; makefile: 545; sh: 349
file content (42 lines) | stat: -rw-r--r-- 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# jython examples for jas.
# $Id$
#

#import sys;

from jas import Ring, PolyRing, ZZ
from jas import startLog

# mark, d-gb diplom example

r = PolyRing( ZZ(), "x,y,z", PolyRing.lex );
print "Ring: " + str(r);
print;

ps = """
( 
 ( z + x y**2 + 4 x**2 + 1 ),
 ( y**2 z + 2 x + 1 ),
 ( x**2 z + y**2 + x )
) 
""";

f = r.ideal( ps );
print "Ideal: " + str(f);
print;

#startLog();

eg = f.eGB();
print "seq e-GB:", eg;
print "is e-GB:", eg.isGB();
print;

dg = f.dGB();
print "seq d-GB:", dg;
print "is d-GB:", dg.isGB();
print;

print "d-GB == e-GB:", eg.list.equals(dg.list);
print "d-GB == e-GB:", eg == dg;