Re: [sage-support] Re: direct product and direct sum of groups

2021-03-24 Thread Dima Pasechnik
On Wed, Mar 24, 2021 at 3:59 PM slelievre  wrote:
>
> 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.=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. = 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 >
> ```

careful here, FreeGroup is not Abelian, you'll want to add commuting relations
for all its generators.

You might prefer AbelianGroup() to begin with.


>
> --
> 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.

-- 
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/CAAWYfq1Ey5ujUz5ygbXNHuJYpvN_8JGEyxKunJdVTAb2fhr38g%40mail.gmail.com.


[sage-support] Re: direct product and direct sum of groups

2021-03-24 Thread slelievre
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.=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. = 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.