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 3598 for branches/f4grobner


Ignore:
Timestamp:
2015-09-05T18:32:35-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/5am-monom.lisp

    r3597 r3598  
    148148  "Term basics"
    149149  (with-fixture term-context ()
    150     (is (= (r-dimension m) 3))
    151     (is (= (r-elt m 2) 3))
     150    (is (= (monom-dimension m) 3))
     151    (is (= (monom-elt m 2) 3))
    152152    (is (= (r-total-degree m) 6))
    153153    (is (= (r-sugar m) 6))
    154     (is (equalp  (r->list z) '(0 0 0)) "Trivial term is a vector of 0's")
    155     (is (r-equalp (r* m n) m*n))
    156     (is (r-equalp (r/ n m) n/m))
    157     (is (r-equalp (right-tensor-product-by m n) m-tensor-n))
     154    (is (equalp  (monom->list z) '(0 0 0)) "Trivial term is a vector of 0's")
     155    (is (universal-equalp (multiply m n) m*n))
     156    (is (universal-equalp (divide n m) n/m))
     157    (is (universal-equalp (right-tensor-product-by m n) m-tensor-n))
    158158    (signals
    159159        (error "EXPONENTS must have length DIMENSION")
    160160      (make-instance 'term  :dimension 3 :exponents '(1 2 3 4 5 6) :coeff 77))
    161     (is-true (r-divides-p m n))
    162     (is-false (r-divides-p n m))
    163     (is (r-equalp (r-gcd m n) m))
    164     (is (r-equalp (r-lcm m n) n))
    165     (is-true (r-depends-p m 0))
     161    (is-true (divides-p m n))
     162    (is-false (divides-p n m))
     163    (is (r-equalp (universal-gcd m n) m))
     164    (is (r-equalp (universal-lcm m n) n))
     165    (is-true (depends-p m 0))
    166166    (signals
    167167        (error "Index out of bounds")
    168       (r-depends-p m 3))
     168      (depends-p m 3))
    169169    )
    170170  (with-fixture term-context ()
    171     (is (r-equalp (multiply-by m n) m*n)))
     171    (is (universal-equalp (multiply-by m n) m*n)))
    172172  (with-fixture term-context ()
    173     (is (r-equalp (divide-by n m) n/m)))
     173    (is (universal-equalp (divide-by n m) n/m)))
    174174  (with-fixture term-context ()
    175     (is (r-equalp (unary-minus m) m-uminus))))
     175    (is (universal-equalp (unary-minus m) m-uminus))))
    176176
    177177
     
    186186  "Monom/term conversion"
    187187  (with-fixture monom/term-conversion-context ()
    188     (is (r-equalp (change-class term 'monom) monom)))
     188    (is (universal-equalp (change-class term 'monom) monom)))
    189189  (with-fixture monom/term-conversion-context ()
    190     (is (r-equalp (change-class monom 'term) promoted-monom))))
     190    (is (universal-equalp (change-class monom 'term) promoted-monom))))
    191191
    192192(test monom/term-copy
    193193  "Monom/term copy"
    194194  (with-fixture monom/term-conversion-context ()
    195     (is (r-equalp (copy-instance monom) monom))
    196     (is (r-equalp (copy-instance term) term)))
     195    (is (universal-equalp (copy-instance monom) monom))
     196    (is (universal-equalp (copy-instance term) term)))
    197197  )
    198198
     
    202202        (term2 (make-instance 'term :exponents '(4 5) :coeff 3))
    203203        (term1-left-tensor-by-term2 (make-instance 'term :exponents '(4 5 1 2 3) :coeff 12)))
    204     (is (r-equalp (left-tensor-product-by term1 term2) term1-left-tensor-by-term2))))
     204    (is (universal-equalp (left-tensor-product-by term1 term2) term1-left-tensor-by-term2))))
    205205
    206206(test term-contract
     
    208208  (let ((term (make-instance 'term :exponents '(1 2 3) :coeff 4))
    209209        (term-contracted (make-instance 'term :exponents '(2 3) :coeff 4)))
    210     (is (r-equalp (left-contract term 1) term-contracted))))
     210    (is (universal-equalp (left-contract term 1) term-contracted))))
    211211
    212212
Note: See TracChangeset for help on using the changeset viewer.