REDUCE 3.7, 15-Apr-1999, patched to 14-Jun-2001 ... 1: nil 2: t 3: Entering LISP ... REDUCE, 26-Jun-2001 1 lisp> "" 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > 2 > (t) 3 > 3 > 3 > 3 > 3 > 3 > 3 > 3 > 3 > 3 > 3 > 3 > (t) 4 > 4 > 4 > 4 > 4 > 4 > 4 > 4 > 4 > 4 > 4 > 4 > (t) 5 > 5 > 5 > 5 > 5 > 5 > 5 > 5 > 5 > 5 > 5 > 5 > 5 > nil 6 > 6 > 6 > 6 > 6 > 6 > nil 7 > 7 > 7 > 7 > 7 > 7 > 7 > 7 > 7 > 7 > 7 > 7 > ("$bmload/" "$bmexe/" "" "$reduce/lisp/psl/solaris/red/" "$reduce/lisp/psl/solaris/psl/") 8 > 8 > 8 > nil 9 > 9 > 9 > 9 > 9 > nil 10 > 10 > 10 > 10 > 10 > 10 > 10 > 10 > 10 > nil 11 > 11 > nil 12 > 12 > 12 > 12 > 12 > 12 > 12 > 12 > 12 > *** `gcdn' has not been defined, because it is flagged LOSE nil 13 > 13 > 13 > 13 > nil 14 > 14 > 14 > 14 > 14 > nil 15 > 15 > 15 > 15 > 15 > Request to set constant faslout-magic to a different value. *** (printsetup): base 11104660, length 68 bytes comment rEDUCE INTERFACE PROCEDURES. mAY BE LOADED FROM rEDUCE (WITH NORMAL rEDUCE SYNTAX, NO 'LISP-HOOK*'. pROVIDES A RUDIMENTARY INTERFACE FOR USING BERGMAN FROM rEDUCE. aLL MODE-CHANGERS - INCLUDING SETIOVARS - MUST BE RUN SYMBOLICALLY. tHEN BMGROEBNER MAY BE CALLED from algebraic mode, WITH A LIST OF POLYNOMIALS AS (SINGLE) ARGUMENT. eACH POLYNOMIAL SHOULD BE HOMOGENEOUS, AND only CONTAIN SET BERGMAN INPUT VARIABLES. iF ALL IS WELL, BMGROEBNER RETURNS A REDUCED GROEBNER BASIS (AS A LIST OF POLYNOMIALS): rIGHT NOW, ONLY INTEGER OR STANDARD FORM COEFFICIENTS ARE PERMITTED; symbolic; nil off raise; nil global '(mODULUS iNvARS DPiNvARS oUTvARS iNpmONoNE); nil fluid '(!&!*NiNpOL!&!*); nil symbolic procedure bmlsppol2algsq(LSPPOL); begin scalar LP,TM; if null (LP := LSPPOL) then return nil; repeat <>; LP := cdr LP>> until (null LP); return mk!*sq simp('plus . LSPPOL) end; bmlsppol2algsq symbolic procedure algsq2bmlsppol (SQ); if not (SQ := !*q2f SQ) then nil else begin scalar !&!*NiNpOL!&!*; !&!*NiNpOL!&!* := tconc(nil,nil); !*f2BMlSPpOL1(SQ, listcopy iNpmONoNE); return cdar !&!*NiNpOL!&!*; end; algsq2bmlsppol ; nil symbolic procedure sfalgsq2bmlsppol (SQ); if not (SQ := reorder !*q2f SQ) then nil else begin scalar !&!*NiNpOL!&!*; !&!*NiNpOL!&!* := tconc(nil,nil); !*f2sfcFBMlSPpOL1(SQ, listcopy iNpmONoNE); return cdar !&!*NiNpOL!&!*; end; sfalgsq2bmlsppol ; nil symbolic procedure !*f2BMlSPpOL1 (SF,LEXP); begin scalar LE, LP, VN; mL: if not SF then return nil else if domainp SF then return tconc (!&!*NiNpOL!&!*, (!*d2BMiNcOEFF SF) . LEXP) else if not (VN := atsoc(mvar SF, DPiNvARS)) then rederr "Undeclared input variable in !*F2bmLspPol1"; LP := pnth(LE := listcopy LEXP, cdr VN); rplaca(LP, plus2(car LP, ldeg SF)); !*f2BMlSPpOL1(lc SF, LE); SF := red SF; go mL; % Does RETURN work inside a WHILE loop? end; *f2!B!Ml!S!Pp!O!L1 symbolic procedure !*f2sfcFBMlSPpOL1 (SF,LEXP); begin scalar LE, LP, VN; mL: if not SF then return nil else if domainp SF or not (VN := atsoc(mvar SF, DPiNvARS)) then return tconc (!&!*NiNpOL!&!*, (!*f2BMiNcOEFF SF) . LEXP); LP := pnth(LE := listcopy LEXP, cdr VN); rplaca(LP, plus2(car LP, ldeg SF)); !*f2sfcFBMlSPpOL1(lc SF, LE); SF := red SF; go mL; % Does RETURN work inside a WHILE loop? end; *f2sfc!F!B!Ml!S!Pp!O!L1 symbolic procedure !*d2BMiNcOEFF (RCF); if not (numberp RCF) then typerr(RCF,"bergman input coefficient") else RCF; *d2!B!Mi!Nc!O!E!F!F symbolic procedure !*f2BMiNcOEFF (RCF); numr simp prepf RCF; *f2!B!Mi!Nc!O!E!F!F % Should be coefficient mode dependent, in the ordinary way! symbolic procedure !*BMlSPcOEFF2d (BMCF); prepf BMCF; *!B!Ml!S!Pc!O!E!F!F2d % Top level things. Should be called in algebraic mode!? symbolic operator checkalgbminput; nil symbolic operator sfcheckalgbminput; nil symbolic operator algbminput; nil symbolic operator sfalgbminput; nil symbolic operator algbmoutput; nil put('bmgroebner,'psopfn,'bmgroebnerexpr); bmgroebnerexpr symbolic procedure checkalgbminput(LREDPOL); for each RP in cdr LREDPOL do if not (eq(car RP,'!*sq) and subsetp(kernels numr cadr RP, iNvARS) and denr cadr RP eq 1) then typerr(car RP, "bergman input polynomial"); checkalgbminput symbolic procedure sfcheckalgbminput(LREDPOL); for each RP in cdr LREDPOL do if not (eq(car RP,'!*sq) and denr cadr RP eq 1) then typerr(car RP, "bergman input polynomial"); sfcheckalgbminput symbolic procedure algbminput(LREDPOL); lisppols2input for each RP in cdr LREDPOL collect algsq2bmlsppol cadr RP; algbminput symbolic procedure sfalgbminput(LREDPOL); lisppols2input for each RP in cdr LREDPOL collect sfalgsq2bmlsppol cadr RP; sfalgbminput symbolic procedure algbmoutput(); 'list . for each LP in output2lisppols() collect bmlsppol2algsq LP; algbmoutput symbolic procedure bmgroebnerexpr(LREDPOL); if mODULUS eq 'sf then sfcFbmgroebnerexpr(LREDPOL) else ORDbmgroebnerexpr(LREDPOL); bmgroebnerexpr symbolic procedure sfcFbmgroebnerexpr(LREDPOL); begin scalar BMoLDkoRDER; LREDPOL := aeval car LREDPOL; BMoLDkoRDER := setkorder getinvars(); sfcheckalgbminput(LREDPOL); sfalgbminput(LREDPOL); groebnerinit(); groebnerkernel(); setkorder BMoLDkoRDER; return algbmoutput(); end; sfc!Fbmgroebnerexpr symbolic procedure ORDbmgroebnerexpr(LREDPOL); <>; !O!R!Dbmgroebnerexpr on raise; nil algebraic; ; end; nil Entering LISP ... nil 16 > 16 > nil 17 > 17 > 17 > 17 > 17 > 17 > 17 > 17 > 17 > 17 > 17 > 17 > 17 > zbig 18 > 18 > 18 > 18 > 18 > 18 > 18 > nil 19 > 19 > "hseries" 20 > "$bmsrc/modhser.sl" 21 > 21 > "$bmsrc/odd.sl" 22 > "$bmsrc/logodd.sl" 23 > "char2" 24 > 24 > 24 > 24 > "$bmshells/mkprimefile" 25 > "$bmdomains/P" 26 > 26 > 26 > "$bmload/primaux" 27 > "$bmdomains/PRL" 28 > 28 > "$bmdomains/dynmktab.sl" 29 > 29 > 29 > 29 > 32767 30 > 1073741823 31 > 1048576 32 > 32 > 32 > 32 > 32 > 32 > 32 > 32 > 32 > 32 > 32 > nil nil 34 > nil 35 > nil 36 > nil 37 > nil 38 > nil 39 > nil 40 > 40 > nil 41 > nil 42 > 42 > 42 > 42 > 7 43 > 43 > 43 > 43 > 43 > nil 44 > 44 > 44 > 44 > 44 > 44 > nil 45 > 45 > 45 > 45 > 45 > nil 46 > 46 > 46 > 46 > 46 > nil 47 > nil nil 49 > 49 > 49 > 49 > 49 > 49 > 49 > 49 > 49 > 49 > nil 50 > 50 > 50 > "safe" 51 > "safe" 52 > 52 > 52 > 52 > Backtrace, including interpreter functions, from top of stack: nil 53 > 53 > Quitting