# Properties of an FP-group

Most of the group properties discussed in this section are usually hard to determine. Consequently, many of the intrinsics that test an fp-group $G$ for a given property $P$ only return a useful answer in those cases for which they are able to prove that $G$ has property $P$. If they cannot do this then no conclusion can be drawn. The group property intrinsics that are available in Magma are listed below:-

**Intrinsics:**

`IsPerfect` $(G)$ : Returns *true* if $G$ is perfect and *false* if not. Note that this and the small cancellation intrinsic are the only ones in this list that can definitively decide whether or not the condition holds.

`IsFinite` $(G)$ : Returns *true* if Magma is able to prove that $G$ has finite order. Otherwise no conclusion can be drawn. If successful the order of $G$ is also returned.

`IsInfinite` $(G)$ : Returns *true* if Magma is able to prove that $G$ is infinite. Otherwise no conclusion can be drawn.

`IsLarge` $(G, l, u)$ : Attempts to show that $G$ has a subgroup with homomorphic image the free group of rank 2. If successful, `true` is returned together with a subgroup witness to this property. If not successful, return `false`. The algorithm will consider subgroups of $G$ with index $h$ such that $l \le h \le u$.

`SmallCancellationConditions` $(G)$ : Returns the small cancellation conditions $T(i)$, $C(j)$ and $C'(k)$ that are satisfied by the presentation for $G$. Specifically it returns $i,\ j,\ k'$, where $T(i)$, $C(j)$ and $C'(k)$ are satisfied for all $k > k'$.

`IsAutomaticGroup` $(G)$ : Returns *true* if Magma is able to prove that $G$ is an automatic group. Otherwise no conclusion can be drawn. If successful the automatic structure for $G$ is also returned.

`IsHyperbolic` $(G)$ : Returns *true* if Magma is able to prove that $G$ is a hyperbolic group. Otherwise no conclusion can be drawn. If successful a Dehn function for the group may be returned.

**Notes:**

**(i)**
There are two basic approaches for computing structural information about an fp-group $G$: finding subgroups of finite index in $G$ where the index is moderate in size and finding quotients of $G$. These approaches are the basis for determining the first four properties above.

**(ii)**
Intrinsic `IsAutomatic` uses the Knuth–Bendix method for constructing a confluent presentation. The intrinsic works best for groups $G$ having two or three generators and short relators. Even so the running time can be substantial. Given the automatic structure for $G$, the word problem for $G$ can be solved, whether or not $G$ is finite or infinite can be easily determined, and a growth function for $G$ can be computed. See Chapter [Automatic and Hyperbolic Groups](../AutomaticAndHyperbolicGroups/index-automatic-and-hyperbolic-groups.md#chapgrpatc) for detailed information and examples.

**(iii)**
The algorithm underpinning the intrinsic `IsHyperbolic` is based on small cancellation theory. Care has to be taken in setting up the presentation and the user should read the relevant section in chapter [Automatic and Hyperbolic Groups](../AutomaticAndHyperbolicGroups/index-automatic-and-hyperbolic-groups.md#chapgrpatc) before attempting to use the intrinsic. As distinct from many of the other intrinsics described in this section, `IsHyperbolic` reaches a decision quite quickly. Preparing a presentation for input to this intrinsic is a challenge and the reader should consult the section on hyperbolic groups in chapter [Automatic and Hyperbolic Groups](../AutomaticAndHyperbolicGroups/index-automatic-and-hyperbolic-groups.md#chapgrpatc) for detailed information and examples.

## `Example: Perfect (ex-5d2db4)`

Some of the above intrinsics are applied to the Coxeter group

$$
G = \langle\ x,\ y\ |\ x^2,\ y^3,\ (x * y)^7,\ (x, y)^9\ \rangle
$$

First a proof that the group is infinite is produced:-

```magma
> G<x,y> := FPGroup< x, y |  x^2, y^3, (x * y)^7, (x, y)^9 >;
> yes, proof := IsInfinite(G);
> yes;
true

```

So the group is infinite. The second return argument outlines a proof of this fact.

```magma
> proof;

! The following lines sketch a proof that the fp-group F is infinite:-
! F has the group PSL(2, 8) of order 504 as a quotient G (L2Quotient).
! Let k denote the rational field.
! Let M be the ext square of perm module of G as a kG-module. It has dim 36.
! Let N be the kF-module given by the induced action of F on M.
! The dimension of the first integral cohomology group of the kF-module N is 1.
! As H^1(F, N) is non-zero, the Holt-Plesken criterion shows that F is infinite.

```

Next the group is tested for being perfect.

```magma
> IsPerfect(G);
true

```

So $G$ is perfect. Next a subgroup of finite index in $G$ is defined and tested for being perfect.

```magma
> H := sub< G |  x, y * x * y * x * y * x * y^-1 >;
> Index(G, H);
9
> IsPerfect(H);
false
> AbelianQuotient(H);
Abelian Group isomorphic to Z/7
Defined on 1 generator
Relations:
    7*$.1 = 0

```

So the subgroup $H$ is not perfect and its derived subgroup has index $7$ in $H$. Note that if $H$ had infinite or very large index in $G$ then the `IsPerfect` test would fail.

The final step is to determine the small cancellation conditions satisfied by $G$.

```magma
> a := SmallCancellationConditions(G);
This presentation satisfies T( 3 ).
This presentation satisfies C( 2 ).
This presentation satisfies C'(k) for all k > 1/2.

```

## `Example: Automatic (ex-52e6c5)`

The infinite dihedral group is defined and then its automatic structure is computed.

```magma
> G<a, b> := FPGroup< a, b | a^2, b^a = b^-1 >;
> G;
Finitely presented group G on 2 generators
Relations
    a^2 = Id(G)
    b^a = b^-1
> yes, A := IsAutomaticGroup(G);
> yes;
true

```

The second return value $A$ is the group defined by the automatic structure of $G$. The growth function $f$ for $A$ is calculated. The fact that the group is infinite means that the growth function has to be a rational function rather than a polynomial. Consequently, it is necessary to compute the power series for the rational function $f$.

```magma
> R<x> := RationalFunctionField(Integers());
> f := GrowthFunction(A);
> f;
(-x^2 - 2*x - 1)/(x - 1)

```

This is a nice simple rational function. For a typical group the growth function has much larger degree numerator and denominator! The power series expansion of $f$ is obtained by coercing $f$ into the appropriate power series ring.

```magma
> PSR := PowerSeriesRing(Integers(): Precision := 15);
> s<t> := PSR!f;
> s;
1 + 3*t + 4*t^2 + 4*t^3 + 4*t^4 + 4*t^5 + 4*t^6 + 4*t^7 + 4*t^8 +
    4*t^9 + 4*t^10 + 4*t^11 + 4*t^12 + 4*t^13 + 4*t^14 + O(t^15)

```

So there are three elements of $G$ of length 1 and four elements of length 2.
