File: solv_module_ts.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 (127 lines) | stat: -rw-r--r-- 2,354 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#
# jython examples for jas.
# $Id$
#

from java.lang import System

from jas import SolvableRing, SolvPolyRing, PolyRing, SRF 
from jas import QQ, startLog, SolvableModule, SolvableSubModule, terminate

# Ore extension solvable polynomial example, modules

rp = PolyRing(QQ(),"x,y,z,t",PolyRing.lex);
#is automatic: [one,x,y,z,t] = rp.gens();

trel = [ z, y,  y * z + x,
         t, y,  y * t + y,
         t, z,  z * t - z
       ];

print "trel: = " + str([ str(f) for f in trel ]);
print;

rs = SolvPolyRing(QQ(),"x,y,z,t",PolyRing.lex,trel);

#exit(0)

f = rs.ideal("",[t**2 + z**2 + x**2 + y**2 + 1]);
print "f: " + str(f);
tf = f.twosidedGB();
print "t: " + str(tf);
print;

#exit(0)

r = SolvableModule("",rs);
print "SolvableModule: " + str(r);
print;

subm = [
         [ 0, t**2 + z**2 + x**2 + y**2 + 1],
         [ x**2 + y**2,     z ]
       ];

m = SolvableSubModule( r, "", subm );
print "SolvableSubModule: " + str(m);
print;

#exit()
#startLog();

lg = m.leftGB();
print "seq left GB: " + str(lg);
print "is left GB: " + str(lg.isLeftGB());
print;

tg = m.twosidedGB();
print "seq twosided GB: " + str(tg);
print "is twosided GB: " + str(tg.isTwosidedGB());
print "is right GB: " + str(tg.isRightGB());
print;

#exit()

rg = m.rightGB();
print "seq right GB: " + str(rg);
print "is right GB: " + str(rg.isRightGB());
print;


# as quotients to coefficients
rq = SRF(rs);

rpq = PolyRing(rq,"v,w",PolyRing.lex);
print "PolyRing: rpq = " + str(rpq);

vrel = [ v, t, t * v + x,
         w, t, t * w + y
       ];

print "vrel: = " + str([ str(f) for f in vrel ]);
print;

rsq = SolvPolyRing(rq,"v,w",PolyRing.lex,vrel);
print "SolvPolyRing: rsq = " + str(rsq);
print;


r = SolvableModule("",rsq);
print "SolvableModule: " + str(r);
print;

subm = [
         [     0, v + 1 ],
         [ w + x, w - v ]
       ];

m = SolvableSubModule( r, "", subm );
print "SolvableSubModule: " + str(m);
print;

#startLog();

lg = m.leftGB();
print "seq left GB: " + str(lg);
print "is left GB: " + str(lg.isLeftGB());
print;

#exit();
#startLog();

tg = m.twosidedGB();
print "seq twosided GB: " + str(tg);
print "is twosided GB: " + str(tg.isTwosidedGB());
print "is right GB: " + str(tg.isRightGB());
print;

#exit()

rg = m.rightGB();
print "seq right GB: " + str(rg);
print "is right GB: " + str(rg.isRightGB());
print;


#startLog();
terminate();