Re: [sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-10 Thread Simon Brandhorst
That is my motivation as well. -- a baseclass for automorphism groups. Want 
to help me with that? :)

On Friday, February 9, 2018 at 8:48:44 PM UTC+1, mathzeta2 wrote:
>
> On 09/02/18 15:07, Simon Brandhorst wrote: 
> > 
> > The application I have in mind is to create an abstract base class for 
> > group homomorphisms of libgap groups. And if we want to compute the 
> > inverse image of a subgroup, then this should be decided by the method 
> > "is_subgroup". 
> > 
>
> A bit off-topic, but after having group homomorphisms, it will be very 
> nice to have a method to compute the automorphism group of a group G 
> which better than: 
>
> G._gap_().AutomorphismGroup() or 
> libgap(G).AutomorphismGroup() 
>
> The same goes as to create methods for the inner automorphism group, the 
> outer automorphism group and the holomorph. One motivation is just 
> examples in a group theory course, but obviously there many other. 
>
> Regards, 
> TB 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-09 Thread TB

On 09/02/18 15:07, Simon Brandhorst wrote:


The application I have in mind is to create an abstract base class for 
group homomorphisms of libgap groups. And if we want to compute the 
inverse image of a subgroup, then this should be decided by the method 
"is_subgroup".




A bit off-topic, but after having group homomorphisms, it will be very 
nice to have a method to compute the automorphism group of a group G 
which better than:


G._gap_().AutomorphismGroup() or
libgap(G).AutomorphismGroup()

The same goes as to create methods for the inner automorphism group, the 
outer automorphism group and the holomorph. One motivation is just 
examples in a group theory course, but obviously there many other.


Regards,
TB

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-09 Thread Simon Brandhorst
I think 1) is the reasonable way. 

G.is_subgroup(H) should return if G is (in a natural way) a subset of H 
such that it is closed under the group operations i.e. a subset.
For example for permutation groups (of {1,...,n} ) the "natural way" Is to 
regard all of them as permutation groups of the natural numbers NN.

In the concrete situation of libgap groups I would say that the function 
should return if gap considers them as subgroups. (Which should be 
compatible with the above.)
If one wants to have more restricted behaviour in a derived class, then one 
should override is_subgroup !?

The application I have in mind is to create an abstract base class for 
group homomorphisms of libgap groups. And if we want to compute the inverse 
image of a subgroup, then this should be decided by the method 
"is_subgroup".

On Friday, February 9, 2018 at 9:58:44 AM UTC+1, vdelecroix wrote:
>
> On 09/02/2018 09:47, Simon Brandhorst wrote: 
> >  Return whether the group was defined as a subgroup of a bigger 
> >  group. 
>
> This description is very unclear anyway. See also #24535 for ambiguities 
> concerning group comparisons. 
>
> For me there are two relevant concepts 
>
>   1) whether H is a subgroup of G, for example 
>
> sage: G = PermutationGroup([ [4,3,2,1], [2,1,4,3] ]) 
> sage: H = PermutationGroup([ [4,3,2,1] ]) 
> sage: H.is_subgroup(G) 
> True 
>
>   Here I did *not* defined H as a subgroup of G (so the above description 
>   does not apply). Note that in order for this comparison to make sense, 
>   G and H must be subgroups of a same ambient group (here 
>   SymmetricGroup(4)). But there is no such thing as an .ambient_group 
>   method. 
>
>   2) whether G contains a subgroup isomorphic to H. In this situation no 
>need to have a common ambient group 
>
> I think that more generally discussing and fixing the semantic of group 
> comparisons (and more generally algebraic structures) would be a good 
> idea... and the behavior would ideally be coherent among all of Sage! 
>
> Vincent 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-09 Thread Vincent Delecroix

On 09/02/2018 09:47, Simon Brandhorst wrote:

 Return whether the group was defined as a subgroup of a bigger
 group.


This description is very unclear anyway. See also #24535 for ambiguities
concerning group comparisons.

For me there are two relevant concepts

 1) whether H is a subgroup of G, for example

   sage: G = PermutationGroup([ [4,3,2,1], [2,1,4,3] ])
   sage: H = PermutationGroup([ [4,3,2,1] ])
   sage: H.is_subgroup(G)
   True

 Here I did *not* defined H as a subgroup of G (so the above description
 does not apply). Note that in order for this comparison to make sense,
 G and H must be subgroups of a same ambient group (here
 SymmetricGroup(4)). But there is no such thing as an .ambient_group
 method.

 2) whether G contains a subgroup isomorphic to H. In this situation no
  need to have a common ambient group

I think that more generally discussing and fixing the semantic of group
comparisons (and more generally algebraic structures) would be a good
idea... and the behavior would ideally be coherent among all of Sage!

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-09 Thread Simon Brandhorst
I forgot to say this is in sage.groups.libgap_wrapper

On Friday, February 9, 2018 at 9:45:50 AM UTC+1, Simon Brandhorst wrote:
>
> Currently:
>  
>def is_subgroup(self):
> """
> Return whether the group was defined as a subgroup of a bigger
> group.
>
> You can access the containing group with :meth:`ambient`.
>
> OUTPUT:
>
> Boolean.
>
> EXAMPLES::
>
> sage: G = FreeGroup(3)
> sage: G.is_subgroup()
> False
> """
> return self._ambient is not None
>
>
> But in any sensible derived class i would expect
>
> def is_subgroup(self, other):
> """
>Returns "True" if "self" is a subgroup of "other".
>"""
>
> The suggestion is to change the name of he first method to 
> "is_defined_as_subgroup"
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.