Coerce element of subgroup into ambient group

asked 2022-12-21 14:37:41 +0100

schcs gravatar image

I constructed a group G and then its subgroup M. I would like to consider the elements of the subgroup M as elements of G because I want to do some computation with them in a group algebra.

sage: G = AbelianGroup( [2,2,2] )
sage: n, b, c = G.gens()
sage: M = G.subgroup( [n, b] )
sage: M.1 in G
sage: M.list()[1] in G

G(M.list()[1]) also does not work.

I'm working in Sage 9.7

edit retag flag offensive close merge delete


Max Alekseyev gravatar imageMax Alekseyev ( 2023-01-04 22:21:01 +0100 )edit