Justin thanks for your reply. When I realised that I have posted to dev I
deleted the message and I posted to support. It looks like that you had
already answered there. Since it might help others which will look at
support and not dev, I copy and paste your dev reply here.
2. Yes no problem :)
1. The reason I resulted to Integers(p) was that I couldn't have the proper
cooefficients when using GF.
For the same "configuration" I tried the following
Trying with the following
p=32
N=100
FFQ.<t> = GF(q)#FiniteField(q)
PR.<x> = PolynomialRing(K)
Q.<xx> = PR.quotient(x^N - 1)
pp=Q.random_element()
while True:
try:
ppInv=pp.inverse_mod(xx^N-1)
break
except:
pp=Q.random_element()
print (pp*ppInv).mod(x^N-1)
I get to a dead end as inverse_mod returns me a not implemented error
(sage-6.3-x86_64-Linux)
On Sunday, April 5, 2015 at 3:59:42 AM UTC+3, Justin C. Walker wrote:
>
>
> On Apr 4, 2015, at 17:25 , absinthe wrote:
>
> > Dear all,
> >
> > I'm trying to work with polynomials modulo x^N-1 whose coefficients
> belong
> > to Z_p (If it helps p is a power of a prime). I know that I'm doing
> > something wrong, but I cannot figure out what so any help is welcome.
>
> I'm not sure how familiar you are with this stuff, so forgive me if this
> is already clear to you.
>
> 1. When "p" is a prime power, Z/pZ is not a field (it's a ring, but not a
> domain). If you want to deal with coefficients in a field, then you will
> want to use "GF(p)", not "Integers(p)". And a minor syntactic wrinkle to
> beware of is that when "p" (as above) is a prime power, and not a prime,
> you need a second argument, to be used as the name of the "generator" of
> F_p (as an extension of F_q, q being the prime in p).
>
> 2. Also, in computer algebra systems, you have to be careful about
> parentheses, to get what you want. In particular, "X^N-1" and X^(N-1)" are
> not the same.
>
> If this isn't helpful, we can look at this some more.
>
> HTH
>
> Justin
>
> --
> Justin C. Walker
> Curmudgeon at Large
> Director
> Institute for the Enhancement of the Director's Income
> --
> Build a man a fire and he'll be warm
> for a night.
> Set a man on fire and he'll be warm
> for the rest of his life.
>
>
>
On Sunday, April 5, 2015 at 4:00:47 AM UTC+3, Justin C. Walker wrote:
>
>
> On Apr 4, 2015, at 17:29 , absinthe wrote:
>
> > Dear all,
> >
> > I'm trying to work with polynomials modulo x^N-1 whose coefficients
> belong
> > to Z_p (If it helps p is a power of a prime). I know that I'm doing
> > something wrong, but I cannot figure out what so any help is welcome.
>
> Answered, possibly, on sage-devel...
>
> --
> Justin C. Walker, Curmudgeon at Large
> Institute for the Absorption of Federal Funds
> -----------
> My wife 'n kids 'n dogs are gone,
> I can't get Jesus on the phone,
> But Ol' Milwaukee's Best is my best friend.
> -----------
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.