File: sicora.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 (31 lines) | stat: -rw-r--r-- 460 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
#
# jython examples for jas.
# $Id$
#

import sys;

from jas import PolyRing, ZZ, Order, Ideal
from jas import startLog, terminate

# sicora, e-gb example

r = PolyRing( ZZ(), "t", Order.INVLEX );
print "Ring: " + str(r);
print;

f1 = 2 * t + 1;
f2 = t**2 + 1;

F = r.ideal( "", [f1,f2] );
print "Ideal: " + str(F);
print;

E = F.eGB();
print "seq e-GB:", E;
print "is e-GB:", E.iseGB();
print;

f = t**3;
n = E.eReduction(f);
print "e-Reduction = " + str(n);