Generators and relations¶
generators ¶
generators.py¶
Symbolic generators for U_q(sl_2).
This module defines the four generators (E, F, K, K^{-1}) and the formal
parameter q as noncommutative SymPy symbols. No relations are imposed at this
level: the structure is a free algebra. relations.py supplies the relations.
all_generators ¶
all_generators() -> dict
Return the generators as a name-to-symbol dictionary.
Source code in quantum_group/generators.py
26 27 28 | |
commutator ¶
commutator(a: Expr, b: Expr) -> sp.Expr
Return the expanded commutator [a, b] = ab - ba.
Source code in quantum_group/generators.py
31 32 33 | |
relations ¶
relations.py¶
Defining relations of U_q(sl_2) and their verification.
Defining relations
(R1) K K^{-1} = K^{-1} K = 1
(R2) K E K^{-1} = q^{ 2} E
(R3) K F K^{-1} = q^{-2} F
(R4) [E, F] = (K - K^{-1}) / (q - q^{-1})
At the symbolic level these relations can only be stated as definitions; a
concrete matrix representation is used to check them. The
verify_on_representation function tests whether a representation satisfies
all four relations by checking that their residual matrices are zero.
RelationCheck
dataclass
¶
Result of checking one relation with matrices.
Source code in quantum_group/relations.py
62 63 64 65 66 67 68 69 70 71 | |
symbolic_relations ¶
symbolic_relations() -> list[tuple[str, sp.Expr, sp.Expr]]
Return the four defining U_q(sl_2) relations as (LHS, RHS) pairs.
At the symbolic level, these pairs only name the relations.
Source code in quantum_group/relations.py
35 36 37 38 39 40 41 42 43 44 45 46 47 | |
pretty_print_relations ¶
pretty_print_relations() -> str
Return a readable rendering of the relations.
Source code in quantum_group/relations.py
50 51 52 53 54 55 | |
verify_on_representation ¶
verify_on_representation(E_mat: Matrix, F_mat: Matrix, K_mat: Matrix, Kinv_mat: Matrix, q_sym: Expr = q) -> dict[str, RelationCheck]
Check the U_q(sl_2) relations for matrices E, F, K, K^{-1}.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
E_mat
|
Matrix
|
Concrete matrix representations of the generators. All must have the same (n+1) x (n+1) shape. |
required |
F_mat
|
Matrix
|
Concrete matrix representations of the generators. All must have the same (n+1) x (n+1) shape. |
required |
K_mat
|
Matrix
|
Concrete matrix representations of the generators. All must have the same (n+1) x (n+1) shape. |
required |
Kinv_mat
|
Matrix
|
Concrete matrix representations of the generators. All must have the same (n+1) x (n+1) shape. |
required |
q_sym
|
sympy expression
|
The q parameter used in the relations. |
q
|
Returns:
| Type | Description |
|---|---|
A dictionary mapping relation names to RelationCheck objects.
|
|
Raises:
| Type | Description |
|---|---|
(TypeError, ValueError)
|
If a generator is not a square SymPy matrix, if the four shapes differ, or if q is 0 or ±1. |
Source code in quantum_group/relations.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
verify_relations_core ¶
verify_relations_core(E: Matrix, F: Matrix, K: Matrix, K_inv: Matrix, q_sym: Expr = q) -> dict[str, RelationCheck]
Manuscript-compatible wrapper for verify_on_representation.
The repository's stable API is verify_on_representation. The manuscript
and older notes sometimes use verify_relations_core for the same
matrix-level relation check, so this wrapper preserves that name without
duplicating logic.
Source code in quantum_group/relations.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
all_relations_hold ¶
all_relations_hold(checks: dict[str, RelationCheck]) -> bool
Return whether all relations hold (convenience function).
Source code in quantum_group/relations.py
161 162 163 | |