Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'public/groups/cactus_group-19594' of git://trac.sagemat…
Browse files Browse the repository at this point in the history
…h.org/sage into cactus
  • Loading branch information
darijgr committed Dec 28, 2015
2 parents 45d940c + 832d7f0 commit 7c0fdf3
Show file tree
Hide file tree
Showing 9 changed files with 795 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/doc/en/reference/groups/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Groups
sage/groups/finitely_presented
sage/groups/finitely_presented_named
sage/groups/braid
sage/groups/cactus_group
sage/groups/indexed_free_group
sage/groups/raag
sage/groups/group_exp
Expand Down
7 changes: 7 additions & 0 deletions src/sage/combinat/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6026,6 +6026,10 @@ def _coerce_map_from_(self, G):
True
sage: P.has_coerce_map_from(Permutations(7))
False
sage: P.has_coerce_map_from(groups.misc.Cactus(5))
True
sage: P.has_coerce_map_from(groups.misc.Cactus(7))
False
"""
if isinstance(G, SymmetricGroup):
D = G.domain()
Expand All @@ -6034,6 +6038,9 @@ def _coerce_map_from_(self, G):
return self._from_permutation_group_element
if isinstance(G, StandardPermutations_n) and G.n <= self.n:
return True
from sage.groups.cactus_group import CactusGroup
if isinstance(G, CactusGroup) and G.n() <= self.n:
return lambda self, x: self(x.to_permutation())
return super(StandardPermutations_n, self)._coerce_map_from_(G)

def _from_permutation_group_element(self, x):
Expand Down

0 comments on commit 7c0fdf3

Please sign in to comment.