Hallo Paul,
this is not a problem of the Finite Field code (which I contributed to very long ago) and to find the error, it is also not neccessary to encapsulate in new domains as your MYFF etc.
It is indeed a problem of function selection of the interpreter. Use:
)set mess sel on
The reason is the following: rem and quo are defined for Euclidean Domains, which Polynomial of a Field is not.
Therefore, if you change your variable definition to e.g.
p : UP(x. MYFFX) := a*x+1
etc. it will work! The interpreter has no extra work todo.
This also works if you define the polynomals of POLY MYFF or if you simply drop this domain in the definition of p and q.
Then the interpreter selects (by coercion facilities) as follows (using the fact that there is only one variable around):
Function Selection for rem
Arguments: (POLY(FF(2,4)),POLY(FF(2,4)))
-> no function rem found for arguments (POLY(FF(2,4)),POLY(FF(2,4)))
Function Selection for rem
Arguments: (UP(x,FF(2,4)),UP(x,FF(2,4)))
[1] signature: (UP(x,FF(2,4)),UP(x,FF(2,4))) -> UP(x,FF(2,4))
implemented: slot $$$ from UP(x,FF(2,4))
However, for strange reason: THIS PROBLEM MUST BE HANDED TO EXPERTS OF THE INTERPRETER FUNCTION SELECTION FACILITIES AND COERCION FACILITIES,
the interpreter - in case of FFX(PF 2, 4) finds a coefficent coercion/retraction to transfer to POLY(PF 2) using a retraction (partial function) to the prime field, which is
here explicitly exhibited in FFX contrary to FF, where this is hidden for the interpreter I guess. For some strange reason, the heurisitic seems to think that transfer the problem to POLY PF 2, it will solve it from there. Actually this is not the case, as the transfer to the Polynomials over the prime field must fail (your observed error message).
(15) -> p' rem q'
Function Selection for rem
Arguments: (POLY(FFX(PF(2),4)),POLY(FFX(PF(2),4)))
-> no function rem found for arguments (POLY(FFX(PF(2),4)),POLY(FFX(PF(2),4)))
Function Selection for map by coercion facility (map)
Arguments: ((FFX(PF(2),4) -> PF(2)),POLY(FFX(PF(2),4)))
Target type: POLY(PF(2))
[1] signature: ((FFX(PF(2),4) -> PF(2)),POLY(FFX(PF(2),4))) -> POLY(PF(2))
implemented: slot (Polynomial (PrimeField 2))(Mapping (PrimeField 2) (FiniteFieldExtension (PrimeField 2) 4))(Polynomial (FiniteFieldExtension (PrimeField 2) 4)) from POLY2(FFX(PF(2),4),PF(2))
> --
> 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
fricas...@googlegroups.com.
> To unsubscribe from this group, send email to
fricas-devel...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.
>
Mit freundlichen Grüßen
Johannes Grabmeier
Prof. Dr. Johannes Grabmeier
Köckstraße 1, D-94469 Deggendorf
Tel.
+49-(0)-991-2979584, Tel.
+49-(0)-171-5503789
Tel.
+49-(0)-991-3615-100 (d), Fax:
+49-(0)-1803-5518-17745