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
4722 def initialize(modu,modstr="",list=nil)
4723     @modu = modu;
4724     if list == nil
4725        sr = StringReader.new( modstr );
4726        tok = GenPolynomialTokenizer.new(modu.ring,sr);
4727        @list = tok.nextSolvableSubModuleList();
4728     else
4729         if list.is_a? Array
4730             @list = rbarray2arraylist(list,@modu.ring,rec=2);
4731         else
4732             @list = list;
4733         end
4734     end
4735     @mset = OrderedModuleList.new(modu.ring,@list);
4736     @cols = @mset.cols;
4737     @rows = @mset.rows;
4738 end

Public Instance Methods

isLeftGB() click to toggle source

Test if this is a left Groebner base.

     # File examples/jas.rb
4762 def isLeftGB()
4763     t = System.currentTimeMillis();
4764     #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isLeftGB(@mset);
4765     b = SolvableGroebnerBaseSeq.new().isLeftGB(@mset);
4766     t = System.currentTimeMillis() - t;
4767     puts "module isLeftGB executed in #{t} ms\n"; 
4768     return b;
4769 end
isLeftSyzygy(g) click to toggle source

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

     # File examples/jas.rb
4822 def isLeftSyzygy(g)
4823     l = @list;
4824     if g.is_a? SolvIdeal
4825        s = g.pset.list; # not g.list
4826     else 
4827        if g.is_a? SolvableSubModule
4828           s = g.mset;
4829           l = @mset;
4830        else
4831           raise "unknown type #{g.getClass().getName()}";
4832        end
4833     end
4834     #puts "l = #{l}";
4835     #puts "s = #{s}";
4836     t = System.currentTimeMillis();
4837     z = SolvableSyzygySeq.new(@modu.ring.coFac).isLeftZeroRelation( l, s );
4838     t = System.currentTimeMillis() - t;
4839     puts "executed isLeftSyzygy in #{t} ms\n"; 
4840     return z;
4841 end
isRightGB() click to toggle source

Test if this is a right Groebner base.

     # File examples/jas.rb
4810 def isRightGB()
4811     t = System.currentTimeMillis();
4812     #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isRightGB(@mset);
4813     b = SolvableGroebnerBaseSeq.new().isRightGB(@mset);
4814     t = System.currentTimeMillis() - t;
4815     puts "module isRightGB executed in #{t} ms\n"; 
4816     return b;
4817 end
isRightSyzygy(g) click to toggle source

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

     # File examples/jas.rb
4859 def isRightSyzygy(g)
4860     l = @list;
4861     if g.is_a? SolvIdeal
4862        s = g.pset.list; # not g.list
4863     else 
4864        if g.is_a? SolvableSubModule
4865           s = g.mset;
4866           l = @mset;
4867        else
4868           raise "unknown type #{g.getClass().getName()}";
4869        end
4870     end
4871     #puts "l = #{l}";
4872     #puts "s = #{s}";
4873     t = System.currentTimeMillis();
4874     z = SolvableSyzygySeq.new(@modu.ring.coFac).isRightZeroRelation( l, s );
4875     t = System.currentTimeMillis() - t;
4876     puts "executed isRightSyzygy in #{t} ms\n"; 
4877     return z;
4878 end
isTwosidedGB() click to toggle source

Test if this is a two-sided Groebner base.

     # File examples/jas.rb
4786 def isTwosidedGB()
4787     t = System.currentTimeMillis();
4788     #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isTwosidedGB(@mset);
4789     b = SolvableGroebnerBaseSeq.new().isTwosidedGB(@mset);
4790     t = System.currentTimeMillis() - t;
4791     puts "module isTwosidedGB executed in #{t} ms\n"; 
4792     return b;
4793 end
leftGB() click to toggle source

Compute a left Groebner base.

     # File examples/jas.rb
4750 def leftGB()
4751     t = System.currentTimeMillis();
4752     #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).leftGB(@mset);
4753     gg = SolvableGroebnerBaseSeq.new().leftGB(@mset);
4754     t = System.currentTimeMillis() - t;
4755     puts "executed left module GB in #{t} ms\n"; 
4756     return SolvableSubModule.new(@modu,"",gg.list);
4757 end
leftSyzygy() click to toggle source

Compute left syzygys of this module.

     # File examples/jas.rb
4846 def leftSyzygy()
4847     l = @mset;
4848     t = System.currentTimeMillis();
4849     p = SolvableSyzygySeq.new(@modu.ring.coFac).leftZeroRelationsArbitrary( l );
4850     t = System.currentTimeMillis() - t;
4851     puts "executed left module syzygy in #{t} ms\n"; 
4852     m = SolvableModule.new("",p.ring,p.cols);
4853     return SolvableSubModule.new(m,"",p.list);
4854 end
rightGB() click to toggle source

Compute a right Groebner base.

     # File examples/jas.rb
4798 def rightGB()
4799     t = System.currentTimeMillis();
4800     #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).rightGB(@mset);
4801     gg = SolvableGroebnerBaseSeq.new().rightGB(@mset);
4802     t = System.currentTimeMillis() - t;
4803     puts "executed right module GB in #{t} ms\n"; 
4804     return SolvableSubModule.new(@modu,"",gg.list);
4805 end
rightSyzygy() click to toggle source

Compute right syzygys of this module.

     # File examples/jas.rb
4883 def rightSyzygy()
4884     l = @mset;
4885     t = System.currentTimeMillis();
4886     #no: p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelations( l );
4887     p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelationsArbitrary( l );
4888     t = System.currentTimeMillis() - t;
4889     puts "executed right module syzygy in #{t} ms\n"; 
4890     m = SolvableModule.new("",p.ring,p.cols);
4891     return SolvableSubModule.new(m,"",p.list);
4892 end
to_s() click to toggle source

Create a string representation.

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

Compute a two-sided Groebner base.

     # File examples/jas.rb
4774 def twosidedGB()
4775     t = System.currentTimeMillis();
4776     #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).twosidedGB(@mset);
4777     gg = SolvableGroebnerBaseSeq.new().twosidedGB(@mset);
4778     t = System.currentTimeMillis() - t;
4779     puts "executed twosided module GB in #{t} ms\n"; 
4780     return SolvableSubModule.new(@modu,"",gg.list);
4781 end