Tanks for your help. The "lambda: True" thing is really odd but seems to 
work... I will try to find how PARI and Sage (cyclotomic) ring of integers 
are implemented.

On Tuesday, 6 May 2014 16:24:26 UTC+1, John Cremona wrote:
>
> On 6 May 2014 16:11,  <[email protected] <javascript:>> wrote: 
> > I'm sorry but I use the notebook / worksheet working on virtual box so 
> > copy-paste the file is long and painful. So actually I wrote it 
> manually, 
> > that's why there is a mistake on "Fractional". My version is 5.13. I 
> know I 
> > could have use K.ring_of_integers(), but I don't want that : I don't 
> want 
> > sage to compute the ring of integer when I know it. 
>
> The ring of integers is computed by the pari library.  I don't know if 
> pari checks to see if the field is cyclotomic and uses a short-cut if 
> it is.  We should check that, and of not then Sage could put in the 
> shortcut instead;  then you would not have to do what you were doing. 
>
> > 
> > I restarted the notebook, and tried once more to have a complete 
> session. I 
> > admit I was unable to reproduce the factor problem, but there is still 
> > something odd : x should not be 1. 
>
> Agree, and that is a bug in the way that the syntax ZK.<x> = ... is 
> interpreted.  Try replacing that line with 
>
> sage: ZK = ZZ[zeta] 
> sage: x = ZK.gen(0) 
> sage: x 
> zeta0 
>
> but even more simply set 
>
> sage: ZK = K.order(zeta) 
>
> (but there may be a delay when Sage first decides that it needs to test 
> sage: ZK.is_maximal() 
> True 
>
> though you could try to cheat like this 
>
> sage: ZK=K.order(zeta) 
> sage: ZK.is_maximal = lambda: True 
> sage: ZK.is_maximal() 
> True 
>
> John 
>
> > 
> > sage: N=25 
> > sage: K.<zeta> = CyclotomicField(N) 
> > sage: n = K.degree() 
> > sage: ZK.<x> = ZZ[zeta] 
> > sage: ZK 
> > Order in Number Field in zeta0 with defining polynomial x^20 + x^15 + 
> x^10 + 
> > x^5 + 1 
> > sage: x 
> > 1 
> > sage: zeta0 
> > Traceback (most recent call last): 
> > ... 
> > NameError: name 'zeta0' is not defined 
> > sage: x^2-1 
> > 0 
> > 
> > 
> > On Tuesday, 6 May 2014 15:12:32 UTC+1, John Cremona wrote: 
> >> 
> >> The normal way to get at the ring of integers would be to write ZK = 
> >> K.ring_of_integers().  You have defined two separate algebraic 
> >> objects, a ring and a field, and it is not clear what the relationship 
> >> is beteween them. 
> >> 
> >> You should have said what version of Sage you are running.  In 
> >> 6.2.rc2, at least, the word "fractional" is spelled correctly. 
> >> 
> >> What you posted cannot be a complete Sage sessions, since you do not 
> >> define zeta0, and the ideal I you define is not the 20th power of 
> >> anything.  In future you should post exactly what you have in a 
> >> complete session. 
> >> 
> >> John Cremona 
> >> 
> >> On 6 May 2014 14:52,  <[email protected]> wrote: 
> >> > 
> >> > 
> >> > Hi. 
> >> > 
> >> > I have some issue with ideals in number fields. I wanted to test 
> >> > something 
> >> > about cyclotomic polynomials, so I had the following result : 
> >> > 
> >> > sage: N = 25 
> >> > sage: K.<zeta> = CyclotomicField(N) 
> >> > sage: n = K.degree() 
> >> > sage: ZK = ZZ[zeta] 
> >> > sage: ZK 
> >> >  Order in Number Field in zeta0 with defining Polynomial 
> >> > x^20+x^15+x^10+x^5+1 
> >> > 
> >> > sage: I=ZK.ideal(5,zeta-1) 
> >> > sage: I 
> >> >  Fractionnal ideal (5,zeta0-1) 
> >> > 
> >> > sage: I.factor() 
> >> >  (Fractionnal ideal (5,zeta0-1))^20 
> >> > 
> >> > sage: I==I^20 
> >> >  False 
> >> > 
> >> > sage: zeta0 
> >> >  1 
> >> > 
> >> > sage: zeta 
> >> >  zeta 
> >> > 
> >> > I think there is a problem with the zeta0 (actually I tried to 
> enforce 
> >> > the 
> >> > name of the ZK variable by ZK.<zeta_int> = ZZ[zeta] or  ZK.<zeta0> = 
> >> > ZZ[zeta] or  ZK.<zeta> = ZZ[zeta] but that doesn't work : it gives 
> the 
> >> > same 
> >> > result. 
> >> > 
> >> > -- 
> >> > 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. 
> > 
> > -- 
> > 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] <javascript:>. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > Visit this group at http://groups.google.com/group/sage-support. 
> > For more options, visit https://groups.google.com/d/optout. 
>

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

Reply via email to