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

563516 views
1
/* last change: 23.04.2002 by Oliver Heidbuechel */
2
3
#ifdef __cplusplus
4
extern "C" {
5
#endif
6
7
8
#ifndef _CARAT_GRAPH_H_
9
#define _CARAT_GRAPH_H_
10
11
#ifndef _CARAT_TYPEDEF_H_
12
#include"typedef.h"
13
#endif
14
15
#ifndef _ZASSEN_H_
16
#include"zass.h"
17
#endif
18
19
#define TWOTO21 2097152
20
21
/* global variables */
22
extern boolean GRAPH_DEBUG;
23
extern boolean GRAPH;
24
25
26
/* new structures */
27
typedef struct {
28
bravais_TYP *G; /* group we started with */
29
bravais_TYP **Z; /* Z-classes */
30
matrix_TYP ***norm_inv; /* inverses of normalizer for each Z-class */
31
int Z_no; /* number of Z-classes */
32
bravais_TYP ***aff; /* affine classes */
33
int *aff_no; /* number of affine classes in each Z-class */
34
int *first_aff; /* position of the first affine class in each Z-class
35
in the list (aff[0][0], aff[0][1], ... aff[1][0], ...) */
36
matrix_TYP ***X; /* matrices with informations about affine classes */
37
matrix_TYP **X_2_inv; /* inverse of ...->X[i][2] for each Z-class i */
38
matrix_TYP ***coz; /* cozycles of the affine classes */
39
MP_INT **names; /* names for affine classes */
40
int **names_int; /* names for affine classes in integers */
41
int *coho_size; /* size of the cohomology group for each Z-class */
42
int all; /* total number of affine classes */
43
matrix_TYP *pres; /* presentation */
44
QtoZ_TYP *INZ; /* graph for Z-classes */
45
matrix_TYP ****stab_coz; /* stabilizer in N_{Gl_n(Z)}(G) for each cozycle in each Z-class */
46
int **stab_gen_no; /* number of generators from this stabilizer */
47
int ****WORDS; /* Words for stabilizer of cozycles for each Z-class */
48
int **NUMBER_OF_WORDS; /* number of words */
49
matrix_TYP ***N; /* representation of normalizer on H^1 */
50
matrix_TYP ***gen_inv; /* inverses of generators for each Z-class */
51
boolean l_option; /* TRUE iff is_option(l) */
52
int **list_of_names; /* for each cocycle in each Z-class: number of the
53
smallest representative in the orbit of this
54
cocycle */
55
} Q_data_TYP;
56
57
58
typedef struct {
59
matrix_TYP *D;
60
matrix_TYP **M;
61
matrix_TYP *i;
62
int erz_no;
63
int flag;
64
int D_first;
65
} H1_mod_ker_TYP;
66
67
68
69
typedef struct {
70
int con_no; /* number of conjugacy classes */
71
bravais_TYP **groups; /* representatives for each conjugacy class */
72
bahn ***strong; /* strong generating set for each represenative */
73
int ***worte; /* words for generators of the representatives in the
74
generators of the group in each conjugacy class */
75
int *elem_no; /* number of elements in the conjugacy classes */
76
int *orders; /* orders of the groups in each conjugacy class */
77
int total; /* total number of subgroups */
78
} t_sub_TYP;
79
80
81
/* --------------------------------------------------------------------- */
82
/* some information about a cocycle */
83
/* --------------------------------------------------------------------- */
84
typedef struct
85
{
86
matrix_TYP *coz; /* cocycle in Q^n */
87
matrix_TYP *std_coz; /* standard form for this cocycle */
88
matrix_TYP *diff; /* coz - std_coz */
89
MP_INT name; /* name for this cocycle (number of element with lowest
90
number in the orbit) */
91
MP_INT number; /* number for this cocycle */
92
int **WORDS; /* Words for stabilizer of cocycle */
93
int WORDS_no; /* number of words for stabilizer of cocycle */
94
matrix_TYP **Stab; /* Stablizer of the cocycle / Pointgroup !!! */
95
int Stab_no; /* number of elements in the stabilizer */
96
matrix_TYP *darst; /* cocycle represented in C_a x C_b x ... */
97
matrix_TYP **aff_transl; /* return value of transl_aff_normal */
98
int aff_transl_no; /* # of elements in transl_aff_normal */
99
matrix_TYP **N_darst; /* representation of G->normal on H^1(G,Q^n/Z^n) */
100
matrix_TYP **N_inv; /* inverses of G->normal */
101
int N_darst_no; /* G->normal_no */
102
matrix_TYP **X; /* return value of cohomology for H^1(G,Q^n/Z^n) */
103
matrix_TYP *GLS; /* inverse of X[2] */
104
} coz_TYP;
105
106
107
108
109
/* functions */
110
#ifdef __STDC__
111
Q_data_TYP *get_Q_data(bravais_TYP *G,
112
matrix_TYP *pres,
113
boolean l_option);
114
115
void free_Q_data(Q_data_TYP *data);
116
117
void put_Q_data(Q_data_TYP *data,
118
char *groupname,
119
int printflag);
120
121
bravais_TYP *extract_r(bravais_TYP *G,
122
matrix_TYP *X);
123
124
matrix_TYP **all_cocycles(matrix_TYP *relator_input,
125
bravais_TYP *G,
126
int *anzahl,
127
matrix_TYP **matinv,
128
matrix_TYP ***X,
129
MP_INT **names,
130
int ****WORDS,
131
int **NUMBER_OF_WORDS,
132
matrix_TYP ***N,
133
int *coho_size,
134
int **list_of_names,
135
boolean l_option);
136
137
matrix_TYP *subgroupgraph(Q_data_TYP *data,
138
boolean oflag);
139
140
matrix_TYP **stab_coz(int **words,
141
int no_of_words,
142
matrix_TYP **N,
143
matrix_TYP **N_inv,
144
int anz,
145
int flag,
146
int *stab_gen_no);
147
148
matrix_TYP *matrix_on_diagonal(matrix_TYP *mat,
149
int anz);
150
151
matrix_TYP *standard_rep(matrix_TYP *coz,
152
matrix_TYP *GLS,
153
matrix_TYP *D);
154
155
MP_INT cohomology_size(matrix_TYP *D);
156
157
int *aff_classes_in_image(MP_INT *names,
158
int aff_no,
159
int coho_size,
160
matrix_TYP **orbit,
161
matrix_TYP **image_gen,
162
int gen_no,
163
matrix_TYP *D,
164
int *aff_in_image);
165
166
int equal_zero(matrix_TYP *m);
167
168
int yet_there(matrix_TYP *m,
169
matrix_TYP **list,
170
int no);
171
172
int **stab_lattice(matrix_TYP *lattice,
173
matrix_TYP **N,
174
int N_gen_no,
175
int *no,
176
matrix_TYP **LIST,
177
int anz,
178
boolean *lattice_orbit);
179
180
void kernel_and_image(matrix_TYP *phi,
181
matrix_TYP *A,
182
int A_first,
183
matrix_TYP *B,
184
matrix_TYP **kernel,
185
matrix_TYP **image);
186
187
void calculate_phi(matrix_TYP *diag,
188
matrix_TYP *coz,
189
matrix_TYP **Xi,
190
matrix_TYP **Xj,
191
matrix_TYP *GLS,
192
matrix_TYP **phi,
193
matrix_TYP **kernel,
194
matrix_TYP ***image,
195
int *image_gen_no,
196
H1_mod_ker_TYP *H1_mod_ker);
197
198
matrix_TYP **calculate_S1(matrix_TYP *lattice,
199
matrix_TYP **N,
200
int anz,
201
int *no,
202
matrix_TYP **dataN,
203
matrix_TYP **dataNinv,
204
matrix_TYP *dataX);
205
206
int *aufspannen(int coho_size,
207
matrix_TYP **elements,
208
matrix_TYP **M,
209
int gen_no,
210
matrix_TYP *D,
211
int *anz);
212
213
matrix_TYP **col_to_list(matrix_TYP *M);
214
215
matrix_TYP **orbit_ker(matrix_TYP **ker_elements,
216
int ker_order,
217
matrix_TYP *D,
218
matrix_TYP **N,
219
int no,
220
int coho_size,
221
int *ker_list,
222
int *anz,
223
int **length);
224
225
matrix_TYP **orbit_ksi_plus_ker(matrix_TYP *ksi,
226
matrix_TYP **ker_elements,
227
int ker_order,
228
matrix_TYP *D,
229
matrix_TYP **N,
230
int no,
231
int coho_size,
232
int *ker_list,
233
int *anz,
234
int **length);
235
236
void free_H1_mod_ker_TYP(H1_mod_ker_TYP H1_mod_ker);
237
238
matrix_TYP **new_representation(matrix_TYP **S,
239
int S_no,
240
H1_mod_ker_TYP H1_mod_ker,
241
matrix_TYP *A);
242
243
matrix_TYP *graph_mapped_word(int *w,
244
matrix_TYP **A,
245
matrix_TYP **AINV,
246
matrix_TYP *D);
247
248
matrix_TYP ***H1_mod_ker_orbit_alg(H1_mod_ker_TYP H1_mod_ker,
249
matrix_TYP **S,
250
int S_no,
251
int *anz,
252
int **length,
253
int ****WORDS,
254
int **WORDS_no,
255
matrix_TYP *start);
256
257
void kernel_elements_2_affine(matrix_TYP **elem,
258
int anz);
259
260
matrix_TYP *graph_mat_inv(matrix_TYP *A,
261
matrix_TYP *D,
262
int first);
263
264
int word_already_there(int **WORDS,
265
int n);
266
267
matrix_TYP *H1_of_standard_to_GL(bravais_TYP *GL,
268
bravais_TYP *standard,
269
matrix_TYP **X);
270
271
int orbit_on_lattices(matrix_TYP **gitter,
272
int gitter_no,
273
matrix_TYP **N,
274
int N_no,
275
int *list,
276
int *length,
277
int *smallest,
278
matrix_TYP **conj);
279
280
int number_of_affine_class(Q_data_TYP *data,
281
matrix_TYP *coz,
282
int i,
283
int flag,
284
boolean wortflag,
285
int **wort);
286
287
matrix_TYP **transl_aff_normal(matrix_TYP **erzeuger,
288
int erzanz,
289
int *anzahl);
290
291
matrix_TYP **kernel_factor_fct(matrix_TYP **translationen,
292
int translanz,
293
int erz_no,
294
matrix_TYP *lattice,
295
int *no);
296
297
bravais_TYP *p_group(bravais_TYP *G);
298
299
bravais_TYP **min_k_super(bravais_TYP *P,
300
bravais_TYP *R,
301
matrix_TYP *pres,
302
int *anz,
303
boolean bahnflag,
304
boolean debugflag,
305
int **orbitlength);
306
307
bravais_TYP **max_k_sub(bravais_TYP *P,
308
bravais_TYP *R,
309
matrix_TYP *pres,
310
int *anz,
311
boolean aflag,
312
boolean debugflag,
313
int **orbitlength);
314
315
void plus_translationen(bravais_TYP *G,
316
matrix_TYP *mat);
317
318
matrix_TYP *extract_c(bravais_TYP *R);
319
320
boolean is_k_subgroup(bravais_TYP *S,
321
bravais_TYP *R,
322
bravais_TYP *P,
323
int n,
324
matrix_TYP *pres);
325
326
matrix_TYP *sg(bravais_TYP *R,
327
bravais_TYP *P);
328
329
matrix_TYP *add_mod_D(matrix_TYP *A,
330
matrix_TYP *B,
331
matrix_TYP *D,
332
int first,
333
int diff);
334
335
matrix_TYP *to_aff_normal_element(matrix_TYP *lin,
336
matrix_TYP *coz,
337
int flag,
338
bravais_TYP *P,
339
bravais_TYP *R);
340
341
void my_translation(matrix_TYP *TR,
342
matrix_TYP *preimage,
343
matrix_TYP *coz,
344
bravais_TYP *G);
345
346
bravais_TYP ****t_subgroups(bravais_TYP *G,
347
matrix_TYP **mats,
348
int no,
349
matrix_TYP *pres,
350
int *aff_no,
351
int **aff_cons,
352
int ***aff_cons_no,
353
bravais_TYP ***R,
354
int flag);
355
356
coz_TYP identify_coz(bravais_TYP *G,
357
matrix_TYP *coz,
358
matrix_TYP **X);
359
360
void free_coz_TYP(coz_TYP coz_info);
361
362
matrix_TYP **calculate_H1(bravais_TYP *G,
363
word *relator,
364
int relatoranz);
365
366
void cen_to_norm(bravais_TYP *G);
367
368
matrix_TYP **max_sublattices(bravais_TYP *P,
369
int *anz,
370
int **trivialflag,
371
boolean debugflag);
372
373
matrix_TYP **calculate_representatives(bravais_TYP *G,
374
bravais_TYP *GL,
375
matrix_TYP **H_G_Z,
376
matrix_TYP **H_GL_Z,
377
matrix_TYP *lattice,
378
matrix_TYP *phi,
379
H1_mod_ker_TYP H1_mod_ker,
380
matrix_TYP *preimage,
381
matrix_TYP *kernel_mat,
382
int *orbit_no,
383
int **orbit_length);
384
385
int obergruppenzahl(matrix_TYP *L,
386
matrix_TYP **Norm,
387
matrix_TYP **NormInv,
388
matrix_TYP **StabStdCoz,
389
int Stab_anz,
390
int *wort);
391
392
#else
393
394
Q_data_TYP *get_Q_data();
395
396
void free_Q_data();
397
398
void put_Q_data();
399
400
bravais_TYP *extract_r();
401
402
matrix_TYP **all_cocycles();
403
404
matrix_TYP *subgroupgraph();
405
406
bravais_TYP *stab_coz();
407
408
matrix_TYP *matrix_on_diagonal();
409
410
matrix_TYP *standard_rep();
411
412
MP_INT cohomology_size(matrix_TYP *D);
413
414
int *aff_classes_in_image();
415
416
int equal_zero();
417
418
int yet_there();
419
420
int **stab_lattice();
421
422
void kernel_and_image();
423
424
void calculate_phi();
425
426
int **calculate_S1();
427
428
int *aufspannen();
429
430
matrix_TYP **col_to_list();
431
432
matrix_TYP **orbit_ker();
433
434
matrix_TYP **orbit_ksi_plus_ker();
435
436
void free_H1_mod_ker_TYP();
437
438
matrix_TYP **new_representation();
439
440
matrix_TYP *graph_mapped_word();
441
442
matrix_TYP ***H1_mod_ker_orbit_alg();
443
444
void kernel_elements_2_affine();
445
446
matrix_TYP *graph_mat_inv();
447
448
int word_already_there();
449
450
matrix_TYP *H1_of_standard_to_GL();
451
452
int orbit_on_lattices();
453
454
int number_of_affine_class();
455
456
matrix_TYP **transl_aff_normal();
457
458
int kernel_factor_fct();
459
460
bravais_TYP *p_group();
461
462
bravais_TYP **min_k_super();
463
464
bravais_TYP **max_k_sub();
465
466
void plus_translationen();
467
468
matrix_TYP *extract_c();
469
470
boolean is_k_subgroup();
471
472
matrix_TYP *sg();
473
474
matrix_TYP *add_mod_D();
475
476
matrix_TYP *to_aff_normal_element();
477
478
void my_translation();
479
480
bravais_TYP ****t_subgroups();
481
482
coz_TYP identify_coz();
483
484
void free_coz_TYP();
485
486
matrix_TYP **calculate_H1();
487
488
void cen_to_norm();
489
490
matrix_TYP **max_sublattices();
491
492
matrix_TYP **calculate_representatives();
493
494
int obergruppenzahl();
495
496
#endif
497
498
#endif /* _CARAT_GRAPH_H_ */
499
500
501
502
#ifdef __cplusplus
503
}
504
#endif
505
506
507
508
509