h4=CoxeterGroup(['H',4])

"""
Coxeter Matrix for H4 in Coxeter 3 is

[1 5 2 2]
[5 1 3 2]
[2 3 1 3]
[2 2 3 1],

while the matrix for Sage is

[1 3 2 2]
[3 1 3 2]
[2 3 1 5]
[2 2 5 1].

"""


"""
The set of all elements in H4 that are fully-commutative but not subregular
form a single 2-sided cell. It contains 162 elements. All elements in it have
a-value 2.
""" 

fccox = [13,14,24,124,132,134,143,213,214,243,324,1213,1214,1243,1321,1324,1432,
2124,2132,2134,2143,3214,3243,12124,12132,12134,12143,13212,13214,13243,14321,
21213,21214,21243,21321,21324,21432,32124,32143,121243,121321,121324,121432,
132123,132124,132143,143212,212132,212134,212143,213212,213214,213243,214321,
321213,321214,321243,321432,1213212,1213214,1213243,1214321,1321234,1321243,
1321432,1432123,2121321,2121324,2121432,2132123,2132124,2132143,2143212,3212132,
3212134,3212143,3214321,4321213,12132123,12132124,12132143,12143212,13214321,
14321234,21213212,21213214,21213243,21214321,21321234,21321243,21321432,
21432123,32121321,32121324,32121432,32143212,43212132,43212134,121321234,
121321243,121321432,121432123,132143212,212132123,212132124,212132143,
212143212,213214321,214321234,321213212,321213214,321213243,321214321,
321432123,432121321,432121324,1213214321,1214321234,1321432123,2121321234,
2121321243,2121321432,2121432123,2132143212,3212132123,3212132124,3212132143,
3212143212,3214321234,4321213212,4321213214,4321213243,12132143212,13214321234,
21213214321,21214321234,21321432123,32121321234,32121321243,32121321432,
32121432123,43212132123,43212132124,43212132143,121321432123,212132143212,
213214321234,321213214321,321214321234,432121321234,432121321243,432121321432,
1213214321234,2121321432123,3212132143212,4321213214321,21213214321234,
32121321432123,43212132143212,321213214321234,432121321432123,4321213214321234]


""" 
This 2-sided cell splits into left cells. 
"""

l1cox =  [13,143,213,1213,2143,12143,21213,32143,132143,212143,321213,2132143,
        3212143,4321213,12132143,212132143,3212132143,43212132143]

l2cox =  [14,134,214,1214,2134,3214,12134,13214,21214,212134,213214,321214,
        1213214,3212134,21213214,43212134,321213214,4321213214]

l3cox =  [24,124,324,1324,2124,12124,21324,32124,121324,132124,2121324,2132124,
        12132124,32121324,212132124,432121324,3212132124,43212132124]

l4cox =  [132,1432,2132,12132,21432,121432,212132,321432,1321432,2121432,
        3212132,21321432,32121432,43212132,121321432,2121321432,32121321432,
        432121321432]

l5cox =  [243,1243,3243,13243,21243,121243,213243,321243,1213243,1321243,
        21213243,21321243,121321243,321213243,2121321243,4321213243,
        32121321243,432121321243]

l6cox =  [1321,14321,21321,121321,214321,1214321,2121321,3214321,13214321,
        21214321,32121321,213214321,321214321,432121321,1213214321,21213214321,
        321213214321,4321213214321]

l7cox =  [13212,143212,213212,1213212,2143212,12143212,21213212,32143212,
        132143212,212143212,321213212,2132143212,3212143212,4321213212,
        12132143212,212132143212,3212132143212,43212132143212]

l8cox =  [132123,1432123,2132123,12132123,21432123,121432123,212132123,
        321432123,1321432123,2121432123,3212132123,21321432123,32121432123,
        43212132123,121321432123,2121321432123,32121321432123,432121321432123]

l9cox = [1321234,14321234,21321234,121321234,214321234,1214321234,2121321234,
        3214321234,13214321234,21214321234,32121321234,213214321234,
        321214321234,432121321234,1213214321234,21213214321234,321213214321234,
        4321213214321234]

l1sage=[42, 412, 342, 4342, 3412, 43412, 34342, 23412, 423412, 343412, 234342,
        3423412, 2343412, 1234342, 43423412, 343423412, 2343423412,
        12343423412]

l2sage= [41, 421, 341, 4341, 3421, 2341, 43421, 42341, 34341, 343421, 342341,
        234341, 4342341, 2343421, 34342341, 12343421, 234342341, 1234342341]

l3sage=[31, 431, 231, 4231, 3431, 43431, 34231, 23431, 434231, 423431, 3434231,
        3423431, 43423431, 23434231, 343423431, 123434231, 2343423431,
        12343423431]

l4sage= [423, 4123, 3423, 43423, 34123, 434123, 343423, 234123, 4234123,
        3434123, 2343423, 34234123, 23434123, 12343423, 434234123, 3434234123,
        23434234123, 123434234123]

l5sage= [312, 4312, 2312, 42312, 34312, 434312, 342312, 234312, 4342312,
        4234312, 34342312, 34234312, 434234312, 234342312, 3434234312,
        1234342312, 23434234312, 123434234312]

l6sage= [4234, 41234, 34234, 434234, 341234, 4341234, 3434234, 2341234,
        42341234, 34341234, 23434234, 342341234, 234341234, 123434234,
        4342341234, 34342341234, 234342341234, 1234342341234]

l7sage= [42343, 412343, 342343, 4342343, 3412343, 43412343, 34342343, 23412343,
        423412343, 343412343, 234342343, 3423412343, 2343412343, 1234342343,
        43423412343, 343423412343, 2343423412343, 12343423412343]

l8sage= [423432, 4123432, 3423432, 43423432, 34123432, 434123432, 343423432,
        234123432, 4234123432, 3434123432, 2343423432, 34234123432,
        23434123432, 12343423432, 434234123432, 3434234123432, 23434234123432,
        123434234123432]

l9sage= [4234321, 41234321, 34234321, 434234321, 341234321, 4341234321,
        3434234321, 2341234321, 42341234321, 34341234321, 23434234321,
        342341234321, 234341234321, 123434234321, 4342341234321,
        34342341234321, 234342341234321, 1234342341234321]





l1_intersect_l1_inverse_sage=[42,423412]
l2_intersect_l2_inverse_sage=[41,4341]
l3_intersect_l3_inverse_sage=[31,3431]
l4_intersect_l4_inverse_sage=[3423,34234123]
l5_intersect_l5_inverse_sage=[2312, 234312]
l6_intersect_l6_inverse_sage=[434234,4342341234]
l7_intersect_l7_inverse_sage=[34342343,343423412343]
l9_intersect_l8_inverse_sage=[2343423432,23434234123432]
l9_intersect_l9_inverse_sage=[123434234321,1234342341234321]
