Top
Back: 3.3.1 Examples of ring declarations
Forward: 3.3.3 Term orderings
FastBack: 3. General concepts
FastForward: 4. Data types
Up: 3.3 Rings and orderings
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

3.3.2 General syntax of a ring declaration

Rings

Syntax:

ring name = (coefficient_field), ( names_of_ring_variables ), ( ordering );

Default:

32003,(x,y,z),(dp,C);

Purpose:

declares a ring and sets it as the current basering.

The coefficient_field is given by one of the following:

  1. a non-negative int_expression less or equal 32003.
    The int_expression should either be 0, specifying the field of rational numbers Q, or a prime number p, specifying the finite field with p elements. If it is not a prime number, int_expression is converted to the next lower prime number.
  2. an expression_list of an int_expression and one or more names.
    The int_expression specifies the characteristic of the coefficient field as described above. The names are used as parameters in transcendental or algebraic extensions of the coefficient field. Algebraic extensions are implemented for one parameter only. In this case, a minimal polynomial has to be defined by assignment to minpoly. See minpoly.
  3. an expression_list of an int_expression and a name.
    The int_expression has to be a prime number p to the power of a positive integer n. This defines the Galois field $\hbox{GF}(p^n)$ with $p^n$ elements, where $p^n$ has to be smaller or equal $2^{15}$. The given name refers to a primitive element of $\hbox{GF}(p^n)$ generating the multiplicative group. Due to a different internal representation, the arithmetic operations in these coefficient fields are faster than arithmetic operations in algebraic extensions as described above.
  4. an expression_list of the name real and two optional int_expression giving the precision in decimal digits and the size for the stabilizing rest. The default for the rest is the same size as for the representation. An exception is the name real without any integers. These numbers are implemented as machine floating point numbers of single precision. Note that computations over all these fields are not exact.
  5. an expression_list of the name complex, two optional int_expression and a name. This specifies the field of complex numbers represented with floating point numbers with a precision similar to real. An expression_list without int_expression defines a precision and rest with length 6. The name of the imaginary unit is given by the last parameter. Note that computations over these fields are not exact.

’names_of_ring_variables’ is a list of names or indexed names.

’ordering’ is a list of block orderings where each block ordering is either

  1. lp, dp, Dp, ls, ds, or Ds optionally followed by a size parameter in parentheses.
  2. wp, Wp, ws, Ws, or a followed by a weight vector given as an intvec_expression in parentheses.
  3. M followed by an intmat_expression in parentheses.
  4. c or C.

For the definition of the orderings, see Monomial orderings.

If one of coefficient_field, names_of_ring_variables, and ordering consists of only one entry, the parentheses around this entry may be omitted.

Quotient rings

Syntax:

qring name = ideal_expression ;

Default:

none

Purpose:

declares a quotient ring as the basering modulo ideal_expression. Sets it as current basering.

ideal_expression has to be represented by a standard basis.

The most convenient way to map objects from a ring to its quotient ring and vice versa is to use the fetch function (see fetch).

SINGULAR computes in a quotient ring as long as possible with the given representative of a polynomial, say, f. I.e., it usually does not reduce f w.r.t. the quotient ideal. This is only done when necessary during standard bases computations or by an explicit reduction using the command reduce(f, std(0)) (see reduce).

Example:

 
  ring r=32003,(x,y),dp;
  poly f=x3+yx2+3y+4;
  qring q=std(maxideal(2));
  basering;
→ //   characteristic : 32003
→ //   number of vars : 2
→ //        block   1 : ordering dp
→ //                  : names    x y 
→ //        block   2 : ordering C
→ // quotient ring from ideal
→ _[1]=y2
→ _[2]=xy
→ _[3]=x2
  poly g=fetch(r, f);
  g;
→ x3+x2y+3y+4
  reduce(g,std(0));
→ 3y+4

Top Back: 3.3.1 Examples of ring declarations Forward: 3.3.3 Term orderings FastBack: 3. General concepts FastForward: 4. Data types Up: 3.3 Rings and orderings Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.