# Operations on Reflection Groups

See Chapter [Matrix Groups over General Rings](../../FiniteGroups/MatrixGroupsOverGeneralRings/index-matrix-groups-over-general-rings.md#chapgrpmat) for general functions for matrix groups. Note that most of the functions in this section only work for real reflection groups.

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

Returns `true` if and only if the real reflection groups $W_1$ and $W_2$ are isomorphic as Coxeter systems.

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

Returns `true` if and only if the crystallographic real reflection groups $W_1$ and $W_2$ have Cartan equivalent Cartan matrices.

## `Example: Isomorphism (ex-ce63f7)`

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

```

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

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

## `CoxeterDiagram(W): GrpMat`

A display of the Coxeter diagram of the real reflection group $W$ (Section [Finite and Affine Coxeter Groups](../CoxeterSystems/finiteaffine.md#sectcartanfinaff)). If $W$ is not affine or finite, an error is flagged.

## `DynkinDiagram(W): GrpMat`

A display of the Coxeter diagram of the real reflection group $W$ (Section [Finite and Affine Coxeter Groups](../CoxeterSystems/finiteaffine.md#sectcartanfinaff)). If $W$ is not affine or finite, or if $W$ is not crystallographic, an error is flagged.

## `Example: Name And Diagram (ex-0c1a24)`

```magma
> G := CompleteGraph(3);
> W := ReflectionGroup(G);
> CartanName(W);
A~2
> CoxeterDiagram(W);

A~2    1 - 2
       |   |
       - 3 -

```

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

The root system of the finite real reflection group $W$ (Chapter [Root Systems](../RootSystems/index-root-systems.md#chaprootsys)). If $W$ is infinite, an error is flagged.

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

The root datum of the finite real reflection group $W$ (Chapter [Root Data](../RootData/index-root-data.md#chaprootdtm)). The roots and coroots of $W$ must have integral components, and $W$ must be finite.

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

The Coxeter matrix of the real reflection group $W$ (Section [Coxeter Matrices](../CoxeterSystems/coxetermat.md#sectcartancoxmat)).

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

The Coxeter graph of the real reflection group $W$ (Section [Coxeter Graphs](../CoxeterSystems/coxetergraph.md#sectcartancoxgrph)).

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

The Cartan matrix of the real reflection group $W$ (Section [Cartan Matrices](../CoxeterSystems/cartanmat.md#sectcartancarmat)).

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

The Dynkin digraph of the real reflection group $W$ (Section [Dynkin Digraphs](../CoxeterSystems/dynkindigraph.md#sectcartandyndigrph)).

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

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

The rank of the reflection group $W$.

## `Example: Rank Dimension (ex-6d4455)`

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

```

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

The fundamental group of the real reflection group $W$ (Subsection [Isogeny of Split Reduced Root Data](../RootData/introduction.md#subsectrdisogeny)). The roots and coroots of $W$ must have integral components.

## `IsogenyGroup(W): GrpMat -> GrpAb, Map`

The isogeny group of the real reflection group $W$, together with the injection into the fundamental group (Subsection [Isogeny of Split Reduced Root Data](../RootData/introduction.md#subsectrdisogeny)). The roots and coroots of $W$ must have integral components.

## `CoisogenyGroup(W): GrpMat -> GrpAb, Map`

The fundamental group of the real reflection group $W$ together with the projection onto the fundamental group (Subsection [Isogeny of Split Reduced Root Data](../RootData/introduction.md#subsectrdisogeny)). The roots and coroots of $W$ must have integral components.

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

The degrees of the basic invariant polynomials of the reflection group $W$. These are computed using the table in [[Carter, 1972](../../references.md#cite-carter-small), page 155] if the group is real, and using the algorithm of [[Lehrer and Taylor, 2009](../../references.md#cite-lehrertaylor)] in other cases. If $W$ is infinite, an error is flagged.

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

The basic codegrees of the reflection group $W$. These are computed using the algorithm of [[Lehrer and Taylor, 2009](../../references.md#cite-lehrertaylor)]. If $W$ is infinite, an error is flagged.

## `Example: Basic Degrees (ex-9828d5)`

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 := ReflectionGroup("E6");
> degs := BasicDegrees(W);
> degs;
[ 2, 5, 6, 8, 9, 12 ]
> &*degs eq #W;
true
> &+degs eq NumPosRoots(W) + Rank(W);
true

```

## `LongestElement(W): GrpMat -> SeqEnum`

The unique longest element in the finite real reflection group $W$.

## `CoxeterElement(W): GrpMat -> SeqEnum`

The Coxeter element in the reflection group $W$, ie. the product of the generators.

## `CoxeterNumber(W): GrpMat -> SeqEnum`

The order of the Coxeter element in the real reflection group $W$.

## `Example: Operations (ex-ae7bca)`

Operations on groups.

```magma
> W := ReflectionGroup("A4");
> LongestElement(W);
[ 0  0  0 -1]
[ 0  0 -1  0]
[ 0 -1  0  0]
[-1  0  0  0]
> CoxeterElement(W);
[-1 -1 -1 -1]
[ 1  0  0  0]
[ 0  1  0  0]
[ 0  0  1  0]

```

## `LeftDescentSet(W, w): GrpMat, GrpMatElt -> SetEnum`

The set of indices $r$ of simple roots of the finite real reflection group $W$ such that the length of the product $s_rw$ is less than that of the element $w$.

## `RightDescentSet(W, w): GrpMat, GrpMatElt -> SetEnum`

The set of indices $r$ of simple roots of the finite real reflection group $W$ such that the length of the product $ws_r$ is less than that of the element $w$.

## `Example: Descent Sets (ex-609f66)`

```magma
> W := ReflectionGroup("A5");
> x := W.1*W.2*W.4*W.5;
> LeftDescentSet(W, x);
{ 1, 4 }
> RightDescentSet(W, x);
{ 2, 5 }

```
