In my opinion construction of the field, in order to able to do basic
arithmetic in it, should not require any checking other than that the
defining polynomial is irreducible -- in this case, whether D is a
square.  Only if you need the ring of integers should it be necessary
to do the extra work requiring factorization.

It's traditional in number theory to refer to the discriminant of a
field, when it's really the discriminant of the ring of integers which
is meant.  So what do you do if you construct a field (as in the
previous paragraph) and then ask for its discriminant?  The only
mathematically sensible answer is that at that point factorization is
needed, and behind the scenes the rings of integers will be
determined.  The cheaper alternative, which is what Magma does, is to
return the discriminant of the defining polynomial of the field,
something which causes a lot of confusion when starting to use Magma!
Not only does this fail to match the mathematical definition of
"discriminant of a number field", it has the unfortunate side effect
that two fields can be isomorphic but have different Magma-style
discriminants.

Let's make sure that Sage does this properly!  And that means that to
compute the discriminant of a number field is not a "free" operation,
as it will involve harder work, including the factorization of the
polynomial discriminant.

John

On 01/11/2007, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
>
> On Nov 1, 2007, at 12:11 AM, William Stein wrote:
>
> > On Thu, 01 Nov 2007 00:00:57 -0700, Robert Bradshaw
> > <[EMAIL PROTECTED]> wrote:
> >> The answer is, I believe, yes. Should it rely on the check flag to
> >> decide whether or not to try and factor?
> >
> > Wait, is there a good reason to ever compute the discriminant in
> > order to
> > represent elements of the field?
> >
> > Generally, check is supposed to be for checking whether
> > the polynomial is irreducible or not, which for a quadratic
> > field Q(sqrt(D)) just means checkin whether D is a perfect
> > square, which is a lot easier than factoring D.
>
> Smaller D will result in faster arithmetic, but it's probably not
> worth factoring (might be worth doing trial division for squares of
> small primes though).
>
> - Robert
>
> >
>


-- 
John Cremona

--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to