Home
Singular - Tutorial - Universität Kaiserslautern
Contents
1. gt _ 1 a20 a3 1 To obtain the multiplicities of the factors use factorize a20 a2 1 c Computation with real and complex floating point numbers 30 digits pre cision ring Ri real 30 x dp number n 123456789 0 28 n 5 compute with a precision of 30 digits gt 0 286797186029971810723376143809e 41 Note n is a number whose integral part has 41 digits indicated by e 41 However only 30 digits are computed ring R2 complex 30 1 x dp I denotes imaginary unit number n 123456789 0 0 0001x1 n 5 complex number with 30 digits precision gt 0 286797186029971810723374262133e 41 1 116152861399129622075046746710 d Computation with rational numbers and parameters that is in Q a b c the quotient field of Qla b c ring R3 0 a b c x dp number n 12345a 12345 78bc n 2 gt 103021740900a2b2c2 2641583100abc 16933225 676b2c2 n 9c gt 320970abc 4115 234bc2 3 2 Computation in polynomial rings We shall now show how to define the polynomial ring in n variables x n over the above mentioned fields K We can do this for any n but we have to specify an integer n first The same remark applies if we work with tran scendental extensions of degree m we usually call the elements t tm of a transcendental basis free parameters If g is any non zero polynomial in the parameters t tm then g and 1 g are numbers in the corresponding ring
2. gt jG 1 1 3x2 2x gt jG 1 2 2y ideal I jG G I gt 1 1 2y gt 112 3x2 2x gt 113 x3 x2 y2 std I gt _ 1 y gt _ 2 x LIB solve lib solve I gt 1 gt 1 gt 0 gt 2 gt 0 Hence V g is not an algebraic manifold since 0 0 V g is a singular point of g 44 SINGULAR Example 3 15 6 Compute the critical points of f x y 4 y Q z y under the additional condition g x y 0 where g x y 42 4 w 1 Qlz y ring R 0 x y dp poly f x y ideal G 1 4 x2 1 16 y2 1 matrix jG jacob G jG gt jG 1 1 1 2x gt jG 1 2 1 8y ideal I jG G jG minor jG 1 I gt 1 1 1 2x gt 1 2 1 8y gt 113 1 4x2 1 16y2 1 std I gt _ 1 1 LIB ring lib def r extendring 1 1 dp setring r poly f imap R f ideal G imap R G poly F f 1 G 1 FE gt 1 41x2 1 161y2 1 x y ideal J jacob F J gt J 1 1 4x2 1 16y2 1 gt J 2 1 21x 1 gt J 3 1 81y 1 ideal crit eliminate J 1 crit gt crit 1 4x y gt crit 2 5y2 64 LIB solve lib setring R ideal crit imap r crit solve crit gt 1 gt 1 gt 0 89442719 gt 2 gt 3 57770876 gt 2 gt 1 gt 0 89442719 gt 2 gt 3 57770876 45 3 15 3 Singular Exercise Consider an ideal G 91
3. gt gt gt gt gt gt 1 23 2 arbitrary element 3 4 21 gt 4 gt 3 gt 5 gt 1 2 3 gt 6 gt 45 L gt 11 gt 23 gt 2 gt arbitrary element gt 3 gt 3 gt 4 gt 1 2 3 gt 5 gt 45 Note that lists are not always ringindependent Lists containing an element from a ring belong to that ring 2 3 Rings and standard bases To calculate with objects as ideals matrices modules and polynomial vectors a ring has to be defined first ring r 0 x y z dp The definition of a ring consists of three parts the first part determines the ground field the second part determines the names of the ring variables and the third part determines the monomial ordering to be used So the example above declares a polynomial ring called r with a ground field of characteristic 0 i e the rational numbers and ring variables called x y and z The dp at the end means that the degree reverse lexicographical ordering should be used Other ring declarations ring r1 32003 x y z dp characteristic 32003 variables x y and z and ordering dp ring r2 32003 a b c d 1p characteristic 32003 variable names a b c d and lexicographical or dering ring r3 7 x 1 10 ds characteristic 7 variable names x 1 x 10 negative degree revers lexicographical ordering ds ring r4 0 a
4. gt gt gt gt gt Then kJ 4 xy2 kJ 5 y2 kJ 6 x2y kJ 71 xy kJ 8 y kJ 9 x3 kJ 10 x2 kJ 11 x kJ 12 1 size kJ gt gives the desired vector space dimension of Q x y z jacob f As in SIN GULAR the functions may take the input directly from earlier calculations the whole sequence of commands may be written in one single statement 12 size kbase groebner jacob f gt When we are not interested in a basis of the quotient vector space but only in the resulting dimension we may even use the command vdim and write vdim groebner jacob f gt 12 12 26 3 Examples 3 1 Computation in fields In SINGULAR field elements have the type number but notice that in order to compute in fields i e to define and use numbers one has to define a polynomial ring with at least one variable and a specified monomial ordering a Computation in the field of rational numbers ring A 0 x dp number n 12345 6789 n 5 common divisors are cancelled gt 1179910858126071875 59350279669807543 Note Typing just 12345678975 will result in integer overflow since 123456789 is considered as an integer machine integer of limited size and not as an element in the field of rational numbers however also correct would be number 123456789 5 int a int b a gt 5 atb gt 8 a b gt 2 a b gt 1 afb gt 2 a b gt 15
5. gt _ 1 3 gt _ 2 6 gt _ 3 6 gt _ 4 12 gt _ 5 3 gt _ 6 6 gt _ 7 3 gt _ 8 6 gt _ 9 3 M 2 3 access to single entry gt xyz M 2 3 37 change single entry print M gt 1 x y z2 gt x 0 37 Further matrix operations are contained in the library matrix lib There is a procedure pmat in inout lib which formats matrices similarly to print but allows additional parameters for example to show only the first terms of each entry for big matrices LIB matrix lib LIB inout lib print power N 3 exponentiation of matrices gt 468 576 684 gt 1062 1305 1548 gt 1656 2034 2412 pmat power x y z N 3 15 show first 15 terms of entries where a truncation of a column is indicated by two dots gt 468x3 1404x2y 576x3 1728x2y 684x3 2052x2y gt 1062x3 3186x2 1305x3 3915x2 1548x3 4644x2 gt 1656x3 4968x2 2034x3 6102x2 2412x3 7236x2 matrix K concat M N concatenation print K gt 1 x y 22 1 2 3 gt x 0 37 4 5 6 gt 0 0 0 7 8 9 Y5 gt 40 ideal M converts matrix to ideal gt _ 1 1 same as flatten from matrix lib gt _ 2 x y gt _ 3 z2 gt _ 4 x gt _ 5 0 gt _ 6 37 print unitmat 5 5x5 unit matrix gt 1 0 0 0 0 gt 0 1 0 0 0 gt 0 0 1 0 0 gt 0 0 0 1 0 gt 0 0
6. k The numbers Aj Az are called Lagrange Multipliers Proof For the proof we refer to KOE 3 15 2 Application to Singular Let Q z Qlk 2 be the polynomial ring in n variables over the field Q and consider an ideal G g91 9x C Qlx n and a polynomial FfEeQlzi En We want to compute local extrema of the map f m M gt Q where Misa manifold given by M V G V g 9 x E Q g x le 0 c Q i e M denotes the set of solutions of the polynomial system gi 1 n 0 ge 1 2n 0 and is called the affine algebraic variety of g1 gx respectively of G Definition 3 15 2 An affine algebraic variety M V g1 gx is called an algebraic manifold if the Jacobian matrix J g1 9 p x oe has maximal rank at allpe M In terms of our assumptions and Definition 3 15 2 Theorem 3 15 1 concerning the Lagrange Multipliers can be reformulated as follows Theorem 3 15 3 Let f 91 9x Qlx 2n M V g1 9x be an algebraic manifold and consider the Lagrange polynomial k F x d f a YM gio with x 1 n Q and A A Ar QF 42 Then ifp M is a local extremum of f m there exists A A Ak Q such that the system of polynomial equations V F z A 0 VF x 1 0 lt VF a A 0 3 1 BL 2 Dia a 0 z 2 Es A 0 3 2 glx
7. return 1 def S basering def R lagPoly f G setring R poly L 1 for int i 1 i lt nvars R nvars S i L L var i ideal crit eliminate jacob F L setring S ideal crit imap R crit return crit SINGULAR Example 3 15 7 Compute the critical points of f x y z 2x 4y 5z Qlx y z under the additional condition g x y 2 g1 x y z g92 2 y z 0 0 where g 2 Y 2 go 2 y z a y z 16 gt oe 2y z Qlg y z ring R 0 x y z dp poly f 2x 4y 5z poly g1 x2 y2 z2 16 poly g2 x 2ytz ideal G g1 g2 ideal I critIdeal f G I gt 1 1 5y 2z gt 1 2 x 2y z gt 1 3 322 40 solve I gt 1 gt 1 gt 0 73029674 gt 2 gt 1 46059349 gt 3 gt 3 65148372 gt 2 gt 1 gt 0 73029674 gt 2 gt 1 46059349 gt 3 gt 3 65148372 48 References GP G M Greuel G Pfister A SINGULAR Introduction to Commutative Algebra 2nd edition Springer Verlag Berlin 2007 GPS1 G M Greuel G Pfister and H Sch nemann SINGULAR online manual GPS2 G M Greuel G Pfister and H Sch nemann SINGULAR 3 0 4 2007 http www singular uni kl de DL W Decker C Lossen Computing in Algebraic Geometry Springer Verlag Berlin 2006 KOE K K nigsberger Analysis 2 2 erweiterte Auflage Springer Verlag
8. 0 _ 2 xy12 x2y7 K is not in I K f yi4 xy12 size reduce K sI 1 result is 0 iff K is in I gt 0 3 9 Linear combination of ideal members Now assume that f I fi fx Then there exist a a K x such that J uft arfk The computation of the a is illustrated in the following example We exemplify the SINGULAR commands lift and division 36 ring A 0 x y dp ideal I x10 x9y2 y8 x2y7 poly f xy13 y12 matrix M lift I f M 1 1 1 1 M r 1 x 1 r M gt M 1 1 y7 gt M 2 1 x7y2 x8 x5y3 x6y x3y4 x4y2 xy5 x2y3 y4 Hence f can be expressed as a linear combination of J 1 and J 2 using M f M 1 1 1 1 M 2 11 1 21 test gt 0 3 10 Elimination of variables ring A 0 t x y z dp ideal I t2 x2 y2 z2 t2 2x2 xy z2 t y3 z3 eliminate I t gt _ 1 x2 xy y2 2z2 _ 2 y6 2y3z3 z6 2x2 xy z2 LIB elim lib loads library for elim1 elimi I t gt _ 1 x2 xy y2 2z2 _ 2 y6 2y3z3 z6 2x2 xy z2 Alternatively choose a product ordering ring A1 0 t x y z dp 1 dp 3 ideal I imap A I ideal J std I J gt J 1 x2 xy y2 2z2 J 2 y6 2y3z3 z6 2x2 xy z2 gt J 3 t y3 z3 3 11 Computing with radicals 1 Compute the radical of an ideal ring R 0 x y z dp poly p z4 2z2 1 LIB primdec lib loads library for radical radical p squarefree part of p gt _ 1 z2 1 ideal I xyz x2 y4 y5 a more compli
9. Note that SINGULAR stores and outputs a polynomial in an ordered way in decreasing order a Global orderings ring Al 0 x y z 1p lexicographical poly f x3yz yb z4 x3 xy2 f gt x3yz x3 xy2t y5 z4 ring A2 0 x y z dp degree reverse lexicographical poly f imap A1 f f gt yb x3yz z4 x3 xy2 ring A3 0 x y z Dp degree lexicographical poly f imap Al f f gt x3yz y5 z4 x3 xy2 ring A4 0 x y z Wp 5 3 2 weighted degree lexicographical poly f imap Al f f gt x3yz x3 y5 xy2 z4 b Local orderings ring A5 0 x y z 1s negative lexicographical poly f imap A1 f f gt zAty5t xy2 x3 x3yz ring A6 0 x y z ds negative degree reverse lexicographical poly f imap Al f f gt x3 xy2 z4 y5 x3yz ring A7 0 x y z Ws 5 3 2 negative weighted degree lexicographical poly f imap A1 f f gt Z4 xy2 x3 y5 x3yz c Product and matrix orderings ring A8 0 x y z dp 1 ds 2 mixed product ordering poly f imap Al f f gt x3 x3yz xy2 z4 y5 34 intmat A 3 3 1 1 1 0 O 1 O 1 0 print A gt 1 1 1 gt 0 0 1 gt 0 1 Now define your own matrix ordering using A ring AQ 0 x y z M A a local ordering poly f imap A1 f f gt xy2 x3 z4 x3yzty5 3 6 Leading data ring A 0 x y 2 1p poly f y4z3 2x2y2z2 3x5 4z4 5y2 f display f in a lex
10. 9x C Qle Qfz1 n and a polynomial f Qlz Qla 2n 1 2 3 Write a procedure which returns the Lagrange polynomial F x A k FR Xiz Ai glo How could you test with SINGULAR if the Jacobian matrix of 91 gk has maximal rank on the zero set of g1 gx Write a procedure which returns the ideal of all critical points for the given data if feasible 3 15 4 Solution 1 2 Here is just an example procedure to solve the given problem in SINGULAR LIB ring lib necessary for procedure extendring proc lagPoly poly f ideal G USAGE lagPoly f G RETURN extended ring R with the variables x 1 x m 1 1 1 k comes with the Lagrange polynomial F x 1 f x 1 1 g1 x 1 k gk x where G lt gl gk gt NOTE F is the Lagrange polynomial whose partial deriviates are the Lagrange conditions f is the function to maximize G is the ideal defining the variety of points for which f is defined def S basering int nvar size G def R extendring nvar 1 dp setring R poly f imap S f poly F f ideal G imap S G for int i 1 i lt nvar i F F var i Gli export f export F export G return R To observe if the Jacobian matrix J g 9x Mat k x n Q x has full rank one can check whether there exists a n dim G minor that does not vanish lBy a k minor we denote a determi
11. For further examples see GPS1 a Computation with polynomials Let us create polynomial rings over different fields By typing the name of the ring we obtain all relevant information about the ring ring A 0 x y z dp poly f x3 y2 same as x 3 y 2 fxf f gt x6 2x3y2 y4 x3 y2 SINGULAR understands short e g 2x2 y3 and long e g 2 x72 y 3 input Computations in polynomial rings over other fields follow the same pattern Try ring R 32003 x 1 3 dp finite ground field and type 29 R to obtain information about the ring The command setring allows switching from one ring to another for example setring A makes A the basering poly g 2xy z2 ftg gt x3 2xy y2 z2 xg gt 2x4y x3z2 2xy3 y2z2 b Declaration and operation on ideals ideal I 0 x 0 1 I gt 1 1 0 gt 1 2 x gt 1 3 0 gt 1 4 1 I 0 addition with simplification gt _ 1 1 ideal J 1 0 x x z J gt J 1 0 gt J 2 x gt J 3 0 gt J 4 1 gt J 5 0 gt J 6 x gt J 7 x z I J multiplication with simplification gt _ 1 1 I x gt _ 1 0 gt _ 2 x2 gt _ 3 0 gt _ 4 x ideal mi maxideal 1 m1 2 exponentiation gt _ 1 x2 gt _ 2 xy gt _ 3 xz gt _ 4 y2 gt _ 5 yz gt _ 6 z2 ideal m2 maxideal 2 m2 gt _ 1 x2 gt _ 21 xy 30 gt
12. _ 3 xz gt _ 4 y2 gt _ 5 yz gt _ 6 z2 ideal II I 2 4 II gt 11 1 x gt 11 2 0 gt 11 3 1 3 3 Methods for creating ring maps SINGULAR has three possibilities fetch imap and map to define ring maps by giving the name of the preimage ring and a list of polynomials fi fn as many as there are variables in the preimage ring in the current basering The commands fetch respectively imap map an object directly from the preimage ring to the basering whereas fetch maps the first variable to the first the second to the second and so on hence is convenient for renaming the variables while imap maps a variable to the variable with the same name or to 0 if it does not exist hence is convenient for inclusion of sub rings or for changing the monomial ordering Note All maps go from a predefined ring to the basering map preimage ring basering a General definition of a map ring A 0 a b c dp poly f atbtab c3 8 gt c3 abtatb ring B 0 x y z dp map F A xty x y z map F from ring A to basering B sending a gt xty b gt x y c gt Z poly g F f apply F 8 gt Z3 x2 y2 2x b Special maps imap fetch ring Al 0 x y c b a z dp imap A f imap preserves names of variables gt c3 batbta fetch A f fetch preserves order of variables gt c3 xy xty 31 3 4 Properties of ring maps 1 Checking inj
13. mu nu lp transcendental extension of Q by a variable names mu and nu 22 Typing the name of a ring prints its definition The example below shows that the default ring in SINGULAR is Z 32003Z x y z with degree reverse lexicographical ordering ring r5 r5 gt characteristic 32003 gt number of vars 3 gt block 1 ordering dp gt names xyz gt block 2 ordering C Defining a ring makes this ring the current active basering so each ring definition above switches to a new basering The concept of rings in SINGULAR is discussed in detail in the chapter Rings and orderings of the SINGULAR manual GPS1 Furthermore one can define a ring r6 which extends the ring r by adding new variables in front of the old variables LIB ring lib def r6 extendring 3 t dp The characteristic of r6 is the characteristic of r the new variables are t 1 t 2 t 3 and the ordering is the product ordering of the ordering of r and dp The basering now is r5 That means to work in the ring r6 we have to switch to it This can be done using the function setring setring r6 16 gt characteristic 0 gt number of vars 6 gt block 1 ordering dp gt names t 1 t 2 t 3 gt block 2 ordering dp gt names xyz gt block 3 ordering C Since we want to calcualate in the ring r which we defined first we have to switch ba
14. output gt 17 216 A short form for execute read is lt e g lt test2 txt Anyone wanting to document a SINGULAR session for security in a file e g test3 txt can do this with the command monitor e g monitor test3 txt io 18 The option io causes input as well as output to be stored The omission of one of the letters leads to only the input or only the output being stored The option monitor is very helpful when working on an operating system on which SINGULAR is instable or on which an editor is available which is no easily manageable Please note that monitor opens a file but does not terminate it This can be done by the following input monitor 2 2 Ringindependent objects As we already mentioned in section 2 1 2 once SINGULAR is started it awaits an input after the prompt gt Every statement has to be terminated by 37 5 gt 42 Integer variables are ringindependent objects that are defined by the word int To keep in mind the assignment is done by the symbol int k 2 In addition there is a bigint expression available in order to define a larger integer variable Note 11 13 17 100 200 2000 returns a machine integer 11 13 17 100 200 2000 gt int overflow result may be wrong gt 1544247808 using the type cast number for a greater allowed range bigint 11 13 17 100 200 2000 gt 97240000000 Next we define a 3 x
15. replace in the definition of the ring the characteristic 0 with real resp rea1 50 if one wishes to calculate with 50 decimal points e g ring r real 10 x 1p Even the complex numbers are available by replacing real with complex i defines then the imaginary unit i e the square root of 1 2 1 7 Procedures If there exists a definite problem which is to be solved with SINGULAR then one calls up the programme enters the command sequence and obtains a result Very often the same calculations are to be carried out with different inputs Then it makes sense to write the command sequence as a procedure into which the desired inputs are entered as arguments and which returns the solutions The syntax of a procedure is fairly simple proc PROCEDURENAME PARAMETERLIST PROCEDUREBODY For PROCEDURENAME any not otherwise delegated letter sequence can be used The types and names of the arguments which are passed on to the procedure are laid down in the PARAMETERLIST The PARAMETERLIST should be encased in round brackets The PROCEDUREBODY contains a sequence of permissible SIN GULAR code If the procedure is to return a result the result should be stored in a variable result and the procedure should terminate with the command return result An example is more useful than thousands of words proc permcol matrix A int c1 int c2 matrix B A 13 B 1 nrows B c1 A 1 nrows A c2 B 1 nrows B c2 A 1
16. with complete number coefficients i e a A list can contain objects of different types Through 1 2 the second entry of 1 can be seized A matrix with two lines and three columns the entries being either of type poly or of type number as shown here 123 4 5 6 i A vector in module R3 If the entries are all of type number we can interpret it as vector over the field The mounted module in R by v and z a7 0 1 A polynomial in the indeterminates of the ring with numbers as coefficients here f x 2x 1 Note that numbers in front of the monomials are interpreted as coefficients whereas SINGULAR inter prets numbers after single variables as ex ponents 12 ideal i f x3 That from f and z generated ideal in R qring Q i The quotient ring R i map g R x The rest class formation of R after Q which is defined by CHE def j If at the point time when the definition of a variable is fixed one does not want to fix the type it can be defined as def The first allocation of a value to the variable also fixes the data type link For the data type link we refer to the handbook GPS1 resolution For the data type resolution we refer to the handbook GPS1 At first glance it might seem as though the matrices im and m are identical In the case of SINGULAR that is not the case as they are of different types If one wishes to calculate with decimal points having the ground field R avail able then one must
17. x9y2 y8 x2y7 ideal sI2 std 12 sI2 gt sI2 1 x2y7 y8 sI2 2 x9y2 x10 sI2 3 x12y xy11 gt sI2 4 x13 xy12 sI2 5 y14 xy12 sI2 6 xy13 y12 ring Al 0 x y 1p global ordering lex ideal 13 fetch A 12 ideal sI3 std I3 sI3 gt s13 1 y15 y12 gt s13 2 xy12 y14 gt s13 3 x2y7 y8 gt s13 4 x10 x9y2 The command kbase calculates a basis of the polynomial ring modulo an ideal if the quotient ring is finite dimensional As an example we calculate the Milnor number of a hypersurface singularity in the global and local case This is the vector space dimension of the polynomial ring modulo the Jacobian ideal in the global case resp of the power series ring modulo the Jacobian ideal in the local case See GPS1 Critical points for a detailed explanation The Jacobian ideal is obtained with the command jacob setring r ideal J jacob f gt redefining J J gt J 1 3x2y2 2xy3 3x2 gt J 2 2x3y 3x2y2 3y2 gt J 3 2z SINGULAR prints the line redefining J This indicates that we have previously defined a variable with name J of type ideal see above To obtain a representing set of the quotient vectorspace we first calculate a standard basis then we apply the function kbase to this standard basis J groebner J ideal kJ kbase J kJ gt kJ 1 y4 gt kJ 2 xy3 gt kI 3 y3 25 gt gt gt gt
18. 0 g s 0 has the solution p A M x Q In order to compute the local extrema of flu M Q proceed in the following way e Eliminate Aj e Get a system of equations hy 1 h p hr p 0 SINGULAR Example 3 15 4 Compute the critical points of f x y y Q z y under the additional condition g x y 0 where g x y y 2x 1 Qlz y ring R 0 x y dp poly f x2 y2 ideal G y 2x 1 matrix jG jacob G jG gt jG 1 1 2 gt jG 1 2 1 ideal M minor jG 1 M gt M 1 1 gt M 2 2 ideal I M G I gt 1 1 1 LIB ring lib def r extendring 1 1 dp setring r poly f imap R f ideal G imap R G poly F f 1 G 1 we can therefore Ax from the system of polynomial equations 3 2 h x 0 satisfying 3 A such that 3 2 holds fla has a local extremum at p M 43 E gt 21x 1y 1 x2 y2 ideal J jacob F J gt J 1 2x y 1 gt J 2 21 2x gt J 3 1 2y ideal crit eliminate J 1 crit gt crit 1 5y 1 gt crit 2 2x y 1 LIB solve lib setring R ideal crit imap r crit solve crit gt 1 gt 1 gt 0 4 gt 2 gt 0 2 SINGULAR Example 3 15 5 Check whether V g with g x y y x x Q z y is an algebraic manifold ring R 0 x y dp ideal G y2 x3 x2 matrix jG jacob G jG
19. 0 0 1 Besides matrices there are integer matrices which do not need a ring These are mainly used for bookkeeping or storing integer results The operations are the same as for matrices intmat IM 2 3 1 2 3 4 5 6 IM gt 1 2 3 gt 4 5 6 print IM gt 1 2 3 gt 4 5 6 3 15 Langrange multipliers 3 15 1 Theoretical introduction In many optimization problems we do not only ask for the extremum of a func tion but for the extremum under additional conditions Lets consider the following problem Given a function f U Rand functions 1 r U R defined on a set U C R Let M be the zero set of y 1 U RE M x E U y x 0 We are interested in local extrema xy of f on M i e f x lt f xo Vae M or f x gt f to VreM Such points are called Maxima resp Minima of f on M or Maxima resp Minima of f under the additional condition p 0 The following theorem states a necessary condition for extrema of f on M if M is a manifold Theorem 3 15 1 Lagrange Let f U gt R be differentiable and p p1 px U R be continuously differentiable on an open set U C R Furthermore let the Jacobian matrix of p have rank k at any point x of the zero set M of p i e rk Hola k VreM 4fx U p x 0 41 Then it holds If xo M is an extremum of f then Vf xo is a linear combination of Vor to Vexl to ie there exist A Ar ER satisfying
20. 3 matrix of integers and initialize it with some values row by row from left to right intmat m 3 3 1 2 3 4 5 6 7 8 9 A single matrix entry may be selected and changed using square brackets and m 2 3 gt 6 m 1 2 0 m gt 1 0 3 gt 4 5 6 gt 7 8 9 To calculate the trace of this matrix we use a for loop The curly brackets and 3 denote the beginning resp end of a block If you define a variable without giving an initial value as the variable tr in the example below SINGULAR assigns a default value for the specific type In this case the default value for integers is 0 19 int j tr for j 1 j lt 3 j tr tr nlj jl gt tr gt 15 Variables of type string can also be defined and used without a ring being active Strings are delimited by double quotes They may be used to comment the output of a computation or to give it a nice format If a string contains valid SINGULAR commands it can be executed using the function execute The result is the same as if the commands would have been written on the command line This feature is especially useful to define new rings inside procedures example for strings gt example for strings string s The element of m s s at position 2 3 is concatenation of strings by s a m 2 3 2 gt The element of m at position 3 2 is 6 s m 2 1 0 m execute s gt 1 0 3 gt 0
21. 5 6 gt 7 8 9 This example shows that expressions can be separated by comma giving a list of expressions SINGULAR evaluates each expression in this list and prints all results separated by spaces The following operators are given for the data type list Combines the elements of two lists delete Deletes an element from a list delete L 3 deletes the third element of the list L the input is not changed insert Inserts an element into a list insert L 4 inserts into the list L the element 4 in first place insert L 4 2 after second position i e in third place the input is not changed Here is a simple example string t arbitrary element intvec v 1 2 3 list Li 23 t 3 list L2 v 45 L1 gt 1 gt 23 gt 2 gt arbitrary element gt 3 1 gt 3 20 L2 gt gt gt gt list L gt gt gt gt gt gt gt gt gt gt 1 1 2 3 2 45 L L1 L2 1 23 2 arbitrary element 3 3 4 1 2 3 5 45 delete L 3 gt gt gt gt gt gt gt gt 1 23 2 arbitrary element 3 1 2 3 4 45 insert L 4 gt gt gt gt gt gt gt gt gt gt gt gt 1 4 2 23 3 arbitrary element 4 3 5 1 2 3 6 45 insert L 4 2
22. Berlin 1997 MAR T Markwig A Short Introduction to Singular Lecture Notes 2003 FACHBEREICH MATHEMATIK UNIVERSITAT KAISERSLAUTERN ERWIN SCHR DINGER STRASSE D 67663 KAISERSLAUTERN E mail address steidel mathematik uni kl de singular mathematik uni kl de to reach the SINGULAR team 49
23. Singular SINGULAR is a Computer Algebra System for polynomial computations with special emphasis on the needs of commutative algebra algebraic geometry and singularity theory Here are some of the most important features of SINGULAR e Main computational objects ideals modules over very general polynomial rings over various ground fields e Large variety of algorithms implemented in kernel written in C C e Many more algorithms implemented as SINGULAR libraries e Intuitive C like programming language e Extensive documentation Manual info ps and html Publications e Available for most hard and software platforms Unix HP UX SunOS Solaris Linux AIX Windows Macintosh SINGULAR is a free software under the GNU General Public Licence SINGULAR is developed by the SINGULAR team at the Department of Mathe matics of the University of Kaiserslautern under the direction of Gert Martin Greuel Gerhard Pfister and Hans Sch nemann 1 2 Availability The latest information about SINGULAR is always available from http www singular uni kl de 1 3 History of Singular 1983 Greuel Pfister Existence of complete intersection singularities which are not quasi homogeneous but Poincare complex exact 1983 Neuendorf geb Schemmel Pfister Implementation of the Gr bner basis algorithm BuchMora for ZX Spectrum in Basic 1987 Pfister et al Humboldt Uni Berlin Buchmora for Atari in Modula 2 Existence shown 1989 B
24. Singular Tutorial Stefan Steidel Department of Mathematics University of Kaiserslautern 67653 Kaiserslautern steidel mathematik uni kl de SINGULAR version 3 0 4 University of Kaiserslautern Department of Mathematics and Centre for Computer Algebra Authors G M Greuel G Pfister H Sch nemann Copyright 1986 2007 October 20 2008 Contents 1 Preface 1 1 1 2 1 3 1 4 Overview of Singular 2 2 0 2 0 00002000000 Availability 2 40 area EOS oo nn nennen History of Singular 6 cnc eu GAG ed ae ee Acknowledgement 2 2 2222 Cm nn 2 Getting started Dull TS sure ve shy a ee ae ea 2 1 1 Notations and basic concepts 2 1 2 Starting and terminating Singular 2 1 3 The online help help o o 2 1 4 Interrupt Singular u a a a ata nen 2 1 92 Edittinginputs aa ls ara 2 1 6 Types of data in Singular and rings 2 1 07 Procedures lt arara bus As ai Vi ee eh 2 1 8 Libraries 2 te es aa ne ei 2 1 9 Output in files input in files 2 2 Ringindependent objects o e 2 3 Rings and standard bases o o 3 Examples 3 1 Computation in fields 2 22 22 Co Eon nn 3 2 Computation in polynomial rings 2 2 nn onen 3 3 Methods for creating ring maps 3 4 Properties of ring maps e 3 5 Monomial orderings e 3 6 Le ding
25. ab gt 125 5 3 gt 5 3 number c 5 3 I al number d c d gt 5 3 I w b Computation in finite fields ring Al 32003 x dp finite field Z 32003 number 123456789 5 gt 8705 number a 25000 27 number b 20000 atb gt 12997 a b gt 8002 ring A2 2 3 a x dp finite Galois field GF 8 with 8 elements number n ata2 a is a generator of the group GF 8 0 n 5 gt a6 minpoly minimal polynomial of GF 8 gt 1 a73 1 a71 1 a70 ring A3 2 a x dp infinite field Z 2 a of characteristic 2 minpoly a20 a3 1 define a minimal polynomial a720 a73 1 now the ground field is GF 2720 Z 2 a lt a 20 a73 1 gt number n ata2 a finite field with 2720 elements n 5 a is a generator of the group GF 2720 0 gt al0 a9 a6 a5 Note For computation in finite fields Z pZ p lt 32003 respectively GF p p lt 2 one should use rings as A1 respectively A2 since for these fields SINGULAR uses look up tables which is quite fast For other finite fields a minimal polynomial as in A3 must be specified SINGULAR does not however check the irreducibility of the chosen minimal polynomial This can be done as in the following example ring tst 2 a dp factorize a20 a2 1 1 gt _ 1 a3 a 1 not irreducible We have 2 factors gt _ 2 a7 a5 a4t a3 1 factorize a20 a3 1 1 irreducible
26. assignment is done by the symbol int k 2 Test for equality respectively inequality is done using resp or lt gt where 0 represents the boolean value FALSE any other value represents TRUE RN I ONFN The value of an object is displayed by simply typing its name k gt 2 On the other hand the output is suppressed if an assignment is made int j j kl The last displayed result is always available with the special symbol _ 2 _ the value from k displayed above gt 4 Text starting with denotes a comment and is ignored in calculations as seen in the previous example 2 1 2 Starting and terminating Singular Obviously the first question is how does one start the programme and how is it terminated The most current version of SINGULAR is started by using the command Singular in the command line of the system Entering Singular v will prompt use of the version number of SINGULAR when starting the pro gramme After the start SINGULAR shows an input prompt a gt back and is available to the user for interactive use As soon as the user no longer wants to use this possibility he is recommended to terminate the programme There are three commands available for this exit quit or for very lazy users Please note that the semicolons in the preceding paragraph are part of the SINGULAR commands and not inserted punctuations marks In general every command in Singu
27. at A if nrows A ncols A print Attention A is not a square matrix return 0 int re 0 int i 1 while i lt nrows A re re Ali il i return re Hence we obtain trma M gt 15 trace M the built in SINGULAR command gt 15 b Greatest common divisor of two integers Our aim is to write a prodedure that computes the greatest common divisor of two integers a b Z A possible realization is the following proc GCD int a int b int r a b while r 0 a b b r r return b I w x amp GCD 15 21 gt 3 GCD 2765851 255781 gt 31 gcd 2765851 255781 the built in SINGULAR command gt 31 15 2 1 8 Libraries To make procedures available for more than one SINGULAR session it makes sense to store them in files which can be re read by so called SINGULAR Libraries The library names often allow conclusions to be drawn from the procedures contained and always have the ending 1ib Libraries are read into SINGULAR through the command LIB followed by the encapsulated library name in inverted commas such as LIB 123456 1ib Library names should if possible only consist of eight letters to guarantee compatibility with systems such as Dos If they are not SINGULAR s own li braries then they should be in the register from which SINGULAR is started Of course a library must confor
28. cated ideal radical I gt _ 1 x gt _ 2 y2 y we see that I is not reduced 37 2 Compute the index of nilpotency Since y y is contained in the radical of I some power of y y must be contained in J We compute the minimal power k so that y y is contained in by using the normal form This is the same as saying that y y is nilpotent in the quotient ring R I and then k is the index of nilpotency of y y in R T ideal gl groebner I int k while reduce y2ty k gI 0 k k gt 4 minimal power index of nilpotency is 4 3 12 Intersection of ideals We use elimination to compute the intersection of two ideals Given fi fx h1 hy K x and gt a monomial ordering Let I f1 fx Klx and Ig hy h K a We wish to find generators for l N L Consider the ideal J tfi tfr 1 t h1 1 t h Klx t With the above notations we get I NIa JNK a i e we obtain the intersection by eliminating t from J ring A 0 x y z dp ideal I1 x y ideal I2 y2 z intersect 11 12 the built in SINGULAR command gt _ 1 y2 _ 2 yz _ 3 xz ring B 0 t x y Z dp the way described above ideal I1 imap A I1 ideal I2 imap A 12 ideal J t 11 1 x 12 eliminate J t gt _ 1 yz _ 21 xz _ 3 y2 ideal 13 x ideal 14 y intersect 13 14 gt _ 1 xy 3 13 Quotient of ideals Let I and Ig C Klx We want to c
29. ck to it setring r Once a ring is active we can define polynomials A monomial say x may be entered in two ways either using the power operator saying x 3 or in short hand notation without operator saying x3 Note that the short hand notation is forbidden if the name of the ring variable consists of more than one character Note that SINGULAR always expands brackets and automatically sorts the terms with respect to the monomial ordering of the basering poly f x3 y3 x y x2y2 z2 f gt x3y2 x2y3 x3 y3 z2 23 The command size determines in general the number of single entries in an object In particular for polynomials size determines the number of monomials size f gt 5 A natural question is to ask if a point e g x y z 1 2 0 lies on the variety defined by the polynomials f and g For this we define an ideal generated by both polynomials substitute the coordinates of the point for the ring variables and check if the result is zero poly g f 2 2x y ideal I f g ideal J subst I x 1 y 2 2 0 J gt J 1 5 gt J 2 0 Since the result is not zero the point 1 2 0 does not lie on the variety V f g Another question is to decide whether some function vanishes on a variety or in algebraic terms if a polynomial is contained in a given ideal For this we calculate a standard basis using the command groebner and afterwards reduce the polynomial with respect to this stan
30. cknowledgement The development of SINGULAR is directed and coordinated by Gert Martin Greuel Gerhard Pfister and Hans Sch nemann Currently the SINGULAR team has the following members Michael Bricken stein Wolfram Decker Alexander Dreyer Anne Fr hbis Kr ger Kai Kr ger Viktor Levandovskyy Oleksandr Motsak Mathias Schulze and Oliver Wienand Former members of the SINGULAR team are Olaf Bachmann Christoph Lossen Wolfgang Neumann Wilfred Pohl Jens Schmidt Thomas Siebert R diger Stobbe Eric Westenberger and Tim Wichmann Further contributions to SINGULAR were made by Thomas Bayer Isabelle Bermejo Markus Becker Stas Bulygin Kai Dehmann Marcin Dumnicki Stephan Endrass Jose Ignacio Farran Vladimir Gerdt Philippe Gimenez Christian Gorzel Hubert Grassmann Fernando Hernando Agnes Heydtmann Dietmar Hillebrand Tobias Hirsch Manuel Kauers Simon King Anen Lakhal Martin Lamm Santiago Laplagne Gregoire Lecerf Francisco Javier Lobillo Thomas Markwig Bernd Martin Michael Messollen Andrea Mindnich Jorge Martin Morales Thomas N ssler Carlos Rabelo Alfredo Sanchez Navarro Henrik Strohmayer Christian Stussak Imade Sulandra Christine Theis Enrique Tobis Alberto Vigneron Tenorio Moritz Wenk Denis Yanovich Oleksandr lena We should like to acknowledge the financial support given by the Volkswagen Stiftung the Deutsche Forschungsgemeinschaft and the Stiftung fir Innovation des Landes Rheinland Pfalz to
31. d ta ss cre doae 2 eee e ee 3 1 Normal form 2 48 E ee ee 3 8 Ideal membership 00 000000 3 9 Linear combination of ideal members 3 10 Elimination of variables 2 2 2 2 Con on 3 11 Computing with radicals 2 2 o o o 3 12 Intersection of ideals 2 22 22 Co Emm ee 3 13 Quotient of ideals 2 2 20 20 20 2000000022 eee 3 14 Matrix Operations lt o a 2 aa a awe eee p a a a a 3 15 Langrange multipliers o o 3 15 1 Theoretical introduction 3 15 2 Application to Singular 3 15 3 Singular Exercise 2 2 Comm 3 15 4 90lUt101 e 3 bob oo Areas ae 1 Preface SINGULAR version 3 0 4 University of Kaiserslautern Department of Mathematics and Centre for Computer Algebra Authors G M Greuel G Pfister H Sch nemann Copyright c 1986 2007 NOTICE This program is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 or version 3 of the License The following software used with SINGULAR have their own copyright the omalloc library the readline library the Gnu Multiple Precision Library GMP NTL A Library for doing Number Theory NTL the Multi Protocol library MP the Singular Factory library the Singular libfac library and for the Windows distributions the Cygwin DLL and the Cyg
32. dard basis ideal sI groebner f reduce g sI gt 0 As the result is 0 the polynomial y belongs to the ideal defined by f The function groebner like many other functions in SINGULAR prints a pro tocol during calculation if desired The command option prot enables pro tocoling whereas option noprot turns it off SINGULAR s implementation of Buchberger s algorithm is available via the std command std referring to standard basis The computation of reduced Groeb ner and standard bases may be forced by setting option redSB However de pending on the monomial ordering of the active basering it may be advisable to use the groebner command instead This command is provided by the SIN GULAR library standard lib which is automatically loaded when starting a SINGULAR session Depending on some heuristics groebner either refers to the std command e g for rings with ordering dp or to one of the other imple mented Groebner bases algorithms For information on the heuristics behind groebner see the library file standard lib ideal 11 x3 y2 xyz y2 std I1 gt _ 1 xyz y2 gt _ 2 x3 y2 gt _ 3 x2y2 y3z gt _ 4 y3z2 xy3 24 groebner 11 gt _ 1 xyz y2 gt _ 2 x3 y2 gt _ 3 x2y2 y3z gt _ 4 y3z2 xy3 The same generators for an ideal give different standard bases with respect to different orderings ring A 0 x y dp global ordering degrevlex ideal I2 x10
33. ectivity ring S 0 a b c 1p ring R 0 x y z dp ideal i x y x2 y3 map phi S i a map from S to R sending a gt x b gt y c gt x2 y3 LIB algebra lib load algebra lib By default SINGULAR displays the names and paths of those libraries which are used by algebra lib and which are also loaded We suppress this message We test injectivity using the procedure is_injective then we compute the kernel by using the procedure alg_kernel which displays the kernel an object of the preimage ring as a string is_injective phi S gt 0 phi is not injective ideal j x x y Z X2 y3 map psi S j another map from S to R is_injective psi S gt 1 psi is injective alg_kernel phi S gt b 3 a 2 c lt b 3 a 2 c gt Ker phi alg_kernel psi S gt 0 2 Computing the preimage Using the preimage command we must first go back to S since the preim age is an ideal in the preimage ring ideal Z the zero ideal in R setring S preimage R phi Z computes kernel of phi in S gt _ 1 a2 b3 c kernel of phi preimage of Z 3 Checking surjectivity and bijectivity setring R is_surjective psi S gt 1 is_bijective psi S faster than is_injective is_surjective gt 1 32 4 Computing the inverse in quotient rings If Ic K a Klc tn is a maximal ideal then the quotient ring Klx T is a field To be able to compute e
34. ffectively in the field K x I we need in addition to the ring operations the inverse of a non zero element The following example shows that we can effectively compute in all fields of finite type over a prime field If the polynomial f is invertible then the command 1ift f 1 1 1 gives the inverse lift checks whether 1 f and then expresses 1 as a multiple of f ring R 0 x y z dp ideal I z5 y2 x2 y2 z x I std I qring Q 1 We shall now compute the inverse of z in Q R I poly p lift z 1 1 1 P gt 1 x2 x z4 1 x2 x We make a test for p being the inverse of z reduce p z std 0 gt 1 The ideal J is a maximal ideal if and only if R I is a field We shall now prove that in our example is a maximal ideal ring R1 0 x z y 1p ideal I imap R I I std I I gt 1 1 y10 5x y8 10x2 y6 10x3 y4 5x4 1 y2 x5 x2 gt I 2 z y2 x Since Q x z y z y x Q x y we see that R T Uy y Say 10x y 10r y Br 1 y 2 a factorize I 1 gt 1 gt 1 1 gt _ 2 y10 5x y8 10x2 y6 10x3 y4 5x4 1 y2 gt x5 x2 gt 2 gt 1 1 The polynomial J 1 is irreducible and R T is a field 33 3 5 Monomial orderings Global orderings are denoted with a p at the end referring to polynomial ring while local orderings end with an s referring to series ring
35. field of characteristic 32003 and degree reverse lex icographical ordering ring r real 15 x 1p The amount of polynomials in the variables x with coefficients in real numbers R for calculations with 15 places after the decimal point We shall calculate first over the rational numbers Q We do not need real numbers as floating point numbers or even complex numbers until later A list of the available data types in SINGULAR is given below and we also show for each an example by defining a variable of the relative type and through the operator allocating a value to it 11 int i 1 string s Hallo intvec iv 1 2 3 4 intmat im 2 3 1 2 3 4 5 6 ring R 0 a x y 1p number n 4 6 list l n iv s matrix m 2 3 1 2 3 4 5 6 vector v 1 2 3 module mo v x x2 x 1 poly f x2 2x 1 The data type integer represents the machine numbers whole numbers be tween 2 l und 23 1 In addition true values boolean are represented as integers 0 FALSE 1 TRUE strings are any chains of letters always boxed in by inverted commas A vector of integers A matrix with two lines and three columns with integer entries 123 456 The ring Q a z y with lexicographical order For further explanations please see the handbook GPS1 numbers are the elements of the field based on the ring By ring r 0 x lp the rational numbers by ring r 0 a x lp also fractions of polynomials in a
36. in the library are depicted with a maximum of one line SINGULAR shows this part when help is requested for the relative library that is help 123456 1ib It should also be noted that strings are allocated to version and info by means of the sign of equality so that the inverted commas which box them in are just as necessary as the semicolon at the end of the line Section two serves the loading from other libraries whose procedures are nec essary for one s own procedures As an example the library inout 1lib whose procedure pmat in the example part of the procedure permcol is used In the third section the procedures follow simply strung together It should be noted that the command proc is always shown at the beginning of a new line It is recommended that the Syntax in section 2 1 7 is extended by two sections for procedures A commentary block can be inserted between the procedure head and the text body in inverted commas which contains certain key words followed by the relative information Under USAGE should be shown how the command is sum monsed and of which type the arguments are RETURN should contain informa tion on which type the return is and if necessary any further information NOTE is used to show important comments to the procedure its use etc EXAMPLE shows tips as to how an example can be shown under SINGULAR The com mentary block displayed there contains information which is shown when help
37. is requested to a procedure under SINGULAR z B through help permcol The second additional section at the end of the procedure is initiated through the set word example followed by a section in curly brackets which contains the SINGULAR code The aim is to show an example for the operation of the procedure which simplifies its use for the user The user obtains the example by entering example PROCEDURENAME 17 2 1 9 Output in files input in files The command write offer the possibility to store the values of variables or any strings in a file For this the variable values are converted to strings The following lines store variable values resp a string in the file test1 txt int a 5b int b 4 write test1 txt a b write test1 txt Das ist Singular Several variables or strings can be shown separated by commas Their values are written in each case in a new line Data contained in a file can be read in by the command read They are however interpreted as strings e g read test1 txt gt 5 4 Das ist Singular Should SINGULAR code which is read in from a file be recognized as such then the read command must be passed on to the command execute Should the file test2 txt contain the following lines 4x5 3 673 which is to be done via write test2 txt 4 B5 3 673 read test2 txt gt 4x5 3 673 then the command execute read test2 txt leads to the following SINGULAR
38. lar ends with a semicolon The semicolon tells the computer that the inputted command is to be interpreted and if this is successful be carried out The programme comes up with a result possibly an error notification followed by a new input prompt Should the user forget the semicolon or have opened with a curved bracket and not closed with one SINGULAR shows this with an input prompt in words a dot and enables further inputs such as the missing semicolon In this way it is possible to stretch longer commands over several lines 2 1 3 The online help help The next most important information after the start and terminate commands is how to find help if the user is stuck Here SINGULAR offers the command help or in short Using the command help followed by a SINGULAR command a SINGULAR function or procedure name or a SINGULAR library information to the respective objects are shown For the libraries one receives a list of the procedures contained therein for commands functions and procedures one is shown their purpose and finds the general syntax as well as very important examples for their use Examples exit standard lib printf The help can be shown on various browsers Standard is SINGULAR 3 0 4 Netscape This means that SINGULAR after inputting e g help exit starts Netscape and shows the help text to the exit Via self explanatory buttons the entire handbook is available Apart from Netscape further browse
39. m to certain syntax rules and procedures which are stored in libraries should be extended by two explanatory additions We show this in an example rn version 1 0 info LIBRARY 123456 1ib AUTHOR Stefan Steidel email steidel mathematik uni kl de PROCEDURES permcol matrix int int interchanges columns of the matrix permrow matrix int int interchanges rows of the matrix mt IAS RARA RANA AAA AAA AAA AAA AAA AA AAA NAAA AAA AAA AAA AA III T III LIB inout lib rn proc permcol matrix A int c1 int c2 USAGE permcol A c1 c2 A matrix c1 c2 positive integers RETURN matrix A being modified by permuting column ci and c2 NOTE space for important remarks also over more than one row EXAMPLE example permcol shows an example matrix B A B 1 nrows B c1 A 1 nrows A c2 B 1 nrows B c2 A 1 nrows A c1 return B example EXAMPLE echo 2 ring r 0 x 1p 16 matrix A 3 3 1 2 3 4 5 6 7 8 9 pmat A pmat permcol A 2 3 If a double slash in a line appears the rest of the line is interpreted as a comment and ignored The first section to be found between both the comment lines is the so called head of the library The first line contains the set word version through which the version number of the library is fixed General information to the library follows the set word info It should be noted that under the item PROCEDURES all procedure names con tained
40. n front of the cursor 10 CTRL K deletes all from the cursor to the end of the line CTRL U deletes all from the cursor to the beginning of the line l CTRL N supplies the next line from the history 1 CTRL P supplies the preceding line from the history RETURN sends the current line to the SINGULAR Parser 2 1 6 Types of data in Singular and rings SINGULAR operates with a whole range of diverse structures which are available as various data types If an object in SINGULAR is to be defined that is a variable entered it is necessary to allocate it to a data type right from the start Data types in SINGULAR depend on a meta structure the so called ring over which they exist with the exception of string int intvec und intmat To perform a calculation in SINGULAR it is first absolutely necessary to define the ring over which one is working ring r 0 x 1p The amount of polynomials in the variables x with coefficients in the rational numbers Q and lexicographical ordering ring r 0 a b x y z lp The amount of polynomials in the variables x y z where the coefficients are rational terms in the variables a and b Of course instead of a b resp x y z also any other variables can be shown Important is that the variables in the first brackets can appear in the denominator of fractions the ones in the second brackets may not ring r 32003 x 1 10 dp The amount of polynomials in the variables 1 19 with coefficients in the
41. nant of a k x k submatrix of A Mat n x m K 46 Now consider g1 gx Qlx the matrix J g1 gx Mat k x n Qlx and let M mi m is a n dim G minor of J g1 9x C Ole Our aim is to obtain if VpeVl g 9 Ji mi p 0 Therefore we define the ideal J M g gk C Q x and check if vn 0 gt 1 G h u cl where G is a Gr bner basis of I A possible realization for this in SINGULAR is the following procedure proc lagTest ideal G USAGE lagTest GC RETURN 1 if the Jacobian matrix of G has maximal rank on V G 1 if the Jacobian matrix of G does not have maximal rank on V G NOTE V G describes the variety zero set of the ideal G lt gl gk gt matrix jG jacob G ideal M minor jG nvars basering dim std G ideal I M G if reduce poly 1 std I 0 return 1 else return 1 y Since it is our aim to find all critical points of f Q z Qlx n under the additional condition g gk 0 we proceed as described in section 3 15 2 A possible realization in SINGULAR serves the following procedure proc critIdeal poly f ideal G USAGE critIdeal f G RETURN 1 if the Jacobian matrix of G does not have maximal rank on V G and else the ideal of all critical points p of f under the additional condition gil p gk p 0 47 if lagTest G 1 print Attention V G is no algebraic manifold
42. nrows A c1 return B The procedure permcol should exchange two columns of a matrix For this three arguments are necessary The first argument is given the name A and is of the type matrix the two following are c1 and c2 and are of type integer SINGULAR instructions follows and the result is stored in the variable B of type matrix which is then returned with return B This means in particular that the result of the procedure is of type matrix 2 1 6 A procedure can be called up by entering the procedure name followed by the arguments in round brackets E g LIB matrix lib LIB inout lib ring r 0 x 1p matrix A 3 3 1 2 3 4 5 6 7 8 9 pmat A 2 gt 1 2 3 4 5 6 7 8 9 matrix B permcol A 2 3 pmat B 2 gt 1 3 2 4 6 5 7 9 8 Variables which are defined within a procedure are only known there and can therefore have the same name as objects which are defined outside the procedure Here are two more trivial examples a Trace of a matrix Our aim is to write a procedure that computes the trace of a quadratic matrix M Mat n x n Z Therefore we have to consider first how such a matrix is declared intmat M 3 3 1 2 3 4 5 6 7 8 9 M gt 1 2 3 gt 4 5 6 gt 7 8 9 Note that intmat is independent of a given basering A possible procedure that returns the trace of a quadratic input matrix A Mat n x n Z is as follows 14 proc trma intm
43. of the menu buttons e leaf forward to the end of the menu buttons SPACE scroll forward one page DEL scroll back one page h call up the Info introduction CTRL H call up a short synopsis on the online help s search the handbook for a defined string 1 9 call up the i th subbutton of a menu 2 1 4 Interrupt Singular Under Unix like operating systems and under Windows NT it is possible via the key combination CTRL C to force an interruption in SINGULAR Does not work wit ESingular SINGULAR reacts with an output of the currently performed command and awaits further instructions Following options are available a SINGULAR carries out the current command and returns then to top level c SINGULAR carries on q the programme SINGULAR is terminated 2 1 5 Editting inputs If acommand has been miswritten or if an earlier command is needed again it is not absolutely necessary to renew the input Existing SINGULAR text can be edited For this SINGULAR records a history of all commands of a SINGULAR session Below is a selection of the available key combinations for text editing TAB automatic completion of function and file names z CTRL B moves the cursor to the left EE CTRL F moves the cursor to the right CTRL A moves the cursor to the beginning of the line CTRL E moves the cursor to the end of the line CTRL D deletes the letter under the cursor never use in an empty line BACKSPACE DEL CTRL H deletes the letter i
44. ompute l Lo g Klz glo ch Therefore the procedure quotient is implemented in SINGULAR 38 ring A 0 x y z dp ideal I1 x y ideal I2 y2 z quotient 11 12 the built in SINGULAR command gt _ 1 y _ 2 x ideal I3 xz yz ideal I4 x y quotient 13 14 gt _ 1 z 3 14 Matrix operations A matrix in SINGULAR is a matrix with polynomial entries hence they can be defined only when a basering is active This applies also to matrices with numbers as entries A matrix is filled with entries from left to right row by row spaces are allowed ring A 0 x y z dp matrix M 2 3 1 x y 22 2x3 matrix xy 0 xyz matrix N 3 3 1 2 3 4 5 6 7 8 9 3x3 matrix M lists all entries of M gt M 1 1 1 gt M 1 2 x y gt M 1 3 z2 gt M 2 1 x gt M 2 2 0 gt M 2 3 xyz print N displays N as usual gt 1 2 3 if the entries are small gt 4 5 6 gt 7 8 9 print M M addition of matrices gt 2 2x 2y 2z2 gt 2x 0 2xyz print x N gt x 2x 3x scalar multiplication gt 4x 5x 6x gt 7x 8x 9x print M N multiplication of matrices gt TzZ2 4x 4y 1 8Z22 5x by 2 9Z22 6x 6y 3 gt Txyztx 8xyzt2x 9xyzt 3x 39 ideal I minor M 2 ideal of all 2x2 minors sub determinants of M I gt 1 1 x2yz xy2z gt 1 2 xyz xz2 gt 1 3 x2 xy minor N 2 2x2 minors of N
45. ordered way gt 3x5 2x2y2z2 y4z3 5y2 4z4 leadmonom f leading monomial gt x5 leadexp f leading exponent gt 5 0 0 lead f leading term gt 3x5 leadcoef f leading coefficient gt 3 f lead f tail gt 2x2y2z2 y4z3 5y2 4z4 3 7 Normal form Note that NF f G may depend on the sorting of the elements of G The function reduce computes a normal form ring A 0 x y z dp a global ordering poly f x2yz xy2zt y2z z3 xy poly fi xyty2 1 poly f2 xy ideal G f1 f2 ideal S std G a standard basis of lt G gt S gt S 1 x gt S 2 y2 1 reduce f G G is no standardbasis gt y2z z3 NF w r t a non standard basis 35 G f2 f1 reduce f G G is no standardbasis gt y2z z3 y2 1 NF for a different numbering in G reduce f S 1 NFBuchberger gt z3 xy z reduce f S redNFBuchberger gt 23 z 3 8 Ideal membership 1 Check inclusion of a polynomial in an ideal ring A 0 x y dp ideal I x10 x9y2 y8 x2y7 ideal sI std I poly f x2y7 y14 reduce f sI 1 NFBuchberger 3rd parameter avoids tail reduction gt xy12 x2y7 is not in I NF f sI 1 gt xy12 x2y7 f is not in I f xy13 y12 reduce f sI 1 gt 0 f is in I 2 Check inclusion and equality of ideals ideal K f x2y7 y14 reduce K sI 1 normal form for each generator of K gt _ 1
46. rs are available from which only info and builtin are named here Users of Unix operating systems are probably familiar with the first the last shows the help text on the current SINGULAR page and has the advantage of functioning on all computer platforms and without additional programmes such as Netcape or Info Through the command system browsers one learns which browsers are known to SINGULAR and through system browser builtin the browser can be changed from Netscape to builtin in the same manner for other browsers In addition it is possible to define the browser when starting SINGULAR by starting the programme with the following command Singular browser builtin Whilst use of the Netscape help is self explanatory pointers are necessary if the user has never worked with Info Anyone not working with Info may go immediately to 2 1 4 To move around within Info the following commands should be used which are all just one letter Note that the RETURN or arrow keys should never be used Some commands read subsequently further input from the command line at the bottom of the monitor Here the TAB key can be used to complete a partially inputted command Some important Info commands q leave the online help n leaf on to the next menu button p leaf back to preceding menu button m choose a specified menu button by name f call up a cross reference 1 call up the last visited menu button b leaf back to the start
47. the SINGULAR project 2 Getting started SINGULAR is a special purpose system for polynomial computations Hence most of the powerful computations in SINGULAR require the prior definition of a ring Most important rings are polynomial rings over a field localizations thereof or quotient rings of such rings modulo an ideal However some simple computations with integers machine integers of limited size and manipulations of strings are available without a ring 2 1 First steps 2 1 1 Notations and basic concepts SINGULAR input and output as well as set words will be written in type writer face e g exit or help The whole SINGULAR manual GPS1 is available online by typing the command help or Explanation on single topics e g on intmat which defines a matrix of integers are obtained by help intmat This shows the text from node intmat in the printed manual A more detailed treatment of the command help will be done in section 2 1 3 The symbol gt starts SINGULAR output e g int i 5 i gt 5 Square brackets are access operators for strings integer vectors ideals matrices polynomials resolutions and lists e g intvec v 3 5 6 7 8 v 4 gt 7 Keys are also shown in typewriter face such as n press the key n RETURN press the enter key CTRL P press the control key and P simultaneously All objects have a type e g integer variables are defined by the word int An
48. uchmora renamed to SINGULAR Developed jointly by groups from Berlin Pfister and Kaiserslautern Greuel 1990 Ported to Unix First user manual 1993 Rewritten in C SINGULAR programming language Libraries Faster than Macaulay 1996 Multivariate polynomial factorization ged 1997 Release of SINGULAR version 1 0 multivariate polynomial factorization gcd syzygies resolutions communication links 1998 Release of SINGULAR version 1 2 faster primary decomposition norma lization 1999 Release of SINGULAR version 1 4 much faster numerical data types and algorithms monodromy moduli of space curves debugger 2001 Release of SINGULAR version 2 0 2002 Book A SINGULAR Introduction to Commutative Algebra by G M Greuel and G Pfister with contributions by O Bachmann C Lossen and H Sch nemann The book includes a CD containing a distribution of SIN GULAR version 2 0 3 2004 The Richard D Jenks Prize for Excellence in Software Engineering for Computer Algebra was awarded to the SINGULAR team 2005 SINGULAR 3 0 0 for Mac OS X is available in the unstable branch of fink 2005 SINGULAR is included in the Knoppix Math CD 2005 The SINGULAR web pages have been revised and equipped with a new css based design 2007 Release of SINGULAR version 3 0 3 available for most Unix platforms Windows and Mac OS X 2007 Release of SINGULAR version 3 0 4 available for most Unix platforms Windows and Mac OSX 1 4 A
49. win tools Cygwin and the XEmacs editor XEmacs Their copyrights and licenses can be found in the accompanying files which are distributed along with these packages Since version 3 0 3 of SINGULAR all parts have GPL or LGPL as one of their licences This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABIL ITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with this program if not write to the Free Software Foundation Inc 59 Temple Place Suite 330 Boston MA 02111 1307 USA see GPL Please send any comments or bug reports to singular mathematik uni kl de If you want to be informed of new releases please register yourself as a SINGULAR user by using the registration form on the SINGULAR home page http www singular uni kl de If for some reason you cannot access the registration form you can also register by sending an email to singular mathematik uni kl de with subject line register and body con taining the following data your name email address organisation country and platform s For the citation of SINGULAR see http www singular uni kl de how_to_cite html for information on how to cite SINGULAR You can also support SINGULAR by informing us about your result obtained by using SINGULAR 1 1 Overview of
Download Pdf Manuals
Related Search
Related Contents
WSD 130 Panasonic Toughpad FZ-M1 128GB 4G Black, Grey Entretien : les 7 attitudes qui énervent les recruteur Powered by R EVOC20 User Guide Home Decorators Collection 0158900270 Instructions / Assembly UNECOM manual hotstop.cdr V4i user installation service manual 20150929 KoiAir™ - Garden Ponds Copyright © All rights reserved.
Failed to retrieve file