Debian Codegraph @

doc/V1modes

raw
1
2 % The disposition of the particular mode changers follows the
3 % manual listing:
4
5 %Object type:
6 % Ring (default) SETRINGOBJECT()
7 % Module SETMODULEOBJECT()
8 % Two modules (for calculating Tor(*,*)) SETTWOMODULESOBJECT()
9 % Factor Algebra ( = Residue class ring) SETFACTALGOBJECT()
10 % Minor variants:
11 % Right, Left, 2-sided module?
12 % Autoadding of relations? SETAUTOADDRELATIONSTATE(state)
13 % Yes! AUTOADDRELATIONS()
14 % No, absolutely not! NOAUTOADDRELATIONS()
15 % Perhaps, but not right now! CANCELAUTOADDRELATIONSSETTINGS()
16 % Permit linear or constant terms? SETLOWTERMSHANDLING(state)
17 % Yes! state := SAFE
18 % No, since using fast tricks state := QUICK
19 %
20 %Resolution calculations type:
21 % None (default) SETRESOLUTIONTYPE(NIL)
22 % Anick SETRESOLUTIONTYPE(ANICK)
23 %
24 %Anick minor modes (only present when the module anick is loaded):
25 % In what form is tenspols (Anick resolution elements) printed?
26 % Semidistributed PRINTTENSORPOLSSEMIDISTRIBUTED()
27 % (Fully) distributed PRINTTENSORPOLSDISTRIBUTED()
28 % The beginning, tensor sign, and end of a tensor product term:
29 % SETTENSPOLPRTSTRINGS(string,string,string)
30 % The chain link demarkation string SETEDGESTRING(string)
31 % Should this string be printed? SETEDGESTRINGPRINTING(boole)
32 % Should the Betti numbers of the homology be calculated at each degree end?
33 % Yes, and immediately displayed! ONFLYBETTI(T)
34 % Yes, but not automatically displayed CALCBETTI(T) + ONFLYBETTI(NIL)
35 % No CALCBETTI(NIL)
36 %
37 %Polynomial ring (or correspondingly for other objects) set-up:
38 % Type of ring (or correpondingly); SETRINGTYPE(),COMMIFY(),
39 % NONCOMMIFY()
40 % Commutative DEG-REVLEX (default); COMMIFY(),DEGREVLEXIFY()
41 % Commutative DEG-LEX; - " - ,DEGLEXIFY()
42 % Commutative MATRIX; - " - ,MATRIXIFY();
43 % set the matrix with SETORDERMATRIX(llint)
44 % Non-commutative DEG-LEFTLEX (default); NONCOMMIFY(),DEGLEFTLEXIFY()
45 % Non-commutative ELIM-DEG-LEFTLEX NONCOMMIFY(),ELIMORDER()
46 % Minor variants:
47 % Ordinary ( = unit) weights CLEARWEIGHTS(),SETWEIGHTS()
48 % Alternative weights SETWEIGHTS()
49 % Homogenising variable: SETHOMOGVARIABLE()
50 %
51 %Coefficient arithmetics:
52 % Characteristic 0, arbitrary integers (default); SETMODULUS(0)
53 % Characteristic 0, only inums; NOBIGNUMS, - " -
54 % Characteristic 2; SETMODULUS(2)
55 % Odd characteristic, ordinary inum arithmetics; SETMODULUS(pr)
56 % Odd characteristic, ordinary bignum arithmetics; - " -
57 % Odd characteristic, logarithm table inum arithmetics; - " -,
58 % MODLOGARITHMS
59 % (Arbitrary Reduce Standard Forms; SETREDUCESFCOEFFS()
60 % only available in bergman-under-reduce)
61 %
62 %Fundamental strategy: SETSTRATEGY(clause)
63 % Default, ordinary (Buchberger, Bergman) (with degree first)
64 % SETDEFAULTSTRATEGY()
65 % Rabbit (jumping back to lower degrees) SETRABBITSTRATEGY()
66 % Staggered with substance (SAWS). SETSAWSSTRATEGY()
67 % Major mode modifications:
68 % Work degree by degree (irrespective of order) SETDEGREEWISE()
69 % Instead, work item for item (NOT compatible with Rabbit or SAWS)
70 % SETITEMWISE()
71 % Are the found leading monomials of Groebner basis elements stable?
72 % SETSTABILITY(T,NIL),
73 % STABILISE(),DESTABILISE()
74 % Minor mode modifications:
75 % with immediate full autoreduction (default);
76 % IMMEDIATEFULLREDUCTION
77 % without immediate full autoreduction; - " -
78 % Densely or sparsely performed factoring out of contents:
79 % DENSECONTENTS(),
80 % SPARSECONTENTS()
81 % Ordinary or Hilbert series limit interruption strategy:
82 % ORDNGBESTRATEGY(),
83 % MINHILBLIMITSTRATEGY()
84 % (or use SETINTERRUPTSTRATEGY)
85 % Calculation start and end points: SETMINDEG(),
86 % GETMINDEG(),
87 % SETMAXDEG(),
88 % GETMAXDEG().
89 % Customised strategy procedures read (if defined):
90 % SETCUSTSTRATEGY
91 % combined with defining one or more of
92 % CUSTNEWCDEGFIX, CUSTNEWINPUTGBEFIND, CUSTCRITPAIRTONEWGBE,
93 % CUSTENDDEGREE, CUSTENDDEGREECRITPAIRFIND, CUSTITEMCRITPAIRFIND.
94 %
95 %Input mode minor modification:
96 % (No) case sensitivity in algebraic input SETCASESENSALGIN (NIL/T)
97 %
98 %Output mode:
99 % Ordinary algebraic form (default): SETALGOUTMODE(ALG)
100 % Lisp form: SETALGOUTMODE(LISP)
101 % Macaulay-like algebraic form: SETALGOUTMODE(MACAULAY)
102 %
103
104 %Output time modes should be brought here: Degreewise and/or itemwise
105 %and/or finally.
106 %
107
108 % Minor mode modifications:
109 % Collect common factors to exponents (default):
110 % EXPTSPRINTMODE()
111 % Print each factor separately: NOEXPTSPRINTMODE()
112 %
113 % If the associated monomial ring Poincare-Betti series is calculated
114 % degree by degree, should it be printed automatically or not:
115 % SETIMMEDIATEASSOCRINGPBDISPLAY(NIL/T)
116 % Should existing files if possible be overwritten?
117 % SETOVERWRITE(NIL/T)
118 % Customised display procedures read (if defined):
119 % SETCUSTDISPLAY
120 % combined with defining one or more of
121 % CUSTDISPLAYINIT, DEGREEENDDISPLAY, CUSTCLEARCDEGDISPLAY,
122 % CUSTCLEARCDEGOBSTRDISPLAY, and HSERIESMINCRITDISPLAY.
123 %
124 %Debugging mode modifications:
125 % If an alertchannel is open, and called by FILEALERT with second
126 % argument MAYBE, should the channel be closed? SETDIRECTALERTCLOSING (NIL/T)
127 % Setup checkers print (not) failure information as warnings to the
128 % write selected channel. SETCHECKFAILUREDISPLAY(NIL/T)
129 % The following option should only be turned on, if bergman is
130 % compiled under Psl or Reduce:
131 % Should we cause continuable error loops at entries and exits
132 % of procedures which are traced by MYTRACE or MYTR1?
133 % SETACTIVETRACEBREAKS(NIL/T)
134
135 % Mode influencing user available switches - a complete list.
136 % (However, note that we plan to replace them by mode changers!)
137
138
139
140 % Major mode modifications:
141 % Work degree by degree (irrespective of order) SETDEGREEWISE()
142 % Instead, work item for item (NOT compatible with Rabbit or SAWS)
143 % SETITEMWISE()
144 % Are the found leading monomials of Groebner basis elements stable?
145 % SETSTABILITY(T,NIL),
146 % STABILISE(),DESTABILISE()
147
148 (DefineSWLHFEXPR SETPROCESS (GETPROCESS) !$!#ProcessingGbes!#!*)
149
150 (SETQ !$!#ProcessingGbes!#!*
151 '((DEGREEWISE . SETDEGREEWISE)
152 (ITEMWISE . SETITEMWISE)))
153
154 (DE GETPROCESS ()
155 (COND (!*!&DegreeWise!# 'DEGREEWISE)
156 (T 'ITEMWISE)) )
157
158 (DE SETDEGREEWISE ()
159 (PROG (rt !*USERMODE !*REDEFMSG)
160 (SETQ rt !*!&DegreeWise!#)
161 (COPYD 'DEGORITEMLIST2LIST 'DEGLIST2LIST)
162 (COPYD 'SortlPol 'DegSortlPol)
163 (MainDegreewise)
164 (StratDegreewise)
165 (ReductDegreewise)
166 (EVAL (LIST 'SETSTABILITY (GETSTABILITY)))
167 (ON !&DegreeWise!#)
168 (RETURN rt)
169 ))
170
171 (DE SETITEMWISE ()
172 (PROG (rt !*USERMODE !*REDEFMSG)
173 (SETQ rt !*!&DegreeWise!#)
174 (COPYD 'DEGORITEMLIST2LIST 'IBIDNOOPFCN)
175 (COPYD 'SortlPol 'ItemSortlPol)
176 (MainItemwise)
177 (StratItemwise)
178 (ReductItemwise)
179 (EVAL (LIST 'SETSTABILITY (GETSTABILITY)))
180 (OFF !&DegreeWise!#)
181 (RETURN rt)
182 ))
183
184
185 (DE STABILISE ()
186 (PROG (rt !*USERMODE !*REDEFMSG)
187 (SETQ rt (GETSTABILITY))
188 (MainStabilise)
189 (StratStabilise)
190 (ReductStabilise)
191 (ON !&!#Stable!#)
192 (RETURN rt) ))
193
194 (DE DESTABILISE ()
195 (PROG (rt !*USERMODE !*REDEFMSG)
196 (SETQ rt (GETSTABILITY))
197 (MainDestabilise)
198 (StratDestabilise)
199 (ReductDestabilise)
200 (OFF !&!#Stable!#)
201 (RETURN rt) ))
202
203 %# GETSTABILITY () : boolean;
204 (DE GETSTABILITY () (PROGN !*!&!#Stable!#))
205
206
207 %# SETSTABILITY (sexpr) : boolean ; FEXPR
208 (DF SETSTABILITY (u)
209 (COND ((OR (NOT u) (AND (PAIRP u) (OR (NOT (CAR u)) (EQ (CAR u) 'OFF))))
210 (DESTABILISE))
211 (T
212 (STABILISE)) ))
213
214 % Initialisation:
215
216 (SETQ !*!&!#Stable!# T)
217
218 %# GETDEGREEPRINTOUTPUT (sexpr) : boolean ;
219 (DE GETDEGREEPRINTOUTPUT () (PROGN !*DEGREEPRINTOUTPUT))
220
221 %# SETDEGREEPRINTOUTPUT (sexpr) : boolean ; FEXPR
222 (DF SETDEGREEPRINTOUTPUT (u)
223 (PROG (rt)
224 (SETQ rt (GETDEGREEPRINTOUTPUT))
225 (COND ((OR (NOT u)
226 (AND (PAIRP u) (OR (NOT (CAR u)) (EQ (CAR u) 'OFF))))
227 (OFF DEGREEPRINTOUTPUT))
228 (T
229 (ON DEGREEPRINTOUTPUT)))
230 (RETURN rt) ))
231
232
233 %# GETITEMPRINTOUTPUT (sexpr) : boolean ;
234 (DE GETITEMPRINTOUTPUT () (PROGN !$!&ItemPrinting!#))
235
236 %# SETITEMPRINTOUTPUT (sexpr) : boolean ; FEXPR
237 (DF SETITEMPRINTOUTPUT (u)
238 (PROG (rt)
239 (SETQ rt (GETITEMPRINTOUTPUT))
240 (COND ((OR (NOT u)
241 (AND (PAIRP u) (OR (NOT (CAR u)) (EQ (CAR u) 'OFF))))
242 (SETQ !$!&ItemPrinting!# NIL))
243 ((OR (EQ u 'MAYBE)
244 (AND (PAIRP u) (EQ (CAR u) 'MAYBE)))
245 (SETQ !$!&ItemPrinting!# 'MAYBE))
246 (T
247 (SETQ !$!&ItemPrinting!# T)))
248 (RETURN rt) ))
249
250
251 %# GETSAVEDEGREE (sexpr) : boolean ;
252 (DE GETSAVEDEGREE () (PROGN !*SAVEDEGREE))
253
254 %# SETSAVEDEGREE (sexpr) : boolean ; FEXPR
255 (DF SETSAVEDEGREE (u)
256 (PROG (rt)
257 (SETQ rt (GETSAVEDEGREE))
258 (COND ((OR (NOT u)
259 (AND (PAIRP u) (OR (NOT (CAR u)) (EQ (CAR u) 'OFF))))
260 (OFF SAVEDEGREE))
261 (T
262 (ON SAVEDEGREE)))
263 (RETURN rt) ))
264
265
266 From inout:
267
268 (DF DEGREEOUTPREPARE (fil)
269 (COND ((NOT fil)
270 (SETSAVEDEGREE T)
271 (SETQ GBasOutChan NIL))
272 ((NOT (PAIRP fil))
273 (PRIN2 "***** Bad input to DEGREEOUTPREPARE") (TERPRI))
274 (T
275 (SETSAVEDEGREE T)
276 (SETQ GBasOutChan (CHECKOUTFILE (CAR fil))))) )
277
278
279 From main:
280
281
282 In stabledegGROEBNERKERNEL:
283
284 MlEnd
285 (COND ((AND (GETCUSTSTRATEGY) (DEFP 'CUSTENDDEGREE) (CUSTENDDEGREE))
286 (GO Ml)))
287 (MAPC (CDR cGBasis) (FUNCTION FixGbe))
288 (COND (!*CUSTSHOW (DEGREEENDDISPLAY))
289 ((COND (!*PBSERIES (TDEGREECALCULATEPBSERIES cDeg))))
290 (!*SAVEDEGREE (DEGREEOUTPUT)))
291
292
293 %# GROEBNERFINISH () : - ;
294 (DE GROEBNERFINISH ()
295 (COND ((AND (GETSAVEDEGREE) (EQ (GETPROCESS) 'DEGREEWISE))
296 (ENDDEGREEOUTPUT))
297 ((AND (GETITEMPRINTOUTPUT)
298 (OR (EQ (GETPROCESS) 'ITEMWISE) (EQ (GETITEMPRINTOUTPUT) T)))
299 (ENDITEMOUTPUT))
300 ((NOT !*CUSTSHOW)
301 (BIGOUTPUT))) )
302
303
304 Similarly, but less updated, STAGGERKERNEL and STAGGERFINISH, in stg:
305
306 (DE STAGGERFINISH ()
307 (PROG (OldChan)
308 (COND (!*SAVEDEGREE (STAGGERENDDEGREEOUTPUT)))
309 (MAPC (CDR GBasis)
310 (FUNCTION (LAMBDA (mon)
311 (DestructRedor2Redand (Mpt mon)))))
312 (AUTOREDUCESTAGGEROUTPUT)
313 (COND (!&!*StgFinalOutputChan
314 (SETQ OldChan (WRS !&!*StgFinalOutputChan))))
315 (COND (!*DEGREEPRINTOUTPUT
316 (DEGREEBIGOUTPUT DegGBasis))
317 (T
318 (BIGOUTPUT)))
319 (PRIN2 "Done") (TERPRI)
320 (COND (OldChan
321 (CLOSE (WRS OldChan)))) ))