Re: [sage-support] Coefficients of polynomial over finite field are not reduced?

61 views
Skip to first unread message

William Stein

unread,
May 5, 2013, 5:26:15 PM5/5/13
to sage-support support


On May 5, 2013 2:15 PM, "geo909" <gtza...@gmail.com> wrote:
>
> Hi all,
>
> This is my first time with sage and I'm trying to work with polynomials
> over finite fields. Probably due to my lack of knowledge, I'm getting
> some unexpected behaviour. In particular, the output of, let's say
>
> F = GF(3)
> R.<x> = F[]
> T(x)=5*x^2+3

This is wrong.  Do T=5*x^2+3 instead.

> T
>
> is
>    
>
> x |→ 5x2+3
>
>
> I also get the same output with
>
> x = PolynomialRing(GF(3), 'x').gen()
> T(x)=5*x^2+3
> T
>
> I guess I would expect the coefficients to be reduced
> modulo 3 since we are working over GF(3). At least,
> I would expect, say T(F(1)) to be reduced modulo 3,
> but instead I get:
>
> F = GF(3)
> R.<x> = F[]
> T(x)=5*x^2+3
> T(F(1))
>
> output: 8
>
> Any comments? What is that I'm not doing right?
>
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

Simon King

unread,
May 6, 2013, 1:05:56 AM5/6/13
to sage-s...@googlegroups.com
Hi,

On 2013-05-05, William Stein <wst...@gmail.com> wrote:
>> F =3D GF(3)
>> R.<x> =3D F[]
>> T(x)=3D5*x^2+3
>
> This is wrong. Do T=3D5*x^2+3 instead.

To elaborate a bit more:

By
T(x) = 3*x^2+3
you define T as a symbolic function (not as a polynomial) in the
new symbolic variable x. Hence, after this line, x is a symbolic
variable and not the generator of a polynomial ring.

Best regards,
Simon


William Stein

unread,
May 6, 2013, 10:54:01 AM5/6/13
to sage-s...@googlegroups.com
On Sun, May 5, 2013 at 10:05 PM, Simon King <simon...@uni-jena.de> wrote:
> Hi,
>
> On 2013-05-05, William Stein <wst...@gmail.com> wrote:
>>> F =3D GF(3)
>>> R.<x> =3D F[]
>>> T(x)=3D5*x^2+3
>>
>> This is wrong. Do T=3D5*x^2+3 instead.
>
> To elaborate a bit more:

(Thanks! I was sneakily typing on my cell phone yesterday when I
answered that.)

>
> By
> T(x) = 3*x^2+3
> you define T as a symbolic function (not as a polynomial) in the
> new symbolic variable x. Hence, after this line, x is a symbolic
> variable and not the generator of a polynomial ring.
>
> Best regards,
> Simon
>
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

geo909

unread,
May 19, 2013, 1:16:04 PM5/19/13
to sage-s...@googlegroups.com
Thank you very much! I couldn't understand what
I was doing wrong for the life of me, now it's clear.
Reply all
Reply to author
Forward
0 new messages