1) This is okay with me, but by "set" I assume you don't mean "Set":-)
For example,
sage: A = lambda g, x: g*x
sage: G = SL(2,5)
sage: X = GF(5)^2
sage: a = GroupAction(A, X, G)
sage: a.orbits()
should return something reasonable.
2) Your new class should be consistent with the built in action
of permutation groups and automorphism groups on various
objects (eg, graphs, block designs, incidence structures)
It would be nice if there could be a default "A" in this
case.

Some examples of such built-in orbits,
sage: A = lambda g, x: g*x
sage: X = [1,2,3,4]
sage: G = SymmetricGroup(X)
sage: H = G.subgroup([[(1,2),(3,4)]]);
sage: a = GroupAction(A, H, X)
sage: a.orbits()
should be consistent with the built in permutation group action
sage: X = [1,2,3,4]
sage: G = SymmetricGroup(X)
sage: H = G.subgroup([[(1,2),(3,4)]]); H.list()
[(), (1,2)(3,4)]
sage: H.orbits()
[[1, 2], [3, 4]]
and
sage: A = lambda g, x: g*x
sage: X = graphs.ButterflyGraph()
sage: G = Gamma.automorphism_group()
sage: a = GroupAction(A, G, Gamma)
sage: a.orbits()
should give more or less the same output as
sage: Gamma = graphs.ButterflyGraph()
sage: G = Gamma.automorphism_group()
sage: G.orbits()
[[0, 1, 2, 3], [4]]
However, I'm not sure how your class would yield the output of
sage: P = designs.DesarguesianProjectivePlaneDesign(2)
sage: G = P.automorphism_group()
sage: G.orbits()
[[(0, 0, 1), (1, 0, 1), (0, 1, 1), (1, 0, 0), (1, 1, 1), (0, 1, 0), (1, 1, 0)]]



On Mon, May 2, 2022 at 4:39 AM 'Martin R' via sage-devel
<sage-devel@googlegroups.com> wrote:
>
> Would you be happy with something like the following, as a unifying and 
> easily accessible framework?  Of course, I am thinking of providing also 
> methods that convert it (back) into a representation, a combinatorial 
> species, a permutation group.
>
> class FiniteGroupAction(SageObject):
>
>     def __init__(A, X=None, G=None):
>     r"""
>     A finite group action.
>
>     INPUT:
>
>     - ``A`` -- can be one of the following:
>
>       * a permutation group, if ``X`` and ``G`` are ``None``
>
>       * a bijection on a finite set ``X``, if ``G`` is ``None``
>
>       * a map `G\times X\to X`, otherwise.
>
>     - ``X`` (optional, default ``None``) -- a finite set
>
>     - ``G`` (optional, default ``None``) -- a finite group
>
>     EXAMPLES::
>
>         sage: G = PermutationGroup([['b','c','a']], domain=['a','b','c','d'])
>         sage: a = GroupAction(G)
>         sage: a.orbits()
>         [['a', 'b', 'c'], ['d']]
>
>         sage: A = lambda x: (2*x) % 6
>         sage: X = [0,1,2,3,4,5]
>         sage: a = GroupAction(A, X)
>         sage: a.orbits()
>         [[0], [1, 2, 4], [3], [5]]
>
>         sage: G = SymmetricGroup(3)
>         sage: A = lambda g, x: g*x
>         sage: a = GroupAction(A, G, G)
>         sage: a.orbits()
>         [['a', 'b', 'c', 'd']]
>
> On Monday, 2 May 2022 at 01:32:01 UTC+2 Travis Scrimshaw wrote:
>>>>
>>>> Sorry, I don't know an easy way. I've always just defined them by hand
>>>> whenever needed.
>>>> However, I agree with you that a better way is needed.
>>>
>>>
>>> I would love for there to be some standard way to define a group action on 
>>> a set - preferably maintaining other algebraic properties of the set, such 
>>> as addition!  But I don't know if there is even close to a standard way to 
>>> do this either.
>>
>>
>> - There is a standard way to do this, but not a generic method/class for it 
>> IIRC. You can do this by implementing an _act_on_() method on a wrapper 
>> class. Yet, this requires some manual input.
>> - For cyclic actions, there is the DiscreteDynamicalSystem class introduced 
>> in https://trac.sagemath.org/ticket/24128.
>> - There is also the Representation class in 
>> modules/with_basis/representation.py if you want to want to extend the 
>> action on the set to the module with a basis given by that set.
>>
>> Likely we will want to implement a class SetWithAction that automates a 
>> collects the orbit_decomposition functions and similar together as methods 
>> as a single global entry point.
>>
>> Best,
>> Travis
>>
>>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/20c36129-bd92-4252-9a85-a750aea7b038n%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAEQuuAU48K0n162dR8P32n%2Bie7xHS2ph2ETpZLzB7SNd9Bnzbw%40mail.gmail.com.

Reply via email to