Algebra#

class discopy.hopf.Algebra(unit, counit, mult, comult, antipode, R=None)[source]#

Bases: builtins.object

A finite-dimensional Hopf algebra whose structural generators are tensor.Diagrams over one object ty:

unit

\(1 \to H\) (\(\eta\))

counit

\(H \to 1\) (\(\epsilon\))

mult

\(H \otimes H \to H\) (\(\nabla\))

comult

\(H \to H \otimes H\) (\(\Delta\))

antipode

\(H \to H\) (\(S\))

R

\(1 \to H \otimes H\) (optional, the R-matrix)

An axiom is a diagram equation, checked by evaluating both sides (see is_valid()). Build one from concrete structure arrays with from_arrays(), or compose generators to derive new algebras (see Double).

Parameters:
  • unit – The generators as diagrams.

  • counit – The generators as diagrams.

  • mult – The generators as diagrams.

  • comult – The generators as diagrams.

  • antipode – The generators as diagrams.

  • R – The R-matrix generator (optional).

property generators#

The tuple of structural generators, in constructor order.

property antipode_inv#

The inverse of the antipode, computed by inverting its matrix on first access — raising ValueError if the antipode is not invertible.

property twist#

the central element whose action is the twist, so that Intertwiner.twist() is a single application of the action. It is computed on first access, as the ribbon trace of the self-braiding of the regular representation applied to the unit.

Type:

The ribbon element as a state \(1 \to H\)

classmethod from_arrays(unit, counit, mult, comult, antipode, R=None)[source]#

Build a Hopf algebra from its structure arrays with respect to a basis \(e_0, \dots, e_{n-1}\): mult[i, j, k] is the coefficient of \(e_k\) in \(e_i e_j\), comult[i, p, q] of \(e_p \otimes e_q\) in \(\Delta(e_i)\), antipode[i, j] of \(e_j\) in \(S(e_i)\), and R[i, j] of \(e_i \otimes e_j\) in the R-matrix. Each is wrapped into a named tensor.Box.

is_associative()[source]#

(mult @ ty) >> mult == (ty @ mult) >> mult.

is_unital()[source]#

The unit is a left and right identity for mult.

is_coassociative()[source]#

comult >> (comult @ ty) == comult >> (ty @ comult).

is_counital()[source]#

The counit is a left and right identity for comult.

is_commutative()[source]#

Swap >> mult == mult (a property, not an axiom).

is_cocommutative()[source]#

comult >> Swap == comult (a property, not an axiom).

is_bialgebra()[source]#

comult and counit are algebra homomorphisms.

has_antipode()[source]#

comult >> (S @ ty) >> mult == counit >> unit == comult >> (ty @ S) >> mult.

is_quasitriangular()[source]#

Whether R is a universal R-matrix: it intertwines comult with its opposite, \(R \Delta = \Delta^{op} R\), and satisfies the two hexagon equations \((\Delta \otimes 1) R = R_{13} R_{23}\) and \((1 \otimes \Delta) R = R_{13} R_{12}\).

is_valid()[source]#

Whether the axioms of a Hopf algebra hold, and quasitriangularity whenever there is an R-matrix.

classmethod group_algebra(table)[source]#

The group algebra \(k[G]\) from a group multiplication table, with table[i][j] the index of \(g_i g_j\) and g_0 the unit.

>>> Z2 = Algebra.group_algebra([[0, 1], [1, 0]])
>>> assert Z2.is_valid()
classmethod cyclic(n)[source]#

The group algebra of the cyclic group \(\mathbb{Z}/n\).

>>> assert Algebra.cyclic(3).is_valid()
classmethod sweedler()[source]#

Sweedler’s four-dimensional Hopf algebra, the smallest one that is neither commutative nor cocommutative, with basis \(1, g, x, gx\) (\(g^2 = 1\), \(x^2 = 0\), \(xg = -gx\)) and \(S^2 \neq \mathrm{id}\).

>>> H = Algebra.sweedler()
>>> assert H.is_valid() and H.dim == 4
>>> assert not H.is_commutative() and not H.is_cocommutative()