Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Friends
mty::SemiSimpleAlgebra Class Referenceabstract

Abstract base class for all semi-simple Lie algebras. More...

#include <semiSimpleAlgebra.h>

Inheritance diagram for mty::SemiSimpleAlgebra:
[legend]

Public Member Functions

 SemiSimpleAlgebra (int t_l)
 Constructor with one parameter. More...
 
virtual ~SemiSimpleAlgebra ()
 Destructor.
 
csl::Expr getQuadraticCasimir (const AlgebraState &irrep) const
 Returns the expression (symbolic, rational number) of the quadratic Casimir operator for a representation. More...
 
virtual csl::Expr getIndex (const Irrep &irrep, size_t n) const
 
virtual Irrep highestWeightRep (const AlgebraState &highestWeight, bool mult=true) const
 Calculates and returns the highest weight representation. Determines all states with their multiplicities and returns the corresponding Irrep object. Overriden in R algebra. More...
 
virtual Irrep highestWeightRep (const std::vector< int > &highestWeight, bool mult=true) const
 Calculates and returns the highest weight representation. Determines all states with their multiplicities and returns the corresponding Irrep object. Overriden in R algebra. More...
 
virtual Irrep getTrivialRep () const
 Returns the trivial representation of the algebra. Overriden in R algebra. More...
 
virtual Irrep getDefiningRep () const
 
virtual SumIrrep tensorProduct (const Irrep &A, const Irrep &B, bool mult=true) const
 Calculates and returns the product of two Irrep in the algebra. The result is decomposed in a sum of irreducible representations, stored in a SumIrrep. Overriden in the R algebra. More...
 
virtual SumIrrep tensorProduct (const SumIrrep &A, const Irrep &B, bool mult=true) const
 
virtual SumIrrep tensorProduct (const Irrep &A, const SumIrrep &B, bool mult=true) const
 
SumIrrep tensorProduct (const SumIrrep &A, const SumIrrep &B, bool mult=true) const
 
virtual void sortRep (std::vector< AlgebraState > &rep, std::vector< int > &mult) const
 Sorts by modifing input paramaters a set of AlgebraState with their multiplicities. One state is considered "bigger" than another if the sum of its dinkin labels is bigger. Overriden in the R algebra. More...
 
int getOrderL () const
 Returns the order of the algebra, i.e. the number of simple roots l. More...
 
virtual algebra::Type getType () const =0
 Pure virtual function overriden in derived classes. More...
 

Protected Member Functions

void init ()
 Initialization function called in derived classes to initialize the cartan matrix, the Weyl group and the norms of simple roots.
 
virtual void setCartanMatrix ()=0
 Pure virtual function overriden in derived classes. Initializes the Cartan matrix specifically to the given semi-simple Lie algebra.
 
virtual void setSquaredNorm ()=0
 Pure virtual function overriden in derived classes. Initializes norms of simple roots specifically to the given semi-simple Lie algebra.
 
virtual csl::Expr getEta () const
 

Protected Attributes

const int l
 Order of the semi-simple algebra, i.e. number of simple roots.
 
std::vector< int > rho
 std::vector of size l. Particular root (half-sum of simple roots) useful in calculations. More...
 
csl::vector_expr absoluteNorms
 Absolute norms of simple roots used in the computation of the quadratic Casimir operator. See SemiSimpleAlgebra::getQuadraticCasimir().
 
std::vector< int > squaredNorm
 std::vector of integers of size l. Contains squared norms of all simple roots.
 
std::vector< std::vector< int > > positiveRoots
 Contains all positive roots in a std::vector. Each positive root is a std::vector of integers of size l: dinkin labels in co-root space.
 
std::vector< std::vector< int > > cartanMatrix
 Cartan matrix of the algebra.
 
std::vector< std::vector< int > > rootMetric
 Metric for roots in co-root space, i.e. metrix to apply in order to compute scalar dot between roots expressed with their dinkin labels.
 
csl::Expr symbolicRho
 Symbolic version of the half-sum of simple roots (see positiveRoots). Contains the factor 1/2 that positiveRoots does not.
 
