Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Coerce element of subgroup into ambient group

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
True
sage: M.list()[1] in G
False

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

I'm working in Sage 9.7