- Location:
- /trunk
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
/trunk/grobner.lisp
r20 r30 1074 1074 (setf r (scalar-times-poly ring cg r) 1075 1075 c (funcall (ring-mul ring) c cg) 1076 ;; p := cg*p-cp*m*g 1076 1077 p (grobner-op ring cp cg m p g)))) 1077 1078 (debug-cgb "/")) … … 1674 1675 J the polynomial W*H belongs to I." 1675 1676 (cond 1676 ((endp g)1677 ;;Id(G) consists of 0 only so W*0=0 belongs to Id(F)1678 (if (every #'poly-zerop f)1679 1680 (list (make-poly1681 1682 1683 1684 1685 ((endp (cdr g))1686 (colon-ideal-1 ring f (car g) top-reduction-only))1687 (t1688 (ideal-intersection ring1689 1690 1691 1677 ((endp g) 1678 ;;Id(G) consists of 0 only so W*0=0 belongs to Id(F) 1679 (if (every #'poly-zerop f) 1680 (error "First ideal must be non-zero.") 1681 (list (make-poly 1682 (list (make-term 1683 (make-monom (monom-dimension (poly-lm (find-if-not #'poly-zerop f))) 1684 :initial-element 0) 1685 (funcall (ring-unit ring)))))))) 1686 ((endp (cdr g)) 1687 (colon-ideal-1 ring f (car g) top-reduction-only)) 1688 (t 1689 (ideal-intersection ring 1690 (colon-ideal-1 ring f (car g) top-reduction-only) 1691 (colon-ideal ring f (rest g) top-reduction-only) 1692 top-reduction-only)))) 1692 1693 1693 1694 (defun colon-ideal-1 (ring f g &optional (top-reduction-only $poly_top_reduction_only)) … … 2048 2049 ,@(mapcar #'(lambda (var power) `((mexpt) ,var ,power)) 2049 2050 vars (monom-exponents (term-monom object))))) 2051 ;; Assumes that Lisp and Maxima logicals coincide 2052 (:logical object) 2050 2053 (otherwise 2051 2054 object))) … … 2183 2186 2184 2187 (defmfun $poly_buchberger_criterion (g vars) 2185 (with-parsed-polynomials ((vars) :poly-lists (g) )2188 (with-parsed-polynomials ((vars) :poly-lists (g) :value-type :logical) 2186 2189 (buchberger-criterion *maxima-ring* g))) 2187 2190 … … 2287 2290 (ideal-polysaturation *maxima-ring* f ideal-list 0 nil))) 2288 2291 2292 (defmfun $poly_lt (f vars) 2293 (with-parsed-polynomials ((vars) :polynomials (f) :value-type :polynomial) 2294 (make-poly-from-termlist (list (poly-lt f))))) 2295 2296 (defmfun $poly_lm (f vars) 2297 (with-parsed-polynomials ((vars) :polynomials (f) :value-type :polynomial) 2298 (make-poly-from-termlist (list (make-term (poly-lm f) (funcall (ring-unit *maxima-ring*))))))) 2299
Note:
See TracChangeset
for help on using the changeset viewer.