Goto Chapter: Top 1 2 3 4 5 A Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

3 Rings and ring elements
 3.1 Constructors
 3.2 Operations

3 Rings and ring elements

3.1 Constructors

3.1-1 SI_ring
‣ SI_ring( char, indets[, ord] )( operation )

Construct a Singular ring over the prime field of characteristic char with the indeterminates given by indets and term ordering given by the list ord. The list indets is allowed to be empty.

The indeterminates may be specified in one of multiple ways:

The list ord may be omitted, in which case TODO

You may use AssignGeneratorVariables (Reference: AssignGeneratorVariables) to make the ring variables accessible as GAP variables.

SI_ring( ) is equivalent to SI_ring( 32003, ["x","y","z"] ).

gap> r := SI_ring( 32003, ["x","y","z"] );
<singular ring, 3 indeterminates>
gap> AssignGeneratorVariables( r );
#I Assigned the global variables [ x, y, z ]
gap> s := SI_ring( 32003, "x1..4,y1..6", [["dp",4],["lp",6]] );
<singular ring, 10 indeterminates>
gap> SI_Indeterminates(s);
[ x1, x2, x3, x4, y1, y2, y3, y4, y5, y6 ]

3.1-2 SI_poly
‣ SI_poly( r, str )( operation )

Construct a polynomial in the Singular ring r using the string str. Polynomials constructed this way support the usual operations.

gap> s1 := SI_poly( r, "x2y+7xyz10-xy" );
7*x*y*z^10+x^2*y-x*y
gap> s2 := 3*x*z^2 + x*y*z;
x*y*z+3*x*z^2
gap> s1 + s2;
7*x*y*z^10+x^2*y+x*y*z+3*x*z^2-x*y
gap> s1 * x * y;
7*x^2*y^2*z^10+x^3*y^2-x^2*y^2

3.1-3 SI_number
‣ SI_number( r, a )( operation )

Construct a number in the Singular ring r using the GAP number a, which may be an integer, a rational number or an element of a finite prime field.

gap> SI_number( r, 33000 );
<singular number: 997>
gap> SI_number( r, Z(32003)^603 );
<singular number: 997>

3.2 Operations

Below we list just some relevant commands, to give you the general gist of what is available. For a comprehensive overview, please refer to the Singular manual and remember that you can map Singular function names to their GAP equivalent by prefixing them with SI_.

3.2-1 SI_imap
‣ SI_imap( TODO )( function )

TODO

3.2-2 SI_deg
‣ SI_deg( r )( function )

Compute the degree of the polynomial a.

gap> f := -5*x^3*y + (x*y*z)^5;
x^5*y^5*z^5-5*x^3*y
gap> SI_deg(f);
15

3.2-3 SI_gcd
‣ SI_gcd( a, b )( function )

Compute the greatest common divisor of the two polynomial a and b.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 A Bib Ind

generated by GAPDoc2HTML