Conventions:
-Use tuples for words of elements (ex: (1,2,3))
-Function inputs are ordered as (word, type, matrix)
-Also see http://doc.sagemath.org/html/en/developer/coding_basics.html
-We also referenced
-Question: How many of these rely on a reduced word as an input?
Helper Functions
-For future: Add a helper function that checks if an inputted word is reduced, if not, reduce it. (eg. check for ss)
contains_long_braid: Returns if a word "word" has a long braid with respect to the Coxeter matrix "matrix".
Ex)
M=A5.coxeter_matrix()
contains_long_braid((1,3,2,1), M), contains_long_braid((4,3,5,4,1), M), contains_long_braid((1,2,3,2), M)
Returns:
(False, False, True)
|
contains_square: Returns if a word "word" has a consecutive occurences of the same generator (a square), indicating the word is not reduced.
To-do: Implement within our FC tests.
|
commutation_relations: We mimicked the code for braid_relations to write a commutation_relations function
Ex)
A5 = CoxeterGroup(["A", 5])
commutation_relations(A5)
Expected output:
[[1, 3], [3, 1], [1, 4], [4, 1], [1, 5], [5, 1], [2, 4], [4, 2], [2, 5], [5, 2], [3, 5], [5, 3]]
|
commute_once: Commutes a word "word" at a given index "i" once
Ex)
commute_once((5,3,4,1,5),2)
Returns:
[5, 3, 1, 4, 5] |
|
Fully Commutative Test Functions
isFullyCommutative :relies on http://doc.sagemath.org/html/en/reference/categories/sage/categories/coxeter_groups.html#sage.categories.coxeter_groups.CoxeterGroups.ElementMethods.reduced_word_graph
Ex)
A5 = CoxeterGroup(["A", 5])
testWord1 = A5.from_reduced_word((1, 2, 1)) #121 should be braidable to 212
isFullyCommutative(testWord1)
Returns:
False
|
isFC: Relies on reduced_word() to get all reduced words of the input first. (This may not be necessary)
Ex)
A5 = CoxeterGroup(["A", 5])
testWord1 = A5.from_reduced_word((1, 2, 1)) #121 should be braidable to 212
isFC(testWord1)
Returns:
False
|
is_FC2:
Ex)
A9 = CoxeterGroup(["A", 9])
is_FC2(A9,(1,2,3,4,5,6,7,8))
Returns:
True
|
is_FC_depth_recursive: Uses function recursion to take advantage of the function stack to implement a depth-first search
Ex)
A9 = CoxeterGroup(["A", 9])
is_FC_depth_recursive(A9,(1,2,3,4,5,6,7,8))
Returns:
True
|
is_FC_depth: An iterative function using a stack to implement depth-first traversal
Ex)
A9 = CoxeterGroup(["A", 9])
is_FC_depth(A9,(1,2,3,4,5,6,7,8))
Returns:
True
|
is_FC_breadth: An iterative function using a queue to implement breadth-first traversal
Ex)
A9 = CoxeterGroup(["A", 9])
if_FC_breadth(A9,(1,2,3,4,5,6,7,8))
Returns:
True
|
|