2021-03-24 14:53:06 UTC, Matt: > How can I calculate the direct product of two groups and/or the direct sum? > For example given: > > G.<x,y>=FreeGroup() > H=G.quotient([x*y]) > > how do I calculate H+H and HxH? >
Having defined `H`, you can type H. then hit the TAB key to see what methods are available. This reveals the methods `cartesian_product` and `direct_product`, are they what you need? ``` sage: G.<x, y> = FreeGroup() sage: H = G.quotient([x*y]) sage: H.cartesian_product(H) The Cartesian product of (Finitely presented group < x, y | x*y >, Finitely presented group < x, y | x*y >) sage: H.direct_product(H) Finitely presented group < a, b, c, d | a*b, c*d, a^-1*c^-1*a*c, a^-1*d^-1*a*d, b^-1*c^-1*b*c, b^-1*d^-1*b*d > ``` -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/ec06a1f8-624a-4352-b968-ac451fa3847bn%40googlegroups.com.