On Nov 30, 2007 11:15 AM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
> On Nov 30, 2007, at 10:19 AM, William Stein wrote:
> > On Nov 30, 2007 9:50 AM, David Roe <[EMAIL PROTECTED]> wrote:
> >> Excellent list! Maybe I should take a break from p-adics and do
> >> some of
> >> these. Some of the gaps should be quite easy to fill in.
>
> I agree. Thanks for this list!
>
> > There are several other things like this, e.g,
> >
> > GIgcd(x) GCD of Gaussian integers
> >
> > I definitely definitely don't think Sage should have a function
> > GIgcd at the top
> > level, since we have Gaussian integers and you can do much the same
> > thing like this:
> >
> > sage: R.<i> = ZZ[i]
> > sage: R
> > Order in Number Field in I with defining polynomial x^2 + 1
> > sage: a = (2 + i)*(3-i); b = (7+2*i)*(3-i)^2
> > sage: R.ideal([a,b])
> > Fractional ideal (6)
>
> I think, however, that
>
> sage: R.<i> = ZZ[i]
> sage: gcd(2+i, 6*i-3)
> 3
>
> should work for any Euclidian domain. Right now it is an error.
I definitely agree with you that this should work. Actually, gcd(a,b) could
be made to work whenever a,b are both in the ring of integers of a number
field, and the ideal they generate is principal. Just return a generator
for (a,b).
> > That said, I think I would be happy with something like:
> >
> > sage: maple_numtheory.safeprime(10)
> > ...
> > sage: maple_numtheory.GIgcd((2 + i)*(3-i), (7+2*i)*(3-i)^2)
> > 6
> >
> > etc. In otherwords, maple maple_numtheory.[tab] give a clone of
> > the number theory functionality of Maple, and of course we should
> > make sure it is faster than Maple for every function.
> >
> > What do you guys think?
>
> I think this goes against the "one way to do it" mantra of Python,
Very good point!
> and if sage it actually doing the code it seems weird to have script
> maple_numtheory.xxx.
>
> If there is actually an equivalent function, I think it would be good
> to have, e.g.
>
> maple.translate('GIgcd') or maple.equivalent('GIgcd')
>
> which would return the equivalent way of doing this in Sage. (Perhaps
> one should return a function the other the code of that function?) I
> think it should be easy for users of Ma--- quickly be able to work in
> Sage, but not just to work in a mapped namespace but rather to learn
> the 'Sage way' of doing things.
You're right. My suggestion is just going to lead to confusion. So
let's just take the list that was posted as motivation for implementing
various things in Sage when they make sense, but *not* implement
everything e.g., when things are sort of silly to implement.
William
--~--~---------~--~----~------------~-------~--~----~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---