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.

Ignore:
Timestamp:
2016-06-14T19:35:34-07:00 (8 years ago)
Author:
Marek Rychlik
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/buchberger.lisp

    r4462 r4463  
    2626        :ring
    2727        )
    28   (:export "BUCHBERGER" "PARALLEL-BUCHBERGER")
     28  (:export "BUCHBERGER" "PARALLEL-BUCHBERGER" "GROBNER-MEMBER" "GROBNER-SUBSETP" "GROBNER-EQUAL")
    2929  (:documentation "Buchberger Algorithm Implementation."))
    3030
     
    4949                    (grobner-test (subseq f 0 start) (subseq f 0 start)))
    5050  ;;Initialize critical pairs
    51   (let ((b (make-critical-pair-queue *normal-strategy* f start))
     51  (let ((b (make-critical-pair-queue *min-total-degree-strategy* f start))
    5252        (b-done (make-hash-table :test #'equal)))
    5353    (declare (type critical-pair-queue b) (type hash-table b-done))
     
    8585        (setf (gethash (list (critical-pair-first pair) (critical-pair-second pair)) b-done)
    8686              t)))))
     87
     88
     89(defun grobner-member (p g)
     90  "Returns T if a polynomial P belongs to the ideal generated by the
     91polynomial list G, which is assumed to be a Grobner basis. Returns NIL otherwise."
     92  (universal-zerop (normal-form p g nil)))
     93
     94
     95(defun grobner-subsetp (g1 g2)
     96  "Returns T if a list of polynomials G1 generates
     97an ideal contained in the ideal generated by a polynomial list G2,
     98both G1 and G2 assumed to be Grobner bases. Returns NIL otherwise."
     99  (every #'(lambda (p) (grobner-member p g2)) g1))
     100
     101
     102(defun grobner-equal (g1 g2)
     103  "Returns T if two lists of polynomials G1 and G2, assumed to be Grobner bases,
     104generate  the same ideal, and NIL otherwise."
     105  (and (grobner-subsetp g1 g2) (grobner-subsetp g2 g1)))
Note: See TracChangeset for help on using the changeset viewer.