cayleypy.MatrixGroups
- class cayleypy.MatrixGroups[source]
Pre-defined Cayley graphs for matrix groups.
- __init__()
Methods
__init__
()heisenberg
(*[, n, modulo, add_inverses])Returns Cayley graph for the Heisenberg group.
special_linear_fundamental_roots
(n[, modulo])Returns Cayley graph for the special linear group SL(n, Z/mZ).
special_linear_root_weyl
(n[, modulo])Returns Cayley graph for the special linear group SL(n, Z/mZ).
- static heisenberg(*, n: int = 3, modulo: int = 0, add_inverses: bool = True) CayleyGraphDef [source]
Returns Cayley graph for the Heisenberg group.
For
n=3
, this is a group of upper triangular 3x3 integer matrices with 1s on main diagonal. See https://en.wikipedia.org/wiki/Heisenberg_group. Generated by 4 matrices: x=(110,010,001), y=(100,011,001), and their inverses.For
n>=4
, this is a group ofn*n
matrices which differ from identity matrix only in top row or right column. See https://en.wikipedia.org/wiki/Heisenberg_group#Higher_dimensions.The number of generators is
4(n-2)
when inverses are added or2(n-2)
when inverses are not added.Central element is identity matrix.
- Parameters:
n – Size of the matrix. Defaults to 3.
modulo – multiplication modulo (or 0 if multiplication is not modular). Defaults to 0.
add_inverses – whether to add inverse generators. Defaults to
True
.
- Returns:
requested graph as
CayleyGraphDef
.
- static special_linear_fundamental_roots(n: int, modulo: int = 0) CayleyGraphDef [source]
Returns Cayley graph for the special linear group SL(n, Z/mZ).
This is a group of n x n integer matrices with determinant 1, modulo m.
Generated by n-1 fundamental roots: e_i = (e_ij) where e_ij is 1 at (i,j) and 0 elsewhere, and their negatives. Central element is identity matrix.
- Parameters:
n – Size of matrices.
modulo – multiplication modulo (or 0 if multiplication is not modular).
- Returns:
requested graph as CayleyGraphDef.
- static special_linear_root_weyl(n: int, modulo: int = 0) CayleyGraphDef [source]
Returns Cayley graph for the special linear group SL(n, Z/mZ).
This is a group of n x n integer matrices with determinant 1, modulo m.
Generated by a single root element e_12 and a lift of a Coxeter element w. Central element is identity matrix.
- Parameters:
n – Size of matrices.
modulo – multiplication modulo (or 0 if multiplication is not modular).
- Returns:
requested graph as CayleyGraphDef.