Changeset 102 for branches/f4grobner/mx-grobner.lisp
- Timestamp:
- 2015-06-05T12:00:26-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r101 r102 41 41 (defmacro debug-cgb (&rest args) 42 42 `(when $poly_grobner_debug (format *terminal-io* ,@args))) 43 44 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45 ;;46 ;; These are provided mostly for debugging purposes To enable47 ;; verification of grobner bases with BUCHBERGER-CRITERION, do48 ;; (pushnew :grobner-check *features*) and compile/load this file.49 ;; With this feature, the calculations will slow down CONSIDERABLY.50 ;;51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;52 53 (defun grobner-test (ring g f)54 "Test whether G is a Grobner basis and F is contained in G. Return T55 upon success and NIL otherwise."56 (debug-cgb "~&GROBNER CHECK: ")57 (let (($poly_grobner_debug nil)58 (stat1 (buchberger-criterion ring g))59 (stat260 (every #'poly-zerop61 (makelist (normal-form ring (copy-tree (elt f i)) g nil)62 (i 0 (1- (length f)))))))63 (unless stat1 (error "~&Buchberger criterion failed."))64 (unless stat265 (error "~&Original polys not in ideal spanned by Grobner.")))66 (debug-cgb "~&GROBNER CHECK END")67 t)68 69 43 70 44 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note:
See TracChangeset
for help on using the changeset viewer.