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 21 for trunk


Ignore:
Timestamp:
2012-06-12T20:25:56-07:00 (12 years ago)
Author:
Marek Rychlik
Message:

Introduced a boundary case to colon-ideal, when f is nil.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grobner.lisp

    r20 r21  
    16741674J the polynomial W*H belongs to I."
    16751675  (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))))
     1676    ((endp f))
     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))
Note: See TracChangeset for help on using the changeset viewer.