The general number field stuff is in sage/rings/number_fields/*. Looking through these files should give you a sense of the general structure of things. Note that there are special fields for quadratic extensions and cyclotomic extensions of Q.
I would imagine that many of the Z[i] algorithms would be true (in some form) for quadratic extensions. You could implement it as a ring of integers for quadratic extensions. -- Joel On Saturday 31 March 2007 18:11, Pablo De Napoli wrote: > I'm now trying to write a class for the ring of Gaussian integers > (i.e: Z[i]). This ring has a rich arithmetic (see for example, > Hardy-Wright) In fact, I've already writen some basic functions and > integrate it to my local > copy of sage, but I need to work more on in. > It is writen in pure python (using the functions that sage already has for > integers) > > Obviously more general solutions can be created for example, we could have > the algebraic integers in quadratic fields, but this would be a first step. > > Pablo > > On 3/31/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote: > > On Saturday 31 March 2007 10:10, Pablo De Napoli wrote: > > > Does Sage currently support factoring in Gaussian integers (i.e. in the > > > ring > > > > > > Z[I] of complex numbers with integral real/imaginary parts)? > > > I thing this would be a nice feature to have. > > > > > > In pari/gp for example this works: > > > > > > ? factor(5*I) > > > %1 = > > > [2 + I 1] > > > > > > [1 + 2*I 1] > > > > > > in sage > > > > > > factor(5*I) > > > gives an error. > > > > Yes, as you state, we need to have a ring of integers. This is something > > I'm > > going to work on this summer. Before I do this, I plan on spending more > > time > > with some basic speed benchmarking for number fields. If you want to > > write a > > ring of integers class, that would be a welcome contribution. > > > > -- > > Joel > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---