On Sep 3, 2008, at 5:25 PM, Nick Alexander wrote:

> Hi sage-devel,
>
> At this time, Sage prints number field ideals in two-generator form.
> There are good reasons for this, perhaps most notably that this is a
> normal form best suited for visual inspection.
>
> For most of the things I do, I don't care exactly what ideal I have: I
> would be perfectly happy to know I had just some ideal I of norm N of
> a number field K.  In particular, I want to calculate in the residue
> field K/I; the actual ideal counts very little; the norm N and the map
> from K -> K/I count a lot.
>
> This would all be fine, except... number field ideals hash to the hash
> of their string representation.  And the string representation
> computes a two-generator form, and computing two-generator forms is
> slow.  *Excruciatingly slow*.  So just to construct K/I, which hashes
> the ideal I into its unique key, takes me minutes if not hours.
>
> So I'd like opinions on two things:
> 1) changing the printing of number field ideals, and

I think this is a good idea, I've avoided printing out number field  
ideals for this exact reason.

> 2) changing the hash key of a residue field K/I to not reference I
> directly, but instead the map K -> K/I.

+1 For sure. As long as hashing respects equality, lets make it as  
fast as we can.

> I haven't thought about this for a long time, but it basically works:
> I have a hacked version of a few functions that tries to avoid hashing
> and changes the relevant __repr__s, and so far it works.  This is the
> difference between not being able to reduce curves defined over number
> fields of degree 40 to easily reducing at dozens of primes.  Thoughts,
> please?

Also, I wonder how much of the number field arithmetic can be sped up  
using Sage's much faster HNF rather than pari's.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to