Singular Manual: Examples of ring declarations

- | ### 3.3.1 Examples of ring declarations The exact syntax of a ring declaration is given in the next two subsections; this subsection lists some examples first. Note that the chosen ordering implies that a unit-elements of the ring will be among the elements with leading monomial 1. For more information, see Monomial orderings. Every floating point number in a ring consists of two parts, which may be chosen by the user. The leading part represents the number and the rest is for numerical stability. Two numbers with a difference only in the rest will be regarded equal. the ring 5#5 with degree reverse lexicographical ordering. The exact ring declaration may be omitted in the first example since this is the default ring:
      ring r1;
      ring r2 = 32003,(x,y,z),dp;
      ring r3=(ZZ/32003)[x,y,z];
      ring r4 = (ZZ/32003),(x,y,z),dp;
- similar examples with indexed variables. The ring variables of r1 are going to be x(1)..x(10); in r2 they will be x(1)(1), x(1)(2), ..., x(1)(8), x(2)(1), ..., x(5)(8):
      ring r1 = 32003,(x(1..10)),dp;
      ring r2 = 32003,(x(1..5)(1..8)),dp;
      ring r3 = (ZZ/32003)[x(1..5)(1..8)];
      ring r4 = (ZZ/32003),(x(1..5)(1..8)),dp;
- the ring 32#32 with lexicographical ordering:
      ring r1 = 0,(a,b,c,d),lp;
      ring r2 = QQ,(a,b,c,d),lp;
- the ring 33#33 with local degree reverse lexicographical ordering. The non-prime 10 is converted to the next lower prime in the second example:
      ring r1 = 7,(x,y,z),ds;
      ring r2 = 10,(x,y,z),ds;
      ring r3 = (ZZ/7),(x,y,z),ds;
- the ring 34#34with lexicographical ordering for 35#35and degree reverse lexicographical ordering for 36#36:
      ring r1 = 7,(x(1..6)),(lp(3),dp);
      ring r2 = (ZZ/7),(x(1..6)),(lp(3),dp);
- the localization of 37#37 at the maximal ideal 38#38:
      ring r1 = 0,(x,y,z,a,b,c),(ds(3), dp(3));
      ring r2 = QQ,(x,y,z,a,b,c),(ds(3), dp(3));
- the ring 39#39 with weighted reverse lexicographical ordering. The variables 40#40, 41#41, and 42#42 have the weights 2, 1, and 3, respectively, and vectors are first ordered by components (in descending order) and then by monomials:
      ring r1 = 0,(x,y,z),(c,wp(2,1,3));
      ring r2 = QQ,(x,y,z),(c,wp(2,1,3));
- For ascending component order, the component ordering `C` has to be used. the ring 43#43, where 44#44 denotes the transcendental extension of 45#45 by 4#4, 46#46 and 47#47 with degree lexicographical ordering:
      ring r = (7,a,b,c),(x,y,z),Dp;
- the ring 43#43, where 48#48 denotes the algebraic extension of degree 2 of 45#45 by 49#49 In other words, 50#50 is the finite field with 49 elements. In the first case, 4#4 denotes an algebraic element over 45#45 with minimal polynomial 51#51,in the second case, 4#4 refers to some generator of the cyclic group of units of 50#50:
      ring r = (7,a),(x,y,z),dp; minpoly = a^2+a+3;
      ring r = (7^2,a),(x,y,z),dp;
- the ring 52#52, where 53#53 denotes the field of real numbers represented by simple precision floating point numbers. This is a special case:
      ring r = real,(x,y,z),dp;
- the ring 52#52, where 53#53 denotes the field of real numbers represented by floating point numbers of 50 valid decimal digits and the same number of digits for the rest:
      ring r = (real,50),(x,y,z),dp;
- the ring 52#52, where 53#53 denotes the field of real numbers represented by floating point numbers of 10 valid decimal digits and with 50 digits for the rest:
      ring r = (real,10,50),(x,y,z),dp;
- the ring 54#54, where 53#53 denotes the field of real numbers represented by floating point numbers of 30 valid decimal digits and the same number for the rest. 55#55 denotes the imaginary unit.
      ring r = (complex,30,j),(x,y,z),dp;
- the ring 56#56, where 53#53 denotes the field of real numbers represented by floating point numbers of 6 valid decimal digits and the same number for the rest. 57#57 is the default for the imaginary unit.
      ring r = complex,(x,y,z),dp;
- the quotient ring 33#33 modulo the square of the maximal ideal 38#38:
      ring R = 7,(x,y,z), dp;
      qring r = std(maxideal(2));
- the ring 58#58:
      ring R = integer,(x,y,z), dp;
- the ring 59#59:
      ring R = (integer, 6, 3),(x,y,z), dp;
- the ring 60#60:
      ring R = (integer, 100),(x,y,z), dp;

User manual for Singular version 4.3.2, 2023, generated by texi2html.