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 | |
---|
15 | Do not forget to terminate all commands with a {\tt ;} (semicolon)! |
---|
16 | |
---|
17 | Especially if \Singular\ prints the continuation prompt {\tt .} |
---|
18 | (dot) instead of the regular command prompt {\tt >}, then it |
---|
19 | waits for a command to be terminated by a {\tt ;}. If that does |
---|
20 | not help, try one or more {\tt "} or {\tt \char`}} to close an |
---|
21 | opened string or procedure. |
---|
22 | |
---|
23 | Comments start with {\tt //} and extend to the end of the line. |
---|
24 | |
---|
25 | \sec Starting SINGULAR(2.5cm) |
---|
26 | Singular& start \Singular\cr |
---|
27 | Singular {\it files} $\ldots$& read {\it files\/} and prompt for further commands\cr |
---|
28 | Singular --help& print short help on command line options and |
---|
29 | exit\cr |
---|
30 | \endsec |
---|
31 | |
---|
32 | \sec Stopping SINGULAR() |
---|
33 | quit;& 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() |
---|
38 | help;& enter online help system\cr |
---|
39 | help {\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 |
---|
43 | q& exit from help system\cr |
---|
44 | n\rmslash p\rmslash u& go to next/previous/upper node\cr |
---|
45 | m& pick menu item by name\cr |
---|
46 | l& go to last visited node/exit from help on help\cr |
---|
47 | SPC\rmslash DEL& scroll forward/backward one page\cr |
---|
48 | \endsec |
---|
49 | |
---|
50 | \sec Commandline editing() |
---|
51 | \sectext |
---|
52 | You may edit the commandline and retrieve previous commands in a |
---|
53 | way common to most modern shells (on $*$ix systems only):\cr |
---|
54 | BS\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 |
---|
65 | All names(=identifiers) have to be declared. A declaration has the syntax |
---|
66 | |
---|
67 | {\tt\quad {\it type\/} {\it name\/} \opt{= {\it expression\/}};} |
---|
68 | |
---|
69 | Names of type {\tt number}, {\tt poly}, {\tt ideal}, {\tt vector}, {\tt |
---|
70 | module}, {\tt matrix}, {\tt map}, and {\tt resolution} may be declared |
---|
71 | only inside a ring. They are local to that ring. The same holds for a {\tt |
---|
72 | list} if it contains an object of the above types. All other types may be |
---|
73 | declared at any moment. They are visible globally. |
---|
74 | |
---|
75 | Names may consist of alphanumeric characters including {\tt \_} (underscore) and |
---|
76 | have to start with a letter. Names may be followed by an integer expression in |
---|
77 | parentheses, resulting in so-called {\it indexed names}. |
---|
78 | |
---|
79 | The 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 |
---|
81 | useful 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\/}:} |
---|
103 | 0& 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 |
---|
123 | real& the real numbers represented by floating point |
---|
124 | numbers\cr |
---|
125 | \endsec |
---|
126 | |
---|
127 | \sec Term orderings() |
---|
128 | \sectext |
---|
129 | An {\it ordering\/} as referred to in the ring declaration may be either |
---|
130 | a global, local, or matrix ordering or a list of these resulting in a |
---|
131 | pro\-duct ordering. The list may include extra weight vectors and may be |
---|
132 | preceded or followed by a module order specification.\cr |
---|
133 | \subsec{Global orderings} |
---|
134 | lp& lexicographical ordering\cr |
---|
135 | dp& degree reverse lexicographical ordering\cr |
---|
136 | Dp& degree lexicographical ordering\cr |
---|
137 | wp($w_1$, $\ldots$)& weighted reverse lexicographical ordering\cr |
---|
138 | Wp($w_1$, $\ldots$)& weighted lexicographical ordering\cr |
---|
139 | & The $w_i$ have to be positive integers.\cr |
---|
140 | \subsec{Local orderings} |
---|
141 | ls& negative lexicographical ordering\cr |
---|
142 | ds& negative degree reverse lexicographical ordering\cr |
---|
143 | Ds& negative degree lexicographical ordering\cr |
---|
144 | ws($w_1$, $\ldots$)& general weighted reverse lexicographical ordering\cr |
---|
145 | Ws($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 |
---|
166 | C& sort generators in ascending order (\ie {\tt |
---|
167 | gen({\it i\/})} $<$ {\tt gen({\it j\/})} iff $i < |
---|
168 | j$)\cr |
---|
169 | c& sort generators in descending order\cr |
---|
170 | \subsec{Extra weight vector} |
---|
171 | a($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 |
---|
179 | First, examples of ring-independent types:\cr |
---|
180 | \interentryskip |
---|
181 | \longitem |
---|
182 | int i1 = 101; int i2 = 13 div 3;\cr |
---|
183 | \interentryskip |
---|
184 | \longitem |
---|
185 | intvec iv = 13 div 3, -4, i1;\cr |
---|
186 | \interentryskip |
---|
187 | \longentry |
---|
188 | intmat 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 |
---|
197 | string s1 = "a quote \char"5C " and a backslash \char"5C \char"5C";\par |
---|
198 | string s2 = "con" + "catenation";\cr |
---|
199 | \interentryskip |
---|
200 | \sectext |
---|
201 | The basering in the following is {\tt ring r = 0, (x, y, z, mu, nu), dp;}\cr |
---|
202 | \interentryskip |
---|
203 | \longitem |
---|
204 | number n = 5/3;\cr |
---|
205 | \interentryskip |
---|
206 | \longentry |
---|
207 | poly p(1) = 2xy2+3/4x3yz4;\par |
---|
208 | poly 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 |
---|
214 | ideal i = p(1..2), x+y;& note the use of indexed names\cr |
---|
215 | \interentryskip |
---|
216 | \longentry |
---|
217 | vector v = [p(1), p(2), x+y];\par |
---|
218 | vector 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 |
---|
225 | module mo = v, w, x+y*gen(1);\cr |
---|
226 | \interentryskip |
---|
227 | \longitem |
---|
228 | resolution r = sres(std(mo), 0);\cr |
---|
229 | \interentryskip |
---|
230 | \longentry |
---|
231 | matrix 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 |
---|
237 | list 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() |
---|
244 | timer = 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 |
---|
248 | memory(1);& print number of bytes allocated from system\cr |
---|
249 | option(prot);& show algorithm protocol\cr |
---|
250 | option(mem);& show algorithm memory usage\cr |
---|
251 | \noalign{\medskip} |
---|
252 | TRACE = 1;& print protocol on execution of procedures\cr |
---|
253 | listvar(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() |
---|
261 | option();& 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 |
---|
264 | option(none);& reset all options to default values\cr |
---|
265 | \sectext |
---|
266 | The most important options:\cr |
---|
267 | \subsec{Monitoring} |
---|
268 | debugLib& show loading of procedures from libraries\cr |
---|
269 | mem& show algorithm memory usage\cr |
---|
270 | prot& show algorithm protocol\cr |
---|
271 | \subsec{Standard bases} |
---|
272 | fastHC& try to find highest corner as fast as possible\cr |
---|
273 | intStrategy& avoid divisions\cr |
---|
274 | morePairs& create additional pairs\cr |
---|
275 | notSugar& disable sugar strategy\cr |
---|
276 | redSB& compute reduced standard bases\cr |
---|
277 | redTail& reduce tails\cr |
---|
278 | sugarCrit& use sugar criteria\cr |
---|
279 | weightM& automatically compute weights\cr |
---|
280 | \subsec{Resolutions} |
---|
281 | minRes& do additional minimizing\cr |
---|
282 | notRegularity& disable regularity bound\cr |
---|
283 | \subsec{Miscellany} |
---|
284 | returnSB& let some functions return standard bases\cr |
---|
285 | \endsec |
---|
286 | |
---|
287 | \sec System variables() |
---|
288 | \sectext |
---|
289 | The most important system variables:\cr |
---|
290 | \subsec{Standard bases} |
---|
291 | degBound& stop if (weighted) total degree exceeds {\tt |
---|
292 | degBound}\cr |
---|
293 | multBound& stop if multiplicity gets smaller than {\tt |
---|
294 | multBound}\cr |
---|
295 | noether& cut off all monomials above the monomial {\tt |
---|
296 | noether}\cr |
---|
297 | \subsec{Miscellany} |
---|
298 | minPoly& use {\tt minPoly} as minimal polynomial for |
---|
299 | algebraic extensions\cr |
---|
300 | short& print monomials in a long format if non-zero\cr |
---|
301 | timer& 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 |
---|
305 | TRACE& 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 |
---|
319 | Coefficients between rings with different basefields are mapped in the following |
---|
320 | way (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 |
---|
323 | Z_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 |
---|
342 | Das 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 |
---|