Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563477 views
1
/****************************************************************************
2
**
3
*A central_auts.c ANUPQ source Eamonn O'Brien
4
**
5
*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany
6
*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia
7
**
8
*/
9
10
#include "pq_defs.h"
11
#include "pcp_vars.h"
12
#include "pga_vars.h"
13
#include "pq_functions.h"
14
15
/* determine which of the central outer automorphisms of the immediate
16
descendant are required for iteration purposes; set up those
17
which are necessary in the array central, which is returned */
18
19
int ***central_automorphisms(struct pga_vars *pga, struct pcp_vars *pcp)
20
{
21
register int *y = y_address;
22
23
int ***central;
24
int **commutator; /* result of commutator calculations */
25
char **redundant; /* automorphisms which are not required */
26
Logical found;
27
register int gamma = 0;
28
register int i, j, k;
29
register int u, v;
30
31
/* number of generators of last class in group */
32
int x = y[pcp->clend + pcp->cc - 1] - y[pcp->clend + pcp->cc - 2];
33
register int nmr_columns;
34
35
/* dummy variable -- not used in this routine but
36
required for echelonise_matrix call */
37
/*
38
int *subset;
39
subset = allocate_vector (x, 0, 0);
40
echelonise_matrix (commutator, x, nmr_columns, pcp->p, subset, pga);
41
free_vector (subset, 0);
42
*/
43
44
/* maximum number of central outer automorphisms */
45
nmr_columns = pga->nmr_centrals = pga->ndgen * pga->s;
46
47
commutator = commutator_matrix(pga, pcp);
48
if (pga->print_commutator_matrix) {
49
printf("The commutator matrix is \n");
50
print_matrix(commutator, x, nmr_columns);
51
}
52
53
reduce_matrix(commutator, x, nmr_columns, pcp->p, pga);
54
55
redundant = allocate_char_matrix(pga->ndgen, pga->s, 0, TRUE);
56
for (i = 0; i < x; ++i) {
57
found = FALSE;
58
j = 0;
59
while (j < nmr_columns && !(found = (commutator[i][j] == 1)))
60
++j;
61
if (found) {
62
u = j / pga->s;
63
v = j % pga->s;
64
redundant[u][v] = TRUE;
65
--pga->nmr_centrals;
66
}
67
}
68
69
/* set up, in the array central, all necessary automorphisms of the form
70
u --> u * (pcp->ccbeg + v)
71
k --> k
72
where both u and k are defining generators, k distinct from u,
73
and v runs from 0 to pga->s - 1 */
74
75
if (pga->nmr_centrals != 0) {
76
central = allocate_array(pga->nmr_centrals, pga->ndgen, pcp->lastg, TRUE);
77
78
for (u = 0; u < pga->ndgen; ++u) {
79
for (v = 0; v < pga->s; ++v) {
80
if (redundant[u][v] == FALSE) {
81
++gamma;
82
for (k = 0; k < pga->ndgen; ++k) {
83
central[gamma][k + 1][k + 1] = 1;
84
if (k == u)
85
central[gamma][k + 1][pcp->ccbeg + v] = 1;
86
}
87
}
88
}
89
}
90
}
91
92
free_matrix(commutator, x, 0);
93
free_char_matrix(redundant, pga->ndgen);
94
95
return central;
96
}
97
98
/* for each of the x generators of highest class - 1, look up
99
its commutator with each of the pga->ndgen defining generators;
100
set up the exponents of the pga->s new generators which occur
101
in the commutator as part of a row of an
102
x by pga->ndgen * pga->s matrix, commutator, which is returned */
103
104
int **commutator_matrix(struct pga_vars *pga, struct pcp_vars *pcp)
105
{
106
register int *y = y_address;
107
108
/* first and last generator of last class of parent */
109
int first = y[pcp->clend + pcp->cc - 2] + 1;
110
int last = y[pcp->clend + pcp->cc - 1];
111
112
int x = last - first + 1;
113
int **commutator;
114
int *result;
115
int pointer, value, entry, length;
116
int offset;
117
int u, v;
118
register int i, j, k;
119
#include "access.h"
120
121
#ifdef CARANTI
122
commutator = allocate_matrix(x, pga->ndgen * pga->s, 0, TRUE);
123
return commutator;
124
#else
125
commutator = allocate_matrix(x, pga->ndgen * pga->s, 0, FALSE);
126
#endif
127
128
for (i = first; i <= last; ++i) {
129
130
offset = 0;
131
132
for (j = 1; j <= pga->ndgen; ++j) {
133
134
/* store the result of [i, j] */
135
result = allocate_vector(pga->s, 0, 1);
136
137
if (i != j) {
138
139
if (i < j) {
140
u = i;
141
v = j;
142
} else {
143
u = j;
144
v = i;
145
}
146
147
/* look up the value of [v, u] */
148
pointer = y[pcp->ppcomm + v];
149
entry = y[pointer + u];
150
if (entry > 0)
151
result[entry - pcp->ccbeg] = 1;
152
else if (entry < 0) {
153
length = y[-entry + 1];
154
for (k = 1; k <= length; ++k) {
155
value = y[-entry + 1 + k];
156
result[FIELD2(value) - pcp->ccbeg] = FIELD1(value);
157
}
158
}
159
160
/* since, we want the value of [i, j], we may now
161
need to invert [v, u] */
162
if (j == v) {
163
for (k = 0; k < pga->s; ++k)
164
if (result[k] != 0)
165
result[k] = (pga->p - result[k]) % pga->p;
166
}
167
}
168
169
/* now copy the result to commutator */
170
for (k = 0; k < pga->s; ++k)
171
commutator[i - first][k + offset] = result[k];
172
offset += pga->s;
173
174
free_vector(result, 0);
175
}
176
}
177
178
return commutator;
179
}
180
181