Polycyclic groups
PcGroup
— TypePcGroup
Polycyclic group, a group that is defined by a finite presentation of a special kind, a so-called polycyclic presentation. Contrary to arbitrary finitely presented groups (see Finitely presented groups), this presentation allows for efficient computations with the group elements.
Examples
cyclic_group(n::Int)
: cyclic group of ordern
abelian_group(PcGroup, v::Vector{Int})
: direct product of cyclic groups of the ordersv[1]
,v[2]
, ...,v[length(v)]
PcGroupElem
— TypePcGroupElem
Element of a polycyclic group.
The generators of a polycyclic group are displayed as f1
, f2
, f3
, etc., and every element of a polycyclic group is displayed as product of the generators.
Examples
julia> G = abelian_group(PcGroup, [2, 4]);
julia> G[1], G[2]
(f1, f2)
julia> G[2]*G[1]
f1*f2
Note that this does not define Julia variables named f1
, f2
, etc.! To get the generators of the group G
, use gens(G)
; for convenience they can also be accessed as G[1]
, G[2]
, as shown in Section Elements of groups.
Julia has the following functions that allow to generate polycyclic groups:
abelian_group
— Methodabelian_group(::Type{T}, v::Vector{Int}) where T <: Group -> PcGroup
Return the direct product of cyclic groups of the orders v[1]
, v[2]
, $\ldots$, v[n]
, as an instance of T
. Here, T
must be one of PermGroup
, FPGroup
, or PcGroup
.
The type need to be specified in the input of the function abelian_group
, otherwise a group of type GrpAbFinGen
is returned, which is not a GAP group type. In future versions of Oscar, this may change.
cyclic_group
— Functioncyclic_group(::Type{T} = PcGroup, n::IntegerUnion)
cyclic_group(::Type{T} = PcGroup, n::PosInf)
Return the cyclic group of order n
, as an instance of type T
.
Examples
julia> G = cyclic_group(5)
<pc group of size 5 with 1 generator>
julia> G = cyclic_group(PermGroup, 5)
Group([ (1,2,3,4,5) ])
julia> G = cyclic_group(PosInf())
Pcp-group with orders [ 0 ]
dihedral_group
— Functiondihedral_group(::Type{T} = PcGroup, n::Union{IntegerUnion,PosInf})
Return the dihedral group of order n
, as an instance of T
, where T
is in {PcGroup
,PermGroup
,FPGroup
}.
There are two competing conventions for interpreting the argument n
: In the one we use, the returned group has order n
, and thus n
must always be even. In the other, n
indicates that the group describes the symmetry of an n
-gon, and thus the group has order 2n
.
Examples
julia> dihedral_group(6)
<pc group of size 6 with 2 generators>
julia> dihedral_group(PermGroup, 6)
Group([ (1,2,3), (2,3) ])
julia> dihedral_group(PosInf())
Pcp-group with orders [ 2, 0 ]
julia> dihedral_group(7)
ERROR: ArgumentError: n must be a positive even integer or infinity
quaternion_group
— Functionquaternion_group(::Type{T} = PcGroup, n::IntegerUnion)
Return the (generalized) quaternion group of order n
, as an instance of T
, where n
is a power of 2 and T
is in {PcGroup
,PermGroup
,FPGroup
}.
Examples
julia> g = quaternion_group(8)
<pc group of size 8 with 3 generators>
julia> quaternion_group(PermGroup, 8)
Group([ (1,5,3,7)(2,8,4,6), (1,2,3,4)(5,6,7,8) ])
julia> g = quaternion_group(FPGroup, 8)
<fp group of size 8 on the generators [ r, s ]>
julia> relators(g)
3-element Vector{FPGroupElem}:
r^2*s^-2
s^4
r^-1*s*r*s