class JAS::SolvableSubModule
Represents a JAS sub-module over a solvable polynomial ring.
Methods to compute left, right and two-sided Groebner bases.
Attributes
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
Public Class Methods
Constructor for sub-module over a solvable polynomial ring.
# File examples/jas.rb 4939 def initialize(modu,modstr="",list=nil) 4940 @modu = modu; 4941 if list == nil 4942 sr = StringReader.new( modstr ); 4943 tok = GenPolynomialTokenizer.new(modu.ring,sr); 4944 @list = tok.nextSolvableSubModuleList(); 4945 else 4946 if list.is_a? Array 4947 @list = rbarray2arraylist(list,@modu.ring,rec=2); 4948 else 4949 @list = list; 4950 end 4951 end 4952 @mset = OrderedModuleList.new(modu.ring,@list); 4953 @cols = @mset.cols; 4954 @rows = @mset.rows; 4955 end
Public Instance Methods
Test if this is a left Groebner base.
# File examples/jas.rb 4979 def isLeftGB() 4980 t = System.currentTimeMillis(); 4981 #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isLeftGB(@mset); 4982 b = SolvableGroebnerBaseSeq.new().isLeftGB(@mset); 4983 t = System.currentTimeMillis() - t; 4984 puts "module isLeftGB executed in #{t} ms\n"; 4985 return b; 4986 end
Test if this is a left syzygy of the vectors in g.
# File examples/jas.rb 5039 def isLeftSyzygy(g) 5040 l = @list; 5041 if g.is_a? SolvIdeal 5042 s = g.pset.list; # not g.list 5043 else 5044 if g.is_a? SolvableSubModule 5045 s = g.mset; 5046 l = @mset; 5047 else 5048 raise "unknown type #{g.getClass().getName()}"; 5049 end 5050 end 5051 #puts "l = #{l}"; 5052 #puts "s = #{s}"; 5053 t = System.currentTimeMillis(); 5054 z = SolvableSyzygySeq.new(@modu.ring.coFac).isLeftZeroRelation( l, s ); 5055 t = System.currentTimeMillis() - t; 5056 puts "executed isLeftSyzygy in #{t} ms\n"; 5057 return z; 5058 end
Test if this is a right Groebner base.
# File examples/jas.rb 5027 def isRightGB() 5028 t = System.currentTimeMillis(); 5029 #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isRightGB(@mset); 5030 b = SolvableGroebnerBaseSeq.new().isRightGB(@mset); 5031 t = System.currentTimeMillis() - t; 5032 puts "module isRightGB executed in #{t} ms\n"; 5033 return b; 5034 end
Test if this is a right syzygy of the vectors in g.
# File examples/jas.rb 5076 def isRightSyzygy(g) 5077 l = @list; 5078 if g.is_a? SolvIdeal 5079 s = g.pset.list; # not g.list 5080 else 5081 if g.is_a? SolvableSubModule 5082 s = g.mset; 5083 l = @mset; 5084 else 5085 raise "unknown type #{g.getClass().getName()}"; 5086 end 5087 end 5088 #puts "l = #{l}"; 5089 #puts "s = #{s}"; 5090 t = System.currentTimeMillis(); 5091 z = SolvableSyzygySeq.new(@modu.ring.coFac).isRightZeroRelation( l, s ); 5092 t = System.currentTimeMillis() - t; 5093 puts "executed isRightSyzygy in #{t} ms\n"; 5094 return z; 5095 end
Test if this is a two-sided Groebner base.
# File examples/jas.rb 5003 def isTwosidedGB() 5004 t = System.currentTimeMillis(); 5005 #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isTwosidedGB(@mset); 5006 b = SolvableGroebnerBaseSeq.new().isTwosidedGB(@mset); 5007 t = System.currentTimeMillis() - t; 5008 puts "module isTwosidedGB executed in #{t} ms\n"; 5009 return b; 5010 end
Compute a left Groebner base.
# File examples/jas.rb 4967 def leftGB() 4968 t = System.currentTimeMillis(); 4969 #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).leftGB(@mset); 4970 gg = SolvableGroebnerBaseSeq.new().leftGB(@mset); 4971 t = System.currentTimeMillis() - t; 4972 puts "executed left module GB in #{t} ms\n"; 4973 return SolvableSubModule.new(@modu,"",gg.list); 4974 end
Compute left syzygys of this module.
# File examples/jas.rb 5063 def leftSyzygy() 5064 l = @mset; 5065 t = System.currentTimeMillis(); 5066 p = SolvableSyzygySeq.new(@modu.ring.coFac).leftZeroRelationsArbitrary( l ); 5067 t = System.currentTimeMillis() - t; 5068 puts "executed left module syzygy in #{t} ms\n"; 5069 m = SolvableModule.new("",p.ring,p.cols); 5070 return SolvableSubModule.new(m,"",p.list); 5071 end
Compute a right Groebner base.
# File examples/jas.rb 5015 def rightGB() 5016 t = System.currentTimeMillis(); 5017 #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).rightGB(@mset); 5018 gg = SolvableGroebnerBaseSeq.new().rightGB(@mset); 5019 t = System.currentTimeMillis() - t; 5020 puts "executed right module GB in #{t} ms\n"; 5021 return SolvableSubModule.new(@modu,"",gg.list); 5022 end
Compute right syzygys of this module.
# File examples/jas.rb 5100 def rightSyzygy() 5101 l = @mset; 5102 t = System.currentTimeMillis(); 5103 #no: p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelations( l ); 5104 p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelationsArbitrary( l ); 5105 t = System.currentTimeMillis() - t; 5106 puts "executed right module syzygy in #{t} ms\n"; 5107 m = SolvableModule.new("",p.ring,p.cols); 5108 return SolvableSubModule.new(m,"",p.list); 5109 end
Create a string representation.
# File examples/jas.rb 4960 def to_s() 4961 return @mset.toScript(); # + "\n\n" + str(@pset); 4962 end
Compute a two-sided Groebner base.
# File examples/jas.rb 4991 def twosidedGB() 4992 t = System.currentTimeMillis(); 4993 #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).twosidedGB(@mset); 4994 gg = SolvableGroebnerBaseSeq.new().twosidedGB(@mset); 4995 t = System.currentTimeMillis() - t; 4996 puts "executed twosided module GB in #{t} ms\n"; 4997 return SolvableSubModule.new(@modu,"",gg.list); 4998 end