csl::Expr symbolicCartan
 Symbolic version of the cartan matrix.
 
csl::Expr inverseCartan
 Inverse cartan matrix.
 
csl::Expr symbolicMetric
 Symbolic metric in root space. i.e. different from rootMetric that is the metric in co-root space.
 
csl::vector_expr symbolicRoots
 Symbolic version of positiveRoots, each root is a csl::Vector of csl::Integer in co-root space (dinkin labels).
 
csl::vector_expr symbolicSquaredNorms
 Symbolic version of squaredNorm.
 
std::vector< std::pair< AlgebraState, Irrep > > irreps
 
std::vector< IndexDataindices
 

Private Member Functions

bool isOnWall (const AlgebraState &state) const
 Checks if a state is on a wall of the root lattice, i.e. if one of the coefficients if the simple roots basis (one of the dinkin labels) is zero. More...
 
AlgebraState toDominantWeylChamber (const AlgebraState &state, int &sign) const
 Reflects a given state in the dominant Weyl chamber. More...
 
std::vector< int > weylReflection (int simpleRoot, const std::vector< int > &root) const
 Reflects a root with respect to one simple root. More...
 
AlgebraState weylReflection (int simpleRoot, const AlgebraState &state) const
 Reflects a state with respect to one simple root. More...
 
std::vector< int > weylReflection (int simpleRoot1, int simpleRoot2) const
 Reflects a simple root with respect to another. More...
 
void invertCartanMatrix ()
 Inverts the Cartan matrix using csl's matrix inversion and stores it in the member \b inverseCartan. More...
 
void generateWeylGroup ()
 Generates the Weyl group of reflection from the simple roots. More...
 
csl::Expr convertState (const AlgebraState &state) const
 Converts a state in co-root space (AlgebraState with dinkin labels) into an expression (csl csl::Expr), Vector of coefficients in root space. More...
 
bool comparatorHighest (const AlgebraState &A, const AlgebraState &B) const
 Compares two AlgebraState. More...
 
csl::Expr computeScalarDot (const csl::Expr &rootA, const csl::Expr &rootB) const
 Computes the scalar dot of two roots in root-space. More...
 
csl::Expr computeSquaredNorm (const csl::Expr &root) const
 Computes the squared norm of a root, see computeScalarDot(). More...
 
AlgebraState applyAnnihilationOperator (int annihilator, const AlgebraState &state) const
 Applies the annihilation operator of a simple root on an AlgebraState and returns the resulting AlgebraState. More...
 
AlgebraState applyAnnihilationOperator (const std::vector< int > &root, const AlgebraState &state) const
 Applies the annihilation operator of a root on an AlgebraState and returns the resulting AlgebraState. More...
 
AlgebraState applyCreationOperator (int creator, const AlgebraState &state) const
 Applies the creation operator of a simple root on an AlgebraState and returns the resulting AlgebraState. More...
 
AlgebraState applyCreationOperator (const std::vector< int > &root, const AlgebraState &state) const
 Applies the creation operator of a root on an AlgebraState and returns the resulting AlgebraState. More...
 
std::vector< AlgebraStategetSingleChain (const AlgebraState &state, int direction) const
 Calculates the root chain starting from states and applying annihilation operator of the simple root number
direction. More...
 
void getSingleChainExperimental (const AlgebraState &state, std::vector< AlgebraState > &states, std::vector< std::vector< bool >> &directionExplored, int direction) const
 
std::vector< AlgebraStategetRootChain (const AlgebraState &highestWeightState, std::vector< AlgebraState > states=std::vector< AlgebraState >(0), std::vector< std::vector< bool > > directions=std::vector< std::vector< bool > >(0)) const
 Computes the complete root chain (with all simple roots) starting from a highest weight highestWeightState. More...
 
void getRootChainExperimental (const AlgebraState &highestWeightState, std::vector< AlgebraState > &states, std::vector< std::vector< bool > > &directions) const
 
void computeMultiplicity (std::vector< int > &multiplicities, const std::vector< AlgebraState > &rep, const AlgebraState &state) const
 Computes the multiplicity of the state state. More...
 
