Dear Javier,

On Thu, Oct 01, 2009 at 10:32:30AM -0700, javier wrote:
> 
> Somebody could explain why these are different files?
> 
> Assuming that by "all ideals of a ring R" we mean two-sided ideals
> (that should go inside the description!) I don't see what is the
> difference, for a commutative ring R, between ring_ideals(R) and
> commutative_ring_ideals(R). Or am I missing something here?
>
> IMO, there is no need for "commutative_ring_ideals", and the only
> distinction on whether R is commutative or not should be made for
> super_categories. If R is commutative it should return Modules(R) and
> if R is not commutative it should return
> [LeftRingIdeals(R), RightRingIdeals(R), Bimodules(R,R)]
> 
> This also brings to attention that there aren't any "LeftRingIdeals"
> or "RightRingIdeals" methods, I think these should also be included in
> the ring_ideals.py file, defined in a similar way as RingIdeals with
> the additional check of commuativity of R, in which case
> LeftRingIdeals, RightRingIdeals and RingIdeals should be identified as
> equal.

Thanks for bringing this up. My point of view, backed up with David is
as follow:

 - RingIdeals is indeed about two sided ideals

 - The CommutativeRingIdeal category will potentially contain a lot of
   code that will be specific to the commutative case (either new
   methods or more efficient implementations of other
   methods). Merging the two categories would mean not only making a
   test in the super_categories method (as you mention above), but
   also in all the other methods specific to the commutative case.

   Hence the following hierarchy of categories:

               LeftModule            RightModule
                   |     \          /       |
           RingLeftIdeals  BiModule  RingRightIdeals
                         \     |    /
                          RingIdeals
                               |
                     CommutativeRingIdeals

 - As you mention, from the user perspective it's redundant to ask for
   CommutativeRingIdeals(QQ). So, when RingIdeals(QQ) is called, Sage
   could detect that QQ is commutative, and automatically return the
   former (+ play a trick so that CommutativeRingIdeals.super_categories 
   could still actually create RingIdeals(QQ)).

 - Same thing for AlgebraIdeals.

I added those bits to the documentation, leaving the current code
unchanged. I vote for delaying the actual implementation of
Ring[Left/Right]Ideals until actually needing them. I am also lazy
implementing the trick above now, unless there is a vast agreement on
it.

Does this sound ok?

Cheers,
                                Nicolas

PS: in the same vein: should Modules(R) automatically return
VectorSpaces(R) when R is a field?

--
Nicolas M. ThiĆ©ry "Isil" <[email protected]>
http://Nicolas.Thiery.name/

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to