Tanks for answers! > > > 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.)
I would like to get something like NotImplementedError if there is no known comparison (in which case python try to search elsewhere if there is a possibility). Both of the following command should return False or raise an error like "NotKnownComparison" sage: Gamma0(7) < PolynomialRing(RR,'a') sage: PolynomialRing(RR,'a') < Gamma0(7) but this is not the case... The question looks like the one which was pointed out in thread [complementary problem]: having two *Sage Parent* coercible into a set A and B does A.__lt__(B) means strict inclusion of the underlying set? (is this documented anywhere in Sage?) > > > 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! > Right! Good point! But there are infinite group with which we can compute things: finitely generated ones (and not especially co- finite)... for the future. I have also examples of subgroups of SL(2,Z) defined by kernel and intersection which are neither finitely generated nor co-finite but which are of interest and for which one can answer to the questions: * is x in G (so one can enumerate elements) * which power of x are in G * is a conjugate of x in G > > > * 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. > OK. for this question it seems that everybody agree .is_conjugate for a group as a subgroup of an ambient group means conjugacy in the ambient group. But it seems that there is no generic class for subgroups, is it? .is_conjugate for element of a group means conjugacy inside the group. In which case we need to document it somewhere in the base class MultiplicativeGroupElement? [complementary problem] http://groups.google.com/group/sage-devel/browse_thread/thread/5adbb850f787373c/eab3aafb319a2769 -- 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