Skip to content

Instantly share code, notes, and snippets.

@ChristopherKing42
Created March 11, 2018 22:14
Show Gist options
  • Save ChristopherKing42/756da4ec1fd8a5d73c5923a920cea22e to your computer and use it in GitHub Desktop.
Save ChristopherKing42/756da4ec1fd8a5d73c5923a920cea22e to your computer and use it in GitHub Desktop.
sides = 7
order = 3
F.<rotate,move> = FreeGroup(2)
G = F/[rotate**sides, move**2, (rotate*move)**order]
k = G.rewriting_system()
k.make_confluent()
print k
print [(x.Tietze(), y.Tietze()) for x,y in k.rules().items()]
@ChristopherKing42
Copy link
Author

ChristopherKing42 commented Mar 11, 2018

Try it at https://sagecell.sagemath.org/. Here's the output with sides=7 and order=3:

Rewriting system of Finitely presented group < rotate, move | rotate^7, move^2, (rotate*move)^3 >
with rules:
    move^-1    --->    move
    move^2    --->    1
    move*rotate^-1*move    --->    rotate*move*rotate
    move*rotate*move    --->    rotate^-1*move*rotate^-1
    rotate^-4    --->    rotate^3
    rotate^4    --->    rotate^-3
    move*rotate^-2*move*rotate^-1    --->    rotate*move*rotate^2*move
    move*rotate^2*move*rotate    --->    rotate^-1*move*rotate^-2*move
    rotate^-1*move*rotate^-2*move*rotate^3    --->    move*rotate^2*move*rotate^-3
    rotate*move*rotate^2*move*rotate^-3    --->    move*rotate^-2*move*rotate^3
    rotate^-3*move*rotate^2*move*rotate^-3    --->    rotate^3*move*rotate^-2*move*rotate^3
    (move*rotate^-2*move*rotate^3)^2    --->    rotate*(move*rotate^2*move*rotate^-2)^2*rotate^-1
[((-1, -1, -1, 2, 1, 1, 2, -1, -1, -1), (1, 1, 1, 2, -1, -1, 2, 1, 1, 1)), ((-1, -1, -1, -1), (1, 1, 1)), ((2, -1, -1, 2, -1), (1, 2, 1, 1, 2)), ((2, -1, -1, 2, 1, 1, 1, 2, -1, -1, 2, 1, 1, 1), (1, 2, 1, 1, 2, -1, -1, 2, 1, 1, 2, -1, -1, -1)), ((2, 1, 1, 2, 1), (-1, 2, -1, -1, 2)), ((1, 1, 1, 1), (-1, -1, -1)), ((1, 2, 1, 1, 2, -1, -1, -1), (2, -1, -1, 2, 1, 1, 1)), ((-2,), (2,)), ((2, 1, 2), (-1, 2, -1)), ((2, 2), ()), ((-1, 2, -1, -1, 2, 1, 1, 1), (2, 1, 1, 2, -1, -1, -1)), ((2, -1, 2), (1, 2, 1))]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment