# GSoC 2019 - Week 6 - Computation of Polycyclic presentation

08 Jul 2019The sixth week of coding period has ended and a good amount of work has been done on polycyclic groups. Polycyclic presentation, Polycyclic generating sequence(pcgs) and it’s series is implemented which for sure need some improvement sympy/sympy#16991.

The polycyclic series is computed starting from the bottom of the derived series of a group by adding the missing generators in the subgroups, and collecting these missing generators provide us the polycyclic generating sequence.

As we discussed last week here that to compute conjugate relators of a polycyclic group we were missing the `RHS`

term, which was of the form `x[i]**-1*x[i+1]*x[i] == RHS`

. So, starting from the bottom of the polycyclic generating sequence forming the subgroup and finding all the generators of the RHS using `generator_product`

, mapping these generators with the free group elements and forming a word, finally collect the above formed word which will give us the collected RHS.

Below is an example to compute polycyclic presentation for S(9).sylow_subgroup(3)

```
>>> from sympy.combinatorics import *
>>> from sympy.combinatorics.free_groups import free_group
>>> F, x0, x1, x2, x3 = free_group("x0, x1, x2, x3")
>>> S = SymmetricGroup(9)
>>> G = S.sylow_subgroup(3)
>>> pc_group = G.polycyclic_group()
>>> group = F
>>> pc_group.pc_presentation(group)
{x3**3: (), x2**3: (), x1**3: (), x0**3: (), x2**-1*x3*x2: x3, x1**-1*x3*x1: x3, x1**-1*x2*x1: x2, x0**-1*x3*x0: x2**2*x3**2, x0**-1*x2*x0: x3, x0**-1*x1*x0: x1*x3}
```

One problem that we’ve encountered is that the generators in pcgs may change for the same group on executing it several times which makes it difficult to test pc_presentation but, Kalevi advised me to initalize `random.seed`

with some chosen value and then it will result in the same repeatable result, will try it by today!

The tasks that I’m hopping to accomplish next week are

- Add tests for plycyclic presentation and be sure that it works properly.
- Include more functionalities to pc groups like
`exponent_vector`

,`element_depth`

,`leading_coefficient`

. - Add documentation for all the functions.

Till then, good byee..

Follow @divyanshu132