@@ -21,13 +21,63 @@ DeclareAttribute( "OmegaAndLowerPCentralSeries", IsGroup );
2121# # <Func Name="CodePcgs" Arg='pcgs'/>
2222# #
2323# # <Description>
24- # # returns the code corresponding to <A>pcgs</A>.
24+ # # returns the non-negative integer code corresponding to the finite pcgs
25+ # # <A>pcgs</A>, which must be in <Ref Prop="IsPrimeOrdersPcgs"/>.
26+ # # The code stores the relative orders of <A>pcgs</A> and
27+ # # the right hand sides of the nontrivial power and commutator relations
28+ # # of the pc presentation defined by <A>pcgs</A>. This integer encoding of
29+ # # pc groups underlies the group construction method described in
30+ # # <Cite Key="BescheEick98"/>.
31+ # # <P/>
32+ # # More precisely, let
33+ # # <M>g_1,\ldots,g_l</M> be the entries of <A>pcgs</A>, and let
34+ # # <M>r_1,\ldots,r_l</M> be their relative orders. If <M>l=0</M>,
35+ # # the code is <M>0</M>. Otherwise put
36+ # # <M>m = \max_i r_i - 1</M>. If the relative orders are not all equal,
37+ # # the first <M>l</M> base <M>m</M> digits are
38+ # # <M>r_1-2,\ldots,r_l-2</M>, so the relative order part is
39+ # # <M>\sum_{i=1}^l (r_i-2)m^{l-i}</M>. If the relative orders are all
40+ # # equal, this part is omitted; on decoding the relative orders are then
41+ # # read from the factorisation of the supplied group order.
42+ # # <P/>
43+ # # After the relative order part comes a bit mask of length
44+ # # <M>l(l+1)/2-1</M>. The bits, from least significant to most
45+ # # significant, correspond first to the power relations
46+ # # <M>g_1^{r_1},\ldots,g_{l-1}^{r_{l-1}}</M>, and then to the
47+ # # commutators <M>[g_j,g_i]</M> for
48+ # # <M>1 \leq i < j \leq l</M>, ordered by increasing <M>i</M> and, for
49+ # # fixed <M>i</M>, increasing <M>j</M>. A bit is <M>1</M> exactly when
50+ # # the corresponding right hand side is nontrivial. The final power
51+ # # relation <M>g_l^{r_l}=1</M> is not stored separately.
52+ # # <P/>
53+ # # The nontrivial right hand sides, in the same order as their set bits,
54+ # # are stored as base <M>|G|</M> digits, where <M>G</M> is the group
55+ # # generated by <A>pcgs</A>. If
56+ # # <M>x = g_1^{e_1} \cdots g_l^{e_l}</M>, with
57+ # # <M>0 \leq e_i < r_i</M>, then the digit for <M>x</M> is
58+ # # <M>\sum_{i=1}^l e_i\prod_{k=i+1}^l r_k</M>. Equivalently, this is
59+ # # the zero-based position of <M>x</M> in the canonical list
60+ # # <M>g_1^{e_1}\cdots g_l^{e_l}</M>, ordered according to the
61+ # # lexicographic order of the tuples <M>e_1,\dots,e_l</M>.
62+ # # <P/>
63+ # # Thus if <M>b</M> is <M>m^l</M> when the relative order part is present
64+ # # and <M>1</M> otherwise, if <M>u</M> is the bit mask, and if
65+ # # <M>a_1,\ldots,a_t</M> are the digits for the nontrivial right hand
66+ # # sides, then the complete code is
67+ # # <M>A + b(u + 2^{l(l+1)/2-1}(a_1 + |G|a_2 + \cdots +
68+ # # |G|^{t-1}a_t))</M>, where <M>A</M> is the relative order part, or
69+ # # <M>0</M> if that part is omitted.
2570# # <Example><![CDATA[
26- # # gap> G := CyclicGroup(512 );;
71+ # # gap> G := CyclicGroup(8 );;
2772# # gap> p := Pcgs( G );;
2873# # gap> CodePcgs( p );
29- # # 162895587718739690298008513020159
74+ # # 323
3075# # ]]></Example>
76+ # # In this example the relative orders are <M>[2,2,2]</M>, so there is
77+ # # no relative order part. The nontrivial power tails are <M>g_2</M>
78+ # # and <M>g_3</M>, with digits <M>2</M> and <M>1</M> in the canonical
79+ # # list. Hence the code is
80+ # # <M>1 + 2 + 2^5(2 + 8\cdot 1) = 323</M>.
3181# # </Description>
3282# # </ManSection>
3383# # <#/GAPDoc>
@@ -43,11 +93,15 @@ DeclareGlobalFunction( "CodePcgs" );
4393# # <Func Name="CodePcGroup" Arg='G'/>
4494# #
4595# # <Description>
46- # # returns the code for a pcgs of <A>G</A>.
96+ # # returns the code for the pcgs returned by <C>Pcgs</C> for <A>G</A>.
97+ # # The encoding is the one described for <Ref Func="CodePcgs"/>.
4798# # <Example><![CDATA[
48- # # gap> G := DihedralGroup(512);;
49- # # gap> CodePcGroup( G );
50- # # 2940208627577393070560341803949986912431725641726
99+ # # gap> G := CyclicGroup(8);;
100+ # # gap> code := CodePcGroup( G );
101+ # # 323
102+ # # gap> H := PcGroupCode( code, Size( G ) );;
103+ # # gap> IsCyclic( H ) and Size( H ) = Size( G );
104+ # # true
51105# # ]]></Example>
52106# # </Description>
53107# # </ManSection>
@@ -69,6 +123,15 @@ DeclareGlobalFunction( "CodePcGroup" );
69123# # otherwise anything may happen.
70124# # Valid codes are usually obtained by one of the functions
71125# # <Ref Func="CodePcgs"/> or <Ref Func="CodePcGroup"/>.
126+ # # The inverse construction uses the integer format described for
127+ # # <Ref Func="CodePcgs"/>. The length of the pcgs, and in the case where
128+ # # all relative orders are equal also the relative orders themselves, are
129+ # # recovered from the prime factorisation of <A>size</A>.
130+ # # <P/>
131+ # # The same integer format is also used by Magma's
132+ # # <C>SmallGroupEncoding</C> and <C>SmallGroupDecoding</C>, and by
133+ # # OSCAR's <C>encode</C> for pc groups and
134+ # # <C>pc_group( order, code )</C>.
72135# # <Example><![CDATA[
73136# # gap> G := SmallGroup( 24, 12 );;
74137# # gap> p := Pcgs( G );;
0 commit comments