Changeset 4463 for branches/f4grobner/buchberger.lisp
- Timestamp:
- 2016-06-14T19:35:34-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/buchberger.lisp
r4462 r4463 26 26 :ring 27 27 ) 28 (:export "BUCHBERGER" "PARALLEL-BUCHBERGER" )28 (:export "BUCHBERGER" "PARALLEL-BUCHBERGER" "GROBNER-MEMBER" "GROBNER-SUBSETP" "GROBNER-EQUAL") 29 29 (:documentation "Buchberger Algorithm Implementation.")) 30 30 … … 49 49 (grobner-test (subseq f 0 start) (subseq f 0 start))) 50 50 ;;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)) 52 52 (b-done (make-hash-table :test #'equal))) 53 53 (declare (type critical-pair-queue b) (type hash-table b-done)) … … 85 85 (setf (gethash (list (critical-pair-first pair) (critical-pair-second pair)) b-done) 86 86 t))))) 87 88 89 (defun grobner-member (p g) 90 "Returns T if a polynomial P belongs to the ideal generated by the 91 polynomial 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 97 an ideal contained in the ideal generated by a polynomial list G2, 98 both 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, 104 generate 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.