Changeset d9267f in git
- Timestamp:
- May 25, 1998, 11:49:02 AM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 6c5ef10e8419b7cedda7131b1c547f4f62b17160
- Parents:
- 129d726e0c0f622bd255af26eeeff8dc4850a25a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/usercard.tex
r129d72 rd9267f 1 % $Id: usercard.tex,v 1. 1 1998-05-12 07:24:29schmidt Exp $1 % $Id: usercard.tex,v 1.2 1998-05-25 09:49:02 schmidt Exp $ 2 2 3 3 % … … 15 15 Do not forget to terminate all commands with a {\tt ;} (semicolon)! 16 16 17 Especiallyif \Singular\ prints the continuation prompt {\tt .}17 In particular if \Singular\ prints the continuation prompt {\tt .} 18 18 (dot) instead of the regular command prompt {\tt >}, then it 19 19 waits for a command to be terminated by a {\tt ;}. If that does 20 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. 21 opened string or block. 22 23 Comments start with {\tt //} and extend to end of line. 24 25 \smallskip 26 Some of the topics concerning interactive use are system dependent. 24 27 25 28 \sec Starting SINGULAR(2.5cm) 26 29 Singular& start \Singular\cr 27 30 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 31 Singular --help& print help on command line options and exit\cr 30 32 \endsec 31 33 32 34 \sec Stopping SINGULAR() 33 35 quit;& exit \Singular; also {\tt exit;} or {\tt \$}\cr 34 \ctl c& interrupt \Singular\ (on $*$ix systems only)\cr36 \ctl c& interrupt \Singular\cr 35 37 \endsec 36 38 … … 39 41 help {\it topic\/};& describe {\it topic\/}; also {\tt? {\it topic\/};}\cr 40 42 \subsec{Inside the online help system:} 41 & (on $*$ix systems only)\cr42 43 \ctl h& get help on help system\cr 43 44 q& exit from help system\cr … … 50 51 \sec Commandline editing() 51 52 \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 53 Commandline editing is similar to that of, e.g., {\tt bash} or {\tt tcsh}:\cr 54 BS\rmslash\ctl d& remove character on the left/right of cursor\cr 56 55 \ctl p\rmslash\ctl n& get previous/next line from history\cr 57 56 \ctl b\rmslash\ctl f& move cursor left/right\cr … … 71 70 only inside a ring. They are local to that ring. The same holds for a {\tt 72 71 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 72 declared at any time. They are globally visible. 73 74 Names may consist of alphanumeric characters including {\tt \_} 75 (underscore) and have to start with a letter. Capital and small letters 76 are distinguished. Names may be followed by an integer expression in 77 77 parentheses, resulting in so-called {\it indexed names}. 78 78 79 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 80 {\it name\/}({\it n\/}), $\ldots$, {\it name\/}({\it m\/})} which in particular 81 is useful for declaring ring variables (\eg {\tt ring r = 0, x(1..3), dp;}). 82 83 The special name {\tt \_} (underscore) may be used to refer to the value of the 84 last expression printed. 85 \cr 82 86 \endsec 83 87 … … 89 93 \sec Ring declaration() 90 94 \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 95 \hyphenpenalty=50 \tolerance=200 declare ring 96 {\it name\/} and make it the current base\-ring. 97 {\it ringvars\/} has to be a list of names, the 98 other items are described below. Example:\par 99 {\tt ring r = 32003, (x, y, z), dp;}\cr 97 100 \longentry qring {\it name\/} = {\it ideal\/};& 98 declare thequotient ring {\it name\/} of the99 current base ring with respect to ideal{\it100 ideal\/}. Make {\it name\/} the new101 base ring.\cr101 declare quotient ring {\it name\/} of the 102 current base\-ring with respect to {\it 103 ideal\/}. {\it ideal\/} has to be a standard 104 bases. Make {\it name\/} the new basering.\cr 102 105 \subsec{Available {\bit basefields\/}:} 103 0& the field ofrational numbers\cr106 0& the rational numbers\cr 104 107 \it p& the finite field $Z_p$ with {\it p\/} 105 108 elements,\par … … 107 110 ({\it p\/}\^{}{\it n}, {\it gen\/})& 108 111 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 112 a prime and\par $4 \le p^n \le 32671$. The name 113 {\it gen\/} refers to some generator of the 114 cyclic group of unities.\cr 113 115 ({\it p}, {\it alpha\/})& algebraic extension of $Q$ or $Z_p$ ($p = 114 0$ or as above) by {\it alpha}. You have to115 specify the minpoly $\mu_{\hbox{\tit alpha}}$116 for {\it alpha\/} immediately after the ring117 declaration with an assignment to {\tt minpoly}118 (\eg {\tt minpoly=a\^{}2+1;}). {\it alpha\/}119 has to be a validname.\cr116 0$ or as above) by {\it alpha}. The minpoly 117 $\mu_{\hbox{\tit alpha}}$ for {\it alpha\/} has 118 to be specified with an assignment to {\tt 119 minpoly} (\eg {\tt minpoly=a\^{}2+1;}, for 120 $\hbox{\it alpha}=\hbox{\tt a}$). {\it 121 alpha\/} has to be a name.\cr 120 122 ({\it p}, $t_1$, $\ldots$)& transcendental extension of $Q$ or $Z_p$ 121 ($p = 0$ or as above) by~$t_i$. As $t_i$ you122 may use either names or indexednames.\cr123 ($p = 0$ or as above) by~$t_i$. The $t_i$ have 124 to be names.\cr 123 125 real& the real numbers represented by floating point 124 126 numbers\cr … … 127 129 \sec Term orderings() 128 130 \sectext 129 An {\it ordering\/} as referred to in the ring declaration may be either131 An {\it ordering\/} as referred to in the ring declaration may either be 130 132 a global, local, or matrix ordering or a list of these resulting in a 131 133 pro\-duct ordering. The list may include extra weight vectors and may be 132 preceded or followed by a module order specification.\cr134 preceded or followed by a module ordering specification.\cr 133 135 \subsec{Global orderings} 134 136 lp& lexicographical ordering\cr … … 147 149 $w_i$ may be any integer\cr 148 150 \subsec{Matrix orderings} 149 \longentry M($ M_{11}$, $M_{12}$, $\ldots$, $M_{nn}$)&150 {\it M\/} has to be an invertible matrix with151 \longentry M($m_{11}$, $m_{12}$, $\ldots$, $m_{nn}$)& 152 {\it m\/} has to be an invertible matrix with 151 153 integer coeffi\-cients. Coefficients have to be 152 154 specified row-wise.\cr 153 155 \subsec{Product orderings} 154 156 \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 157 the $o_i$ have to be any of the above orderings. 158 {\tt lp}, {\tt dp}, {\tt Dp}, {\tt ls}, {\tt 159 ds}, {\tt Ds} may be followed by an integer 160 expression $k_i$ in parentheses specifying the 161 number of variables $o_i$ refers to (\eg {\tt 162 (lp(3), dp(2))}).\cr 163 \subsec{Extra weight vector} 164 a($w_1$, $\ldots$)& any of the above degree orderings may be 165 preceded by an extra weight vector\cr 166 \noalign{\eject} 160 167 \subsec{Module orderings} 161 168 ({\it c}, $o_1$, $\ldots$)& sort by components first\cr … … 168 175 j$)\cr 169 176 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 \endsec 178 177 179 \sec Data types(1.5cm) 178 180 \sectext 179 First, examples of ring-independent types:\cr180 \ interentryskip181 Examples of ring-independent types:\cr 182 \entryskip 181 183 \longitem 182 184 int i1 = 101; int i2 = 13 div 3;\cr 183 \ interentryskip185 \entryskip 184 186 \longitem 185 187 intvec iv = 13 div 3, -4, i1;\cr 186 \ interentryskip188 \entryskip 187 189 \longentry 188 190 intmat im[2][2] = 13 div 3, -4, i1;& … … 191 193 entries are ignored. vector/matrix elements are 192 194 accessed using the {\tt[$\ldots$]} operator, 193 where the first index is one (\eg {\tt iv[3];194 i m[1, 2];}).\cr195 \ interentryskip195 where the first element has index one (\eg {\tt 196 iv[3]; im[1, 2];}).\cr 197 \entryskip 196 198 \longitem 197 199 string s1 = "a quote \char"5C " and a backslash \char"5C \char"5C";\par 198 200 string s2 = "con" + "catenation";\cr 199 \ interentryskip200 \sectext 201 The basering in the following is {\tt ring r = 0, (x, y, z, mu, nu), dp;}\cr202 \ interentryskip201 \entryskip 202 \sectext 203 Basering in the following is {\tt ring r = 0, (x, y, z, mu, nu), dp;}\cr 204 \entryskip 203 205 \longitem 204 206 number n = 5/3;\cr 205 \ interentryskip207 \entryskip 206 208 \longentry 207 209 poly p(1) = 2xy2+3/4x3yz4;\par 208 210 poly p(2) = (5/3)*mu\^{}2*nu\^{}3+n*yz2;& 209 {\tt p(1)} equals $3/4x^3yz^4+2xy^2$. The210 short format of monomials is valid for211 one-characterring variables only.\cr212 \ interentryskip211 {\tt p(1)} equals $3/4x^3yz^4+2xy^2$. Short 212 format of mono\-mials is valid for one-character 213 ring variables only.\cr 214 \entryskip 213 215 \longentry 214 216 ideal i = p(1..2), x+y;& note the use of indexed names\cr 215 \ interentryskip217 \entryskip 216 218 \longentry 217 219 vector v = [p(1), p(2), x+y];\par … … 221 223 combinations of the canonical generators {\tt 222 224 gen({\it i\/})}\cr 223 \ interentryskip225 \entryskip 224 226 \longitem 225 227 module mo = v, w, x+y*gen(1);\cr 226 \ interentryskip228 \entryskip 227 229 \longitem 228 230 resolution r = sres(std(mo), 0);\cr 229 \ interentryskip231 \entryskip 230 232 \longentry 231 233 matrix ma[2][2] = 5/3, p(1), 101;& 232 234 the rules for declaring, filling, and accessing 233 of integer matricies apply to the types {\tt234 matrix}and {\tt vector}, too\cr235 \ interentryskip235 integer matrices apply to types {\tt matrix} 236 and {\tt vector}, too\cr 237 \entryskip 236 238 \longentry 237 239 list l = iv, v, p(1..2), mo;& 238 240 lists may collect objects of any type. They are 239 241 ring-dependent iff one of the entries is.\cr 240 \endsec 241 \endgroup 242 \entryskip 243 \longentry 244 def d = read("MPfile:r example.mp");& 245 a name of type {\tt def} inherits the type of 246 the object assigned first to it. Useful if the 247 actual type of an object is unknown.\cr 248 \endsec 242 249 243 250 \sec Monitoring and debugging tools() 244 251 timer = 1;& print time used for commands to execute\cr 245 252 \longentry int t = timer; {\it commandsequence}; timer-t;& 246 print time in seconds used for {\it commandsequence}247 toexecute\cr253 print time used for {\it commandsequence} to 254 execute\cr 248 255 memory(1);& print number of bytes allocated from system\cr 249 256 option(prot);& show algorithm protocol\cr 250 257 option(mem);& show algorithm memory usage\cr 251 \ noalign{\medskip}258 \entryskip 252 259 TRACE = 1;& print protocol on execution of procedures\cr 253 260 listvar(all);& list all (user-)defined names\cr … … 264 271 option(none);& reset all options to default values\cr 265 272 \sectext 266 T he most important options:\cr273 Type {\tt help option;} for a list of all options.\cr 267 274 \subsec{Monitoring} 268 275 debugLib& show loading of procedures from libraries\cr … … 287 294 \sec System variables() 288 295 \sectext 289 T he most important system variables:\cr296 Type {\tt help System variables;} for a list of all system variables.\cr 290 297 \subsec{Standard bases} 291 298 degBound& stop if (weighted) total degree exceeds {\tt … … 296 303 noether}\cr 297 304 \subsec{Miscellany} 298 minPoly& use {\tt minPoly} as minimal polynomial for299 300 short& print monomials in a long format if non-zero\cr305 basering& the current basering\cr 306 minpoly& minimal polynomial for algebraic extensions\cr 307 short& do not print monomials in short format if zero\cr 301 308 timer& on assignment of a non-zero value show time 302 309 used for execution of executed commands. On … … 304 311 by \Singular\ since start\cr 305 312 TRACE& print information on procedures being executed 306 if {\tt TRACE} is larger than one\cr 313 if larger than one\cr 314 \endsec 315 316 \sec Input and output() 317 < "{\it filename}";& load and execute {\it filename}\cr 318 \longentry write("{\it filename}", {\it expression\_list})& 319 write {\it expression\_list} to ASCII file {\it 320 filename}\cr 321 \longentry read("{\it filename}");& 322 read ASCII file {\it filename} and return 323 content as a string. See also example below.\cr 324 \longentry 325 dump("MPfile: {\it filename}");\par 326 getdump("MPfile: {\it filename}");& 327 dump current state of {\sc Singular} to {\it 328 filename} and retrieve it, resp.\cr 329 \entryskip 330 \sectext 331 An example how to write one single expression (in this case the 332 ideal {\tt i}) to a file and read it back from there: 333 334 {\tt 335 write("i.save", i);\par 336 execute("ideal i=" + read("i.save") + ";"); 337 }\cr 338 \endsec 339 340 \eject 341 342 \sec Libraries() 343 LIB "{\it library\/}";& load {\it library}\cr 344 help {\it library\/};& show help on {\it library}\cr 345 help all.lib;& show list of all libraries\cr 307 346 \endsec 308 347 309 348 \sec Mapping(1.5cm) 310 \longentry map {\it name\/} = {\it ringname}, {\it ideal expression};&349 \longentry map {\it name\/} = {\it ringname}, {\it ideal\/};& 311 350 declare a map {\it name\/} from {\it ringname} 312 351 to current basering. The $i$'th ring variable 313 352 from {\it ringname} is mapped to the $i$'th 314 generator from {\it idealexpression}.\cr353 generator of {\it ideal}.\cr 315 354 \longentry {\it mapname\/}({\it expression\/})& 316 355 apply map {\it mapname\/} to {\it expression}\cr 317 \ noalign{\smallskip}356 \entryskip 318 357 \sectext 319 358 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} 359 way (non-canonical maps only):\strut 360 \abovedisplayskip=0pt 361 \belowdisplayskip=0pt 362 $$ 363 \eqalign{Z_p \rightarrow Q& :[i]_p \mapsto i \in [-p/2,p/2] \subset Z\cr 364 Z_p \rightarrow Z_q&:[i]_p \mapsto i \in [-p/2,p/2] \subset Z, i \mapsto [i]_q} 365 $$ 366 \cr 367 \noalign{\vskip -9pt} % dirty trick, gobbles the trailing \strut from \sectext 368 \entryskip 369 \longentry fetch({\it ringname}, {\it name\/})& 370 map object {\it name\/} from ring {\it 371 ringname\/} to current base\-ring. The rings 372 have to be ``almost'' identical.\cr 373 \longentry imap({\it ringname}, {\it name\/})& 374 map object {\it name\/} from subring {\it 375 ringname\/} to current basering\cr 325 376 \longentry subst({\it expression}, {\it ringvar}, {\it monomial\/})& 326 377 substitute {\it ringvar\/} by {\it monomial\/} 327 378 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 379 \endsec 380 381 \sec Miscellany(1.5cm) 382 \longentry ord({\it poly\/}\alt{\it vector\/})& 383 return (weighted) degree of initial term\cr 384 \longentry deg({\it poly\/}\alt{\it vector\/})& 385 return maximal (weighted) degree of terms\cr 369 386 \endsec 370 387
Note: See TracChangeset
for help on using the changeset viewer.