Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/majoranaalgebras/tst/   (GAP Algebra Version 4.15.1©)  Datei vom 7.6.2024 mit Größe 2 kB image not shown  

Quelle  Miscellaneous.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

gap> SetInfoLevel( InfoMajorana, 0);

##
## Set up infinite family example
##
gap> ex := MAJORANA_Example_min3gen9();;
gap> rep := MajoranaRepresentation(ex, 2);;
gap> MAJORANA_Dimension(rep);
7
gap> rep := MajoranaRepresentation(ex, 1);;
gap> rep.innerproducts[19] := 1/12;;
gap> MAJORANA_MainLoop(rep);;
gap> NClosedMajoranaRepresentation(rep);;
gap> MAJORANA_Dimension(rep);
12
gap> MajoranaAlgebraTest(rep);
true

##
## Test eigenvectors
##
gap> u := SparseMatrix( 115, [[2]], [[1]], Rationals);;
gap> evecs := MAJORANA_Eigenvectors( 20, rep);;
gap> for v in Iterator( evecs ) do prod := MAJORANA_AlgebraProduct(u, v, rep.algebraproducts, rep.setup); if prod <> (0)*v then Error(); fi; od;
gap> evecs := MAJORANA_Eigenvectors( 21/4, rep);;
gap> for v in Iterator( evecs ) do prod := MAJORANA_AlgebraProduct(u, v, rep.algebraproducts, rep.setup); if prod <> (1/4)*v then Error(); fi; od;
gap> evecs := MAJORANA_Eigenvectors( 21/32, rep);;
gap> for v in Iterator( evecs ) do prod := MAJORANA_AlgebraProduct(u, v, rep.algebraproducts, rep.setup); if prod <> (1/32)*v then Error(); fi; od;

##
## Test subalgebra
##
gap> vecs := SparseMatrix(215, [[7], [1,2]], [[1], [11]], Rationals);;
gap> subalg := MAJORANA_Subalgebra(vecs, rep);;
gap> subalg!.indices;
[ [ 12 ], [ 34 ], [ 7 ] ]
gap> subalg!.entries;
[ [ 11 ], [ 11 ], [ 1 ] ]

##
## Test IsJordanAlgebra
##
gap> MAJORANA_IsJordanAlgebra(subalg, rep);
true
gap> MAJORANA_IsJordanAlgebra(SparseIdentityMatrix(15, Rationals), rep);
false

##
## Test AdjointAction
##
gap> axis := SparseMatrix(115, [[1]], [[1]], Rationals);;
gap> basis := MAJORANA_Basis(rep);;
gap> adj := MAJORANA_AdjointAction(axis, basis, rep);;
gap> adj := ConvertSparseMatrixToMatrix(adj);;
gap> AsSet(Eigenvalues(Rationals, adj)) = AsSet([101/41/32]);
true

##
## Test ConvertToBasis
##
gap> vec := SparseMatrix( 115, [[127]], [[11, -1]], Rationals);;
gap> vec := MAJORANA_ConvertToBasis(subalg, vec);;
gap> vec!.indices;
[ [ 13 ] ]
gap> vec!.entries;
[ [ 1, -1 ] ]

##
## Test eigenvectors (again)
##
gap> rep := MAJORANA_DihedralAlgebras("3C");;
gap> List( [101/41/32], i -> Nrows(MAJORANA_Eigenvectors( 1, i, rep)) );
1101 ]

[Dauer der Verarbeitung: 0.19 Sekunden, vorverarbeitet 2026-06-17]