Working with groups. Basic operations, and information. Now suports only cyclic and symmetric groups
This is mostly for better understanding Group theory.
import groups
gr1 = groups.Sn(4) # Create symmetric group
gr2 = groups.Zn(4) # Create cyclic group
# Check is groups is Abelian
gr1.is_abelian()
gr2.is_abelian()
Set binary operation to the group. By default is is modulo operation
import groups
gr = groups.Zn(4)
gr.set_binop(lambda (x,y): x + y)
Return True if group is abelian and False otherwise
Return inverse element if exist
Return elements of the group