sagemath / sage

Main repository of SageMath. Now open for Issues and Pull Requests.
https://www.sagemath.org
Other
1.21k stars 421 forks source link

Invertibility of simplification_isomorphism #24137

Open b7b30ad4-17d9-42b7-bc1d-7ceb7b0f2dbb opened 6 years ago

b7b30ad4-17d9-42b7-bc1d-7ceb7b0f2dbb commented 6 years ago

The simplification_isomorphism() method in the class sage.groups.finitely_presented.FinitelyPresentedGroup_with_category returns an isomorphism, which would in particular mean it is invertible. It would be useful to be able to access the inverse, however there is no obvious way to access this inverse.

Running the following code

G.<a,b,c> = FreeGroup()
H = G / [a*b*c, a*b^2, c*b/c^2]
I = H.simplification_isomorphism()
print(type(I))
~I

Results in:

<class 'sage.groups.finitely_presented.GroupMorphismWithGensImages'>
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-106829259be7> in <module>()
      3 I = H.simplification_isomorphism()
      4 print(type(I))
----> 5 ~I

TypeError: bad operand type for unary ~: 'GroupMorphismWithGensImages'

I'm not sure if ~I would be the way to invert the map, but there are no obvious inversion methods in I, and the type of I suggests it is not invertible.

Thank you for your help. I am happy to help in any way I can, but I don't have much experience with creating patches, etc.

Component: group theory

Keywords: simplification_isomorphism

Issue created by migration from https://trac.sagemath.org/ticket/24137

roed314 commented 6 years ago
comment:1

If you look at the source for simplification_isomorphism you'll see

I = self.gap().IsomorphismSimplifiedFpGroup()
domain = self
codomain = wrap_FpGroup(I.Range())
phi = lambda x: codomain(I.ImageElm(x.gap()))
HS = self.Hom(codomain)
return GroupMorphismWithGensImages(HS, phi)

The first step toward finding an inverse in Sage is to figure out how to do it in Gap....

roed314 commented 6 years ago
comment:2

You can look at 47.12-1 in https://www.gap-system.org/Manuals/doc/ref/chap47.html

b7b30ad4-17d9-42b7-bc1d-7ceb7b0f2dbb commented 6 years ago
comment:3

I'm sorry about being slow to respond: I've been busy.

When I get a chance, I'll try to figure out how to do this myself so that I can submit a patch. Thanks for your help.

roed314 commented 6 years ago
comment:4

Replying to @sagetrac-wphooper:

I'm sorry about being slow to respond: I've been busy.

When I get a chance, I'll try to figure out how to do this myself so that I can submit a patch. Thanks for your help.

No problem; we're all busy. Feel free to comment here if you get stuck.