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

563687 views
1
/****************************************************************************
2
**
3
*A consistency.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
13
#if !defined(CONSISTENCY_FILTER)
14
15
/* process those consistency relations of weight wc not already used;
16
the value of type determines the consistency relations processed;
17
if type = 0 then all relations are processed;
18
for Lie Algebra calculations, the type is always 3 */
19
20
void consistency(
21
int type, int *queue, int *queue_length, int wc, struct pcp_vars *pcp)
22
{
23
register int *y = y_address;
24
25
register int a;
26
register int b;
27
register int c;
28
29
register int wta; /* weight of a */
30
31
register int a_start; /* start of range for a */
32
register int a_end; /* end of range for a */
33
register int b_start;
34
register int b_end;
35
register int c_start;
36
register int c_end;
37
38
register int jacobi_wt = wc;
39
register int bound = jacobi_wt >> 1;
40
register int constant;
41
register int offset;
42
register int entry;
43
register int p1;
44
45
register int class_end = pcp->clend;
46
register int p_pcomm = pcp->ppcomm;
47
register int p_power = pcp->ppower;
48
register int structure = pcp->structure;
49
50
register Logical metabelian = pcp->metabelian;
51
register Logical compute; /* is it necessary to compute jacobi? */
52
53
#include "access.h"
54
55
/* process the consistency equations (a^p) a = a (a^p)
56
where 2 * WT(a) + 1 = jacobi_wt */
57
58
if (type == 0 || type == 1) {
59
if (MOD(jacobi_wt, 2) != 0) {
60
61
/* find range of a */
62
offset = class_end + bound - 1;
63
a_start = y[offset] + 1;
64
a_end = y[++offset];
65
66
for (a = a_start; a <= a_end; a++) {
67
compute =
68
(!metabelian || (metabelian && (PART2(y[structure + a]) == 0 ||
69
PART3(y[structure + a]) == 0)));
70
if (compute) {
71
jacobi(a, a, a, 0, pcp);
72
if (pcp->redgen != 0 && pcp->m != 0)
73
queue[++*queue_length] = pcp->redgen;
74
}
75
if (pcp->overflow || (pcp->complete != 0 && !pcp->multiplicator))
76
return;
77
}
78
}
79
}
80
81
/* process the consistency equations
82
(b^p) a = b^(p - 1) (ba) and b (a^p) = (ba) a^(p - 1)
83
where b > a and WT(b) + WT(a) + 1 = jacobi_wt */
84
85
if (type == 0 || type == 2) {
86
for (wta = 1; wta <= bound; ++wta) {
87
88
/* find range of a */
89
offset = class_end + wta - 1;
90
a_start = y[offset] + 1;
91
a_end = y[++offset];
92
93
/* find maximum value of b */
94
offset = class_end + jacobi_wt - wta - 2;
95
b_end = y[offset + 1];
96
97
for (a = a_start; a <= a_end; ++a) {
98
99
/* ensure b > a */
100
b_start = MAX(y[offset] + 1, a + 1);
101
for (b = b_start; b <= b_end; ++b) {
102
103
/* introduce Vaughan-Lee consistency check restriction */
104
if (wta == 1) {
105
/* check if this jacobi relation has already been used
106
in filling in the tail on (b, a)^p */
107
p1 = y[p_pcomm + b];
108
if (y[p1 + a] <= 0 || y[p1 + a] >= pcp->first_pseudo) {
109
compute = (!metabelian ||
110
(metabelian && (PART2(y[structure + b]) == 0 ||
111
PART3(y[structure + b]) == 0)));
112
if (compute) {
113
jacobi(b, b, a, 0, pcp);
114
if (pcp->redgen != 0 && pcp->m != 0)
115
queue[++*queue_length] = pcp->redgen;
116
}
117
if (pcp->overflow ||
118
(pcp->complete != 0 && !pcp->multiplicator))
119
return;
120
}
121
}
122
123
/* check if this jacobi relation has already been
124
used in filling in the tail on (b, a^p) */
125
entry = y[p_power + a];
126
if (entry <= 0 || entry >= b) {
127
compute = (!metabelian ||
128
(metabelian && (PART2(y[structure + a]) == 0 ||
129
PART3(y[structure + a]) == 0 ||
130
PART2(y[structure + b]) == 0 ||
131
PART3(y[structure + b]) == 0)));
132
if (compute) {
133
jacobi(b, a, a, 0, pcp);
134
if (pcp->redgen != 0 && pcp->m != 0)
135
queue[++*queue_length] = pcp->redgen;
136
}
137
if (pcp->overflow ||
138
(pcp->complete != 0 && !pcp->multiplicator))
139
return;
140
}
141
}
142
}
143
}
144
}
145
146
/* process the consistency equations (cb) a = c (ba), where
147
c > b > a, WT(a) + WT(b) + WT(c) = jacobi_wt, and WT(a) = 1 */
148
149
if (type == 0 || type == 3) {
150
151
/* first, find maximum values of a and b */
152
a_end = y[class_end + 1];
153
b_end = y[class_end + ((jacobi_wt - 1) >> 1)];
154
constant = class_end + jacobi_wt - 2;
155
156
for (a = 1; a <= a_end; ++a) {
157
for (b = a + 1; b <= b_end; ++b) {
158
159
/* find range of c and ensure c > b */
160
offset = constant - WT(y[structure + b]);
161
c_start = MAX(y[offset] + 1, b + 1);
162
c_end = y[++offset];
163
164
/* where possible, avoid redoing those jacobis used to
165
fill in tails on (c, (b, a)) */
166
if (!metabelian) {
167
p1 = y[p_pcomm + b];
168
if (y[p1 + a] > 0)
169
c_end = MIN(c_end, y[p1 + a]);
170
}
171
172
for (c = c_start; c <= c_end; ++c) {
173
compute = (!metabelian ||
174
(metabelian && (PART2(y[structure + b]) == 0 ||
175
PART3(y[structure + b]) == 0 ||
176
PART2(y[structure + c]) == 0 ||
177
PART3(y[structure + c]) == 0)));
178
if (compute) {
179
jacobi(c, b, a, 0, pcp);
180
if (pcp->redgen != 0 && pcp->m != 0)
181
queue[++*queue_length] = pcp->redgen;
182
}
183
if (pcp->overflow || (pcp->complete != 0 && !pcp->multiplicator))
184
return;
185
}
186
}
187
}
188
}
189
}
190
191
#endif
192
193