std::vector< int > multiplicities (std::vector< AlgebraState > &rep) const
 Compute the multiplicities of the states in rep, where rep is a complete set of AlgebraState. More...
 

Static Private Member Functions

static bool isPositiveRoot (const std::vector< int > &root)
 Checks if a given root is a positive root (i.e. only positive dinkin labels). More...
 
static bool isPositiveWeight (const AlgebraState &state)
 Checks if a given state is a positive state (i.e. only positive dinkin labels). More...
 
static AlgebraState addWeights (const AlgebraState &A, const AlgebraState &B)
 Adds the dinkin labels of two states and returns the resulting state. More...
 

Friends

std::ostream & operator<< (std::ostream &fout, const SemiSimpleAlgebra &algebra)
 Overload of operator<< for SemiSimpleAlgebra. Displays exhaustively members of the object. More...
 

Detailed Description

Abstract base class for all semi-simple Lie algebras.

This class implements almost all calculations (getting representation from highest weight, product of representations...) except the initialization of the cartan matrix and the norms of simple roots, that is overriden in derived classes, specializations of semi simple Lie algebras.

Constructor & Destructor Documentation

◆ SemiSimpleAlgebra()

mty::SemiSimpleAlgebra::SemiSimpleAlgebra ( int  t_l)
explicit

Constructor with one parameter.

Parameters
t_lNumber of simple roots, or rank, of the algebra.

Member Function Documentation

◆ addWeights()

AlgebraState mty::SemiSimpleAlgebra::addWeights ( const AlgebraState A,
const AlgebraState B 
)
staticprivate

Adds the dinkin labels of two states and returns the resulting state.

Parameters
AFirst AlgebraState in the sum.
BSecond AlgebraState in the sum.
Returns
The sum of A and B.

◆ applyAnnihilationOperator() [1/2]

AlgebraState mty::SemiSimpleAlgebra::applyAnnihilationOperator ( int  annihilator,
const AlgebraState state 
) const
private

Applies the annihilation operator of a simple root on an AlgebraState and returns the resulting AlgebraState.

Parameters
annihilatorInteger number of the simple root.
stateState on which the annihilation operator is applied.
Returns
The resulting AlgebraState.

◆ applyAnnihilationOperator() [2/2]

AlgebraState mty::SemiSimpleAlgebra::applyAnnihilationOperator ( const std::vector< int > &  root,
const AlgebraState state 
) const
private

Applies the annihilation operator of a root on an AlgebraState and returns the resulting AlgebraState.

Parameters
rootRoot from which we take the annihilation operator.
stateState on which the annihilation operator is applied.
Returns
The resulting AlgebraState.

◆ applyCreationOperator() [1/2]

AlgebraState mty::SemiSimpleAlgebra::applyCreationOperator ( int  creator,
const AlgebraState state 
) const
private

Applies the creation operator of a simple root on an AlgebraState and returns the resulting AlgebraState.

Parameters
creatorInteger number of the simple root.
stateState on which the creation operator is applied.
Returns
The resulting AlgebraState.

◆ applyCreationOperator() [2/2]

AlgebraState mty::SemiSimpleAlgebra::applyCreationOperator ( const std::vector< int > &  root,
const AlgebraState state 
) const
private

Applies the creation operator of a root on an AlgebraState and returns the resulting AlgebraState.

Parameters
rootRoot from which we take the creation operator.
stateState on which the creation operator is applied.
Returns
The resulting AlgebraState.

◆ comparatorHighest()

bool mty::SemiSimpleAlgebra::comparatorHighest ( const AlgebraState A,
const AlgebraState B 
) const
private

Compares two AlgebraState.

One AlgebraState is considered greater than another if the sum of its labels is greater.

Parameters
AFirst AlgebraState to compare.
BSecond AlgebraState to compare.
Returns
True if A is greater than or equal to B.
False else.

◆ computeMultiplicity()

void mty::SemiSimpleAlgebra::computeMultiplicity ( std::vector< int > &  multiplicities,
const std::vector< AlgebraState > &  rep,
const AlgebraState state 
) const
private

