# Constants Associated with Root Data

In this section functions for a number of constants associated with root data will be described. These constants are needed to define Lie algebras and groups of Lie type. The notation of [[Carter, 1972](../../references.md#cite-carter-small)] will be used, except that the constants are defined for right actions rather than left actions [[Cohen *et al.*, 2004](../../references.md#cite-cohenmurraytaylor)].

## `ExtraspecialPairs(R): RootDtm -> SeqEnum`

The sequence of extraspecial pairs of the root datum $R$ (see [[Carter, 1972](../../references.md#cite-carter-small), page 58]). That is the sequence $[(r_i,s_i)]_{i=1}^{N-n}$ where $r_i$ is minimal such that $\alpha_{r_i}+\alpha_{s_i}=\alpha_{i+n}$ ($n$ is the rank of $R$ and $N$ is the number of positive roots).

## `NumExtraspecialPairs(R): RootDtm -> SeqEnum`

The number of extraspecial pairs of the root datum $R$. This function doesn’t actually compute the extraspecial pairs, thus is much more efficient than calling `#ExtraspecialPairs(R)` in case extraspecial pairs are not yet computed.

## `ExtraspecialPair(R, r): RootDtm, RngIntElt -> SeqEnum`

The extraspecial pair of the $r$th root in the root datum $R$. That is the pair $(s,t)$ where $s$ is minimal such that $\alpha_{s}+\alpha_{t}=\alpha_{r}$.

## `ExtraspecialSigns(R): RootDtm -> []`

Return the sequence of extraspecial signs of the root datum $R$.

## `LieConstant_p(R, r, s): RootDtm, RngIntElt, RngIntElt -> RngIntElt`

The constant $p_{rs}$ for the root datum $R$, i.e. the largest $p$ such that $\alpha_s-p\alpha_r$ is a root. This is the same as [`LeftStringLength`](roots-coroots-weights.md#function-intrleftstringlength). The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

## `LieConstant_q(R, r, s): RootDtm, RngIntElt, RngIntElt -> RngIntElt`

The constant $q_{rs}$ for the root datum $R$, i.e. the largest $q$ such that $\alpha_s+q\alpha_r$ is a root. This is the same as [`RightStringLength`](roots-coroots-weights.md#function-intrrightstringlength). The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

## `CartanInteger(R, r, s): RootDtm, RngIntElt, RngIntElt -> RngIntElt`

The Cartan integer $\langle\alpha_r,\alpha_s^\star\rangle$ for the root datum $R$.

## `LieConstant_N(R, r, s): RootDtm, RngIntElt, RngIntElt -> RngIntElt`

The Lie algebra structure constant $N_{rs}$ for the root datum $R$. The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

## `LieConstant_epsilon(R, r, s): RootDtm, RngIntElt, RngIntElt -> RngIntElt`

The constant $\epsilon_{rs}= \hbox{Sign}(N_{rs})$ for the root datum $R$. The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

## `LieConstant_M(R, r, s, i): RootDtm, RngIntElt, RngIntElt, RngIntElt -> RngIntElt`

The constant $M_{rsi}={1\over{i!}}N_{s_0r}\cdots N_{s_{i-1}r}$ where $\alpha_{s_i} = i\alpha_r+\alpha_s$ for the root datum $R$. The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

## `LieConstant_C(R, i, j, r, s): RootDtm, RngIntElt, RngIntElt, RngIntElt, RngIntElt -> RngIntElt`

The Lie group structure constant $C_{ijrs}$ for the root datum $R$. The conditions $\alpha_s\ne\pm\alpha_r$ and $\alpha_r+\alpha_s\in\Phi$ must be satisfied.

## `LieConstant_eta(R, r, s): RootDtm, RngIntElt, RngIntElt -> RngIntElt`

The constant

$$
\eta_{rs}= (-1)^{p_{rs}} {\epsilon_{r,s-pr}\cdots \epsilon_{r,s-r}\over
     \epsilon_{r,s-pr}\cdots \epsilon_{r,s+(q-p-1)r}}
$$

for the root datum $R$. The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

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

The Lie algebra structure constants for the reductive Lie algebra with root datum $R$ in the sparse format described in Section [Constructors for Lie Algebras](../LieAlgebras/construct.md#sectalglieconstr).

## `Example: consts (ex-6b2ee2)`

The code below verifies some standard formulas in the root datum of type $F_4$:

```magma
> R := RootDatum("F4");
> N := NumPosRoots(R);
> r := Random([1..N]);
> s := Random([1..r-1] cat [r+1..r+N-1] cat [r+N+1..2*N]);

```

1. Agreement of the Cartan matrix with the Cartan integers.

```magma
> C := CartanMatrix(R);
> C[2,3] eq CartanInteger(R,2,3);
true

```

1. $p_{rs}$ is the length of the left string through $\alpha_s$ in the direction of $\alpha_r$.

```magma
> LieConstant_p(R,r,s) eq #LeftString(R,r,s);
true

```

1. $q_{rs}$ is the length of the right string through $\alpha_s$ in the direction of $\alpha_r$.

```magma
> LieConstant_q(R,r,s) eq #RightString(R,r,s);
true

```

1. $\langle\alpha_s,\alpha_r^\star\rangle=p_{rs}-q_{rs}$.

```magma
> CartanInteger(R,s,r) eq
> LieConstant_p(R,r,s) - LieConstant_q(R,r,s);
true

```

1. $N_{rs} = \epsilon_{rs}(p_{rs}+1)$.

```magma
> LieConstant_N(R,r,s) eq
> LieConstant_epsilon(R,r,s) * (LieConstant_p(R,r,s) + 1);
true

```
