Skip to content

Yurie/Algebra

A Mathematica paclet for implementing and managing finitely presented associative algebras.

The GitHub repository is yuriever/Algebra.

Dependency:

"Yurie/Cluster" -> ">=1.0.0"

Example

The CCR can be implemented as

algebraDefine["CCR"];

algebraDefault["CCR"];

<|operator->{x,p},relation->{x**p:>p**x+1}|>//algebraAdd["CCR"];

operatorPower[x,2]**operatorPower[p,2]//algS
Out[]= 2+4 p**x+p**p**x**x

The relation can be packed by commDefine like

commDefine[x,p]:>1

commDefine[x,p,Reverse]:>1/;True
Out[]= x**p:>1+p**x

Out[]= p**x:>-1+x**p/;True

Methods

  • algebraCluster|operator|relation|printing - keywords.

  • algebraDefine[algList_|alg_] - define algebras.

  • algebraDefineQ[alg_] - check whether an algebra is defined.

  • algebraDefault[algList_|alg_] - set the default algebras.

  • algebraReset|algebraUnset[algList_|alg_] - reset/unset the algebras.

  • algebraAdd[algList_|alg_,assoc_] - add elements to the algebras. The argument assoc_ accepts _Rule|{___Rule}|_Association.

  • algebraShow[alg_] - show the algebra.

List of shortcuts:

  • operator|relation|printing[] - return the elements of the default algebras.

  • algebraDefine[] - return the defined algebras.

  • algebraDefault[] - return the default algebras.

  • algebraReset|algebraUnset[] - reset/unset the default except internal algebras.

  • algebraReset|algebraUnset[All] - reset/unset all the defined except internal algebras.

  • algebraShow[] - show the default algebras.

Functionalities

Internal algebras

Name System operator occupation Meaning
"Multiplication" NonCommutativeMultiply associativity, linearity over \(\CC\)
"TensorProduct" CircleTimes strict tensor category with identity id
"Conjugate" SuperDagger dagger structure
"Comultiplication" CircleTimes coassociativity (TODO)

Questing functions

  • scalarQ|operatorQ[_] - check whether the expression is C-number/Q-number by the default algebra.

  • generatorQ[_] - check whether the symbol is a generator the default algebra.

Algebra simplification

  • algebraSimplify[_] - simplify the expression by the default algebra.

  • algebraPrint[_] - format the expression by the default algebra.

Table of shortcuts:

Name Meaning
algS[_] algebraSimplify
algFS[_] algebraSimplify + FullSimplify
algP[_] algebraPrint
algSP[_] algebraSimplify + algebraPrint
algFSP[_] algebraSimplify + FullSimplify + algebraPrint
algSE[_] return an equation with the input at right side and the simplified one at left side.
algFSE[_] return an equation with the input at right side and the fully simplified one at left side.
algEqualQ[_,_] x==y for operators.
algSameQ[_,_] x===y for operators.

Commutator

  • comm|anticomm[__] - (anti-)commutator.

  • commSim|anticommSim[__] - simplify the (anti-)commutator.

  • commDefine[_,_]:>_/;_ - define commutation relations with condition, order-reversing or anti-commutator.

Adjoint

  • adjoint[op_,order_:1][expr_] - the adjoint action of Lie algebra, \(\adjoint^n_x\cdot y\).

  • adjointExp[op_,max_,parameter_:1][expr_] - the adjoint action of Lie group upto the max order \(n\), \([\Adjoint_{x}(t)]_n\cdot y=[e^{t x}]_n\, y\, [e^{-t x}]_n\).

Power

  • operatorPower[op_,order_:1] - power of operators, \(x^n\).

  • operatorExp[op_,max_,parameter_:1] - exponential of operators upto the max order \(n\), \([e^{t x}]_n=\sum_{i=0}^{n}\frac{t^i}{i!} x^i\).

Inner product

This functionality needs the algebra "Conjugate".

  • innerProduct[_,___] - inner product of two vectors. For operators \(x\) and \(y\) this returns \(x^{\dagger}\cdot y\), and for a single operator \(x\) this returns \(x^{\dagger}\cdot x\).

  • innerProductSim[__] - simplify the inner product.

Scalar extraction

  • scalarSeparate|scalarExtract[__] - separate/extract scalars from operators in the expressions.

Definition checking

  • checkLieBracket[_,_,_] - check the Jacobi identity of Lie algebras.

  • checkLieModule[_,_,_] - check the definition of Lie modules.

Tensor product

This functionality needs the algebra "TensorProduct".

  • id - identity of tensor product.

  • tensorCompose - composite tensors over multiplication according to tensor-rank.

  • tensorRankSet[op_?generatorQ,rank_] - set the tensor-rank of generators.

  • tensorRankGet[op_] - get the tensor-rank of operators.

  • tensorRankEqualQ[op1_,op2_] - check whether the ranks of two tensors are equal.

To-do list and other issues

  • TODO: implement the comultiplication.