Computes the multiplicity of the state state.

The multiplicity of the state depends on those of highest weight states. This function is then recursive and calculates on the go the multiplicities it needs if they have not been alreadt calculated.

Parameters
multiplicitiesstd::vector of integers containing multiplicities. It is modified during the run, replacing the default -1 by the computed multiplicities.
repSet of all AlgebraState in the representation.
stateAlgebraState of which we compute the multiplicity.

◆ computeScalarDot()

csl::Expr mty::SemiSimpleAlgebra::computeScalarDot ( const csl::Expr rootA,
const csl::Expr rootB 
) const
private

Computes the scalar dot of two roots in root-space.

The scalar dot depends on the Cartan matrix and norms of simple roots. rootA and rootB must be csl::Vector of csl::Integers, coordinates of the roots in root space (not in co-root space i.e. dinkin labels).

Parameters
rootAFirst root in the scalar dot.
rootBSecond root in the scalar dot.
Returns
The geometrical scalar dot between rootA and rootB.

◆ computeSquaredNorm()

csl::Expr mty::SemiSimpleAlgebra::computeSquaredNorm ( const csl::Expr root) const
private

Computes the squared norm of a root, see computeScalarDot().

Parameters
rootRoot in the form of a csl::Vector of csl::Integer, labels in root space (not co-root space i.e. dinkin labels).
Returns
The squared norm of root in a csl Expr.

◆ convertState()

csl::Expr mty::SemiSimpleAlgebra::convertState ( const AlgebraState state) const
private

Converts a state in co-root space (AlgebraState with dinkin labels) into an expression (csl csl::Expr), Vector of coefficients in root space.

This function actually converts the std::vector of integers into a csl::Vector of csl::Integer, and apply the inverse cartan matrix in order to go from co-root space to root space.

Parameters
stateAlgebraState to convert.
Returns
A csl::Vector expression of the root space-equivalent of state.

◆ generateWeylGroup()

void mty::SemiSimpleAlgebra::generateWeylGroup ( )
private

Generates the Weyl group of reflection from the simple roots.

The weyl group is stored by keeping all positive roots in memory in the member positiveRoots. Any weyl reflection (composition of weyl reflections for simple roots) is the weyl reflection wrt one single positive root. Having all positive roots is then equivalent to have all weyl reflections.

◆ getOrderL()

int mty::SemiSimpleAlgebra::getOrderL ( ) const

Returns the order of the algebra, i.e. the number of simple roots l.

Returns
l

◆ getQuadraticCasimir()

csl::Expr mty::SemiSimpleAlgebra::getQuadraticCasimir ( const AlgebraState irrep) const

Returns the expression (symbolic, rational number) of the quadratic Casimir operator for a representation.

The AlgebraState irrep must be the highest-weight state of the representation from which we want to compute the Casimir. The quadratic Casimir is defined from the generators of the representation \( T^A(\mathcal{R}) \) by

\[ \mbox{Tr}(T(\mathcal{R})^AT(\mathcal{R})^B) \equiv C_2(\mathcal{R}) \delta ^{AB}. \]

Its expression in terms of the highest weight is

\[ C_2 = \sum _{i, j}\mathcal{N}_i\cdot (a_i+2)G_{ij}a_j, \]

with \( a_i \) dynkin labels of the highest weight state, \( G_{ij} \) the inverse Cartan matrix, and \( \mathcal{N}_i \) a normalization factor coming from the absolute norm of the simple root \( i \).

Parameters
irrepHighest weight state of the representation from which we want the Casimir.
Returns
The symbolic expression of the Casimir, a rational number.

◆ getRootChain()

std::vector< AlgebraState > mty::SemiSimpleAlgebra::getRootChain ( const AlgebraState highestWeightState,
std::vector< AlgebraState states = std::vector<AlgebraState>(0),
std::vector< std::vector< bool > >  directions = std::vector<std::vector<bool> >(0) 
) const
private

Computes the complete root chain (with all simple roots) starting from a highest weight highestWeightState.

