Serge D. Mechveliani wrote:
> 
> Can you, please tell, what is wrong here?
> 
> 
> ---------------------------------------------- t.spad  ------------
> INT  ==> Integer
> NNI  ==> NonNegativeInteger
> UPol ==> UnivariatePolynomial(x, Integer)
> 
> )abbrev package FOO Foo
> Foo() : with
>         f : () -> Factored UPol
>  ==
>   add
>     f() : Factored UPol ==
>                         X := monomial(1 ::INT, 1 ::NNI) $UPol
>                         factor(X) $UPol
> -------------------------------------------------------------------
> 
> In the interpreter,  factor(f)  works for  f : UPol.
> 
> And the compiler of  fricas-1.1.6 + SBCL 1.0.55  reports
> 
>    Compiling FriCAS source code from file 
>       /home/mechvel/haxiom/fromA-aim/t.spad using old system compiler.
>    FOO abbreviates package Foo 
> ------------------------------------------------------------------------
>    initializing NRLIB FOO for Foo 
>    compiling into NRLIB FOO 
>    compiling exported f : () -> Factored UnivariatePolynomial(x,Integer)
> ****** comp fails at level 3 with expression: ******
> error in function f 
> 
> (SEQ
>  (LET X
>    ((|elt| (|UnivariatePolynomial| |x| (|Integer|)) |monomial|)
>     (|::| 1 (|Integer|)) (|::| 1 (|NonNegativeInteger|))))
>  (|exit| 1 | << | ((|elt| (|UnivariatePolynomial| |x| (|Integer|)) 
>  |factor|) X)
>   | >> |))
> ****** level 3  ******
> $x:= ((elt (UnivariatePolynomial x (Integer)) factor) X)
> $m:= (Factored (UnivariatePolynomial x (Integer)))
> $f:=
> ((((X #) (|$Information| #) (|f| #) (|$DomainsInScope| # # #) ...)))
>  
>    >> Apparent user error:
>    not known that (UnivariatePolynomial x (Integer)) has 
>    (has (Integer) (PolynomialFactorizationExplicit)) 
> -------------------------------------------------------------------
>

You need to "package call" it.  In this case:

   factor(X)$UnivariateFactorize(Upol)

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to