up previous next
GBasis5, Intersection5, Elim5

calculations using the CoCoAServer
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


Description
Same as GBasis , Intersection , Elim , but computed using the CoCoAServer: server stands for serving process doing the computations for CoCoA on the same computer (as opposed to computer server which runs, say, the mail services). You need to start the CoCoAServer before calling these functions (otherwise an error message will remind you). You may leave the CoCoAServer running even if you don't use it: it takes no cpu time while waiting for requests. It will respond to any other request from you and from other CoCoA-4 processes connected to the same machine on the same port (See OpenSocket ).

You don't need to worry about what this really means: what you have to do is just pressing a button ;-). Instructions for starting the server vary depending on the User Interface you use:

[text] From a shell call COCOADIR/CoCoAServer. [emacs] From the CoCoA menu select (re)start CoCoAServer.

All the 5 functions behave like the corresponding function in CoCoA-4, i.e. should give the same output!

All the 5x functions allows 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 much faster than CoCoA4
                              // input MUST be homogeneous
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);


See Also