Some directions (simple roots) are not computed because they already have been explored. This function is recursive and calls itself again for all new states. If a state has been found along the direction d, then this direction will not be explored again getting the root chains recursively for this state. The new states are added in the std::vector states (copied at the beginning of the function), and this std::vector is returned.

Parameters
highestWeightStateInitial state of the root chains.
statesCurrent set of stated found in the irrep.
directionsSet of already explored directions (along simple roots) for the state highestWeightState, that we do not compute again.
Returns
A modified copy of states, where new states have been added.

◆ getSingleChain()

std::vector< AlgebraState > mty::SemiSimpleAlgebra::getSingleChain ( const AlgebraState state,
int  direction 
) const
private

Calculates the root chain starting from states and applying annihilation operator of the simple root number
direction.

If the eigenvalue of state wrt the simple root number direction is E, we apply the annihilation until we get a state of eigenvalue -E. We have then set of states of eigenvalues (for a sl(2,C) module): { E, E-2, E-4, ..., -E }.

Parameters
stateInitial state (highest weight) of the chain.
directionNumber of the simple root applied in chain.
Returns
The set of generated AlgebraState in the chain in a std::vector.

◆ getTrivialRep()

mty::Irrep mty::SemiSimpleAlgebra::getTrivialRep ( ) const
virtual

Returns the trivial representation of the algebra. Overriden in R algebra.

Returns
An Irrep, trivial representation (dimension 1).

Reimplemented in mty::algebra::R.

◆ getType()

virtual algebra::Type mty::SemiSimpleAlgebra::getType ( ) const
pure virtual

Pure virtual function overriden in derived classes.

Returns
The type of the algebra, see the enum algebra::Type.

Implemented in mty::algebra::G2, mty::algebra::F4, mty::algebra::E8, mty::algebra::E7, mty::algebra::E6, mty::algebra::D, mty::algebra::C, mty::algebra::B, mty::algebra::A, and mty::algebra::R.

◆ highestWeightRep() [1/2]

mty::Irrep mty::SemiSimpleAlgebra::highestWeightRep ( const AlgebraState highestWeight,
bool  mult = true 
) const
virtual

Calculates and returns the highest weight representation. Determines all states with their multiplicities and returns the corresponding Irrep object. Overriden in R algebra.

Parameters
highestWeightAlgebraState highest weight of the representation.
Returns
The Irrep of highest weight highestWeight.

Reimplemented in mty::algebra::R.

◆ highestWeightRep() [2/2]

mty::Irrep mty::SemiSimpleAlgebra::highestWeightRep ( const std::vector< int > &  highestWeight,
bool  mult = true 
) const
virtual

Calculates and returns the highest weight representation. Determines all states with their multiplicities and returns the corresponding Irrep object. Overriden in R algebra.

Parameters
highestWeightstd::vector of integers, labels of the representation's highest weight.
Returns
The Irrep of highest weight highestWeight.

Reimplemented in mty::algebra::R.

◆ invertCartanMatrix()

void mty::SemiSimpleAlgebra::invertCartanMatrix ( )
private

Inverts the Cartan matrix using csl's matrix inversion and stores it in the member \b inverseCartan.

Note
This function actually initializes also other csl csl::Expr member variables.

◆ isOnWall()

bool mty::SemiSimpleAlgebra::isOnWall ( const AlgebraState state) const
private

Checks if a state is on a wall of the root lattice, i.e. if one of the coefficients if the simple roots basis (one of the dinkin labels) is zero.

Parameters
stateAlgebraState.
Returns
True if state is on a wall.
False else.

◆ isPositiveRoot()

bool mty::SemiSimpleAlgebra::isPositiveRoot ( const std::vector< int > &  root)
staticprivate

Checks if a given root is a positive root (i.e. only positive dinkin labels).

Parameters
rootRoot from which we test the positivity.
Returns
True if the root is positive.
False else.

◆ isPositiveWeight()

bool mty::SemiSimpleAlgebra::isPositiveWeight ( const AlgebraState state)
staticprivate

Checks if a given state is a positive state (i.e. only positive dinkin labels).

Parameters
stateState from which we test the positivity.
Returns
True if the state is positive.
False else.

◆ multiplicities()

