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.

Changes in / [20:30]


Ignore:
Location:
/trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • /trunk/grobner.lisp

    r20 r30  
    10741074        (setf r (scalar-times-poly ring cg r)
    10751075              c (funcall (ring-mul ring) c cg)
     1076              ;; p := cg*p-cp*m*g
    10761077              p (grobner-op ring cp cg m p g))))
    10771078    (debug-cgb "/"))
     
    16741675J the polynomial W*H belongs to I."
    16751676  (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         (error "First ideal must be non-zero.")
    1680       (list (make-poly
    1681              (list (make-term
    1682                     (make-monom (monom-dimension (poly-lm (find-if-not #'poly-zerop f)))
    1683                                 :initial-element 0)
    1684                     (funcall (ring-unit ring))))))))
    1685    ((endp (cdr g))
    1686     (colon-ideal-1 ring f (car g) top-reduction-only))
    1687    (t
    1688     (ideal-intersection ring
    1689                         (colon-ideal-1 ring f (car g) top-reduction-only)
    1690                         (colon-ideal ring f (rest g) top-reduction-only)
    1691                         top-reduction-only))))
     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))))
    16921693
    16931694(defun colon-ideal-1 (ring f g &optional (top-reduction-only $poly_top_reduction_only))
     
    20482049       ,@(mapcar #'(lambda (var power) `((mexpt) ,var ,power))
    20492050                 vars (monom-exponents (term-monom object)))))
     2051    ;; Assumes that Lisp and Maxima logicals coincide
     2052    (:logical object)
    20502053    (otherwise
    20512054     object)))
     
    21832186
    21842187(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)
    21862189    (buchberger-criterion *maxima-ring* g)))
    21872190
     
    22872290    (ideal-polysaturation *maxima-ring* f ideal-list 0 nil)))
    22882291
     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.