# Operations on Coxeter Groups

See Chapter [Finitely Presented Groups](../../FinitelyPresentedGroups/FPGroups/index-fpgroups.md#chapgrpfp) for general functions for finitely presented groups, or Chapter [Permutation Groups](../../FiniteGroups/PermutationGroups/index-permutation-groups.md#chapgrpperm) for general functions for permutation groups.

## `IsIsomorphic(W1, W2): GrpPermCox, GrpPermCox -> BoolElt`

Returns `true` if, and only if, $W_1$ and $W_2$ are isomorphic as abstract groups. This is only implemented for permutation Coxeter groups.

## `IsCoxeterIsomorphic(W1, W2): GrpFPCox, GrpFPCox -> BoolElt`

## `IsCoxeterIsomorphic(W1, W2): GrpPermCox, GrpPermCox -> BoolElt`

Tests if $W_1$ and $W_2$ are isomorphic as Coxeter systems. If `true`, a sequence giving the permutation of the generators which takes $W_1$ to $W_2$ is also returned.

## `IsCartanEquivalent(W1, W2): GrpPermCox, GrpPermCox -> BoolElt`

Returns `true` if and only if the crystallographic Coxeter groups $W_1$ and $W_2$ have Cartan equivalent Cartan matrices. This only makes sense for permutation Coxeter groups.

## `Example: Coxeter Isomorphism (ex-892fbe)`

```magma
> W1 := CoxeterGroup(GrpFPCox, "B4");
> W2 := CoxeterGroup(GrpFPCox, "C4");
> IsCoxeterIsomorphic(W1, W2);
true [ 1, 2, 3, 4 ]

```

An example of abstractly isomorphic Coxeter groups whose Coxeter systems not isomorphic:

```magma
> W1 := CoxeterGroup("G2");
> W2 := CoxeterGroup("A1A2");
> IsIsomorphic(W1, W2);
true
> IsCoxeterIsomorphic(W1, W2);
false

```

An example of Coxeter isomorphic groups which are not Cartan equivalent:

```magma
> W1 := CoxeterGroup("B3");
> W2 := CoxeterGroup("C3");
> IsIsomorphic(W1, W2);
true
> IsCoxeterIsomorphic(W1, W2);
true [ 1, 2, 3 ]
> IsCartanEquivalent(W1, W2);
false

```

## `RootSystem(W): GrpPermCox -> RootDtm`

The underlying root system of the permutation Coxeter group $W$.

## `RootDatum(W): GrpPermCox -> RootDtm`

The root datum of the permutation Coxeter group $W$. If $W$ does not have a root datum, an error is flagged.

## `Example: Group To Root (ex-e5a910)`

```magma
> W := CoxeterGroup("C5");
> RootSystem(W);
Root system of type C5
> RootDatum(W);
Root datum of type C5
>
> W := CoxeterGroup("H4");
> RootSystem(W);
Root system of type H4
> RootDatum(W);
Error: This group does not have a root datum

```

## `CartanName(W): GrpFPCox -> List`

## `CartanName(W): GrpPermCox -> MonStgElt`

The Cartan name of the finite or affine Coxeter group $W$ (Section [Finite and Affine Coxeter Groups](../CoxeterSystems/finiteaffine.md#sectcartanfinaff)).

## `CoxeterDiagram(W): GrpFPCox`

## `CoxeterDiagram(W): GrpPermCox`

Print the Coxeter diagram of the finite or affine Coxeter group $W$ (Section [Finite and Affine Coxeter Groups](../CoxeterSystems/finiteaffine.md#sectcartanfinaff)).

## `DynkinDiagram(W): GrpPermCox`

Print the Dynkin diagram of the permutation Coxeter group $W$. If $W$ is not crystallographic, an error is flagged.

## `Example: Names Diagrams (ex-93c1ec)`

```magma
> W := CoxeterGroup("F4");
> CartanName(W);
F4
> DynkinDiagram(W);

F4    1 - 2 =>= 3 - 4
> CoxeterDiagram(W);

F4    1 - 2 === 3 - 4

```

## `CoxeterMatrix(W): GrpFPCox -> AlgMatElt`

## `CoxeterMatrix(W): GrpPermCox -> AlgMatElt`

The Coxeter matrix of the Coxeter group $W$.

## `CoxeterGraph(W): GrpFPCox -> GrphUnd`

## `CoxeterGraph(W): GrpPermCox -> GrphUnd`

The Coxeter graph of the Coxeter group $W$.

## `CartanMatrix(W): GrpPermCox -> AlgMatElt`

The Cartan matrix of the permutation Coxeter group $W$.

## `DynkinDigraph(W): GrpPermCox -> GrphDir`

The Dynkin digraph of the permutation Coxeter group $W$.

## `Rank(W): GrpFPCox -> RngIntElt`

## `Rank(W): GrpPermCox -> RngIntElt`

## `NumberOfGenerators(W): GrpFPCox -> RngIntElt`

## `NumberOfGenerators(W): GrpPermCox -> RngIntElt`

The rank of the Coxeter group $W$.

## `NumberOfPositiveRoots(W): GrpFPCox -> RngIntElt`

## `NumberOfPositiveRoots(W): GrpPermCox -> RngIntElt`

## `NumPosRoots(W): GrpFPCox -> RngIntElt`

## `NumPosRoots(W): GrpPermCox -> RngIntElt`

The number of positive roots of the Coxeter group $W$.

## `Dimension(W): GrpPermCox -> RngIntElt`

The dimension of the permutation Coxeter group $W$, ie. the dimension of the root space.

## `Example: Rank Dimension (ex-6345f3)`

```magma
> R := StandardRootSystem("A", 4);
> W := CoxeterGroup(R);
> Rank(W);
4
> Dimension(W);
5

```

## `ConjugacyClasses(W): GrpFPCox -> [GrpFPCoxElt]`

## `ConjugacyClasses(W): GrpPermCox -> [GrpPermElt]`

The conjugacy classes of the finite Coxeter group $W$. This uses the algorithm of [[Geck and Pfeiffer, 2000](../../references.md#cite-geckpfeiffer)].

## `FundamentalGroup(W): GrpPermCox -> GrpAb`

The fundamental group of the permutation Coxeter group $W$. The roots and coroots of $W$ must have integral components.

## `IsogenyGroup(W): GrpPermCox -> GrpAb`

The isogeny group of the permutation Coxeter group $W$. The roots and coroots of $W$ must have integral components.

## `CoisogenyGroup(W): GrpPermCox -> GrpAb`

The coisogeny group of the permutation Coxeter group $W$. The roots and coroots of $W$ must have integral components.

## `BasicDegrees(W): GrpFPCox -> RngIntElt`

## `BasicDegrees(W): GrpPermCox -> RngIntElt`

The degrees of the basic invariant polynomials of the Coxeter group $W$. These are computed using the table in [[Carter, 1972](../../references.md#cite-carter-small), page 155].

## `BasicCodegrees(W): GrpFPCox -> RngIntElt`

## `BasicCodegrees(W): GrpPermCox -> RngIntElt`

The basic codegrees of the Coxeter group $W$. These are computed using the algorithm in [[Lehrer and Taylor, 2009](../../references.md#cite-lehrertaylor)].

## `Example: Basic Degrees (ex-d80f8f)`

The product of the basic degrees is the order of the Coxeter group; the sum of the basic degrees is the sum of the rank and the number of positive roots.

```magma
> W := CoxeterGroup("E6");
> degs := BasicDegrees(W);
> degs;
[ 2, 5, 6, 8, 9, 12 ]
> &*degs eq #W;
true
> &+degs eq NumPosRoots(W) + Rank(W);
true

```

## `BruhatLessOrEqual(x, y): GrpPermElt, GrpPermElt -> BoolElt`

If Coxeter group element $x$ is less than or equal to $y$ in the Bruhat order [[Deodhar, 1977](../../references.md#cite-deodhar)]. Suppose $x$ is an element of the Coxeter group $W$. The Bruhat order is the partial order generated by the relations: $x \leq xw$ if $l(x) < l(xw)$, and $xw \leq x$ if $l(xw) < l(x)$, for $x\in W$ and $w$ a reflection. If $l(xw) = l(x) + 1$, then $x$ is called a *Bruhat descendant* of $xw$. The algorithm used is a straightforward recursive procedure.

## `BruhatDescendants(x): GrpPermElt -> SetEnum`

```magma
z: GrpPermElt                    Default: 
```

Let $x$ be an element of the Coxeter group $W$, then the returned set $S$ contains the Bruhat descendants of $x$. If $l(yw) = l(y) + 1$, then $y$ is called a *Bruhat descendant* of $yw$. If the optional parameter $z$ is set, only those descendants $y$ with $z \leq y$ are returned. Algorithm: For each fundamental reflection in $x$ it is tested whether leaving it out decreases the length of $x$ by exactly 1. If so, it is included in the result. In particular, this algorithm does not use [`BruhatLessOrEqual`](#function-bruhatlessorequal).

## `BruhatDescendants(X): SetEnum -> SetEnum`

```magma
z: GrpPermElt                    Default: 
```

Let $X$ consist of elements of the Coxeter group $W$, then the returned set $S$ contains the Bruhat descendants of every element of $X$.

If the optional parameter $z$ is set, only those $w$ are returned for which $z \leq w$ in the Bruhat ordering.

## `Example: Bruhat Descendants (ex-3232ff)`

Bruhat descendants:

```magma
> R := RootDatum("D4" : Isogeny := "SC");
> W := CoxeterGroup(GrpPermCox, R);
> Wfp,phi := CoxeterGroup(GrpFPCox, W);
> x := W.1*W.3*W.2*W.4*W.2*W.2*W.2*W.1;
> Eltseq(phi(x));
[ 1, 3, 2, 4, 2, 1 ]
> S := BruhatDescendants(x);
> { Eltseq(phi(w)) : w in S };
{
     [ 1, 3, 2, 4, 2 ],
     [ 3, 2, 4, 2, 1 ],
     [ 1, 2, 4, 2, 1 ],
     [ 1, 3, 2, 1, 4 ],
     [ 1, 3, 4, 2, 1 ]
}

```
