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
|
#
# jruby examples for jas.
# $Id$
#
require "examples/jas"
# Quantum plane example
rsan = """
AN[ (i) (i^2 + 1) ] (Y,X,x,y) G
RelationTable
(
( y ), ( x ), ( {i} x y )
( X ), ( Y ), ( {i} Y X )
)
""";
rsc = """
C(Y,X,x,y) G |2|
#C(Y,X,x,y) G
RelationTable
(
( y ), ( x ), ( 0i1 x y )
( X ), ( Y ), ( 0i1 Y X )
)
""";
r = SolvableModule.new( rsc );
#r = SolvableModule.new( rsan );
puts "SolvableModule: " + str(r);
puts;
ps = """
(
( ( x + 1 ), ( y ) ),
( ( x y ), ( 0 ) ),
( ( x - X ), ( x - X ) ),
( ( y - Y ), ( y - Y ) )
)
""";
f = SolvableSubModule.new( r, ps );
puts "SolvableSubModule: " + str(f);
puts;
#exit()
lg = f.leftGB();
puts "seq left GB: " + str(lg);
puts "is left GB: " + str(lg.isLeftGB());
puts;
tg = f.twosidedGB();
puts "seq twosided GB: " + str(tg);
puts "is twosided GB: " + str(tg.isTwosidedGB());
puts "is right GB: " + str(tg.isRightGB());
puts;
#startLog();
# not supported for split term orders:
#rg = f.rightGB();
#puts "seq right GB: " + str(rg);
#puts "is right GB: " + str(rg.isRightGB());
#puts;
#startLog();
terminate();
|