File: module.rb

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 (33 lines) | stat: -rw-r--r-- 588 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
#
# jruby examples for jas.
# $Id$
#

require "examples/jas"

# module example

p = PolyRing.new(QQ(),"u,v,l", PolyRing.lex);
#r = CommutativeModule.new( "Rat(u,v,l) L", nil, 4 );
r = CommutativeModule.new( "", p, 4 );
puts "Module: " + str(r);
puts;

G = r.gens();
puts "gens() = " + str( G.map { |e| str(e) }.join(", ") );
puts

L = G.map { |e| e.elem.val }
puts "gens() = " + str( L.map { |e| str(e) }.join(", ") );
puts

M = r.submodul("", L );
puts "M = " + str(M);
puts

P = M.mset.getPolynomialList();
puts "P = " + str(P.toScript());
puts

puts "M.isGB(): " + str(M.isGB());
puts