Bill Allombert on Thu, 18 Dec 2014 15:42:38 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Factoring in unique factorization domains


On Thu, Dec 18, 2014 at 02:50:38PM +0200, Andrew Lelechenko wrote:
> What is the best way to factor integers in quadratic rings, which
> are unique factorization domains, using PARI/GP? Should I use
> idealfactor() with nfinit()?

More precisely, you need to compute bnfinit() so you can use
bnfisprincipal() to compute the generators of the prime ideals.

Note that factor() already handles Z[i] so this can be used as a test.

More generally, you can do the same in non-principal domains to
obtain all the factorization of of number as product of irreducible,
but you need to do some combinatoric in the class group to identify
principal ideals.

Cheers,
Bill.