33 lines
1.0 KiB
Python
Executable File
33 lines
1.0 KiB
Python
Executable File
#!/usr/bin/python
|
|
|
|
import coxeter_automaton
|
|
from pprint import pprint
|
|
|
|
# the (3, 3, 3) triangle group; or equivalently, the
|
|
# equilateral triangle tiling of the Euclidean plane
|
|
coxeter_matrix = [[1, 3, 3],
|
|
[3, 1, 3],
|
|
[3, 3, 1]]
|
|
|
|
# (2, 3, infinity) triangle group; 0 stands for infinity
|
|
# coxeter_matrix = [[1, 0, 3],
|
|
# [0, 1, 2],
|
|
# [3, 2, 1]]
|
|
|
|
# coxeter_matrix = [[1, 2, 0, 0, 0, 2],
|
|
# [2, 1, 2, 0, 0, 0],
|
|
# [0, 2, 1, 2, 0, 0],
|
|
# [0, 0, 2, 1, 2, 0],
|
|
# [0, 0, 0, 2, 1, 2],
|
|
# [2, 0, 0, 0, 2, 1]]
|
|
|
|
graph = coxeter_automaton.generate_automaton_coxeter_matrix(coxeter_matrix, lex_reduced = False)
|
|
graph_shortlex = coxeter_automaton.generate_automaton_coxeter_matrix(coxeter_matrix, lex_reduced = True)
|
|
|
|
pprint(graph)
|
|
|
|
# group = coxeter_automaton.enumerate_group(graph, graph_shortlex, 10)
|
|
|
|
# for each group element g and generator a, print index of a*g
|
|
# print([[l.id if l else None for l in g.left] for g in group])
|