Subject: "letsimp" honors "modulus" only partially?
From: Lutz Euler
Date: Mon, 21 Nov 2011 17:07:23 +0100
Hi Stavros and Oliver,
thanks for the fast answers to my mail. Both are very useful.
I wrote:
> I am trying to calculate x^31 in the finite field with 125 elements,
> (Z/5Z)[x]/(x^3 - x - 2). I don't know the canonical way to deal with
> fields of this kind in Maxima, but I found "letsimp" and the variable
> "modulus" and that nearly works.
Stavros wrote:
> I believe the issue here is that 'modulus' is only applied to
> expressions in canonical rational form (CRE) -- expressions
> created using 'rat'.
Yes, this explains why letsimp only partially reduces the numbers
with respect to "modulus". I have read up more on "rat" and CRE in
the documentation now, so thank you for the pointer.
Now, the letsimp-based method very easily gets way too slow;
while it can do the 31th power, with for example the 50th it didn't
return an answer after several minutes.
So thanks to Oliver for pointing me to "gf". You wrote:
> there is the package "gf" which would do all of this ---
> unfortunately it is broken, and only some of the functions work.
>
> The package-functions are also very slow.
I have now tried "gf" very successfully. It seems way sufficient for
my needs, for example exponentiation is instantaneous and it even
can calculate a logarithm in GF(p^3) with p of the order of 2^32
within a minute or so (with p chosen such that the prime factors
of p^3 - 1 are 2, (p - 1)/2 and p^2 + p + 1).
My interest is mostly in interactively experimenting with some simple
calculations to get a better understanding of the structure of the
multiplicative group in these fields, so this amount of performance
is sufficient for me.
Thanks again! Yours,
Lutz