In [30]:
G = SL(2,ZZ)
In [31]:
G
Out[31]:
In [32]:
identity = matrix(ZZ,[[1,0],[0,1]])
In [33]:
G.cayley_table(elements=[identity,-identity])
Out[33]:
In [34]:
from sage.matrix.operation_table import OperationTable
In [35]:
G=DiCyclicGroup(3)
In [36]:
commutator = lambda x, y: x*y*x^-1*y^-1
In [37]:
T=OperationTable(G,commutator)
In [38]:
T
Out[38]:
In [39]:
trans = T.translation()
In [40]:
comm = [trans['a'],trans['d'],trans['h']]
In [41]:
comm
Out[41]:
In [42]:
P=G.cayley_table(elements=comm)
In [43]:
P
Out[43]:
cf. Sage Math documentation, Groups, Finitely Presented Groups in combination with
Joseph J. Rotman. Advanced Modern Algebra (Graduate Studies in Mathematics) 2nd Edition. American Mathematical Society
EY : 20160411 I used the 1st edition of Rotman
In [1]:
F.<a,b,c> = FreeGroup()
In [2]:
G = F/[a^2,b^2,c^2,a*b*c*a*b*c]
In [3]:
G
Out[3]:
In [4]:
G.gen(0) * G.gen(1)
Out[4]:
In [5]:
G([1,2,-1])
Out[5]:
In [6]:
a.parent()
Out[6]:
In [7]:
G.inject_variables()
In [8]:
a.parent()
Out[8]:
Notice that, even if they are represented in the same way, the elements of a finitely presented group and the elements of the corresponding free group are not the same thing. However, they can be converted from one parent to the other:
In [9]:
F.<a,b,c> = FreeGroup()
In [10]:
G = F/[a^2,b^2,c^2,a*b*c*a*b*c]
In [11]:
F([1])
Out[11]:
In [12]:
G([1])
Out[12]:
In [13]:
F([1]) is G([1])
Out[13]:
In [14]:
F([1]) == G([1])
Out[14]:
In [15]:
G(a*b*c)
Out[15]:
In [16]:
F(G(a*b/c))
Out[16]:
Finitely presented groups are implemented via GAP. You can use the gap()
method to access the underlying LibGAP object:
In [17]:
G = FreeGroup(2)
In [18]:
G.inject_variables()
In [19]:
H = G/(x0^2,(x0*x1)^2,x1^2)
In [20]:
H.gap()
Out[20]:
This can be useful, for example, to use GAP functions that are not yet wrapped in Sage:
In [22]:
H.gap().LowerCentralSeries()
Out[22]:
In [23]:
G = FreeGroup(2)
In [24]:
H=G/(G([1,1]),G([2,2,2]),G([1,2,-1,-2])); H
Out[24]:
In [25]:
a = H([1])
In [26]:
a
Out[26]:
In [28]:
a.gap()
Out[28]:
In [45]:
a.gap().Order()
Out[45]:
In [46]:
type(_) # note that the above output is not a Sage integer
Out[46]:
cf. Rotman, Chapter 5, Groups II Proposition 5.80
generalized quaternion group $\mathbf{Q}_n$, $\forall \, n \geq 3$
In [49]:
def make_Q_n(n):
assert n >= 3
F.<a,b> = FreeGroup()
G = F/[a^(2^(n-1)),a*b*a*b^(-1),a^(2^(n-2))*b^(-2)]
return G
In [50]:
Q_3 = make_Q_n(3)
In [51]:
Q_3
Out[51]:
In [52]:
Q_3.monoid_generators()
Out[52]:
In [53]:
def make_D_2n(n):
assert n > 0
F.<a,b> = FreeGroup()
G = F/[a^n,b^2,b*a*b*a]
return G
In [54]:
D_4 = make_D_2n(2)
In [55]:
D_4
Out[55]:
There a large number of modules to explore (by doing the command dir(D_4)
or dir()
on your group of choice) that I have yet to fully and thoroughly understand: I'd invite you to help me out and add your own explanations and explorations.
In [56]:
D_4.abelian_invariants()
Out[56]:
In [57]:
D_4.alexander_matrix()
Out[57]:
In [63]:
D_4.center()
Out[63]:
In [ ]: