# HG changeset patch
# User Nathann Cohen
# 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/sage/groups/perm_gps/permgroup.py
+++ b/sage/groups/perm_gps/permgroup.py
@@ 1068,15 +1068,17 @@
return [[self._domain_from_gap[x] for x in orbit] for orbit in
self._gap_().Orbits(self._domain_gap()).sage()]
 supported_actions = ["OnPoints", "OnTuples", "OnSets", "OnPairs", "OnSetsSets",
+ supported_actions = ["OnPoints", "OnTuples", "OnSets", "OnPairs", "OnSetsSets",
"OnSetsDisjointSets", "OnSetsTuples", "OnTuplesSets", "OnTuplesTuples"]
@cached_method
def orbit(self, point, action = "OnPoints"):
"""
 Return the orbit of a point under the group action in the list
 `self.supported_actions`.
 These are taken from `http://www.gapsystem.org/Manuals/doc/ref/chap41.html`_.
+ Return the orbit of a point under a group action.
+
+ All actions available through this method can be obtained from
+ `self.supported_actions`. They are taken from GAP's list
+ `http://www.gapsystem.org/Manuals/doc/ref/chap41.html`_.
INPUT:
@@ 1085,7 +1087,7 @@
members must be sorted w.r.t. to the default order on them.
 ``action`` (string)  if ``point`` is a tuple (of tuples) of points, this
 variable describes how the group is acting. The list of possibilites is
+ variable describes how the group is acting. The list of possibilites is
is given by `self.supported_actions`.
It is set to ``"OnPoints"`` by default. See below for examples.
@@ 1111,7 +1113,7 @@
sage: S3.orbit((1,2), action = "OnTuples")
[[1, 2], [2, 3], [2, 1], [3, 1], [1, 3], [3, 2]]

+
Action of `S_4` on sets of disjoint sets::
sage: S4 = groups.permutation.Symmetric(4)
@@ 1137,7 +1139,7 @@
else:
points = [[self._domain_to_gap[x] for x in p] for p in point]
orbits = self._gap_().Orbit(points, action).sage()
 return [[[self._domain_from_gap[x] for x in p] for p in o]
+ return [[[self._domain_from_gap[x] for x in p] for p in o]
for o in orbits]
else:
@@ 1147,27 +1149,31 @@
def action(self, domain, action = "OnPoints"):
"""
Return the permutation group induced by self acting on domain.

+
+ All actions available through this method can be obtained from
+ `self.supported_actions`. They are taken from GAP's list
+ `http://www.gapsystem.org/Manuals/doc/ref/chap41.html`_.
+
INPUT:
 ``domain``  the list of things for which GAP knows how to compute
the action of the permutation group. For instance it can be obtained by
 calling :meth:`orbit`.

  ``action`` (string)  the action on domain. Need not be limited to
+ calling :meth:`orbit`.
+
+  ``action`` (string)  the action on domain. Need not be limited to
`self.supported_actions`.
It is set to ``"OnPoints"`` by default. See below for examples.
 EXAMPLES::

 Action of `S_5` on 2subsets::
+ EXAMPLES:
+
+ Action of `S_5` on 2subsets::
sage: S5 = groups.permutation.Symmetric(5)
sage: o10 = S5.orbit((1,2), action = "OnSets")
sage: S5_10 = S5.action(o10, action = "OnSets"); S5_10
Permutation Group with generators [(2,4)(6,9)(7,10), (1,2,3,5,7)(4,6,8,9,10)]

 Nonfaithful action of `S_4` on sets of disjoint sets::
+
+ Nonfaithful action of `S_4` on sets of disjoint sets::
sage: S4 = groups.permutation.Symmetric(4)
sage: o3 = S4.orbit(((1,2),(3,4)), action = "OnSetsDisjointSets")