# Operations on Root Data

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

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

## `IsIsomorphic(R1, R2): RootDtm, RootDtm -> BoolElt, [RngIntElt], Map`

Returns `true` if, and only if, $R_1$ and $R_2$ are isomorphic root data. If `true`, the second value returned is a sequence giving the simple root of $R_2$ corresponding to each simple root of $R_1$, and the third value returned is an isomorphism $R_1\to R_2$. This function is currently only implemented for semisimple root data.

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

Returns `true` if and only if the root data $R_1$ and $R_2$ are Cartan equivalent; i.e. they have isomorphic Dynkin diagrams. If `true`, the second value returned is a sequence giving the simple root of $R_2$ corresponding to each simple root of $R_1$.

## `IsIsogenous(R1, R2): RootDtm, RootDtm -> BoolElt, SeqEnum, RootDtm, Map, Map, RootDtm, Map, Map`

Returns `true` if, and only if, $R_1$ and $R_2$ are isogenous root data. If `true`, the subsequent values returned are: a sequence giving the root of $R_2$ corresponding to each root of $R_1$, the corresponding adjoint root datum $R_{ad}$, the morphisms $R_{ad}\to R_1$ and $R_{ad}\to R_2$, the corresponding simply connected root datum $R_{sc}$, and the morphisms $R_1\to R_{sc}$ and $R_2\to R_{sc}$.

## `Example: Isomorphism Isogeny (ex-864e8f)`

An example of isogenous root data:

```magma
> R1 := RootDatum("A3");
> R2 := RootDatum("A3" : Isogeny := "SC");
> R1 eq R2;
false
> IsIsomorphic(R1, R2);
false
> IsCartanEquivalent(R1, R2);
true [ 1, 2, 3 ]
> IsIsogenous(R1, R2);
true [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ]
Adjoint root datum of type A3
Mapping from: RootDtm: ad to RootDtm: ad
Mapping from: RootDtm: ad to RootDtm: sc
Simply connected root datum of type A3
Mapping from: RootDtm: ad to RootDtm: sc
Mapping from: RootDtm: sc to RootDtm: sc

```

An example of distinct isomorphic root data:

```magma
> C := CartanMatrix("B2");
> R1 := RootDatum(C);
> R2 := RootDatum(Transpose(C));
> R1; R2;
Adjoint root datum of type B2
Adjoint root datum of type C2
> R1 eq R2;
false
> IsIsomorphic(R1, R2);
true [ 2, 1 ]

```

## `CartanName(R): RootStr -> MonStgElt`

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

## `TwistedCartanName(R): RootDtm -> MonStgElt`

The twisted Cartan name of the root datum $R$. E.g., `"2A3,2"`.

## `CoxeterDiagram(R): RootStr`

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

## `DynkinDiagram(R): RootStr`

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

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

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

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

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

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

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

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

