Section 4.8 Sage
Subsection Infinite Cyclic Groups
In Sage, the integersZZ
. To build the infinite cyclic group such as 3*ZZ
. As an infinite set, there is not a whole lot you can do with this. You can test if integers are in this set, or not. You can also recall the generator with the .gen()
command.
xxxxxxxxxx
G = 3*ZZ
-12 in G
xxxxxxxxxx
37 in G
xxxxxxxxxx
G.gen()
Subsection Additive Cyclic Groups
The additive cyclic groupxxxxxxxxxx
G = AdditiveAbelianGroup([14])
G.order()
xxxxxxxxxx
G.list()
You can compute in this group, by using the generator, or by using new elements formed by coercing integers into the group, or by taking the result of operations on other elements. And we can compute the order of elements in this group. Notice that we can perform repeated additions with the shortcut of taking integer multiples of an element.xxxxxxxxxx
a = G.gen(0)
a
xxxxxxxxxx
a + a
xxxxxxxxxx
a + a + a + a
xxxxxxxxxx
4*a
We can create, and then compute with, new elements of the group by coercing an integer (in a list of lengthxxxxxxxxxx
37*a
DeprecationWarning
the first time you use this syntax if you are using an old version of Sage. The mysterious warning can be safely ignored.
xxxxxxxxxx
G([2])
xxxxxxxxxx
b = G([2]); b
xxxxxxxxxx
b + b
xxxxxxxxxx
2*b == 4*a
xxxxxxxxxx
7*b
xxxxxxxxxx
b.order()
xxxxxxxxxx
c = a - 6*b; c
xxxxxxxxxx
c + c + c + c
It is possible to create cyclic subgroups, from an element designated to be the new generator. Unfortunately, to do this requires thexxxxxxxxxx
c.order()
.submodule()
method (which should be renamed in Sage).
xxxxxxxxxx
H = G.submodule([b]); H
xxxxxxxxxx
H.list()
xxxxxxxxxx
H.order()
xxxxxxxxxx
e = H.gen(0); e
xxxxxxxxxx
3*e
The cyclic subgroupxxxxxxxxxx
e.order()
H
just created has more than one generator. We can test this by building a new subgroup and comparing the two subgroups.
xxxxxxxxxx
f = 12*a; f
xxxxxxxxxx
f.order()
xxxxxxxxxx
K = G.submodule([f]); K
xxxxxxxxxx
K.order()
xxxxxxxxxx
K.list()
xxxxxxxxxx
K.gen(0)
Certainly the list of elements, and the common generator ofxxxxxxxxxx
H == K
(2)
lead us to belive that H
and K
are the same, but the comparison in the last line leaves no doubt.
Results in this section, especially Theorem 4.13 and Corollary 4.14, can be investigated by creating generators of subgroups from a generator of one additive cyclic group, creating the subgroups, and computing the orders of both elements and orders of groups.Subsection Abstract Multiplicative Cyclic Groups
We can create an abstract cyclic group in the style of Theorem 4.3, Theorem 4.9, and Theorem 4.10. In the syntax belowa
is a name for the generator, and 14
is the order of the element. Notice that the notation is now multiplicative, so we multiply elements, and repeated products can be written as powers.
xxxxxxxxxx
G.<a> = AbelianGroup([14])
G.order()
xxxxxxxxxx
G.list()
Computations in the group are similar to before, only with different notation. Now products, with repeated products written as exponentiation.xxxxxxxxxx
a.order()
xxxxxxxxxx
b = a^2
b.order()
xxxxxxxxxx
b*b*b
xxxxxxxxxx
c = a^7
c.order()
xxxxxxxxxx
c^2
xxxxxxxxxx
b*c
Subgroups can be formed with axxxxxxxxxx
b^37*c^42
.subgroup()
command. But do not try to list the contents of a subgroup, it'll look strangely unfamiliar. Also, comparison of subgroups is not implemented.
xxxxxxxxxx
H = G.subgroup([a^2])
H.order()
xxxxxxxxxx
K = G.subgroup([a^12])
K.order()
One advantage of this implementation is the possibility to create all possible subgroups. Here we create the list of subgroups, extract one in particular (the third), and check its order.xxxxxxxxxx
L = G.subgroup([a^4])
H == L
xxxxxxxxxx
allsg = G.subgroups(); allsg
xxxxxxxxxx
sub = allsg[2]
sub.order()
Subsection Cyclic Permutation Groups
We will learn more about permutation groups in the next chapter. But we will mention here that it is easy to create cyclic groups as permutation groups, and a variety of methods are available for working with them, even if the actual elements get a bit cumbersome to work with. As before, notice that the notation and syntax is multiplicative.xxxxxxxxxx
G=CyclicPermutationGroup(14)
a = G.gen(0); a
xxxxxxxxxx
b = a^2
b = a^2; b
xxxxxxxxxx
b.order()
xxxxxxxxxx
a*a*b*b*b
xxxxxxxxxx
c = a^37*b^26; c
We can create subgroups, check their orders, and list their elements.xxxxxxxxxx
c.order()
xxxxxxxxxx
H = G.subgroup([a^2])
H.order()
xxxxxxxxxx
H.gen(0)
It could help to visualize this group, and the subgroup, as rotations of a regularxxxxxxxxxx
H.list()
Subsection Cayley Tables
As groups, each of the examples above (groups and subgroups) have Cayley tables implemented. Since the groups are cyclic, and their subgroups are therefore cyclic, the Cayley tables should have a similar “cyclic” pattern. Note that the letters used in the default table are generic, and are not related to the letters used above for specific elements — they just match up with the group elements in the order given by.list()
.
If the real names of the elements are not too complicated, the table could be more informative using these names.xxxxxxxxxx
G.<a> = AbelianGroup([14])
G.cayley_table()
xxxxxxxxxx
K.<b> = AbelianGroup([10])
K.cayley_table(names='elements')
Subsection Complex Roots of Unity
The finite cyclic subgroups ofxxxxxxxxxx
G = CyclotomicField(14)
w = G.gen(0); w
xxxxxxxxxx
wc = CDF(w)
wc.abs()
xxxxxxxxxx
wc.arg()/N(2*pi/14)
xxxxxxxxxx
b = w^2
b.multiplicative_order()
xxxxxxxxxx
bc = CDF(b); bc
xxxxxxxxxx
bc.abs()
xxxxxxxxxx
bc.arg()/N(2*pi/14)
xxxxxxxxxx
sg = [b^i for i in range(7)]; sg
xxxxxxxxxx
c = sg[3]; d = sg[5]
c*d
xxxxxxxxxx
c = sg[3]; d = sg[6]
c*d in sg
xxxxxxxxxx
c*d == sg[2]
xxxxxxxxxx
sg[5]*sg[6] == sg[4]
Notes:xxxxxxxxxx
G.multiplication_table(elements=sg)
zeta14
is the name of the generator used for the cyclotomic field, it is a primitive root of unity (a th root of unity in this case). We have captured it asw
.The syntax
CDF(w)
will convert the complex numberw
into the more familiar form with real and imaginary parts.The method
.abs()
will return the modulus of a complex number, as described in the text. For elements of this should always equalThe method
.arg()
will return the argument of a complex number, as described in the text. Every element of the cyclic group in this example should have an argument that is an integer multiple of TheN()
syntax converts the symbolic value ofpi
to a numerical approximation.sg
is a list of elements that form a cyclic subgroup of order 7, composed of the first 7 powers ofb = w^2
. So, for example, the last comparison multiplies the fifth power ofb
with the sixth power ofb
, which would be the eleventh power ofb
. But sinceb
has order 7, this reduces to the fourth power.If you know a subset of an infinite group forms a subgroup, then you can produce its Cayley table by specifying the list of elements you want to use. Here we ask for a multiplication table, since that is the relevant operation.