# Operators on Root Systems

## `R1 eq R2: RootSys, RootSys -> BoolElt`

Returns `true` if, and only if, the root systems $R_1$ and $R_2$ are identical.

## `IsIsomorphic(R1, R2): RootSys, RootSys -> BoolElt`

Returns `true` if, and only if, root systems $R_1$ and $R_2$ are isomorphic.

## `IsCartanEquivalent(R1, R2): RootSys, RootSys -> BoolElt`

Returns `true` if, and only if, the crystallographic root systems $R_1$ and $R_2$ are Cartan equivalent, i.e. their Cartan matrices are the same modulo a permutation of the underlying basis.

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

Note that the root systems $B_n$ and $C_n$ are isomorphic but not Cartan equivalent. Hence Cartan equivalence is *not* an invariant of a root system since it depends on the particular representation of the (co)roots within the (co)root space.

```magma
> R := RootSystem("B4");  S := RootSystem("C4");
> IsIsomorphic(R, S);
true
> IsCartanEquivalent(R, S);
false

```

## `CartanName(R): RootSys -> List`

The Cartan name of the root system $R$ (Section [Finite and Affine Coxeter Groups](../CoxeterSystems/finiteaffine.md#sectcartanfinaff)).

## `CoxeterDiagram(R): RootSys`

Print the Coxeter diagram of the root system $R$ (Section [Finite and Affine Coxeter Groups](../CoxeterSystems/finiteaffine.md#sectcartanfinaff)).

## `DynkinDiagram(R): RootSys`

Print the Dynkin diagram of the root system $R$ (Section [Finite and Affine Coxeter Groups](../CoxeterSystems/finiteaffine.md#sectcartanfinaff)). If $R$ is not crystallographic, an error is flagged.

## `CoxeterMatrix(R): RootSys -> AlgMatElt`

The Coxeter matrix of the root system $R$ (Section [Coxeter Matrices](../CoxeterSystems/coxetermat.md#sectcartancoxmat)).

## `CoxeterGraph(R): RootSys -> GrphUnd`

The Coxeter graph of the root system $R$ (Section [Coxeter Graphs](../CoxeterSystems/coxetergraph.md#sectcartancoxgrph)).

## `CartanMatrix(R): RootSys -> AlgMatElt`

The Cartan matrix of the root system $R$ (Section [Cartan Matrices](../CoxeterSystems/cartanmat.md#sectcartancarmat)).

## `DynkinDigraph(R): RootSys -> GrphDir`

The Dynkin digraph of the root system $R$ (Section [Dynkin Digraphs](../CoxeterSystems/dynkindigraph.md#sectcartandyndigrph)). If $R$ is not crystallographic, an error is flagged.

## `Example: Diagrams (ex-f78777)`

```magma
> R := RootSystem("F4");
> DynkinDiagram(R);

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

F4    1 - 2 === 3 - 4

```

## `BaseField(R): RootSys -> Fld`

## `BaseRing(R): RootSys -> Fld`

The field over which the root system $R$ is defined.

## `RealInjection(R): RootSys -> .`

The real injection of the root system $R$ (Section [Constructing Root Systems](construct-root-system.md#sectrsconstr)).

## `Rank(R): RootSys -> RngIntElt`

The rank of the root system $R$, i.e. the number of simple (co)roots.

## `Dimension(R): RootSys -> RngIntElt`

The dimension of the root system $R$, i.e. the dimension of the (co)root space. This is always at least as large as the rank, with equality when $R$ is semisimple.

## `CoxeterGroupOrder(R): RootSys -> RngIntElt`

The order of the Coxeter group of the root system $R$.

## `Example: Basic Operations (ex-5eca2e)`

```magma
> R := RootSystem("I2(7)");
> BaseField(R);
Number Field with defining polynomial x^3 - x^2 - 2*x + 1 over the
Rational Field
> Rank(R) eq Dimension(R);
true
> CoxeterGroupOrder(R);
14

```
