close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 102 for branches


Ignore:
Timestamp:
2015-06-05T12:00:26-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/mx-grobner.lisp

    r101 r102  
    4141(defmacro debug-cgb (&rest args)
    4242  `(when $poly_grobner_debug (format *terminal-io* ,@args)))
    43 
    44 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    45 ;;
    46 ;; These are provided mostly for debugging purposes To enable
    47 ;; verification of grobner bases with BUCHBERGER-CRITERION, do
    48 ;; (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 T
    55 upon success and NIL otherwise."
    56   (debug-cgb "~&GROBNER CHECK: ")
    57   (let (($poly_grobner_debug nil)
    58         (stat1 (buchberger-criterion ring g))
    59         (stat2
    60           (every #'poly-zerop
    61                  (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 stat2
    65       (error "~&Original polys not in ideal spanned by Grobner.")))
    66   (debug-cgb "~&GROBNER CHECK END")
    67   t)
    68 
    6943
    7044;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note: See TracChangeset for help on using the changeset viewer.