---
title: "Operations on Elements"
canonical: "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/elts-ops.html"
source: "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/elts-ops.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": "Related Structures", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/rel-struct.md"}
next: {"title": "Representations", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/representations.md"}
intrinsics:
  - {"name": "+", "signature": "x + y: AlgQUEElt, AlgQUEElt -> AlgQUEElt"}
  - {"name": "-", "signature": "x - y: AlgQUEElt, AlgQUEElt -> AlgQUEElt"}
  - {"name": "*", "signature": "x * y: AlgQUEElt, AlgQUEElt -> AlgQUEElt"}
  - {"name": "*", "signature": "c * x: RngElt, AlgQUEElt -> AlgQUEElt"}
  - {"name": "*", "signature": "x * c: AlgQUEElt, RngElt -> AlgQUEElt"}
  - {"name": "^", "signature": "x ^ n: AlgQUEElt, RngIntElt -> AlgQUEElt"}
  - {"name": "!", "signature": "U ! 0: AlgQUE, RngIntElt -> AlgQUEElt"}
  - {"name": "Zero", "signature": "Zero(U): AlgQUE -> AlgQUEElt"}
  - {"name": "!", "signature": "U ! 1: AlgQUE, RngIntElt -> AlgQUEElt"}
  - {"name": "One", "signature": "One(U): AlgQUE -> AlgQUEElt"}
  - {"name": ".", "signature": "U . i: AlgQUE, RngIntElt -> AlgQUEElt"}
  - {"name": "!", "signature": "U ! r: AlgQUE, Any -> AlgQUEElt"}
  - {"name": "KBinomial", "signature": "KBinomial(U, i, s): AlgQUE, RngIntElt, RngIntElt -> AlgQUEElt"}
  - {"name": "KBinomial", "signature": "KBinomial(K, s): AlgQUEElt, RngIntElt -> AlgQUEElt"}
  - {"name": "Monomials", "signature": "Monomials(u): AlgQUEElt -> SeqEnum"}
  - {"name": "Coefficients", "signature": "Coefficients(u): AlgQUEElt -> SeqEnum"}
  - {"name": "^", "signature": "K ^ -1: AlgQUEElt, RngIntElt -> AlgQUEElt"}
  - {"name": "Degree", "signature": "Degree(u, i): AlgQUEElt, RngIntElt -> RngIntElt"}
  - {"name": "KDegree", "signature": "KDegree(m, i): AlgQUEElt, RngIntElt -> Tup"}
examples:
  - "ex-a73ba4"
---

<a id="elts-ops"></a>
<a id="sectalgqeaeltops"></a>
# Operations on Elements

The generators of a quantized enveloping algebra $U$ can be constructed by using the dot operator, e.g., `U.5`. More general elements can then be constructed using the operations of scalar multiplication, addition, and multiplication.

Note that for the generators denoted $F_k$ and $E_k$ we use divided powers instead of normal powers. This means for instance that $F_k^s = [s]!F_k^{(s)}$, i.e., exponentiation causes multiplication by a scalar factor.

<a id="operation-op-plus-algqueelt-algqueelt"></a>
## `x + y: AlgQUEElt, AlgQUEElt -> AlgQUEElt`

<a id="operation-op-minus-algqueelt-algqueelt"></a>
## `x - y: AlgQUEElt, AlgQUEElt -> AlgQUEElt`

<a id="operation-op-times-algqueelt-algqueelt"></a>
## `x * y: AlgQUEElt, AlgQUEElt -> AlgQUEElt`

<a id="operation-op-times-rngelt-algqueelt"></a>
## `c * x: RngElt, AlgQUEElt -> AlgQUEElt`

<a id="operation-op-times-algqueelt-rngelt"></a>
## `x * c: AlgQUEElt, RngElt -> AlgQUEElt`

<a id="operation-op-pow-algqueelt-rngintelt"></a>
## `x ^ n: AlgQUEElt, RngIntElt -> AlgQUEElt`

<a id="operation-op-algque-rngintelt"></a>
## `U ! 0: AlgQUE, RngIntElt -> AlgQUEElt`

<a id="function-zero-algque"></a>
## `Zero(U): AlgQUE -> AlgQUEElt`

The zero element of the quantized enveloping algebra $U$.

<a id="operation-op-algque-rngintelt-2"></a>
## `U ! 1: AlgQUE, RngIntElt -> AlgQUEElt`

<a id="function-one-algque"></a>
## `One(U): AlgQUE -> AlgQUEElt`

The identity element of the quantized enveloping algebra $U$.

<a id="operation-operation-algque-rngintelt-algqueelt"></a>
## `U . i: AlgQUE, RngIntElt -> AlgQUEElt`

The $i$-th generator of the quantized enveloping algebra $U$. Let the root datum have $s$ positive roots and rank $r$. If $1\leq i\leq s$ then `U.i` is $F_i$. If $s+1\leq i\leq s+r$, then `U.i` is $K_j$ where $j= i-s$. If $s+r+1\leq i\leq 2s+r$ then `U.i` is $E_j$, where $j=i-s-r$.

<a id="operation-op-algque-any"></a>
## `U ! r: AlgQUE, Any -> AlgQUEElt`

Returns $r$ as an element of the quantized universal enveloping algebra $U$ where $r$ may be anything coercible into the coefficient ring of $U$ or an element of another quantized enveloping algebra whose coefficients may be coerced into the coefficient ring of $U$.

<a id="function-kbinomial-algque-rngintelt-rngintelt"></a>
## `KBinomial(U, i, s): AlgQUE, RngIntElt, RngIntElt -> AlgQUEElt`

<a id="function-kbinomial-algqueelt-rngintelt"></a>
## `KBinomial(K, s): AlgQUEElt, RngIntElt -> AlgQUEElt`

Given a quantized enveloping algebra $U$ corresponding to a root datum of rank $r$, an integer $i$ between $1$ and $r$, and a positive integer $s$, return the element $[ K_i ; s ]$. This can be used to construct general elements in the subalgebra $U^0$ (cf. Section [PBW-type Bases](https://docs.magma-maths.org/v2.30-1/LieTheory/QuantumGroups/background.md#pbwbases)).

Or given an element $K = K_i$, i.e., equal to `U.(n+i)`, where $n$ is the number of positive roots of the root datum, return $[ K ; s ]$.

<a id="function-monomials-algqueelt"></a>
## `Monomials(u): AlgQUEElt -> SeqEnum`

Given an element $u$ of a quantized enveloping algebra, returns the sequence consisting of the monomials of $u$. This sequence corresponds exactly to the one returned by `Coefficients(u)`.

<a id="function-coefficients-algqueelt"></a>
## `Coefficients(u): AlgQUEElt -> SeqEnum`

Given an element $u$ of a quantized enveloping algebra, returns the sequence consisting of the coefficients of the monomials that occur in $u$. This sequence corresponds exactly to the one returned by `Monomials(u)`.

<a id="operation-op-pow-algqueelt-rngintelt-2"></a>
## `K ^ -1: AlgQUEElt, RngIntElt -> AlgQUEElt`

Given a generator $K$ of a quantized enveloping algebra $U$ of the form $K_i$, i.e., it is equal to `U.k`, for some $n+1 \leq k \leq n+r$ where $U$ corresponds to a root datum of rank $r$ with $n$ positive roots, return the inverse of $K$.

<a id="function-degree-algqueelt-rngintelt"></a>
## `Degree(u, i): AlgQUEElt, RngIntElt -> RngIntElt`

Given an element $u$ of a quantized enveloping algebra $U$ and an integer $1 \le i \le n$ or $n + r + 1 \le i \le 2n + r$, where the root datum corresponding to $U$ has $n$ positive roots and rank $r$ (i.e., `U.i` is equal to $F_i$ or to $E_k$, where $k=i-n-r$), return the degree of $u$ in the generator $F_i$ if $1\leq i\leq n$, otherwise return the degree of $u$ in the generator $E_k$, where $k=i-n-r$.

<a id="function-kdegree-algqueelt-rngintelt"></a>
## `KDegree(m, i): AlgQUEElt, RngIntElt -> Tup`

Given a single monomial $m$ in a quantized enveloping algebra and an integer $1 \le i \le r$, where $r$ is the rank of the corresponding root datum return a tuple of $2$ integers, where the first is $0$ or $1$, and the second is non-negative. Denote this tuple by $\langle d, k \rangle$. If $d=0$ then the factor $[ K_i ; k ]$ occurs in the monomial $m$. If $d=1$, then the factor $K_i[ K_i ; k ]$ occurs in the monomial $m$.

<a id="example-ex-a73ba4"></a>
## `Example: Monomials and Coefficients of Quantum Group Elements (ex-a73ba4)`

```magma
> R:= RootDatum("G2");
> U:= QuantizedUEA(R);
> u:= U.10*U.7^3*U.1;
> m:= Monomials(u); m;
[
    F_1*K_1[ K_1 ; 2 ]*E_2,
    F_1*[ K_1 ; 1 ]*E_2,
    F_1*K_1*E_2,
    K_1[ K_1 ; 1 ]*E_3,
    E_3
]
> Coefficients(u);
[
    (q^6 - q^4 - q^2 + 1)/q^17,
    (q^2 - 1)/q^14,
    1/q^15,
    (-q^2 + 1)/q^9,
    -1/q^8
]
> Degree(m[1], 1);
1
> Degree(m[1], 9);
0
> Degree(m[1], 10);
1
> KDegree(m[1], 1);
<1, 2>
> U.7^-1;
(-q^2 + 1)/q*[ K_1 ; 1 ] + K_1
> U.7*U.7^-1;
1
```
