https://github.com/oldk1331/fricas/commit/6b10a8e1dfac310daae7d4b1586dde766d78d214.patch

This patch should go between patch No.3 and patch No.4.

The Rep is already sorted according to 'LispLessP',
so we can compare them one by one instead of using 'set'.

diff --git a/src/algebra/fr.spad b/src/algebra/fr.spad
index 349ab6e3..8d6547cb 100644
--- a/src/algebra/fr.spad
+++ b/src/algebra/fr.spad
@@ -27,7 +27,6 @@
 Factored(R : IntegralDomain) : Exports == Implementation where
   fUnion ==> Union("nil", "sqfr", "irred", "prime")
   FF     ==> Record(flag : fUnion, factor : R, exponent : Integer)
-  SRFE   ==> Set(Record(factor : R, exponent : Integer))

   Exports ==> Join(IntegralDomain, DifferentialExtension R, Algebra R,
                    FullyEvalableOver R, FullyRetractableTo R) with
@@ -329,8 +328,14 @@
               unitNormalize mkFF(1, [["nil", r, 1]$FF])

     u = v ==
-      (unit u = unit v) and # u.fct = # v.fct and
-        set(factors u)$SRFE =$SRFE set(factors v)$SRFE
+        unit u ~= unit v => false
+        lu := factorList u; lv := factorList v
+        while not empty? lu and not empty? lv repeat
+            u1 := first lu; v1 := first lv
+            u1.exponent ~= v1.exponent => return false
+            u1.factor ~= v1.factor => return false
+            lu := rest lu; lv := rest lv
+        empty? lu and empty? lv

     - u ==
       zero? u => u

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to