---
title: "The Path Model"
canonical: "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/path-model.html"
source: "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/path-model.md"
part: "Lie Theory"
chapter: "Quantum Groups"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Lie Theory", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/index-lie-theory.md"}
  - {"title": "Quantum Groups", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/index-quantum-groups.md"}
prev: {"title": "Kashiwara Operators", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/kashiwara-ops.md"}
next: {"title": "Elements of the Canonical Basis", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/canbas.md"}
intrinsics:
  - {"name": "DominantLSPath", "signature": "DominantLSPath(R, hw): RootDtm, SeqEnum -> PathLS"}
  - {"name": "Falpha", "signature": "Falpha(p, i): PathLS, RngIntElt -> PathLS"}
  - {"name": "Ealpha", "signature": "Ealpha(p, i): PathLS, RngIntElt -> PathLS"}
  - {"name": "WeightSequence", "signature": "WeightSequence(p): PathLS -> SeqEnum"}
  - {"name": "RationalSequence", "signature": "RationalSequence(p): PathLS -> SeqEnum"}
  - {"name": "EndpointWeight", "signature": "EndpointWeight(p): PathLS -> ModTupRngElt"}
  - {"name": "Shape", "signature": "Shape(p): PathLS -> ModTupRngElt"}
  - {"name": "WeylWord", "signature": "WeylWord(p): PathLS -> SeqEnum"}
  - {"name": "IsZero", "signature": "IsZero(p): PathLS -> BoolElt"}
  - {"name": "eq", "signature": "p1 eq p2: PathLS, PathLS -> BoolElt"}
  - {"name": "CrystalGraph", "signature": "CrystalGraph(R, hw): RootDtm, SeqEnum -> GrphDir, SeqEnum"}
examples:
  - "ex-cccc8c"
  - "ex-3f9751"
---

<a id="path-model"></a>
<a id="sectalgqeapathmodel"></a>
# The Path Model

In this section we describe functions for working with Littelmann’s path model (cf. Section [The Path Model](https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/background.md#pathmodel)). A special role is played by the zero path. The path operators cannot be applied to the zero path. However, on some occasions they do produce the zero path.

<a id="function-dominantlspath-rootdtm-seqenum"></a>
## `DominantLSPath(R, hw): RootDtm, SeqEnum -> PathLS`

Given a root datum $R$ and a sequence $hw$ of non-negative integers returns the path that is the straight line from the origin to $hw$.

<a id="function-falpha-pathls-rngintelt"></a>
## `Falpha(p, i): PathLS, RngIntElt -> PathLS`

Given a (non-zero) path $p$ and an integer $i$ between $1$ and the rank of the root datum returns the result of applying the path operator $f_{\alpha_i}$ to $p$ (where $\alpha_i$ is the $i$-th simple root).

<a id="function-ealpha-pathls-rngintelt"></a>
## `Ealpha(p, i): PathLS, RngIntElt -> PathLS`

Given a (non-zero) path $p$ and an integer $i$ between $1$ and the rank of the root datum returns the result of applying the path operator $e_{\alpha_i}$ to $p$ (where $\alpha_i$ is the $i$-th simple root).

<a id="function-weightsequence-pathls"></a>
## `WeightSequence(p): PathLS -> SeqEnum`

For a path $p$ this returns the sequence of weights that, along with the sequence of rational numbers, defines the path (cf. Section [The Path Model](https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/background.md#pathmodel)).

<a id="function-rationalsequence-pathls"></a>
## `RationalSequence(p): PathLS -> SeqEnum`

For a path $p$ this returns the sequence of rational numbers that, along with the sequence of weights, defines the path (cf. Section [The Path Model](https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/background.md#pathmodel)).

<a id="function-endpointweight-pathls"></a>
## `EndpointWeight(p): PathLS -> ModTupRngElt`

Returns the weight which is the end point of the path $p$.

<a id="function-shape-pathls"></a>
## `Shape(p): PathLS -> ModTupRngElt`

Returns the weight which is the shape of the path $p$.

<a id="function-weylword-pathls"></a>
## `WeylWord(p): PathLS -> SeqEnum`

Returns a reduced expression for the element $\sigma$ of the Weyl group, of shortest length such that $\sigma(\lambda) = \nu_1$, where $\lambda$ is the shape of the path $p$, and $\nu_1$ is the first weight in the sequence `WeightSequence(p)`. The reduced expression is represented as a sequence of integers between $1$ and the rank of the root datum. In this sequence the index $i$ represents the $i$-th simple reflection.

<a id="function-iszero-pathls"></a>
## `IsZero(p): PathLS -> BoolElt`

Returns `true` if the path $p$ is the zero path, `false` otherwise.

<a id="operation-op-eq-pathls-pathls"></a>
## `p1 eq p2: PathLS, PathLS -> BoolElt`

Returns `true` if the paths $p1$ and $p2$ are equal, `false` otherwise.

<a id="example-ex-cccc8c"></a>
## `Example: LS Paths and Root Operators (ex-cccc8c)`

```magma
> R:= RootDatum("B2");
> p:= DominantLSPath(R, [ 2, 3 ]);
> p;
LS-path of shape (2 3) ending in (2 3)

> Falpha(p, 1);
LS-path of shape (2 3) ending in (0 5)

> Ealpha(Falpha(p, 1), 1);
LS-path of shape (2 3) ending in (2 3)

> p1:= Falpha(Falpha(Falpha(p, 1), 2), 1);
> p1;
LS-path of shape (2 3) ending in (-1  5)

> WeightSequence(p1);
[
    (5 -7),
    (-2  7)
]
> RationalSequence(p1);
[ 0, 1/7, 1 ]
> WeylWord(p1);
[ 2, 1 ]
```

So $s_2s_1(2,3) = (5,-7)$.

<a id="function-crystalgraph-rootdtm-seqenum"></a>
## `CrystalGraph(R, hw): RootDtm, SeqEnum -> GrphDir, SeqEnum`

For a root datum $R$ and a sequence of non-negative integers $hw$ (of length equal to the rank of the root datum), this function returns the corresponding crystal graph $G$, along with a sequence of paths. The graph $G$ is a directed labelled graph. The labels on the edges are integers between $1$ and the rank of the root system. If there is an edge from $i$ to $j$ with label $s$, then $f_{\alpha_s}(p_i) = p_j$, where $p_i,p_j$ are the $i$-th and $j$-th elements of the sequence of paths returned by this function (and $f_{\alpha_s}$ is the root operator corresponding to the $s$-th simple root). In other words, the $i$-th path is the $i$-th point of the graph $G$.

<a id="example-ex-3f9751"></a>
## `Example: Crystal Graph of a Representation (ex-3f9751)`

```magma
> R:= RootDatum("G2");
> G, pp:= CrystalGraph(R, [0,1]);
> G;
Digraph
Vertex  Neighbours

1       2 ;
2       3 ;
3       4 ;
4       5 6 ;
5       7 ;
6       8 ;
7       9 ;
8       10 ;
9       11 ;
10      11 ;
11      12 ;
12      13 ;
13      14 ;
14      ;

> e:= Edges(G);
> e[10];
[9, 11]
> Label(e[10]);
1
> Falpha(pp[9], 1) eq pp[11];
true
```
