Hi Waldek,

I know that coerce is treated in a special way, but I guess it shouldn't
happen that when I rename a function from toR to coerce that the
compiler will complain like this.

((|::| |p|
  (|PolynomialRing| C
                    (|SplitHomogeneousDirectProduct| |dim| |dim1|

(|NonNegativeInteger|)))))
****** level 1  ******
$x:= (:: p (PolynomialRing C (SplitHomogeneousDirectProduct dim dim1
(NonNegativeInteger))))
$m:= (PolynomialRing C (SplitHomogeneousDirectProduct dim dim1
(NonNegativeInteger)))
$f:=
((((|p| # #) (|rs| #) (|toPol| #) (|coerce| # #) ...)
  ((|computeEtaQuotientRelations| #) (|#| #) (< #) (<= #) ...)
  ((|etaQuotient| #) (* #) (+ #) (/ #) ...)
  ((|xPolynomial?| #) (|/\\| #) (< #) (<= #) ...) ...))

   >> Apparent user error:
   Cannot coerce p
      of mode (Polynomial C)
      to mode (PolynomialRing C (SplitHomogeneousDirectProduct dim dim1
(NonNegativeInteger)))

In fact, I experimented a bit and the problem is not the name "coerce"
but rather the way I call that function.

        rs: List R := [p::R for p in lpol]

        rs: List R := [coerce(p)@R for p in lpol]
        rs: List R := [coerce(p) for p in lpol]
        rs: List R := [toR(p) for p in lpol]

While the first gives the above error, the other three work fine.

I don't know whether or not this is relevant, but all that happens
inside a function, i.e., the (polynomial) domain R as well a coerce and
toR are defined inside this function. OK R, is just a macro to
PolynomialRing.

Ralf

-- 
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 [email protected].
To post to this group, send email to [email protected].
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