source: git/doc/usercard.tex @ 660fdd

spielwiese
Last change on this file since 660fdd was 9056a1, checked in by Jens Schmidt <schmidt@…>, 26 years ago
Initial revision git-svn-id: file:///usr/local/Singular/svn/trunk@1701 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 13.5 KB
Line 
1% $Id: usercard.tex,v 1.1 1998-05-12 07:24:29 schmidt Exp $
2
3%
4% usercard.tex - Singular user quick reference card.
5%
6
7\input singcard.tex
8
9\centerline{\hbf SINGULAR Quick Reference}
10
11\centerline{\srm {\ssc Singular} Version 1.2.0}
12
13\bigskip
14
15Do not forget to terminate all commands with a {\tt ;} (semicolon)!
16
17Especially if \Singular\ prints the continuation prompt {\tt .}
18(dot) instead of the regular command prompt {\tt >}, then it
19waits for a command to be terminated by a {\tt ;}.  If that does
20not help, try one or more {\tt "} or {\tt \char`}} to close an
21opened string or procedure.
22
23Comments start with {\tt //} and extend to the end of the line.
24
25\sec Starting SINGULAR(2.5cm)
26Singular&                       start \Singular\cr
27Singular {\it files} $\ldots$&  read {\it files\/} and prompt for further commands\cr
28Singular --help&                print short help on command line options and
29                                exit\cr
30\endsec
31
32\sec Stopping SINGULAR()
33quit;&                          exit \Singular; also {\tt exit;} or {\tt \$}\cr
34\ctl c&                         interrupt \Singular\ (on $*$ix systems only)\cr
35\endsec
36
37\sec Getting help()
38help;&                          enter online help system\cr
39help {\it topic\/};&            describe {\it topic\/}; also {\tt? {\it topic\/};}\cr
40\subsec{Inside the online help system:}
41&                               (on $*$ix systems only)\cr
42\ctl h&                         get help on help system\cr
43q&                              exit from help system\cr
44n\rmslash p\rmslash u&          go to next/previous/upper node\cr
45m&                              pick menu item by name\cr
46l&                              go to last visited node/exit from help on help\cr
47SPC\rmslash DEL&                scroll forward/backward one page\cr
48\endsec
49
50\sec Commandline editing()
51\sectext
52You may edit the commandline and retrieve previous commands in a
53way common to most modern shells (on $*$ix systems only):\cr
54BS\rmslash\ctl d&               remove character on the left/right of the
55                                cursor\cr
56\ctl p\rmslash\ctl n&           get previous/next line from history\cr
57\ctl b\rmslash\ctl f&           move cursor left/right\cr
58\ctl a\rmslash\ctl e&           go to beginning/end of line\cr
59\ctl u\rmslash\ctl k&           delete to beginning/end of line\cr
60\endsec
61
62\sec Names and objects()
63\sectext
64\parskip=\verysmallskipamount
65All names(=identifiers) have to be declared.  A declaration has the syntax
66
67{\tt\quad {\it type\/} {\it name\/} \opt{= {\it expression\/}};}
68
69Names of type {\tt number}, {\tt poly}, {\tt ideal}, {\tt vector}, {\tt
70module}, {\tt matrix}, {\tt map}, and {\tt resolution} may be declared
71only inside a ring.  They are local to that ring.  The same holds for a {\tt
72list} if it contains an object of the above types.  All other types may be
73declared at any moment.  They are visible globally.
74
75Names may consist of alphanumeric characters including {\tt \_} (underscore) and
76have to start with a letter.  Names may be followed by an integer expression in
77parentheses, resulting in so-called {\it indexed names}.
78
79The expression {\tt {\it name\/}({\it n}..{\it m\/})} is a shortcut for {\tt
80{\it name\/}({\it n\/}), $\ldots$, {\it name\/}({\it m\/})} which is especially
81useful for declaring ring variables (\eg {\tt ring r = 0, x(1..3), dp;}).\cr
82\endsec
83
84\vfill
85\centerline{\srm \copyright 1998 \qquad Permissions on back}
86
87\eject
88
89\sec Ring declaration()
90\longentry ring {\it name\/} = {\it basefield}, ({\it ringvars}), {\it ordering\/};&
91                                \hyphenpenalty=50 \tolerance=200 declare the
92                                ring {\it name\/} and make it the current
93                                base\-ring.  {\it ringvars\/} has to be a list
94                                of names or indexed names, the other items are
95                                described below.  An example:\par {\tt ring r =
96                                32003, (x, y, z), dp;}\cr
97\longentry qring {\it name\/} = {\it ideal\/};&
98                                declare the quotient ring {\it name\/} of the
99                                current basering with respect to ideal {\it
100                                ideal\/}.  Make {\it name\/} the new
101                                basering.\cr
102\subsec{Available {\bit basefields\/}:}
1030&                              the field of rational numbers\cr
104\it p&                          the finite field $Z_p$ with {\it p\/}
105                                elements,\par
106                                $2 \le p \le 32003$ a prime\cr
107({\it p\/}\^{}{\it n}, {\it gen\/})&
108                                the finite field with $p^n$ elements, {\it p\/}
109                                a prime and\par
110                                $4 \le p^n \le 32671$. The name {\it gen\/}
111                                refers to some generator of the group of
112                                unities.\cr
113({\it p}, {\it alpha\/})&       algebraic extension of $Q$ or $Z_p$ ($p =
114                                0$ or as above) by {\it alpha}.  You have to
115                                specify the minpoly $\mu_{\hbox{\tit alpha}}$
116                                for {\it alpha\/} immediately after the ring
117                                declaration with an assignment to {\tt minpoly}
118                                (\eg {\tt minpoly=a\^{}2+1;}).  {\it alpha\/}
119                                has to be a valid name.\cr
120({\it p}, $t_1$, $\ldots$)&     transcendental extension of $Q$ or $Z_p$
121                                ($p = 0$ or as above) by~$t_i$.  As $t_i$ you
122                                may use either names or indexed names.\cr
123real&                           the real numbers represented by floating point
124                                numbers\cr
125\endsec
126
127\sec Term orderings()
128\sectext
129An {\it ordering\/} as referred to in the ring declaration may be either
130a global, local, or matrix ordering or a list of these resulting in a
131pro\-duct ordering.  The list may include extra weight vectors and may be
132preceded or followed by a module order specification.\cr
133\subsec{Global orderings}
134lp&                             lexicographical ordering\cr
135dp&                             degree reverse lexicographical ordering\cr
136Dp&                             degree lexicographical ordering\cr
137wp($w_1$, $\ldots$)&            weighted reverse lexicographical ordering\cr
138Wp($w_1$, $\ldots$)&            weighted lexicographical ordering\cr
139&                               The $w_i$ have to be positive integers.\cr
140\subsec{Local orderings}
141ls&                             negative lexicographical ordering\cr
142ds&                             negative degree reverse lexicographical ordering\cr
143Ds&                             negative degree lexicographical ordering\cr
144ws($w_1$, $\ldots$)&            general weighted reverse lexicographical ordering\cr
145Ws($w_1$, $\ldots$)&            general weighted lexicographical ordering\cr
146&                               $w_1$ has to be a nonzero integer, every other
147                                $w_i$ may be any integer\cr
148\subsec{Matrix orderings}
149\longentry M($M_{11}$, $M_{12}$, $\ldots$, $M_{nn}$)&
150                                {\it M\/} has to be an invertible matrix with
151                                integer coeffi\-cients.  Coefficients have to be
152                                specified row-wise.\cr
153\subsec{Product orderings}
154\longentry($o_1$\opt{($k_1$)}, $o_2$\opt{($k_2$)}, $\ldots$, $o_n$\opt{($k_n$)})&
155                                the orderings {\tt lp}, {\tt dp}, {\tt Dp}, {\tt
156                                ls}, {\tt ds}, {\tt Ds} may be followed by an
157                                integer expression $k_i$ in parentheses which
158                                specifies the number of variables $o_i$ refers
159                                to (\eg {\tt (lp(3), dp(2))}).\cr
160\subsec{Module orderings}
161({\it c}, $o_1$, $\ldots$)&     sort by components first\cr
162($o_1$, $\ldots$, {\it c\/})&   sort by variables first\cr
163&                               $o_i$ may be any of the above orderings or an
164                                extra weight vector, {\it c\/} may be one of
165                                {\tt C} or {\tt c}:\cr
166C&                              sort generators in ascending order (\ie {\tt
167                                gen({\it i\/})} $<$ {\tt gen({\it j\/})} iff $i <
168                                j$)\cr
169c&                              sort generators in descending order\cr
170\subsec{Extra weight vector}
171a($w_1$, $\ldots$)&             any of the above degree orderings may be
172                                preceded by an extra weight vector\cr
173\endsec
174
175\begingroup
176\def\interentryskip{\noalign{\verysmallskip}}%
177\sec Data types(1.5cm)
178\sectext
179First, examples of ring-independent types:\cr
180\interentryskip
181\longitem
182int i1 = 101; int i2 = 13 div 3;\cr
183\interentryskip
184\longitem
185intvec iv = 13 div 3, -4, i1;\cr
186\interentryskip
187\longentry
188intmat im[2][2] = 13 div 3, -4, i1;&
189                                a $2\times 2$ matrix.  Entries are filled
190                                row-wise, missing entries are set to zero, extra
191                                entries are ignored.  vector/matrix elements are
192                                accessed using the {\tt[$\ldots$]} operator,
193                                where the first index is one (\eg {\tt iv[3];
194                                im[1, 2];}).\cr
195\interentryskip
196\longitem
197string s1 = "a quote \char"5C " and a backslash \char"5C \char"5C";\par
198string s2 = "con" + "catenation";\cr
199\interentryskip
200\sectext
201The basering in the following is {\tt ring r = 0, (x, y, z, mu, nu), dp;}\cr
202\interentryskip
203\longitem
204number n = 5/3;\cr
205\interentryskip
206\longentry
207poly p(1) = 2xy2+3/4x3yz4;\par
208poly p(2) = (5/3)*mu\^{}2*nu\^{}3+n*yz2;&
209                                {\tt p(1)} equals $3/4x^3yz^4+2xy^2$.  The
210                                short format of monomials is valid for
211                                one-character ring variables only.\cr
212\interentryskip
213\longentry
214ideal i = p(1..2), x+y;&        note the use of indexed names\cr
215\interentryskip
216\longentry
217vector v = [p(1), p(2), x+y];\par
218vector w = 2*p(1)*gen(6)+n*nu*gen(1);&
219                                vectors may be written in brackets ({\tt
220                                [$\ldots$]}) or expressed as linear
221                                combinations of the canonical generators {\tt
222                                gen({\it i\/})}\cr
223\interentryskip
224\longitem
225module mo = v, w, x+y*gen(1);\cr
226\interentryskip
227\longitem
228resolution r = sres(std(mo), 0);\cr
229\interentryskip
230\longentry
231matrix ma[2][2] = 5/3, p(1), 101;&
232                                the rules for declaring, filling, and accessing
233                                of integer matricies apply to the types {\tt
234                                matrix} and {\tt vector}, too\cr
235\interentryskip
236\longentry
237list l = iv, v, p(1..2), mo;&
238                                lists may collect objects of any type.  They are
239                                ring-dependent iff one of the entries is.\cr
240\endsec
241\endgroup
242
243\sec Monitoring and debugging tools()
244timer = 1;&                     print time used for commands to execute\cr
245\longentry int t = timer; {\it commandsequence}; timer-t;&
246                                print time in seconds used for {\it commandsequence}
247                                to execute\cr
248memory(1);&                     print number of bytes allocated from system\cr
249option(prot);&                  show algorithm protocol\cr
250option(mem);&                   show algorithm memory usage\cr
251\noalign{\medskip}
252TRACE = 1;&                     print protocol on execution of procedures\cr
253listvar(all);&                  list all (user-)defined names\cr
254\longentry listvar({\it ringname});&
255                                list all names belonging to {\it ringname}\cr
256\endsec
257
258\eject
259
260\sec Options()
261option();&                      show current option settings\cr
262\longentry option($option_1$, no$option_2$, $\ldots$);&
263                                switch $option_1$ on and $option_2$ off, resp.\cr
264option(none);&                  reset all options to default values\cr
265\sectext
266The most important options:\cr
267\subsec{Monitoring}
268debugLib&                       show loading of procedures from libraries\cr
269mem&                            show algorithm memory usage\cr
270prot&                           show algorithm protocol\cr
271\subsec{Standard bases}
272fastHC&                         try to find highest corner as fast as possible\cr
273intStrategy&                    avoid divisions\cr
274morePairs&                      create additional pairs\cr
275notSugar&                       disable sugar strategy\cr
276redSB&                          compute reduced standard bases\cr
277redTail&                        reduce tails\cr
278sugarCrit&                      use sugar criteria\cr
279weightM&                        automatically compute weights\cr
280\subsec{Resolutions}
281minRes&                         do additional minimizing\cr
282notRegularity&                  disable regularity bound\cr
283\subsec{Miscellany}
284returnSB&                       let some functions return standard bases\cr
285\endsec
286
287\sec System variables()
288\sectext
289The most important system variables:\cr
290\subsec{Standard bases}
291degBound&                       stop if (weighted) total degree exceeds {\tt
292                                degBound}\cr
293multBound&                      stop if multiplicity gets smaller than {\tt
294                                multBound}\cr
295noether&                        cut off all monomials above the monomial {\tt
296                                noether}\cr
297\subsec{Miscellany}
298minPoly&                        use {\tt minPoly} as minimal polynomial for
299                                algebraic extensions\cr
300short&                          print monomials in a long format if non-zero\cr
301timer&                          on assignment of a non-zero value show time
302                                used for execution of executed commands.  On
303                                evaluation, return system time in seconds used
304                                by \Singular\ since start\cr
305TRACE&                          print information on procedures being executed
306                                if {\tt TRACE} is larger than one\cr
307\endsec
308
309\sec Mapping(1.5cm)
310\longentry map {\it name\/} = {\it ringname}, {\it idealexpression};&
311                                declare a map {\it name\/} from {\it ringname}
312                                to current basering.  The $i$'th ring variable
313                                from {\it ringname} is mapped to the $i$'th
314                                generator from {\it idealexpression}.\cr
315\longentry {\it mapname\/}({\it expression\/})&
316                                apply map {\it mapname\/} to {\it expression}\cr
317\noalign{\smallskip}
318\sectext
319Coefficients between rings with different basefields are mapped in the following
320way (non-canonical maps only):\par
321$Z_p \rightarrow Q: [i]_p \mapsto i \in [-p/2,p/2] \subset Z$\par
322$Z_p \rightarrow Z_q: [i]_p \mapsto i \in [-p/2,p/2] \subset Z \mapsto [i]_q \in
323Z_q$\cr
324\noalign{\smallskip}
325\longentry subst({\it expression}, {\it ringvar}, {\it monomial\/})&
326                                substitute {\it ringvar\/} by {\it monomial\/}
327                                in {\it expression}\cr
328\longentry imap({\it ringname}, {\it name\/})&
329                                map object {\it name\/} from subring {\it
330                                ringname\/} to current basering\cr
331\longentry fetch({\it ringname}, {\it name\/})&
332                                map object {\it name\/} from ring {\it
333                                ringname\/} to current basering.  The rings
334                                have to be ``allmost'' identical.\cr
335\endsec
336
337\sec Liebe SINGULAR-Entwickler und Benutzer!()
338\sectext
339\font\ninerm=cmr9
340\ninerm\baselineskip=11pt
341\parindent=1em
342Das ist der Entwurf einer Quick-Reference-Card f\"ur SINGULAR.  Nachdem der
343`kanonische' Teil gesetzt ist, gebe ich die Arbeit weiter an Euch.  Genauer:
344
345\medskip
346\item{$\bullet$} K\"onntet Ihr bitte den bereits vorhandenen Text korrektur\-lesen,
347  insbesondere auch auf typografische Fehler achtend.
348
349\item{$\bullet$} Eure \"Anderungsw\"unsche und Kritik dazu h\"atte ich gerne.
350  Allerdings ist die erste Seite bereits voll.  Wenn Ihr also irgendwo eine
351  Zeile mehr haben wollt, m\"u\ss t Ihr auch dazusagen, wo eine andere
352  rausgenommen werden soll.
353
354\hang Die Karte ist keine Kurzeinf\"uhrung in SINGULAR, sondern soll als
355  Ged\"achtnisst\"utze dienen.  Dies bitte bei Kritik der Art ``zu ungenau!''
356  oder ``besser!'' beachten.  Davon abgesehen bitte ich um konstruktive Kritik.
357
358\item{$\bullet$} Es fehlen noch Abschnitte zu Input/Output und zu den
359  meistgebrauchten mathematischen Funktionen.  F\"ur den Input/Output-Teil bitte
360  das aufschreiben, was ihr f\"ur erw\"ahnenswert haltet bzw. h\"aufig braucht.
361  Und f\"ur die mathematischen Funktionen bitte ich regelrecht um eine
362  ``Top-Twenty'' der von Euch am h\"aufigsten gebrauchten SINGULAR-Kernel
363  Funktionen.  Oder auch Library-Funktionen?
364
365\hang Irgendwann soll es noch eine ``Programmer's Quick Reference Card''
366  geben (hoffentlich nicht von mir).  Dementsprechend also eher Funktionen
367  ber\"ucksichtigen, die f\"ur den interaktiven Gebrauch wichtig sind.
368\cr
369\endsec
370
371\bye
Note: See TracBrowser for help on using the repository browser.