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
#include <typedef.h>
2
#include <getput.h>
3
#include <matrix.h>
4
#include <base.h>
5
6
7
int INFO_LEVEL;
8
extern int SFLAG;
9
10
matrix_TYP *conjugated(bravais_TYP *G,bravais_TYP *H,
11
matrix_TYP **N,int Nanz,bahn **strong);
12
13
14
main(int argc,char **argv){
15
16
bravais_TYP *G,
17
*H,
18
*N;
19
20
matrix_TYP **base,
21
*erg;
22
23
bahn **strong;
24
25
int i,
26
j,
27
l,
28
anz;
29
30
char comment[1000];
31
32
33
read_header(argc,argv);
34
35
if ((is_option('h') && optionnumber('h')==0) || (FILEANZ < 3)){
36
printf("Usage: Conjugated file1 file2 file3\n");
37
printf("\n");
38
printf("file1: bravais_TYP containing the finite group G.\n");
39
printf("file2: bravais_TYP containing the finite group H.\n");
40
printf("file2: bravais_TYP containing the group N.\n");
41
printf("\n");
42
printf("The program checks whether there is an x in N with the\n");
43
printf("property that x H x^{-1} <= G, and returns this x if it\n");
44
printf("exists.\n");
45
printf("\n");
46
printf("WARNING: The program assumes that the orbit of H under N\n");
47
printf(" is finite.\n");
48
printf("\n");
49
if (is_option('h')){
50
exit(0);
51
}
52
else{
53
exit(31);
54
}
55
}
56
57
INFO_LEVEL = optionnumber('h');
58
59
if (INFO_LEVEL & 12){
60
SFLAG = 1;
61
}
62
63
G = get_bravais(FILENAMES[0]);
64
H = get_bravais(FILENAMES[1]);
65
N = get_bravais(FILENAMES[2]);
66
67
base = get_base(G);
68
strong = strong_generators(base,G,FALSE);
69
70
erg = conjugated(G,H,N->gen,N->gen_no,strong);
71
72
/* output */
73
if (erg != NULL){
74
sprintf(comment,"conjugated the group of %s INTO the group of %s",
75
FILENAMES[1],FILENAMES[0]);
76
put_mat(erg,NULL,comment,2);
77
free_mat(erg);
78
}
79
else{
80
printf("the groups are not conjugated under the group of %s\n",
81
FILENAMES[2]);
82
}
83
84
85
free_bravais(G);
86
free_bravais(H);
87
free_bravais(N);
88
for (i=0;i<G->dim;i++){
89
free_mat(base[i]);
90
free_bahn(strong[i]);
91
free(strong[i]);
92
}
93
free(strong);
94
free(base);
95
if (INFO_LEVEL & 12){
96
pointer_statistics(0,0);
97
}
98
99
exit(0);
100
101
} /* main */
102
103
104