Functions for calculating with Majorana representations
Calculating products the algebra product of vectors u and v The arguments u and v must be row vectors in sparse matrix format. The arguments algebraproducts and setup must be the components with these names of a representation as outputted by . The output is the algebra product of u and v, also in sparse matrix format. the inner product of vectors u and v The arguments u and v must be row vectors in sparse matrix format. The arguments innerproducts and setup must be the components with these names of a representation as outputted by . The output is the inner product of u and v.
gap> G := AlternatingGroup(5);; gap> T := AsList(ConjugacyClass(G, (1,2)(3,4)));; gap> input := ShapesOfMajoranaRepresentation(G,T);; gap> rep := MajoranaRepresentation(input, 1);; gap> Size(rep.setup.coords); 21 gap> u := SparseMatrix( 1, 21, [ [ 1 ] ], [ [ 1 ] ], Rationals);; gap> v := SparseMatrix( 1, 21, [ [ 17 ] ], [ [ 1 ] ], Rationals);; gap> MAJORANA_AlgebraProduct(u, v, rep.algebraproducts, rep.setup); <a 1 x 21 sparse matrix over Rationals> gap> MAJORANA_InnerProduct(u, v, rep.innerproducts, rep.setup); -1/8192
Basic functions true is all algebra products have been found, otherwise returns false Takes a Majorana representation rep, as outputted by . If the representation is complete, that is to say, if the vector space spanned by the basis vectors indexed by the elements in rep.setup.coords is closed under the algebra product given by rep.algebraproducts, return true. Otherwise, if some products are not known then return false. the dimension of the representation rep as an integer Takes a Majorana representation rep, as outputted by and returns its dimension as a vector space. If the representation is not complete (cf. ) then this value might not be the true dimension of the algebra. a basis of the eigenspace of the axis as position index with eigenvalue eval as a sparse matrix

a sparse matrix that gives a basis of the algebra

a sparse matrix representing the adjoint action of axis on basis Takes a Majorana representation rep, as outputted by , a row vector axis in sparse matrix format and a set of basis vectors, also in sparse matrix format. Returns a matrix, also in sparse matrix format, that represents the adjoint action of axis on basis.
The subalgebra structure

the subalgebra of the representation rep that is generated by vecs Takes a Majorana representation rep, as outputted by and a set of vectors vecs in sparse matrix format and returns the subalgebra generated by vecs, also in sparse matrix format. true if the subalgebra subalg is a Jordan algebra, otherwise returns false Takes a Majorana representation rep, as outputted by and a subalgebra subalg of rep. If this subalgebra is a Jordan algebra then function returns true, otherwise returns false.
gap> G := G := AlternatingGroup(5);; gap> T := AsList( ConjugacyClass(G, (1,2)(3,4)));; gap> input := ShapesOfMajoranaRepresentation(G,T);; gap> rep := MajoranaRepresentation(input, 2);; gap> MAJORANA_IsComplete(rep); false gap> NClosedMajoranaRepresentation(rep);; gap> MAJORANA_IsComplete(rep); true gap> MAJORANA_Dimension(rep); 46 gap> basis := MAJORANA_Basis(rep); <a 46 x 61 sparse matrix over Rationals> gap> subalg := MAJORANA_Subalgebra(basis, rep); <a 46 x 61 sparse matrix over Rationals> gap> MAJORANA_IsJordanAlgebra(subalg, rep); false