CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

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

Views: 418346
1
/****************************************************************************
2
**
3
*A close_subgroup.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
14
/* return the rank, t, of the smallest characteristic,
15
k-initial segment subgroup in the p-multiplicator */
16
17
int
18
close_subgroup(int k, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp)
19
{
20
register int *y = y_address;
21
22
register int alpha, i, j;
23
24
int t = MIN(k + 1, pga->multiplicator_rank); /* least possible rank value */
25
int n = y[pcp->clend + pcp->cc - 1]; /* number of pcp generators of group */
26
27
Logical complete = (t == pga->multiplicator_rank);
28
29
int start = t;
30
31
for (alpha = 1; alpha <= pga->m && !complete; ++alpha) {
32
i = n;
33
while (i < n + t && !complete) {
34
++i;
35
j = y[pcp->clend + pcp->cc];
36
/* find the last non-zero entry in the image of generator i */
37
while (auts[alpha][i][j] == 0 && j > n + t)
38
--j;
39
t = j - n;
40
complete = (t == pga->multiplicator_rank);
41
}
42
}
43
44
/* if rank of closure has increased, must now close new subgroup */
45
if (t != start)
46
t = close_subgroup(t - 1, auts, pga, pcp);
47
48
return t;
49
}
50
51