Changeset 2785 for branches/f4grobner
- Timestamp:
- 2015-06-20T20:43:13-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r2784 r2785 192 192 193 193 194 ;; Multiplication of polynomials 195 ;; Non-destructive version 196 (defun termlist-mul (ring-and-order p q 197 &aux (ring (ro-ring ring-and-order))) 198 (declare (ring-and-order ring-and-order)) 199 (cond ((or (endp p) (endp q)) nil) ;p or q is 0 (represented by NIL) 200 ;; If p=p0+p1 and q=q0+q1 then pq=p0q0+p0q1+p1q 201 ((endp (cdr p)) 202 (term-times-termlist ring (car p) q)) 203 ((endp (cdr q)) 204 (termlist-times-term ring p (car q))) 205 (t 206 (let ((head (term-mul-lst ring (termlist-lt p) (termlist-lt q))) 207 (tail (termlist-add ring-and-order 208 (term-times-termlist ring (car p) (cdr q)) 209 (termlist-mul ring-and-order (cdr p) q)))) 210 (cond ((null head) tail) 211 ((null tail) head) 212 (t (nconc head tail))))))) 213 214 215 216 #| 217 194 218 (defun poly-standard-extension (plist &aux (k (length plist))) 195 219 "Calculate [U1*P1,U2*P2,...,UK*PK], where PLIST=[P1,P2,...,PK] … … 204 228 (incf-power (nth i plist) i)))) 205 229 206 #| 230 207 231 208 232 (defun saturation-extension (ring f plist
Note:
See TracChangeset
for help on using the changeset viewer.