# Roots, Coroots and Weights

The roots are stored as an indexed set

$$
\{@\; \alpha_1,\dots,\alpha_N,\alpha_{N+1},\dots,\alpha_{2N} \; @\},
$$

where $\alpha_1,\dots,\alpha_N$ are the positive roots in an order compatible with height; and $\alpha_{N+1},\dots,\alpha_{2N}$ are the corresponding negative roots (i.e. $\alpha_{i+N}=-\alpha_i$). The simple roots are $\alpha_1,\dots,\alpha_n$ where $n$ is the rank.

Many of these functions have an optional argument `Basis` which may take one of the following values

1. `"Standard"`: the standard basis for the (co)root space. This is the default.

2. `"Root"`: the basis of simple (co)roots.

3. `"Weight"`: the basis of fundamental (co)weights (see Subsection [Weights](#subsectrdrootweight) below).

## Accessing Roots and Coroots

### `RootSpace(R): RootStr -> ModTupFld`

### `CorootSpace(R): RootStr -> ModTupFld`

The vector space containing the (co)roots of the root datum $R$, i.e. $X\otimes{\mathbb{Q}}$ (respectively, $Y\otimes{\mathbb{Q}}$).

### `FullRootLattice(R): RootDtm -> Lat, Map`

### `FullCorootLattice(R): RootDtm -> Lat, Map`

The lattice containing the (co)roots of the root datum $R$, i.e. $X$ (respectively, $Y$). An inclusion map into the (co)root space of $R$ is returned as the second value.

### `RootLattice(R): RootDtm -> Lat, Map`

### `CorootLattice(R): RootDtm -> Lat, Map`

The lattice spanned by the (co)roots of the root datum $R$. An inclusion map into the (co)root space of $R$ is returned as the second value.

### `Example: Rt Lat (ex-f812ae)`

The root space, full root lattice and the root lattice of the standard root datum of type $A_2$:

```magma
> R := StandardRootDatum("A",2);
> V := RootSpace(R);
> FullRootLattice(R);
Standard Lattice of rank 3 and degree 3
Mapping from: Standard Lattice of rank 3 and degree 3 to ModTupFld: V
> RootLattice(R);
Lattice of rank 2 and degree 3
Basis:
( 1 -1  0)
( 0  1 -1)
Mapping from: Lattice of rank 2 and degree 3 to ModTupFld: V

```

### `IsRootSpace(V): ModTupFld -> BoolElt`

### `IsCorootSpace(V): ModTupFld -> BoolElt`

Return `true` if, and only if, $V$ is the (co)root space of some root datum.

### `IsInRootSpace(v): ModTupFldElt -> BoolElt`

### `IsCorootSpace(v): ModTupFldElt -> BoolElt`

Return `true` if, and only if, $V$ is an element of the (co)root space of some root datum.

### `RootDatum(V): ModTupFld -> RootDtm`

If $V$ is the (co)root space of some root datum, this returns the datum.

### `Example: Rt Is Space (ex-ddfc7e)`

```magma
> R := RootDatum("a3");
> V := RootSpace(R);
> v := V.1;
> IsRootSpace(V);
true
> RootDatum(V);
R: Adjoint root datum of dimension 3 of type A3
> IsInRootSpace(v);
true

```

### `ZeroRootLattice(R): RootDtm -> Lat`

### `ZeroRootSpace(R): RootDtm -> ModTupFld, Map`

For the given root datum $R$, return the lattice $X_0$ and the vector space $X_0\otimes{\mathbb{Q}}$, respectively (see Section [Extended Root Data](introduction.md#subsectextrd)).

### `RelativeRootSpace(R): RootDtm -> ModTupFld, Map`

For the given root datum $R$, return the vector space $\bar{X} = (X\otimes{\mathbb{Q}})/(X_0\otimes{\mathbb{Q}})$ containing the relative roots (see Section [Extended Root Data](introduction.md#subsectextrd)). The projection from $X\otimes{\mathbb{Q}}$ onto $\bar{X}$ is returned as second return value.

### `SimpleRoots(R): RootStr -> Mtrx`

### `SimpleCoroots(R): RootStr -> Mtrx`

The simple (co)roots of the root datum $R$ as the rows of a matrix, i.e. $A$ (respectively, $B$).

### `Example: Basic Operations (ex-b96105)`

```magma
> R := RootDatum("G2");
> RootSpace(R);
Full Vector space of degree 2 over Rational Field
> FullRootLattice(R);
Standard Lattice of rank 2 and degree 2
Mapping from: Standard Lattice of rank 2 and degree 2 to Full Vector space of
degree 2 over Rational Field
> RootLattice(R);
Standard Lattice of rank 2 and degree 2
Mapping from: Standard Lattice of rank 2 and degree 2 to Full Vector space of
degree 2 over Rational Field
> CorootSpace(R);
Full Vector space of degree 2 over Rational Field
> SimpleRoots(R);
[1 0]
[0 1]
> SimpleCoroots(R);
[ 2 -3]
[-1  2]
> CartanMatrix(R);
[ 2 -1]
[-3  2]
> Rank(R) eq Dimension(R);
true

```

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

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

The number of positive roots of the root datum $R$. This is also the number of positive coroots. The total number of (co)roots is twice the number of positive (co)roots.

### `Roots(R): RootStr -> SetIndx`

### `Coroots(R): RootStr -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The indexed set of (co)roots of the root datum $R$, i.e. $\{@\,\alpha_1,\dots\alpha_{2N}\,@\}$ (respectively, $\{@\,\alpha_1^\star,\dots\alpha_{2N}^\star\,@\}$).

### `PositiveRoots(R): RootStr -> SetIndx`

### `PositiveCoroots(R): RootStr -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The indexed set of positive (co)roots of the root datum $R$, i.e. $\{@\,\alpha_1,\dots\alpha_N\,@\}$ (respectively, $\{@\,\alpha_1^\star,\dots\alpha_N^\star\,@\}$).

### `Root(R, r): RootStr, RngIntElt -> SetIndx`

### `Coroot(R, r): RootStr, RngIntElt -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The $r$th (co)root $\alpha_r$ (respectively, $\alpha_r^\star$) of the root datum $R$.

### `RootPosition(R, v): RootStr, . -> SetIndx`

### `CorootPosition(R, v): RootStr, . -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

If $v$ is a (co)root in the root datum $R$, return its index; otherwise return 0. These functions will try to coerce $v$ into the appropriate lattice; $v$ should be written with respect to the basis specified by the parameter `Basis`.

### `BasisChange(R, v): RootStr, Any -> SeqEnum`

```magma
InBasis : MonStgElt                    Default: "Standard"
OutBasis: MonStgElt                    Default: "Standard"
Coroots : BoolElt                      Default: false
```

Changes the basis of the vector $v$ contained in the space spanned by the (co)roots of the root datum $R$. The vector $v$ is considered as an element of the root space by default. If the parameter `Coroots` is set to `true`, $v$ is considered as an element of the coroot space. The optional arguments `InBasis` and `OutBasis` may take the same values as the parameter `Basis` as described at the beginning of the current section.

### `Example: Roots Coroots (ex-f22cf4)`

```magma
> R := RootDatum("A3" : Isogeny := 2);
> Roots(R);
{@
    (1 0 0),
    (0 1 0),
    (1 0 2),
    (1 1 0),
    (1 1 2),
    (2 1 2),
    (-1  0  0),
    (0 -1  0),
    (-1  0 -2),
    (-1 -1  0),
    (-1 -1 -2),
    (-2 -1 -2)
@}
> PositiveCoroots(R);
{@
    (2 -1 -1),
    (-1  2  0),
    (0 -1  1),
    (1  1 -1),
    (-1  1  1),
    (1 0 0)
@}
> #Roots(R) eq 2*NumPosRoots(R);
true
> Coroot(R, 4);
(1  1 -1)
> Coroot(R, 4 : Basis := "Root");
(1 1 0)
> CorootPosition(R, [1,1,-1]);
4
> CorootPosition(R, [1,1,0] : Basis := "Root");
4
> BasisChange(R, [1,0,0] : InBasis:="Root");
(1 0 0)
> BasisChange(R, [1,0,0] : InBasis:="Root", Coroots);
( 2 -1 -1)

```

### `IsInRootSpace(R, v): RootDtm, ModTupFldElt -> BoolElt`

### `IsInCorootSpace(R, v): RootDtm, ModTupFldElt -> BoolElt`

Returns `true` if and only if the vector $v$ is contained in the (co)root space of the root datum $R$.

### `HighestRoot(R): RootStr -> .`

### `HighestCoroot(R): RootStr -> .`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The unique (co)root of greatest height in the irreducible root datum $R$.

### `HighestLongRoot(R): RootStr -> .`

### `HighestLongCoroot(R): RootStr -> .`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The unique long (co)root of greatest height in the irreducible root datum $R$.

### `HighestShortRoot(R): RootStr -> .`

### `HighestShortCoroot(R): RootStr -> .`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The unique short (co)root of greatest height in the irreducible root datum $R$.

### `Example: Highest Roots (ex-a8cbef)`

```magma
> R := RootDatum("G2");
> HighestRoot(R);
(3 2)
> HighestLongRoot(R);
(3 2)
> HighestShortRoot(R);
(2 1)

```

### `RelativeRoots(R): RootDtm -> SetIndx`

### `PositiveRelativeRoots(R): RootDtm -> SetIndx`

### `NegativeRelativeRoots(R): RootDtm -> SetIndx`

### `SimpleRelativeRoots(R): RootDtm -> SetIndx`

The indexed set of all (resp. positive, negative, simple) relative roots of the root datum $R$. Note that the relative roots are returned in the order induced by the standard ordering on the (nonrelative) roots of $R$.

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

The relative root datum of the root datum $R$.

### `GammaOrbitsRepresentatives(R, delta): RootDtm, RngIntElt -> SeqEnum`

The preimage of a relative root $\delta$ is a disjoint union of $\Gamma$-orbits on the set of all roots of the root datum $R$. This intrinsic returns a sequence of representatives of these orbits.

### `Example: Two Twisted Esixes (ex-bec95e)`

We first consider the twisted root datum of type ${}^2E_6$, which is quasisplit:

```magma
> DynkinDiagram(RootDatum("E6"));

E6    1 - 3 - 4 - 5 - 6
              |
              2
>
> R := RootDatum("E6" : Twist:=2 ); R;
R: Twisted adjoint root datum of type 2E6,4
> OrbitsOnSimples(R);
[
     GSet{ 2 },
     GSet{ 4 },
     GSet{ 1, 6 },
     GSet{ 3, 5 }
]
> DistinguishedOrbitsOnSimples(R) eq OrbitsOnSimples(R);
true
> AnisotropicSubdatum(R);
Twisted toral root datum of dimension 6
[]
> RR := RelativeRootDatum(R);RR;
RR: Adjoint root datum of type F4
> _,pi := RelativeRootSpace(R);
> DynkinDiagram(RR);

F4    1 - 2 =>= 4 - 3
> [ Position(Roots(RR), pi(Root(R,i)) ) : i in [1,6, 3,5, 4, 2]];
[ 3, 3, 4, 4, 2, 1 ]

```

now one with distinguished orbits $\{2\}$ and $\{4\}$:

```magma
> R := RootDatum("E6" : Twist := <{{2},{4}},2> ); R;
R: Twisted adjoint root datum of type 2E6,2
> OrbitsOnSimples(R);
[
     GSet{ 2 },
     GSet{ 4 },
     GSet{ 1, 6 },
     GSet{ 3, 5 }
]
> DistinguishedOrbitsOnSimples(R);
[
     GSet{ 2 },
     GSet{ 4 }
]
> AnisotropicSubdatum(R);
Twisted root datum of type 2(A2 A2)4,0
[ 1, 3, 5, 6, 7, 11, 37, 39, 41, 42, 43, 47 ]
> RR := RelativeRootDatum(R);RR;
RR: Adjoint root datum of type G2
> DynkinDiagram(RR);

G2    2 =<= 1
         3
> _,pi := RelativeRootSpace(R);
> [ Position(Roots(RR), pi(Root(R,i)) ) : i in [2,4]];
[ 1, 2 ]

```

and now the one with distinguished orbits $\{2\}$ and $\{1,6\}$, which has a non-reduced relative root datum:

```magma
> R := RootDatum("E6" : Twist := <{{2},{1,6}},2> ); R;
R: Twisted adjoint root datum of dimension 6 of type 2E6,2
> OrbitsOnSimples(R);
[
     GSet{ 2 },
     GSet{ 4 },
     GSet{ 1, 6 },
     GSet{ 3, 5 }
]
> DistinguishedOrbitsOnSimples(R);
[
     GSet{ 2 },
     GSet{ 1, 6 }
]
> AnisotropicSubdatum(R);
Twisted root datum of type 2A3,0
[ 3, 4, 5, 9, 10, 15, 39, 40, 41, 45, 46, 51 ]
> RR := RelativeRootDatum(R);RR;
RR: Adjoint root datum of type BC2
> DynkinDiagram(RR);

BC2    1 =>= 2
> _,pi := RelativeRootSpace(R);
> [ Position(Roots(RR), pi(Root(R,i)) ) : i in [2, 1,6]];
[ 1, 2, 2 ]

```

Finally, the twisted root Datum of type ${}^6D_{4,1}$:

```magma
> T := RootDatum( "D4" : Twist:=<{{2}},6> );
> T;
T: Twisted adjoint root datum of dimension 4 of type 6D4,1
> RelativeRootDatum(T);
Adjoint root datum of type BC1
> GammaOrbitsRepresentatives(T,1);
[ 11, 5 ]
> GammaOrbitsRepresentatives(T,2);
[ 12 ]

```

### `CoxeterForm(R): RootDtm -> AlgMatElt`

### `DualCoxeterForm(R): RootDtm -> AlgMatElt`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The matrix of an inner product on the (co)root space of the root datum $R$ which is invariant under the action of the (co)roots. The inner product is normalised so that the short roots in each irreducible component have length one.

## Reflections

The root $\alpha$ acts on the root space via the reflection $s_\alpha$; the coroot $\alpha^\star$ acts on the coroot space via the coreflection $s_\alpha^\star$.

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

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

```magma
Basis: MonStgElt                    Default: "Standard"
```

The sequence of matrices giving the action of the simple (co)roots of the root datum $R$ on the (co)root space, i.e. the matrices of $s_{\alpha_1},\dots,s_{\alpha_n}$ (respectively, $s_{\alpha_1}^\star,\dots,s_{\alpha_n}^\star$).

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

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

```magma
Basis: MonStgElt                    Default: "Standard"
```

The sequence of matrices giving the action of the (co)roots of the root datum $R$ on the (co)root space, i.e. the matrices of $s_{\alpha_1},\dots,s_{\alpha_{2N}}$ (respectively, $s_{\alpha_1}^\star,\dots,s_{\alpha_{2N}}^\star$).

### `ReflectionMatrix(R, r): RootDtm, RngIntElt -> []`

### `CoreflectionMatrix(R, r): RootDtm, RngIntElt -> []`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The matrix giving the action of the $r$th (co)root of the root datum $R$ on the (co)root space, i.e. the matrix of $s_{\alpha_r}$ (respectively, $s_{\alpha_r}^\star$).

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

The sequence of permutations giving the action of the simple (co)roots of the root datum $R$ on the (co)roots. This action is the same for roots and coroots.

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

The sequence of permutations giving the action of the (co)roots of the root datum $R$ on the (co)roots. This action is the same for roots and coroots.

### `ReflectionPermutation(R, r): RootDtm, RngIntElt -> []`

The permutation giving the action of the $r$th (co)root of the root datum $R$ on the (co)roots. This action is the same for roots and coroots.

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

The sequence of words in the simple reflections for all the reflections of the root datum $R$. These words are given as sequences of integers. In other words, if $a = [a_1,\dots,a_l] = \hbox{\tt ReflectionWords(R)[r]}$, then $s_{\alpha_r} = s_{\alpha_{a_1}} \cdots s_{\alpha_{a_l}}$.

### `ReflectionWord(R, r): RootDtm, RngIntElt -> []`

The word in the simple reflections for the $r$th reflection of the root datum $R$. The word is given as a sequence of integers. In other words, if $a = [a_1,\dots,a_l] = \hbox{\tt ReflectionWord(R,r)}$, then $s_{\alpha_r} = s_{\alpha_{a_1}} \cdots s_{\alpha_{a_l}}$.

### `Example: Action (ex-458120)`

```magma
> R := RootDatum("A3" : Isogeny := 2);
> mx := ReflectionMatrix(R, 4);
> perm := ReflectionPermutation(R, 4);
> wd := ReflectionWord(R, 4);
> RootPosition(R, Root(R,2) * mx) eq 2^perm;
true
> perm eq &*[ ReflectionPermutation(R, r) : r in wd ];
true
>
> mx := CoreflectionMatrix(R, 4);
> CorootPosition(R, Coroot(R,2) * mx) eq 2^perm;
true

```

## Operations and Properties for Root and Coroot Indices

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

The index of the sum of the $r$th and $s$th roots in the root datum $R$, or 0 if the sum is not a root. In other words, if $t = \hbox{\tt Sum(R,r,s)} \ne 0$ then $\alpha_t=\alpha_r+\alpha_s$. The condition $\alpha_r\ne\pm\alpha_s$ must be satisfied.

### `IsPositive(R, r): RootStr, RngIntElt -> BoolElt`

Returns `true` if, and only if, the $r$th (co)root of the root datum $R$ is a positive root.

### `IsNegative(R, r): RootStr, RngIntElt -> BoolElt`

Returns `true` if, and only if, the $r$th (co)root of the root datum $R$ is a negative root.

### `Negative(R, r): RootStr, RngIntElt -> RngIntElt`

The index of the negative of the $r$th (co)root of the root datum $R$. In other words, if $s = \hbox{\tt Negative(R,r)}$ then $\alpha_s=-\alpha_r$.

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

Indices in the root datum $R$ of the left string through $\alpha_s$ in the direction of $\alpha_r$, i.e. the indices of $\alpha_s-\alpha_r,\alpha_s-2\alpha_r,\dots,\alpha_s-p\alpha_r$. In other words, this returns the sequence $[r_1,\dots,r_p]$ where $\alpha_{r_i}=\alpha_s-i\alpha_r$ and $\alpha_s-(p+1)\alpha_r$ is not a root. The condition $\alpha_r\ne\pm\alpha_s$ must be satisfied.

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

Indices in the root datum $R$ of the left string through $\alpha_s$ in the direction of $\alpha_r$, i.e. the indices of $\alpha_s+\alpha_r,\alpha_s+2\alpha_r,\dots,\alpha_s+q\alpha_r$. In other words, this returns the sequence $[r_1,\dots,r_q]$ where $\alpha_{r_i}=\alpha_s+i\alpha_r$ and $\alpha_s+(q+1)\alpha_r$ is not a root. The condition $\alpha_r\ne\pm\alpha_s$ must be satisfied.

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

The largest $p$ such that $\alpha_s-p\alpha_r$ is a root of the root datum $R$. The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

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

The largest $q$ such that $\alpha_s+q\alpha_r$ is a root of the root datum $R$. The condition $\alpha_s\ne\pm\alpha_r$ must be satisfied.

### `Example: Root Arithmetic (ex-15650f)`

```magma
> R := RootDatum("G2");
> Sum(R, 1, Negative(R,5));
10
> IsPositive(R, 10);
false
> Negative(R, 10);
4
> P := PositiveRoots(R);
> P[1] - P[5] eq -P[4];
true

```

### `RootHeight(R, r): RootStr, RngIntElt -> RngIntElt`

### `CorootHeight(R, r): RootStr, RngIntElt -> RngIntElt`

The height of the $r$th (co)root of the root datum $R$, i.e. the sum of the coefficients of $\alpha_r$ (respectively, $\alpha_r^\star$) with respect to the simple (co)roots.

### `RootNorms(R): RootStr -> [RngIntElt]`

### `CorootNorms(R): RootStr -> [RngIntElt]`

The sequence of squares of the lengths of the (co)roots of the root datum $R$.

### `RootNorm(R, r): RootStr, RngIntElt -> RngIntElt`

### `CorootNorm(R, r): RootStr, RngIntElt -> RngIntElt`

The square of the length of the $r$th (co)root of the root datum $R$.

### `IsLongRoot(R, r): RootStr, RngIntElt -> BoolElt`

Returns `true` if, and only if, the $r$th root of the root datum $R$ is long. This only makes sense for irreducible crystallographic root data. Note that for non-reduced root data, the roots which are not indivisible, are actually longer than the long ones.

### `IsShortRoot(R, r): RootStr, RngIntElt -> BoolElt`

Returns `true` if, and only if, the $r$th root of the root datum $R$ is short. This only makes sense for irreducible crystallographic root data.

### `IsIndivisibleRoot(R, r): RootStr, RngIntElt -> BoolElt`

Returns `true` if, and only if, the $r$th root of the root system $R$ is indivisible.

### `Example: Root Operations (ex-1c59aa)`

Note that the Coxeter form is defined over the rationals. Since it is not possible to multiply a lattice element by a rational matrix, (co)roots must be coerced into a rational vector space first.

```magma
> R := RootDatum("G2");
> RootHeight(R, 5);
4
> F := CoxeterForm(R);
> v := VectorSpace(Rationals(),2) ! Root(R, 5);
> (v*F, v) eq RootNorm(R, 5);
true
> IsLongRoot(R, 5);
true
> LeftString(R, 1, 5);
[ 4, 3, 2 ]
> roots := Roots(R);
> for i in [1..3] do
>   RootPosition(R, roots[5]-i*roots[1]);
> end for;
4
3
2

```

### `RootClosure(R, S): RootDtm, SetEnum[RngIntElt] -> SetEnum[RngIntElt]`

The closure in the root datum $R$ of the set $S$ of root indices. That is the indices of every root that can be written as a sum of roots with indices in $S$.

### `AdditiveOrder(R): RootStr -> SeqEnum`

An additive order on the positive roots of the root datum $R$, i.e. a sequence containing the numbers $1,\dots,N$ in some order such that $\alpha_r+\alpha_s=\alpha_t$ implies $t$ is between $r$ and $s$. This is computed using the techniques of [[Papi, 1994](../../references.md#cite-papi)]

### `IsAdditiveOrder(R, Q): RootStr, [RngIntElt] -> BoolElt`

Returns `true` if, and only if, $Q$ gives an additive order on a set of positive roots of $R$. $Q$ must be a sequence of integers in the range $[1..N]$ with no gaps or repeats.

### `Example: Additive Order (ex-24f6a0)`

```magma
> R := RootDatum("A5");
> a := AdditiveOrder(R);
> Position(a, 2);
6
> Position(a, 3);
10
> Position(a, Sum(R, 2, 3));
7

```

## Weights

### `WeightLattice(R): RootDtm -> Lat`

The weight lattice $\Lambda$ of the root datum $R$. i.e. the $\lambda$ in ${\mathbb{Q}}\Phi\le{\mathbb{Q}}\otimes X$ such that $\langle\lambda,\alpha^\star\rangle\in{\mathbb{Z}}$ for every coroot $\alpha^\star$.

### `CoweightLattice(R): RootDtm -> Lat`

The coweight lattice $\Lambda^\star$ of the root datum $R$, i.e. the $\lambda^\star$ in ${\mathbb{Q}}\Phi^\star\le{\mathbb{Q}}\otimes Y$ such that $\langle\alpha,\lambda^\star\rangle\in{\mathbb{Z}}$ for every root $\alpha$.

### `FundamentalWeights(R): RootDtm -> Mtrx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The fundamental weights $\lambda_1,\dots,\lambda_n$ of the root datum $R$ given as the rows of a matrix. This is the basis of the weight lattice $\Lambda$ dual to the simple coroots, i.e. $\langle\lambda_i,\alpha_j^\star\rangle=\delta_{ij}$.

### `FundamentalCoweights(R): RootDtm -> Mtrx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The fundamental coweights $\lambda_1^\star,\dots,\lambda_n^\star$ of the root datum $R$ given as the rows of a matrix. This is the basis of the coweight lattice $\Lambda^\star$ dual to the simple roots, i.e. $\langle\alpha_i,\lambda_j^\star\rangle=\delta_{ij}$.

### `Example: Weights (ex-28403f)`

```magma
> R := RootDatum("E6");
> WeightLattice(R);
Lattice of rank 6 and degree 6
Basis:
(4  3  5  6  4  2)
(3  6  6  9  6  3)
(5  6 10 12  8  4)
(6  9 12 18 12  6)
(4  6  8 12 10  5)
(2  3  4  6  5  4)
Basis Denominator: 3
> FundamentalWeights(R);
[ 4/3    1  5/3    2  4/3  2/3]
[   1    2    2    3    2    1]
[ 5/3    2 10/3    4  8/3  4/3]
[   2    3    4    6    4    2]
[ 4/3    2  8/3    4 10/3  5/3]
[ 2/3    1  4/3    2  5/3  4/3]

```

### `IsDominant(R, v): RootDtm, . -> ModTupFldElt, GrpFPCoxElt`

```magma
Basis: MonStgElt                    Default: "Standard"
```

Returns `true` if, and only if, $v$ is a dominant weight for the root datum $R$, ie, a nonnegative integral linear combination of the fundamental weights.

### `DominantWeight(R, v): RootDtm, . -> ModTupFldElt, GrpFPCoxElt`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The unique dominant weight in the same $W$-orbit as the weight $v$, where $W$ is the Weyl group of the root datum $R$. The second value returned is a Weyl group element taking $v$ to the dominant weight. The weight $v$ can be given either as a vector or as a sequence representing the vector and is coerced into the weight lattice first.

### `WeightOrbit(R, v): RootDtm, . -> {@ ModTupFldElt @}, [GrpFPCoxElt]`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The $W$-orbit of the weight $v$ as an indexed set, where $W$ is the Weyl group of the root datum $R$. The first element in the orbit is always dominant. The second value returned is a sequence of Weyl group elements taking the weight to the corresponding element of the orbit. The weight $v$ can be given either as a vector or as a sequence representing the vector and is coerced into the weight lattice first.

### `Example: Dominant Weights (ex-4bce9a)`

```magma
> R := RootDatum("B3");
> DominantWeight(R, [1,-1,0] : Basis:="Weight");
(1 0 0)
[ 2, 3, 2, 1 ]
> #WeightOrbit(R, [1,-1,0] : Basis:="Weight");
6

```
