Skip to content

Representations

representations

representations.py

Finite-dimensional irreducible highest-weight representations of U_q(sl_2).

For generic nonzero q and every nonnegative integer n, there is an (n+1)-dimensional irreducible representation V_n. On the basis {v_0, v_1, ..., v_n}, the generators act as:

K . v_k = q^{n - 2k} v_k                                 (diagonal)
F . v_k = v_{k+1}        (F . v_n = 0)                    (lower shift)
E . v_k = [k]_q [n - k + 1]_q v_{k-1}   (E . v_0 = 0)     (upper shift)

This module returns the generator matrices as SymPy Matrix objects. Basis order: k = 0, 1, ..., n; v_k is represented by the kth standard basis vector.

Representation dataclass

Container for the finite-dimensional U_q(sl_2) representation V_n.

Source code in quantum_group/representations.py
29
30
31
32
33
34
35
36
37
38
39
40
41
@dataclass
class Representation:
    """Container for the finite-dimensional U_q(sl_2) representation V_n."""
    n: int                  # highest weight
    dim: int                # dimension = n + 1
    E: sp.Matrix
    F: sp.Matrix
    K: sp.Matrix
    K_inv: sp.Matrix
    weights: list[sp.Expr]  # K-eigenvalues q^{n-2k}, k=0..n

    def __repr__(self) -> str:  # pragma: no cover
        return f"<U_q(sl_2) representation V_{self.n}, dimension={self.dim}>"

build_representation

build_representation(n: int, q_sym: Expr = q) -> Representation

Construct the irreducible representation V_n as explicit matrices.

Parameters:

Name Type Description Default
n int

Highest weight (dimension = n + 1). n >= 0.

required
q_sym sympy expression

The nonzero q parameter. Python integers remain exact; floats are approximate. At roots of unity the module need not be irreducible.

q

Returns:

Type Description
Representation

Data class containing generator matrices and a list of K-weights.

Source code in quantum_group/representations.py
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
def build_representation(n: int, q_sym: sp.Expr = q) -> Representation:
    """Construct the irreducible representation V_n as explicit matrices.

    Parameters
    ----------
    n : int
        Highest weight (dimension = n + 1). n >= 0.
    q_sym : sympy expression
        The nonzero q parameter. Python integers remain exact; floats are
        approximate. At roots of unity the module need not be irreducible.

    Returns
    -------
    Representation
        Data class containing generator matrices and a list of K-weights.
    """
    n = as_int(n, "The highest weight n")
    if n < 0:
        raise ValueError("The highest weight n must be nonnegative.")

    q_sym = sp.sympify(q_sym)
    if q_sym == 0:
        raise ValueError("q must be nonzero.")
    dim = n + 1

    # K is diagonal: K . v_k = q^{n-2k} v_k
    weights = [q_sym**(n - 2 * k) for k in range(dim)]
    K_mat = sp.diag(*weights)
    K_inv_mat = sp.diag(*[w**(-1) for w in weights])

    # F is a lower shift: F . v_k = v_{k+1}, except at k = n.
    F_mat = _zero_matrix(dim)
    for k in range(n):  # k = 0, ..., n-1
        F_mat[k + 1, k] = sp.Integer(1)

    # E is an upper shift: E . v_k = [k]_q [n-k+1]_q v_{k-1}, k = 1..n
    E_mat = _zero_matrix(dim)
    for k in range(1, dim):  # k = 1, ..., n
        coeff = q_integer(k, q_sym) * q_integer(n - k + 1, q_sym)
        E_mat[k - 1, k] = sp.simplify(coeff)

    return Representation(
        n=n,
        dim=dim,
        E=sp.simplify(E_mat),
        F=F_mat,
        K=sp.simplify(K_mat),
        K_inv=sp.simplify(K_inv_mat),
        weights=weights,
    )

build_representation_core

build_representation_core(n: int, q_sym: Expr = q) -> Representation

Manuscript-compatible wrapper for build_representation.

The implementation returns the repository's Representation data class rather than a bare tuple, so downstream code can access E, F, K and K_inv by name.

Source code in quantum_group/representations.py
100
101
102
103
104
105
106
107
def build_representation_core(n: int, q_sym: sp.Expr = q) -> Representation:
    """Manuscript-compatible wrapper for ``build_representation``.

    The implementation returns the repository's ``Representation`` data class
    rather than a bare tuple, so downstream code can access ``E``, ``F``,
    ``K`` and ``K_inv`` by name.
    """
    return build_representation(n, q_sym=q_sym)

highest_weight_vector

highest_weight_vector(rep: Representation) -> sp.Matrix

Return v_0, the highest-weight vector annihilated by E.

Source code in quantum_group/representations.py
110
111
112
113
114
def highest_weight_vector(rep: Representation) -> sp.Matrix:
    """Return v_0, the highest-weight vector annihilated by E."""
    v = sp.zeros(rep.dim, 1)
    v[0, 0] = sp.Integer(1)
    return v

lowest_weight_vector

lowest_weight_vector(rep: Representation) -> sp.Matrix

Return v_n, the lowest-weight vector annihilated by F.

Source code in quantum_group/representations.py
117
118
119
120
121
def lowest_weight_vector(rep: Representation) -> sp.Matrix:
    """Return v_n, the lowest-weight vector annihilated by F."""
    v = sp.zeros(rep.dim, 1)
    v[rep.dim - 1, 0] = sp.Integer(1)
    return v

weight_of

weight_of(rep: Representation, k: int) -> sp.Expr

Return the K-eigenvalue (q^{n-2k}) of basis vector v_k.

Source code in quantum_group/representations.py
124
125
126
127
128
129
def weight_of(rep: Representation, k: int) -> sp.Expr:
    """Return the K-eigenvalue (q^{n-2k}) of basis vector v_k."""
    k = as_int(k, "k")
    if not (0 <= k < rep.dim):
        raise IndexError(f"k must be in [0, {rep.dim}).")
    return rep.weights[k]