Hello,

In August last year I started a thread called 'Another problem with finite 
fields and polynomials' where I posted a problem I was having with FriCAS and 
finite fields. Ralf Hemmecke was very kind in responding to me, but we left the 
problem not quite resolved, with me promising to look further into it.

Well, only 9 months later, I am now looking further into it! :-)

In order to isolate the problem I have written a small SPAD file containing two 
definitions of finite field constructors, modelled on those that I found in the 
distribution. The first constructs a field directly, the second constructs a 
field as an extension of a given base field. The file is:

)abbrev domain MYFF MyFiniteField
MyFiniteField(p:PositiveInteger, n:PositiveInteger): 
FiniteAlgebraicExtensionField(PrimeField p) ==_
 FiniteFieldExtensionByPolynomial(PrimeField p, 
createIrreduciblePoly(n)$FiniteFieldPolynomialPackage(PrimeField p))

)abbrev domain MYFFX MyFiniteFieldExtension
MyFiniteFieldExtension(GF : FiniteFieldCategory, n : PositiveInteger): 
FiniteAlgebraicExtensionField(GF) ==_
 FiniteFieldExtensionByPolynomial(GF, 
createIrreduciblePoly(n)$FiniteFieldPolynomialPackage(GF))

then I have a small input file to construct two polynomials over a field, and 
compute the remainder of one modulo the other:

MyGF16 := MyFiniteField(2,4)
a := primitiveElement()$MyGF16
p : POLY MyGF16 := a*x + 1
q : POLY MyGF16 := a*x
p rem q

which works and returns the answer 1 as expected. The problem arises when I 
change the first line to:

MyGF16 := MyFiniteFieldExtension(PrimeField(2),4)

because then I get the error message:

 Error detected within library code:
 coerce: element doesn't belong to smaller field

Now, I'm not asking anyone to dig around and tell me what the problem is, 
because that is something I promised to do (and which I think will gain me a 
better understanding of FriCAS), but I *am* asking for advice on how to look 
into this. Specifically, is there a way to get FriCAS to tell me what it is 
doing? That is, debug information such as what coercions are being applied and 
which functions in which domains are being called?

Thanks in advance,
Paul

-- 
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