On 29 Aug, 22:58, Alex Ghitza <aghi...@gmail.com> wrote:
> Hi,
>
> On Sun, 29 Aug 2010 10:02:05 -0700 (PDT), Vincent D 
> <20100.delecr...@gmail.com> wrote:
> > I'm working on arithmetic subgroup in sage.modular.arithgroup
> > especially on arithgroup_perm, and I do not know what does the method
> > __cmp__ must do (it is not specified in sage.groups.group.Group where
> > I guess it is the right place):
> >    * equality and inclusions? In this case, the given implementations
> > of Gamma, Gamma0 and Gamma1 fail because of the class
> > ArithmeticSubgroup_perm which can potentially represent any subgroup
> > of SL(2,Z). But, this latter class has the advantage that any
> > implementation of an arithmetic group can be converted into it (from a
> > coset graph) and then be compared.
>
> This is a thorny issue which I would let others address (what should
> happen if G and H are not mathematically comparable?  raise error?
> return -1?  and there are changes in the comparison philosophy between
> python 2 and python 3).
>

As Alex said, __cmp__ is a bit of a can of worms. It certainly isn't
supposed to return any kind of mathematically meaningful result, but
it's intended that *any* two Sage objects can be compared; so trying
to make it test for inclusion etc wouldn't be a good idea. (Is
Gamma0(7) greater than or less than RR[X, Y]? Don't lose too much
sleep over this one.)

> > Other way, I would like to have advices on the best names for the
> > following methods:
> >   * adding minus identity to a subgroup to get an even subgroup?
> > (.to_even_subgroup)

I would have thought that the right place to put this would be the
ArithmeticSubgroup base class, with various specific implementations
in derived classes as appropriate.

> Of course, if you got H without having explicitly defined S, this means
> that you would have to do something like
>
> E = H.ambient_group().even_subgroup(H)
>
> I don't have strong opinions about this, just wanted to suggest the
> alternative.

I do -- it's disgusting :-)

> >   * commensurability? (.is_commensurable)
>
> Sounds good to me.

Sounds pointless to me, because ArithmeticSubgroups are all
commensurable with each other by definition!

> >   * conjugacy of subgroups in SL(2,Z)? (.is_conjugate) there could be
> > a conflict between conjugacy of elements and conjugation of
> > subgroups...
>
> I don't think there would be a conflict, because these would be methods
> of different classes: H.is_conjugate(N) would give conjugacy of
> subgroups as H would be a subgroup; g.is_conjugate(x) would be conjugacy
> of elements since g is a group element.

+1.

David

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to