class JAS::SolvableSubModule

Represents a JAS sub-module over a solvable polynomial ring.

Methods to compute left, right and two-sided Groebner bases.

Attributes

cols[R]

the Java module, module list, number of columns and rows, module list

list[R]

the Java module, module list, number of columns and rows, module list

modu[R]

the Java module, module list, number of columns and rows, module list

mset[R]

the Java module, module list, number of columns and rows, module list

rows[R]

the Java module, module list, number of columns and rows, module list

Public Class Methods

new(modu,modstr="",list=nil) click to toggle source

Constructor for sub-module over a solvable polynomial ring.

     # File examples/jas.rb
4963 def initialize(modu,modstr="",list=nil)
4964     @modu = modu;
4965     if list == nil
4966        sr = StringReader.new( modstr );
4967        tok = GenPolynomialTokenizer.new(modu.ring,sr);
4968        @list = tok.nextSolvableSubModuleList();
4969     else
4970         if list.is_a? Array
4971             @list = rbarray2arraylist(list,@modu.ring,rec=2);
4972         else
4973             @list = list;
4974         end
4975     end
4976     @mset = OrderedModuleList.new(modu.ring,@list);
4977     @cols = @mset.cols;
4978     @rows = @mset.rows;
4979 end

Public Instance Methods

isLeftGB() click to toggle source

Test if this is a left Groebner base.

     # File examples/jas.rb
5003 def isLeftGB()
5004     t = System.currentTimeMillis();
5005     #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isLeftGB(@mset);
5006     b = SolvableGroebnerBaseSeq.new().isLeftGB(@mset);
5007     t = System.currentTimeMillis() - t;
5008     puts "module isLeftGB executed in #{t} ms\n"; 
5009     return b;
5010 end
isLeftSyzygy(g) click to toggle source

Test if this is a left syzygy of the vectors in g.

     # File examples/jas.rb
5063 def isLeftSyzygy(g)
5064     l = @list;
5065     if g.is_a? SolvIdeal
5066        s = g.pset.list; # not g.list
5067     else 
5068        if g.is_a? SolvableSubModule
5069           s = g.mset;
5070           l = @mset;
5071        else
5072           raise "unknown type #{g.getClass().getName()}";
5073        end
5074     end
5075     #puts "l = #{l}";
5076     #puts "s = #{s}";
5077     t = System.currentTimeMillis();
5078     z = SolvableSyzygySeq.new(@modu.ring.coFac).isLeftZeroRelation( l, s );
5079     t = System.currentTimeMillis() - t;
5080     puts "executed isLeftSyzygy in #{t} ms\n"; 
5081     return z;
5082 end
isRightGB() click to toggle source

Test if this is a right Groebner base.

     # File examples/jas.rb
5051 def isRightGB()
5052     t = System.currentTimeMillis();
5053     #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isRightGB(@mset);
5054     b = SolvableGroebnerBaseSeq.new().isRightGB(@mset);
5055     t = System.currentTimeMillis() - t;
5056     puts "module isRightGB executed in #{t} ms\n"; 
5057     return b;
5058 end
isRightSyzygy(g) click to toggle source

Test if this is a right syzygy of the vectors in g.

     # File examples/jas.rb
5100 def isRightSyzygy(g)
5101     l = @list;
5102     if g.is_a? SolvIdeal
5103        s = g.pset.list; # not g.list
5104     else 
5105        if g.is_a? SolvableSubModule
5106           s = g.mset;
5107           l = @mset;
5108        else
5109           raise "unknown type #{g.getClass().getName()}";
5110        end
5111     end
5112     #puts "l = #{l}";
5113     #puts "s = #{s}";
5114     t = System.currentTimeMillis();
5115     z = SolvableSyzygySeq.new(@modu.ring.coFac).isRightZeroRelation( l, s );
5116     t = System.currentTimeMillis() - t;
5117     puts "executed isRightSyzygy in #{t} ms\n"; 
5118     return z;
5119 end
isTwosidedGB() click to toggle source

Test if this is a two-sided Groebner base.

     # File examples/jas.rb
5027 def isTwosidedGB()
5028     t = System.currentTimeMillis();
5029     #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isTwosidedGB(@mset);
5030     b = SolvableGroebnerBaseSeq.new().isTwosidedGB(@mset);
5031     t = System.currentTimeMillis() - t;
5032     puts "module isTwosidedGB executed in #{t} ms\n"; 
5033     return b;
5034 end
leftGB() click to toggle source

Compute a left Groebner base.

     # File examples/jas.rb
4991 def leftGB()
4992     t = System.currentTimeMillis();
4993     #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).leftGB(@mset);
4994     gg = SolvableGroebnerBaseSeq.new().leftGB(@mset);
4995     t = System.currentTimeMillis() - t;
4996     puts "executed left module GB in #{t} ms\n"; 
4997     return SolvableSubModule.new(@modu,"",gg.list);
4998 end
leftSyzygy() click to toggle source

Compute left syzygys of this module.

     # File examples/jas.rb
5087 def leftSyzygy()
5088     l = @mset;
5089     t = System.currentTimeMillis();
5090     p = SolvableSyzygySeq.new(@modu.ring.coFac).leftZeroRelationsArbitrary( l );
5091     t = System.currentTimeMillis() - t;
5092     puts "executed left module syzygy in #{t} ms\n"; 
5093     m = SolvableModule.new("",p.ring,p.cols);
5094     return SolvableSubModule.new(m,"",p.list);
5095 end
rightGB() click to toggle source

Compute a right Groebner base.

     # File examples/jas.rb
5039 def rightGB()
5040     t = System.currentTimeMillis();
5041     #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).rightGB(@mset);
5042     gg = SolvableGroebnerBaseSeq.new().rightGB(@mset);
5043     t = System.currentTimeMillis() - t;
5044     puts "executed right module GB in #{t} ms\n"; 
5045     return SolvableSubModule.new(@modu,"",gg.list);
5046 end
rightSyzygy() click to toggle source

Compute right syzygys of this module.

     # File examples/jas.rb
5124 def rightSyzygy()
5125     l = @mset;
5126     t = System.currentTimeMillis();
5127     #no: p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelations( l );
5128     p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelationsArbitrary( l );
5129     t = System.currentTimeMillis() - t;
5130     puts "executed right module syzygy in #{t} ms\n"; 
5131     m = SolvableModule.new("",p.ring,p.cols);
5132     return SolvableSubModule.new(m,"",p.list);
5133 end
to_s() click to toggle source

Create a string representation.

     # File examples/jas.rb
4984 def to_s()
4985     return @mset.toScript(); # + "\n\n" + str(@pset);
4986 end
twosidedGB() click to toggle source

Compute a two-sided Groebner base.

     # File examples/jas.rb
5015 def twosidedGB()
5016     t = System.currentTimeMillis();
5017     #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).twosidedGB(@mset);
5018     gg = SolvableGroebnerBaseSeq.new().twosidedGB(@mset);
5019     t = System.currentTimeMillis() - t;
5020     puts "executed twosided module GB in #{t} ms\n"; 
5021     return SolvableSubModule.new(@modu,"",gg.list);
5022 end