Skip to content

Commit

Permalink
Rename cozycle to cocycle
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikBernhardt authored and fingolfin committed Nov 9, 2019
1 parent b579492 commit fa98087
Show file tree
Hide file tree
Showing 103 changed files with 276 additions and 898 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ libfunctions_a_SOURCES = \
functions/Zassen/coboundary.c \
functions/Zassen/cong_solve.c \
functions/Zassen/convert_cocycle_to_column.c \
functions/Zassen/convert_to_cozycle.c \
functions/Zassen/convert_to_cocycle.c \
functions/Zassen/normalop.c \
functions/Zassen/put_cocycle.c \
functions/Zassen/reget_gen.c \
Expand Down
6 changes: 3 additions & 3 deletions functions/Graph/graph_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ bravais_TYP *extract_r(bravais_TYP *G,
rat2kgv(X);
Check_mat(X);

/* is it a valid cozycle? */
/* is it a valid cocycle? */
if ((G->dim * G->gen_no != X->rows) || (X->cols != 1)){
fprintf(stderr,"The cozycle is not compatible to this point group\n");
fprintf(stderr,"The cocycle is not compatible to this point group\n");
fprintf(stderr,"It should have %d * %d = %d rows\n",G->dim,G->gen_no,
G->dim*G->gen_no);
exit(3);
Expand Down Expand Up @@ -221,7 +221,7 @@ matrix_TYP *standard_rep(matrix_TYP *coz,
for (i = 0; i < diff; i++){
j = tmp->array.SZ[i + first][0] * D->array.SZ[i + first][i + first];
if ((j % denominator) != 0){
fprintf(stderr,"ERROR in standard_rep: are you sure this is a cozycle?\n");
fprintf(stderr,"ERROR in standard_rep: are you sure this is a cocycle?\n");
fprintf(stderr,"If so, please report to the authors: carat@momo.math.rwth-aachen.de\n");
exit(3);
}
Expand Down
22 changes: 11 additions & 11 deletions functions/Graph/normalop_o.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ static matrix_TYP *static_orbit_rep(matrix_TYP *x,
/* the element is not new */
free_mat(tmp);

/* inserted this case to handle the stabilizer of a cozycle
/* inserted this case to handle the stabilizer of a cocycle
as well: tilman 15.03. */
if (WORDS){

/* we got a new generator of the stabilizer of the cozycle */
/* we got a new generator of the stabilizer of the cocycle */
WORDS[0][NUMBER_OF_WORDS[0]] = (int *) calloc(
orb_words[h][0]+orb_words[i][0]+2, sizeof(int));
WORDS[0][NUMBER_OF_WORDS[0]][0] =
Expand Down Expand Up @@ -349,7 +349,7 @@ static int gives_rise_to_torsionfree_space_group(


R = init_bravais(G->dim+1);
C = convert_to_cozycle(x,cocycle,D);
C = convert_to_cocycle(x,cocycle,D);

R->gen = (matrix_TYP **) malloc(G->gen_no * sizeof(matrix_TYP *));
R->gen_no = G->gen_no;
Expand Down Expand Up @@ -387,7 +387,7 @@ static int gives_rise_to_torsionfree_space_group(
@
@ -------------------------------------------------------------------------
@
@ matrix_TYP **extensions(matrix_TYP *cozycle,
@ matrix_TYP **extensions(matrix_TYP *cocycle,
@ matrix_TYP *D,
@ matrix_TYP *R,
@ bravais_TYP *G,
Expand All @@ -396,7 +396,7 @@ static int gives_rise_to_torsionfree_space_group(
@ int *number_of_orbits,
@ int option)
@
@ Returns the cozycles which generate the isomorphims classes of
@ Returns the cocycles which generate the isomorphims classes of
@ extensions of G by the natural ZG-module. The split extension is
@ represented by an all zero matrix.
@
Expand All @@ -408,7 +408,7 @@ static int gives_rise_to_torsionfree_space_group(
@ int **lengths: length[0] returns a pointer to the lengths
@ of the orbits respectively
@ MP_INT **names: names[0] returns a pointer to the names of
@ the cozycles as they would appear in a call
@ the cocycles as they would appear in a call
@ of identify(.....).
@ int *number_of_orbits: the number of orbits the normalizer induces
@ on the cohomology group.
Expand All @@ -420,7 +420,7 @@ static int gives_rise_to_torsionfree_space_group(
@ -------------------------------------------------------------------------
@
***********************************************************************/
matrix_TYP **extensions_o(matrix_TYP *cozycle,
matrix_TYP **extensions_o(matrix_TYP *cocycle,
matrix_TYP *D,
matrix_TYP *R,
bravais_TYP *G,
Expand Down Expand Up @@ -484,10 +484,10 @@ matrix_TYP **extensions_o(matrix_TYP *cozycle,

for (i=0;i<Nanz;i++){
if (i<G->cen_no){
N[0][i] = normalop(cozycle,D,R,G,G->cen[i],i == (Nanz-1));
N[0][i] = normalop(cocycle,D,R,G,G->cen[i],i == (Nanz-1));
}
else{
N[0][i] = normalop(cozycle,D,R,G,G->normal[i-G->cen_no],i == (Nanz-1));
N[0][i] = normalop(cocycle,D,R,G,G->normal[i-G->cen_no],i == (Nanz-1));
}
if (INFO_LEVEL & 16){
put_mat(N[0][i],NULL,"N[i]",2);
Expand Down Expand Up @@ -535,7 +535,7 @@ matrix_TYP **extensions_o(matrix_TYP *cozycle,

if (mpz_cmp(&new_val,&act_val) == 0 &&
(!(option & 1) ||
gives_rise_to_torsionfree_space_group( G, D, cozycle, x))){
gives_rise_to_torsionfree_space_group( G, D, cocycle, x))){
if (number_of_orbits[0] % MIN_SPEICHER == 0){
erg = (matrix_TYP **) realloc(erg,
(number_of_orbits[0] + MIN_SPEICHER)*sizeof(matrix_TYP*));
Expand All @@ -549,7 +549,7 @@ matrix_TYP **extensions_o(matrix_TYP *cozycle,
(number_of_orbits[0] + MIN_SPEICHER)*sizeof(int));

}
erg[number_of_orbits[0]] = convert_to_cozycle(x,cozycle,D);
erg[number_of_orbits[0]] = convert_to_cocycle(x,cocycle,D);
lengths[0][number_of_orbits[0]] = orbit_length;
mpz_init_set(names[0]+number_of_orbits[0],&act_val);
mpz_add_ui(&got_size,&got_size,(unsigned long) orbit_length);
Expand Down
4 changes: 2 additions & 2 deletions functions/Graph/phi.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ matrix_TYP *sg(bravais_TYP *R,
denominator *= (R->gen[j]->kgv / GGT(R->gen[j]->kgv, denominator));
}

/* stick the rigth INTEGRAL cozycle at the end of the RG[j] */
/* stick the rigth INTEGRAL cocycle at the end of the RG[j] */
for (j = 0; j < R->gen_no; j++){
RG[j]->cols++;
RG[j]->rows++;
Expand All @@ -55,7 +55,7 @@ matrix_TYP *sg(bravais_TYP *R,
}
}

/* get the cozycle on the right generators */
/* get the cocycle on the right generators */
coz = reget_gen(RG, R->gen_no, P, words, TRUE);

/* the cozykle has to become the right denominator */
Expand Down
2 changes: 1 addition & 1 deletion functions/Graph/sub-k-groups-fcts.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ coz_TYP identify_coz(bravais_TYP *G,

coz_info.darst = standard_rep(coz, coz_info.GLS, X[1]);
valuation(coz_info.darst, X[1], &coz_info.number);
coz_info.std_coz = convert_to_cozycle(coz_info.darst, X[0], X[1]);
coz_info.std_coz = convert_to_cocycle(coz_info.darst, X[0], X[1]);
coz_info.diff = mat_add(coz, coz_info.std_coz, eins, minuseins);

coz_info.Stab = stab_coz(coz_info.WORDS, coz_info.WORDS_no, G->normal,
Expand Down
4 changes: 2 additions & 2 deletions functions/Graph/sub-super-tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void plus_translationen(bravais_TYP *G,
/* -------------------------------------------------------------------- */
/* extract_c */
/* extracts the translational part of the affine (space) group G as a */
/* vector system (1-cozycle). */
/* vector system (1-cocycle). */
/* -------------------------------------------------------------------- */
matrix_TYP *extract_c(bravais_TYP *G)
{
Expand All @@ -102,7 +102,7 @@ matrix_TYP *extract_c(bravais_TYP *G)
kgv = kgv*G->gen[i]->kgv/GGT(kgv,G->gen[i]->kgv);
}

/* set the cozycle */
/* set the cocycle */
X->kgv = kgv;
for(i=0;i<G->gen_no;i++)
for (j=0;j<G->dim-1;j++)
Expand Down
16 changes: 8 additions & 8 deletions functions/Name/aff_class_inf.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static matrix_TYP *get_cocycle(bravais_TYP *R,
denominator *= (R->gen[j]->kgv / GGT(R->gen[j]->kgv,denominator));
}

/* stick the rigth INTEGRAL cozycle at the end of the RG[j] */
/* stick the rigth INTEGRAL cocycle at the end of the RG[j] */
for (j=0;j<R->gen_no;j++){
RG[j]->cols++;
RG[j]->rows++;
Expand All @@ -67,7 +67,7 @@ static matrix_TYP *get_cocycle(bravais_TYP *R,
Check_mat(RG[j]);
}

/* get the cozycle on the right generators */
/* get the cocycle on the right generators */
coz = reget_gen(RG,R->gen_no,P,words,TRUE);

/* the cozykle has to become the right denominator */
Expand Down Expand Up @@ -103,7 +103,7 @@ bravais_TYP *space_group_from_matrix(bravais_TYP *G,
k;

R = init_bravais(G->dim+1);
C = convert_to_cozycle(x,cocycle,D);
C = convert_to_cocycle(x,cocycle,D);

R->gen = (matrix_TYP **) malloc(G->gen_no * sizeof(matrix_TYP *));
R->gen_no = G->gen_no;
Expand Down Expand Up @@ -138,7 +138,7 @@ matrix_TYP *aff_class_inf(bravais_TYP *R,
bravais_TYP **RC)
{

matrix_TYP *cozycle,
matrix_TYP *cocycle,
**X,
**Y,
**matinv,
Expand All @@ -152,7 +152,7 @@ matrix_TYP *aff_class_inf(bravais_TYP *R,

/* first thing to do is to find the generators of DATAZ in the
point group of R */
cozycle = get_cocycle(R,DATAZ);
cocycle = get_cocycle(R,DATAZ);

/* do the cohomology calculations */
relator = (word *) calloc(PRES->rows,sizeof(word));
Expand All @@ -166,7 +166,7 @@ matrix_TYP *aff_class_inf(bravais_TYP *R,

if (X[0]->cols > 0){
/* give the group a name */
Y = identify(X[0],X[1],X[2],DATAZ,&cozycle,aff_name,1,3,NULL,NULL);
Y = identify(X[0],X[1],X[2],DATAZ,&cocycle,aff_name,1,3,NULL,NULL);
RES=Y[0]; free(Y);

if (RC){
Expand All @@ -180,7 +180,7 @@ matrix_TYP *aff_class_inf(bravais_TYP *R,
else{
mpz_set_si(aff_name,0);
RES = init_mat(DATAZ->dim+1,DATAZ->dim+1,"1");
coboundary(DATAZ,cozycle,RES);
coboundary(DATAZ,cocycle,RES);

if (RC){
/* construct the split extension */
Expand All @@ -197,7 +197,7 @@ matrix_TYP *aff_class_inf(bravais_TYP *R,
/* clean up and return */
for (i=0;i<3;i++) free_mat(X[i]);
free(X);
free_mat(cozycle);
free_mat(cocycle);
for (i=0;i<PRES->rows;i++) wordfree(relator+i);
free(relator);
for (i=0;i<DATAZ->gen_no;i++)
Expand Down
20 changes: 10 additions & 10 deletions functions/Zassen/README
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@
@
@ -------------------------------------------------------------------------
@
@ matrix_TYP *normalop(matrix_TYP *cozycle,matrix_TYP *D,matrix_TYP *R,
@ matrix_TYP *normalop(matrix_TYP *cocycle,matrix_TYP *D,matrix_TYP *R,
@ bravais_TYP *G,matrix_TYP *N)
@
@ Calculates the action of the matrix N on the cohomology group H^1(G,*)
@ described by the matrices cozycle, D, R, which are in turn output of
@ described by the matrices cocycle, D, R, which are in turn output of
@ cohomology.
@
@ CAUTION: The matrix returned describes the action on rows, and it is
@ not checked whether N is realy an element of the normalizer of G!
@
@ matrix_TYP *cozycle: the first return value of cohomology for G.
@ matrix_TYP *cocycle: the first return value of cohomology for G.
@ matrix_TYP *D: the second return value of cohomology for G.
@ matrix_TYP *R: the third return value of cohomology for G.
@ bravais_TYP *G: the group. only the field generator is realy needed.
Expand All @@ -74,11 +74,11 @@
@
@--------------------------------------------------------------------------
@
@ matrix_TYP **identify(matrix_TYP *cozycle,matrix_TYP *D,matrix_TYP *R,
@ matrix_TYP **identify(matrix_TYP *cocycle,matrix_TYP *D,matrix_TYP *R,
@ bravais_TYP *G,matrix_TYP **extension,MP_INT *a,
@ int number,int transform_flag)
@
@ Identifies the space groups described by the cozycles in extension,
@ Identifies the space groups described by the cocycles in extension,
@ i.e. gives them different number iff they are not isomorphic.
@ The return value depends on the value of transform_flag. If
@ (transform_flag == TRUE) it will return a list of "number" matrices in
Expand All @@ -97,7 +97,7 @@
@ Important for the correctness of the result
@ is that the matrices in G->cen, G->normal
@ generate N_GL_n(Z) (G) /G.
@ matrix_TYP **extension: matrices discribing a cozycles for the group G.
@ matrix_TYP **extension: matrices discribing a cocycles for the group G.
@ So each matrix in the list discribes a spacegroup.
@ MP_int *a: The names for the groups will be returned
@ via this field. The space has to be allocated
Expand All @@ -113,10 +113,10 @@
@
@ -------------------------------------------------------------------------
@
@ matrix_TYP **extensions(matrix_TYP *cozycle,matrix_TYP *D,matrix_TYP *R,
@ matrix_TYP **extensions(matrix_TYP *cocycle,matrix_TYP *D,matrix_TYP *R,
@ bravais_TYP *G,int **lengths,MP_INT **names,int *number_of_orbits)
@
@ Returns the cozycles which generate the isomorphims classes of
@ Returns the cocycles which generate the isomorphims classes of
@ extensions of G by the natural ZG-module. The split extension is
@ represented by an all zero matrix.
@
Expand All @@ -128,7 +128,7 @@
@ int **lengths: length[0] returns a pointer to the lengths
@ of the orbits respectively
@ MP_INT **names: names[0] returns a pointer to the names of
@ the cozycles as they would appear in a call
@ the cocycles as they would appear in a call
@ of identify(.....).
@ int *number_of_orbits: the number of orbits the normalizer induces
@ on the cohomology group.
Expand All @@ -146,7 +146,7 @@
@
@------------------------------------------------------------------------
@
@ void no_of_extensions(matrix_TYP *cozycle,matrix_TYP *D,
@ void no_of_extensions(matrix_TYP *cocycle,matrix_TYP *D,
@ matrix_TYP *R,bravais_TYP *G,MP_INT *erg)
@
@------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@ -------------------------------------------------------------------------
@
***************************************************************************/
matrix_TYP *convert_to_cozycle(matrix_TYP *x,matrix_TYP *cozycle,
matrix_TYP *convert_to_cocycle(matrix_TYP *x,matrix_TYP *cocycle,
matrix_TYP *D)
{

Expand All @@ -20,7 +20,7 @@ matrix_TYP *convert_to_cozycle(matrix_TYP *x,matrix_TYP *cozycle,

matrix_TYP *erg;

erg = init_mat(cozycle->rows,1,"");
erg = init_mat(cocycle->rows,1,"");

/* set first and last */
for (first = 0;first<D->cols && D->array.SZ[first][first] == 1;first++);
Expand All @@ -30,7 +30,7 @@ matrix_TYP *convert_to_cozycle(matrix_TYP *x,matrix_TYP *cozycle,
factor = x->array.SZ[i-first][0] *
D->array.SZ[last-1][last-1] / D->array.SZ[i][i];
for (j=0;j<erg->rows;j++){
erg->array.SZ[j][0] += (cozycle->array.SZ[j][i-first] * factor);
erg->array.SZ[j][0] += (cocycle->array.SZ[j][i-first] * factor);
}
}

Expand Down
Loading

0 comments on commit fa98087

Please sign in to comment.