Skip to content

Representing (finitely presented) groups as systems of rewrite rules and calculating various properties thereof

Notifications You must be signed in to change notification settings

InnovativeInventor/groups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Groups

Tests

Representing certain kinds of finite groups in terms of generators and rewrite rules. Work in progress. This is probably not the best way to represent groups, but whatever. Contributions are welcome.

Example (D_16)

The group D_16 can be represented like so

a^2 = e
b^8 = e
ba = ab^7
from groups import AbstractGroup
group = AbstractGroup({"a": 2, "b": 8}, {(("b", 1), ("a", 1)): (("a", 1), ("b", 7))}) # default group

where each element is represented as a list of tuples containing the generator, followed by the power of the generator.

To enumerate all the elements in the group you can then do

group.enumerate()

To multiply particular elements together you can do

group.multiply(term_1, term_2)

To normalize/simplify an element to its simplest form you can do

group.normalize(term_1)

To get the inverse of an element, you can do

group.inverse(term_1)

Voilà -- some basic group stuff! More basic group operations (subgroups, conjugacy classes, normal subgroups, etc.) are used in examples/d16.py. Tests are in groups/test_groups.py.

About

Representing (finitely presented) groups as systems of rewrite rules and calculating various properties thereof

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages