Ticket #14291: trac_14291-rev2.patch

File trac_14291-rev2.patch, 4.0 KB (added by ncohen, 8 years ago)
  • sage/groups/perm_gps/permgroup.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1363731554 -3600
    # Node ID c3b2b152c65064ab245e4ad7d9d108b66161e427
    # Parent  2e980ea8d962d06b92cb2170a5965cd65d6fefcf
    Orbits of tuples and sets -- documentation
    
    diff --git a/sage/groups/perm_gps/permgroup.py b/sage/groups/perm_gps/permgroup.py
    a b  
    10681068        return [[self._domain_from_gap[x] for x in orbit] for orbit in
    10691069                self._gap_().Orbits(self._domain_gap()).sage()]
    10701070
    1071     supported_actions = ["OnPoints", "OnTuples", "OnSets", "OnPairs", "OnSetsSets", 
     1071    supported_actions = ["OnPoints", "OnTuples", "OnSets", "OnPairs", "OnSetsSets",
    10721072                "OnSetsDisjointSets", "OnSetsTuples", "OnTuplesSets", "OnTuplesTuples"]
    10731073
    10741074    @cached_method
    10751075    def orbit(self, point, action = "OnPoints"):
    10761076        """
    1077         Return the orbit of a point under the group action in the list
    1078         `self.supported_actions`.
    1079         These are taken from `http://www.gap-system.org/Manuals/doc/ref/chap41.html`_.
     1077        Return the orbit of a point under a group action.
     1078
     1079        All actions available through this method can be obtained from
     1080        `self.supported_actions`. They are taken from GAP's list
     1081        `http://www.gap-system.org/Manuals/doc/ref/chap41.html`_.
    10801082
    10811083        INPUT:
    10821084
     
    10851087          members must be sorted w.r.t. to the default order on them.
    10861088
    10871089        - ``action`` (string) -- if ``point`` is a tuple (of tuples) of points, this
    1088           variable describes how the group is acting. The list of possibilites is 
     1090          variable describes how the group is acting. The list of possibilites is
    10891091          is given by  `self.supported_actions`.
    10901092          It is set to ``"OnPoints"`` by default. See below for examples.
    10911093
     
    11111113
    11121114            sage: S3.orbit((1,2), action = "OnTuples")
    11131115            [[1, 2], [2, 3], [2, 1], [3, 1], [1, 3], [3, 2]]
    1114        
     1116
    11151117        Action of `S_4` on sets of disjoint sets::
    11161118
    11171119            sage: S4 = groups.permutation.Symmetric(4)
     
    11371139            else:
    11381140                points = [[self._domain_to_gap[x] for x in p] for p in point]
    11391141                orbits = self._gap_().Orbit(points, action).sage()
    1140                 return [[[self._domain_from_gap[x] for x in p] for p in o] 
     1142                return [[[self._domain_from_gap[x] for x in p] for p in o]
    11411143                        for o in orbits]
    11421144
    11431145        else:
     
    11471149    def action(self, domain, action = "OnPoints"):
    11481150        """
    11491151        Return the permutation group induced by self acting on domain.
    1150        
     1152
     1153        All actions available through this method can be obtained from
     1154        `self.supported_actions`. They are taken from GAP's list
     1155        `http://www.gap-system.org/Manuals/doc/ref/chap41.html`_.
     1156
    11511157        INPUT:
    11521158
    11531159        - ``domain`` -- the list of things for which GAP knows how to compute
    11541160          the action of the permutation group. For instance it can be obtained by
    1155           calling :meth:`orbit`. 
    1156 
    1157         - ``action`` (string) -- the action on domain. Need not be limited to 
     1161          calling :meth:`orbit`.
     1162
     1163        - ``action`` (string) -- the action on domain. Need not be limited to
    11581164          `self.supported_actions`.
    11591165          It is set to ``"OnPoints"`` by default. See below for examples.
    11601166
    1161         EXAMPLES::
    1162 
    1163             Action of `S_5` on 2-subsets::
     1167        EXAMPLES:
     1168
     1169        Action of `S_5` on 2-subsets::
    11641170
    11651171            sage: S5 = groups.permutation.Symmetric(5)
    11661172            sage: o10 = S5.orbit((1,2), action = "OnSets")
    11671173            sage: S5_10 = S5.action(o10, action = "OnSets"); S5_10
    11681174            Permutation Group with generators [(2,4)(6,9)(7,10), (1,2,3,5,7)(4,6,8,9,10)]
    1169            
    1170             Non-faithful action of `S_4` on sets of disjoint sets::
     1175
     1176        Non-faithful action of `S_4` on sets of disjoint sets::
    11711177
    11721178            sage: S4 = groups.permutation.Symmetric(4)
    11731179            sage: o3 = S4.orbit(((1,2),(3,4)), action = "OnSetsDisjointSets")