[sage-devel] Re: factor ideals at NF

2007-12-30 Thread John Cremona
Thanks for the explanation. Perhaps we need to change the implementation to be more like what Magma does, namely it gives either 2 O_K-generators or a Z_K-basis by default, but if you ever ask if an ideal is principal then it works that out and stores the result, with the generator if principal s

[sage-devel] Re: factor ideals at NF

2007-12-30 Thread Bill Hart
Actually, even that is not correct. It creates the ideal objects in no time. It seems that it is when it comes to display them that it wants to determine if they are principal, presumably so it can display them with as simple a representation as possible. Bill. On 30 Dec, 11:39, Bill Hart <[EMAI

[sage-devel] Re: factor ideals at NF

2007-12-30 Thread Bill Hart
What is happening is that at a certain point it is checking to see if ideals are principal. That requires bnfisprincipal and hence bnfinit which requires computation of the unit and class group. Essentially the way it is implemented is that it expresses the ideal in hermite normal form. Then it f

[sage-devel] Re: factor ideals at NF

2007-12-30 Thread John Cremona
But pari provides two number field structures (see page 117 of the pari manual), nf and bnf. nfinit() creates a number field with more "elementary" capabilities, including the ring of integers and prime decompositions. bnfinit() works a lot harder and gives the class and unit groups. Hence it

[sage-devel] Re: factor ideals at NF

2007-12-29 Thread David Roe
The issue is that since Sage uses pari to do everything in the background, one needs to create the pari data structures, which means that you currently call nfinit on the number field, which computes the class group and unit group. This should change eventually, but right now... David On Dec 29,

[sage-devel] Re: factor ideals at NF

2007-12-29 Thread Enrique Gonzalez-Jimenez
As John Cremona said at the sage.forum: "But why would Sage be computing the class group in order to factor 2 in K?" For me that is strange too. Since it would be easier to compute the factorization of an ideal generate by a prime. For example: Using the Proposition that asserts that if K is a

[sage-devel] Re: factor ideals at NF

2007-12-29 Thread Bill Hart
It presumably can't compute the class group, because of the proof=true thing. Basically if you want a proven result, it is going to take forever and will need more primes than Pari has precomputed. It's not clear to me if SAGE is actually catching the error message, or if it is just raising an ex

[sage-devel] Re: factor ideals at NF

2007-12-29 Thread mabshoff
On Dec 29, 9:17 pm, [EMAIL PROTECTED] wrote: > Hello: > > I am working at my Number Theory lectures and I have found a bug (?). This is > the output: > > /// SAGE 2.9.1 /// > sage: K.=CyclotomicField(23) > sage: O=K.maximal_order() > sage: (2*O).factor() > *