std::vector< int > mty::SemiSimpleAlgebra::multiplicities ( std::vector< AlgebraState > &  rep) const
private

Compute the multiplicities of the states in rep, where rep is a complete set of AlgebraState.

Parameters
repSet of all the states in the representation.
Returns
The multiplicities for each states in a std::vector of integers.

◆ sortRep()

void mty::SemiSimpleAlgebra::sortRep ( std::vector< AlgebraState > &  rep,
std::vector< int > &  mult 
) const
virtual

Sorts by modifing input paramaters a set of AlgebraState with their multiplicities. One state is considered "bigger" than another if the sum of its dinkin labels is bigger. Overriden in the R algebra.

Parameters
repstd::vector of AlgebraState to sort, modified during the run.
multmultiplicities of the states, sorted at the same time to keep the one to one correspondance between states and multiplicities.

Reimplemented in mty::algebra::R.

◆ tensorProduct()

mty::SumIrrep mty::SemiSimpleAlgebra::tensorProduct ( const Irrep A,
const Irrep B,
bool  mult = true 
) const
virtual

Calculates and returns the product of two Irrep in the algebra. The result is decomposed in a sum of irreducible representations, stored in a SumIrrep. Overriden in the R algebra.

Parameters
AFirst representation in the product.
BSecond representation in the product.
Returns
A SumIrrep, sum of irreducible representations result of the product.

Reimplemented in mty::algebra::R.

◆ toDominantWeylChamber()

AlgebraState mty::SemiSimpleAlgebra::toDominantWeylChamber ( const AlgebraState state,
int &  sign 
) const
private

Reflects a given state in the dominant Weyl chamber.

The dominant Weyl chamber is the space where all states are positive states (see isPositiveWeight()). This function returns the (only) state in the dominant Weyl chamber that is equivalent to state to a Weyl reflection, i.e. to the application of an element of the Weyl group. If the state is positive, it is itself, else the function operates a series of Weyl reflections until it finds the corresponding positive state. The sign of the Transformation is one if the number of reflections linking the two states is even, -1 else. The sign is stored in sign during the run of the function.

Parameters
stateInitial AlgebraState.
signInteger modified during the run, stores the sign of the Transformation.
Returns
A new AlgebraState, reflection of state in the dominant Weyl chamber.

◆ weylReflection() [1/3]

vector< int > mty::SemiSimpleAlgebra::weylReflection ( int  simpleRoot,
const std::vector< int > &  root 
) const
private

Reflects a root with respect to one simple root.

Parameters
simpleRoot,aninteger specifying the number of the simple root.
rootRoot to reflect, a std::vector of integers labels of the root.
Returns
The reflected root, also a std::vector of integers.

◆ weylReflection() [2/3]

AlgebraState mty::SemiSimpleAlgebra::weylReflection ( int  simpleRoot,
const AlgebraState state 
) const
private

Reflects a state with respect to one simple root.

Parameters
simpleRoot,aninteger specifying the number of the simple root.
stateAlgebraState to reflect.
Returns
The reflected state, also an AlgebraState.

◆ weylReflection() [3/3]

vector< int > mty::SemiSimpleAlgebra::weylReflection ( int  simpleRoot1,
int  simpleRoot2 
) const
private

Reflects a simple root with respect to another.

Parameters
reflectorSimple root (integer) wrt which the reflexion is done.
reflectedSimple root (integer) reflected.
Returns
The reflected root, in the form of a std::vector of integers.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  fout,
const SemiSimpleAlgebra algebra 
)
friend

Overload of operator<< for SemiSimpleAlgebra. Displays exhaustively members of the object.

Parameters
foutOutput flux.
algebraSemiSimpleAlgebra to display.
Returns
The modified output flux.

Field Documentation

◆ rho

std::vector<int> mty::SemiSimpleAlgebra::rho
protected

std::vector of size l. Particular root (half-sum of simple roots) useful in calculations.

In order to be able to store it in a simple std::vector of integers, the 1/2 factor is discarded in this member, it corresponds then strictly to 2*rho in standard conventions.


The documentation for this class was generated from the following files: