A natural way would be to construct the quotient ring of GF(5)[x]  modulo (P), 
then b will be a polynomial in x, and you will have direct access to its 
coefficients.


On 26 November 2024 16:46:50 GMT-06:00, "G. M.-S." <lists....@gmail.com> wrote:
>Already asked on
>https://ask.sagemath.org/question/80389/conversion-from-finite-field-to-integer-polynomial
>
>I am looking for a function myf doing the following:
>
>    sage: var('x')
>    x
>    sage: P=x^3-2*x^2-x-2
>    sage: F125.<a>=GF(5^3,name='a',modulus=P)
>    sage: b=a^37;b
>    4*a^2 + 3*a + 1
>    sage: c=myf(b,y)
>    1 + 3*y + 4*y^2
>    sage: c.parent()
>    Power Series Ring in y over Integer Ring
>
>or better still (symmetric representation):
>
>    sage: c=myf(b,y)
>    1 - 2*y - y^2
>    sage: c.parent()
>    Power Series Ring in y over Integer Ring
>
>I can manage with str, replace, preparse, eval but there is surely a
>natural way.
>
>TIA,
>
>Guillermo
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"sage-support" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to sage-support+unsubscr...@googlegroups.com.
>To view this discussion visit 
>https://groups.google.com/d/msgid/sage-support/CANnG189mMQw1Av4j%3DNQGFaX-EG4YXO_nkTknH-1JiuR3ZnFoxA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-support/16512F53-7543-490F-8E5B-BA36752D3E58%40gmail.com.

Reply via email to