The Dynkin digraph of the root datum $R$ (Section [Dynkin Digraphs](../CoxeterSystems/dynkindigraph.md#sectcartandyndigrph)).

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

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

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

F4    1 - 2 === 3 - 4

```

## `GammaAction(R): RootDtm -> Rec`

The $\Gamma$-action of the root datum $R$. This is a record consisting of four elements: `gamma` is the Group $\Gamma$ acting on $R$, `perm_ac` is the homomorphism defining the permutation action of $\Gamma$ on the set of all roots of $R$, finally `mats_rt` and `mats_co` are sequences of matrices defining the action of $\Gamma$ on the root and coroot spaces of $R$.

## `GammaRootSpace(R): RootDtm -> GSetEnum, Map`

## `GammaCorootSpace(R): RootDtm -> GSetEnum, Map`

Given a root datum $R$, create the fixed space of $\Gamma$ acting on the (co)root space $V = {\mathbb{Q}}\otimes X$ of $R$ as well as the embedding in $V$.

## `GammaOrbitOnRoots(R, r): RootDtm, RngIntElt -> GSetEnum`

The orbit through the $r$th root of the $\Gamma$-action on the root datum $R$.

## `GammaOrbitsOnRoots(R): RootDtm -> SeqEnum[GSetEnum]`

## `PositiveGammaOrbitsOnRoots(R): RootDtm -> SeqEnum[GSetEnum]`

## `NegativeGammaOrbitsOnRoots(R): RootDtm -> SeqEnum[GSetEnum]`

## `ZeroGammaOrbitsOnRoots(R): RootDtm -> SeqEnum[GSetEnum]`

The sequence of all (respectively positive, negative and zero) orbits of the $\Gamma$-action on the root datum $R$ (Section [Extended Root Data](introduction.md#subsectextrd)).

## `GammaActionOnSimples(R): RootDtm -> HomGrp`

The $[\Gamma]$-action on the simple (co)roots of the root datum $R$. (Section [Extended Root Data](introduction.md#subsectextrd)). This function was called `GammaActionPi` in the last release.

## `OrbitsOnSimples(R): RootDtm -> SeqEnum[GSetEnum]`

The sequence of all orbits of the $[\Gamma]$-action on the simple (co)roots of the root datum $R$ (Section [Extended Root Data](introduction.md#subsectextrd)). This function was called `OrbitsPi` in the last release.

## `DistinguishedOrbitsOnSimples(R): RootDtm -> SeqEnum[GSetEnum]`

The sequence of distinguished orbits of the $[\Gamma]$-action on the simple (co)roots of the root datum $R$ (Section [Extended Root Data](introduction.md#subsectextrd)). This function was called `DistinguishedOrbitsPi` in the last release.

## `BaseRing(R): RootDtm -> RngInt`

The base ring of the root datum $R$ is the field of rational numbers.

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

## `AbsoluteRank(R): RootDtm -> RngIntElt`

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

## `RelativeRank(R): RootDtm -> RngIntElt`

The relative rank of the root datum $R$, i.e. the number of simple (co)roots of the relative root system. This is the same as absolute rank for split root data.

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

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

## `TwistingDegree(R): RootDtm -> RngIntElt`

The twisting degree of the root datum $R$, i.e. the order of $\Gamma$ divided by the kernel of the $[\Gamma]$-action.

## `AnisotropicSubdatum(R): RootDtm -> RootDtm`

The anisitropic subdatum of the root datum $R$.

## `Example: Operations For Twisted Root Data (ex-9c2a05)`

Consider the twisted root datum of type ${}^2A_{3,1}$ with distinguished orbit $\{2\}$:

```magma
> R := RootDatum( "A3" : Twist := < {{2}}, 2 > );

```

First, print out the action of $\Gamma$ on the root datum:

```magma
> GammaAction(R);
rec<recformat<gamma: GrpPerm, perm_ac: HomGrp, mats_rt, mats_co> |
     gamma := Permutation group acting on a set of cardinality 4
     Order = 4 = 2^2
          (1, 2, 3, 4),
     perm_ac := Homomorphism of GrpPerm: $, Degree 4, Order 2^2 into GrpPerm: $,
     Degree 12, Order 2^10 * 3^5 * 5^2 * 7 * 11 induced by
          (1, 2, 3, 4) |--> (1, 3, 7, 9)(2, 4, 6, 5)(8, 10, 12, 11),
     mats_rt := [
          [ 0  0  1]
          [ 1  1  0]
          [-1  0  0]
     ],
     mats_co := [
          [ 0  0  1]
          [ 0  1  0]
          [-1  1  0]
     ]
     >

```

Compute the orbits of the $\Gamma$-action:

```magma
> PositiveGammaOrbitsOnRoots(R);
[
     GSet{ 2, 4, 5, 6 }
]
> NegativeGammaOrbitsOnRoots(R);
[
     GSet{ 8, 10, 11, 12 }
]
> ZeroGammaOrbitsOnRoots(R);
[
     GSet{ 1, 3, 7, 9 }
]
> &+[ Root(R,r) : r in ZeroGammaOrbitsOnRoots(R)[1] ];
(0 0 0)

```

Compute the $[\Gamma]$-action and its orbits:

```magma
> GammaActionOnSimples(R);
Homomorphism of GrpPerm: $, Degree 4, Order 2^2 into GrpPerm: $,
Degree 3, Order 2 * 3 induced by
     (1, 2, 3, 4) |--> (1, 3)
> OrbitsOnSimples(R);
[
     GSet{ 2 },
     GSet{ 1, 3 }
]
> DistinguishedOrbitsOnSimples(R);
[
     GSet{ 2 }
]

```

Absolute and relative rank and the twisting degree, as well as their appearance in the name of the root datum:

```magma
> AbsoluteRank(R);
3
> RelativeRank(R);
1
> TwistingDegree(R);
2
> R;
R: Twisted adjoint root datum of type 2A3,1

```

anisotropic subdatum:

```magma
> A := AnisotropicSubdatum(R); A;
A: Twisted root datum of type 2(A1 A1)2,0
> GammaAction(A)`perm_ac;
Homomorphism of GrpPerm: $, Degree 4, Order 2^2 into GrpPerm: $,
Degree 4, Order 2^2 induced by
     (1, 2, 3, 4) |--> (1, 2, 3, 4)

```

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

The order of the (split) Coxeter group of the root datum $R$.

## `GroupOfLieTypeOrder(R, q): RootDtm, RngElt -> RngIntElt`

The order of the group of Lie type with split root datum $R$ over the field of cardinality $q$.

## `GroupOfLieTypeFactoredOrder(R, q): RootDtm, RngElt -> RngIntElt`

The factored order of the group of Lie type with split root datum $R$ over the field of order $q$.

## `Example: Group Of Lie Type Order (ex-da6059)`

As well as accepting a specific prime power, these functions also take an indeterminate so that the generic order formula can be computed.

```magma
> P<q> := PolynomialRing(Integers());
> R := RootDatum("F4");
> GroupOfLieTypeFactoredOrder(R, q);
[
    <q - 1, 4>,
    <q, 24>,
    <q + 1, 4>,
    <q^2 - q + 1, 2>,
    <q^2 + 1, 2>,
    <q^2 + q + 1, 2>,
    <q^4 - q^2 + 1, 1>,
    <q^4 + 1, 1>
]
>
> R := RootDatum("B2");
> ord := GroupOfLieTypeOrder(R, q);
> forall{ q : q in [2..200] | not IsPrimePower(q) or
>   Evaluate(ord, q) eq GroupOfLieTypeOrder(R, q) };
true

```

## `FundamentalGroup(R): RootDtm -> GrpAb, Map`

The fundamental group $\Lambda/{\mathbb{Z}}\Phi$ of the root datum $R$ together with the projection $\Lambda\rightarrow\Lambda/{\mathbb{Z}}\Phi$. See Subsection [Isogeny of Split Reduced Root Data](introduction.md#subsectrdisogeny).

## `IsogenyGroup(R): RootDtm -> GrpAb, Map`

The isogeny group $X/{\mathbb{Z}}\Phi$ of the root datum $R$ together with the projection $X\rightarrow X/{\mathbb{Z}}\Phi$. If $R$ is semisimple, the injection $X/{\mathbb{Z}}\Phi\rightarrow\Lambda/{\mathbb{Z}}\Phi$ is also returned. See Subsection [Isogeny of Split Reduced Root Data](introduction.md#subsectrdisogeny).

## `CoisogenyGroup(R): RootDtm -> GrpAb, Map`

The coisogeny group $Y/{\mathbb{Z}}\Phi^\star$ of the root datum $R$ together with the projection $Y\rightarrow Y/{\mathbb{Z}}\Phi^\star$. If $R$ is semisimple, the projection $Y/{\mathbb{Z}}\Phi^\star\rightarrow\Lambda/{\mathbb{Z}}\Phi$ is also returned. See Subsection [Isogeny of Split Reduced Root Data](introduction.md#subsectrdisogeny).

## `Example: Isogeny Groups (ex-2f8db1)`

In the semisimple case, the fundamental group contains the isogeny group, with quotient isomorphic to the coisogeny group.

```magma
> R := RootDatum("A5" : Isogeny := 3);
> F := FundamentalGroup(R);
> G := IsogenyGroup(R);
> H := CoisogenyGroup(R);
> #G * #H eq #F;
true

```

Nonsemisimple root data have infinite isogeny groups.

```magma
> R := StandardRootDatum("A", 5);
> IsogenyGroup(R);
Abelian Group isomorphic to Z
Defined on 1 generator (free)

```
