CoCoA:GBasis5, and more
From ApCoCoAWiki
GBasis5, and more
calculations using the CoCoAServer
Description
These functions are implemented in CoCoALib (requires an active CoCoAServer).
Mostly the same as <ttref>GBasis</ttref>, <ttref>Intersection</ttref>,
<ttref>Elim</ttref>, but computed using the CoCoAServer.
All the 5 functions behave like the corresponding
function in CoCoA-4, i.e. should give the same output!
All the 5x functions allow extra options to be set, such
as (twin)floating point computations, parameters, shifts, different
orderings, gradings...
NB if you set incompatible options with the CurrentRing
(e.g. a different grading or ordering) the resulting GBasis will be
incompatible with CurrentRing... of course!
Example
----[ parameters ]----------------------------------------------- M := $cocoa5.AddParamOrdMat(DegRevLexMat(3), 1); // compatible Term Ordering Use Z/(32003)[a, x,y,z], Ord(M); I := Ideal((a-1)x+(a^2+a)y,(a+1)x + y); GBasis5(I); GBasis5x(I, Record(NumParams=1)); ----[ Twin floats ]-------------------------------------------------- Use Q[x[0..5]]; L := [Randomized(DensePoly(4)) | I In 1..2]; Time LT(Ideal(L)); LT5x(Ideal(L), Record(FloatPrecision=128)); ----[ Elimination ]---------------- Use Q[x,y,z,w[3..5]], Weights([7, 4, 3, 1, 1, 1]); I := Ideal( x - 7413431 w[4]^7 - 9162341 w[3]*w[4]*w[5]^5, y - 6521443 w[4]^4 - 2312257 w[3]^2*w[4]*w[5], z - 5329421 w[4]^3 - 2122414 w[3]*w[5]^2 ); Time E := Elim([w[3],w[4]], I); E5 := Elim5([w[3],w[4]], I); // usually much faster than CoCoA4 E = E5; ----[ Intersection ]------------------------------- Use Q[x,y,z], Weights(1,2,1); I := Ideal(xy, z^2); J := Ideal(yz, x-z); Intersection5(I, J); // with parameters M := CoCoA5.AddParamOrdMat(DegRevLexMat(3), 2); -- 2 parameters Use Z/(32003)[a,b, x,y,z], Ord(M); II := Ideal(x-y); I := (a-b+1) * x * II; J := (a+1) * y * II; Intersection5x(I,J, Record(NumParams=2)); -- 2 parameters ----[ Syzygies ]-------------------------------------- Use Z/(101)[x,y,z], Weights(1,2,4); L := [Vector(x^2,x^2),Vector(xy,xy)]; S5 := SyzOfGens5(L); ----[ Modules ]--------------------------------------------------------- Use Q[x,y,z], PosTo; M := Module([x,z], [z,y]); ReducedGBasis(M); ReducedGBasis5(M); ReducedGBasis5x(M, Record(IsPosTo=False)); Use Q[x,y,z], Weights([1,2,4]); M := Module([x^2-y,1],[x^4-z,y^2]); Info5 := Record(); Info5.ModuleShifts := Mat([[0,2]]); GBasis5x(M, Info5); // Grading given via OrdMat and Grading Dim OrdMat := Mat([[1,1,1],[2,1,1],[1,1,0]]); // Ring Grading (first 2 Rows) // Plus order (last row) Use Z/(101)[x,y,z], Ord(OrdMat), ToPos; M := Module([y-x,0,0], [x,0,z], [0,y^2-z^2,0]); X := ReducedGBasis5(Module(Gens(M))); // GBasis on a module with shifts Info5 := Record(); Info5.OrdMat := OrdMat; Info5.GradingDim := 2; Info5.ModuleShifts := Mat([[3,1,2],[2,2,5]]); // GrDim rows!! ReducedGBasis5x(M, Info5);
Syntax
-operation-5(same as -operation-) -operation-5x(same as -operation-, Info5: RECORD) GBasis5(M:IDEAL, MODULE):LIST GBasis5x(M:IDEAL, MODULE, Info5: RECORD):LIST
Introduction to Groebner Bases in CoCoA
<type>groebner</type> <type>groebner-basic</type> <type>ideal</type> <type>module</type> <type>quotient</type> <type>cocoaserver</type>