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 1297


Ignore:
Timestamp:
2015-06-11T20:46:28-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/division.lisp

    r1295 r1297  
    243243  "Divide every polynomial in a list PLIST by its leading coefficient. "
    244244  (mapcar #'(lambda (x) (poly-normalize ring x)) plist))
     245
     246;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     247;;
     248;; The function GROBNER-CHECK is provided primarily for debugging purposes. To
     249;; enable verification of grobner bases with BUCHBERGER-CRITERION, do
     250;; (pushnew :grobner-check *features*) and compile/load this file.
     251;; With this feature, the calculations will slow down CONSIDERABLY.
     252;;
     253;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     254
     255(defun grobner-test (ring g f)
     256  "Test whether G is a Grobner basis and F is contained in G. Return T
     257upon success and NIL otherwise."
     258  (debug-cgb "~&GROBNER CHECK: ")
     259  (let (($poly_grobner_debug nil)
     260        (stat1 (buchberger-criterion ring g))
     261        (stat2
     262          (every #'poly-zerop
     263                 (makelist (normal-form ring (copy-tree (elt f i)) g nil)
     264                           (i 0 (1- (length f)))))))
     265    (unless stat1 (error "~&Buchberger criterion failed."))
     266    (unless stat2
     267      (error "~&Original polys not in ideal spanned by Grobner.")))
     268  (debug-cgb "~&GROBNER CHECK END")
     269  t)
Note: See TracChangeset for help on using the changeset viewer.