GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/* last change: 23.04.2002 by Oliver Heidbuechel */12#ifdef __cplusplus3extern "C" {4#endif567#ifndef _CARAT_GRAPH_H_8#define _CARAT_GRAPH_H_910#ifndef _CARAT_TYPEDEF_H_11#include"typedef.h"12#endif1314#ifndef _ZASSEN_H_15#include"zass.h"16#endif1718#define TWOTO21 20971521920/* global variables */21extern boolean GRAPH_DEBUG;22extern boolean GRAPH;232425/* new structures */26typedef struct {27bravais_TYP *G; /* group we started with */28bravais_TYP **Z; /* Z-classes */29matrix_TYP ***norm_inv; /* inverses of normalizer for each Z-class */30int Z_no; /* number of Z-classes */31bravais_TYP ***aff; /* affine classes */32int *aff_no; /* number of affine classes in each Z-class */33int *first_aff; /* position of the first affine class in each Z-class34in the list (aff[0][0], aff[0][1], ... aff[1][0], ...) */35matrix_TYP ***X; /* matrices with informations about affine classes */36matrix_TYP **X_2_inv; /* inverse of ...->X[i][2] for each Z-class i */37matrix_TYP ***coz; /* cozycles of the affine classes */38MP_INT **names; /* names for affine classes */39int **names_int; /* names for affine classes in integers */40int *coho_size; /* size of the cohomology group for each Z-class */41int all; /* total number of affine classes */42matrix_TYP *pres; /* presentation */43QtoZ_TYP *INZ; /* graph for Z-classes */44matrix_TYP ****stab_coz; /* stabilizer in N_{Gl_n(Z)}(G) for each cozycle in each Z-class */45int **stab_gen_no; /* number of generators from this stabilizer */46int ****WORDS; /* Words for stabilizer of cozycles for each Z-class */47int **NUMBER_OF_WORDS; /* number of words */48matrix_TYP ***N; /* representation of normalizer on H^1 */49matrix_TYP ***gen_inv; /* inverses of generators for each Z-class */50boolean l_option; /* TRUE iff is_option(l) */51int **list_of_names; /* for each cocycle in each Z-class: number of the52smallest representative in the orbit of this53cocycle */54} Q_data_TYP;555657typedef struct {58matrix_TYP *D;59matrix_TYP **M;60matrix_TYP *i;61int erz_no;62int flag;63int D_first;64} H1_mod_ker_TYP;65666768typedef struct {69int con_no; /* number of conjugacy classes */70bravais_TYP **groups; /* representatives for each conjugacy class */71bahn ***strong; /* strong generating set for each represenative */72int ***worte; /* words for generators of the representatives in the73generators of the group in each conjugacy class */74int *elem_no; /* number of elements in the conjugacy classes */75int *orders; /* orders of the groups in each conjugacy class */76int total; /* total number of subgroups */77} t_sub_TYP;787980/* --------------------------------------------------------------------- */81/* some information about a cocycle */82/* --------------------------------------------------------------------- */83typedef struct84{85matrix_TYP *coz; /* cocycle in Q^n */86matrix_TYP *std_coz; /* standard form for this cocycle */87matrix_TYP *diff; /* coz - std_coz */88MP_INT name; /* name for this cocycle (number of element with lowest89number in the orbit) */90MP_INT number; /* number for this cocycle */91int **WORDS; /* Words for stabilizer of cocycle */92int WORDS_no; /* number of words for stabilizer of cocycle */93matrix_TYP **Stab; /* Stablizer of the cocycle / Pointgroup !!! */94int Stab_no; /* number of elements in the stabilizer */95matrix_TYP *darst; /* cocycle represented in C_a x C_b x ... */96matrix_TYP **aff_transl; /* return value of transl_aff_normal */97int aff_transl_no; /* # of elements in transl_aff_normal */98matrix_TYP **N_darst; /* representation of G->normal on H^1(G,Q^n/Z^n) */99matrix_TYP **N_inv; /* inverses of G->normal */100int N_darst_no; /* G->normal_no */101matrix_TYP **X; /* return value of cohomology for H^1(G,Q^n/Z^n) */102matrix_TYP *GLS; /* inverse of X[2] */103} coz_TYP;104105106107108/* functions */109#ifdef __STDC__110Q_data_TYP *get_Q_data(bravais_TYP *G,111matrix_TYP *pres,112boolean l_option);113114void free_Q_data(Q_data_TYP *data);115116void put_Q_data(Q_data_TYP *data,117char *groupname,118int printflag);119120bravais_TYP *extract_r(bravais_TYP *G,121matrix_TYP *X);122123matrix_TYP **all_cocycles(matrix_TYP *relator_input,124bravais_TYP *G,125int *anzahl,126matrix_TYP **matinv,127matrix_TYP ***X,128MP_INT **names,129int ****WORDS,130int **NUMBER_OF_WORDS,131matrix_TYP ***N,132int *coho_size,133int **list_of_names,134boolean l_option);135136matrix_TYP *subgroupgraph(Q_data_TYP *data,137boolean oflag);138139matrix_TYP **stab_coz(int **words,140int no_of_words,141matrix_TYP **N,142matrix_TYP **N_inv,143int anz,144int flag,145int *stab_gen_no);146147matrix_TYP *matrix_on_diagonal(matrix_TYP *mat,148int anz);149150matrix_TYP *standard_rep(matrix_TYP *coz,151matrix_TYP *GLS,152matrix_TYP *D);153154MP_INT cohomology_size(matrix_TYP *D);155156int *aff_classes_in_image(MP_INT *names,157int aff_no,158int coho_size,159matrix_TYP **orbit,160matrix_TYP **image_gen,161int gen_no,162matrix_TYP *D,163int *aff_in_image);164165int equal_zero(matrix_TYP *m);166167int yet_there(matrix_TYP *m,168matrix_TYP **list,169int no);170171int **stab_lattice(matrix_TYP *lattice,172matrix_TYP **N,173int N_gen_no,174int *no,175matrix_TYP **LIST,176int anz,177boolean *lattice_orbit);178179void kernel_and_image(matrix_TYP *phi,180matrix_TYP *A,181int A_first,182matrix_TYP *B,183matrix_TYP **kernel,184matrix_TYP **image);185186void calculate_phi(matrix_TYP *diag,187matrix_TYP *coz,188matrix_TYP **Xi,189matrix_TYP **Xj,190matrix_TYP *GLS,191matrix_TYP **phi,192matrix_TYP **kernel,193matrix_TYP ***image,194int *image_gen_no,195H1_mod_ker_TYP *H1_mod_ker);196197matrix_TYP **calculate_S1(matrix_TYP *lattice,198matrix_TYP **N,199int anz,200int *no,201matrix_TYP **dataN,202matrix_TYP **dataNinv,203matrix_TYP *dataX);204205int *aufspannen(int coho_size,206matrix_TYP **elements,207matrix_TYP **M,208int gen_no,209matrix_TYP *D,210int *anz);211212matrix_TYP **col_to_list(matrix_TYP *M);213214matrix_TYP **orbit_ker(matrix_TYP **ker_elements,215int ker_order,216matrix_TYP *D,217matrix_TYP **N,218int no,219int coho_size,220int *ker_list,221int *anz,222int **length);223224matrix_TYP **orbit_ksi_plus_ker(matrix_TYP *ksi,225matrix_TYP **ker_elements,226int ker_order,227matrix_TYP *D,228matrix_TYP **N,229int no,230int coho_size,231int *ker_list,232int *anz,233int **length);234235void free_H1_mod_ker_TYP(H1_mod_ker_TYP H1_mod_ker);236237matrix_TYP **new_representation(matrix_TYP **S,238int S_no,239H1_mod_ker_TYP H1_mod_ker,240matrix_TYP *A);241242matrix_TYP *graph_mapped_word(int *w,243matrix_TYP **A,244matrix_TYP **AINV,245matrix_TYP *D);246247matrix_TYP ***H1_mod_ker_orbit_alg(H1_mod_ker_TYP H1_mod_ker,248matrix_TYP **S,249int S_no,250int *anz,251int **length,252int ****WORDS,253int **WORDS_no,254matrix_TYP *start);255256void kernel_elements_2_affine(matrix_TYP **elem,257int anz);258259matrix_TYP *graph_mat_inv(matrix_TYP *A,260matrix_TYP *D,261int first);262263int word_already_there(int **WORDS,264int n);265266matrix_TYP *H1_of_standard_to_GL(bravais_TYP *GL,267bravais_TYP *standard,268matrix_TYP **X);269270int orbit_on_lattices(matrix_TYP **gitter,271int gitter_no,272matrix_TYP **N,273int N_no,274int *list,275int *length,276int *smallest,277matrix_TYP **conj);278279int number_of_affine_class(Q_data_TYP *data,280matrix_TYP *coz,281int i,282int flag,283boolean wortflag,284int **wort);285286matrix_TYP **transl_aff_normal(matrix_TYP **erzeuger,287int erzanz,288int *anzahl);289290matrix_TYP **kernel_factor_fct(matrix_TYP **translationen,291int translanz,292int erz_no,293matrix_TYP *lattice,294int *no);295296bravais_TYP *p_group(bravais_TYP *G);297298bravais_TYP **min_k_super(bravais_TYP *P,299bravais_TYP *R,300matrix_TYP *pres,301int *anz,302boolean bahnflag,303boolean debugflag,304int **orbitlength);305306bravais_TYP **max_k_sub(bravais_TYP *P,307bravais_TYP *R,308matrix_TYP *pres,309int *anz,310boolean aflag,311boolean debugflag,312int **orbitlength);313314void plus_translationen(bravais_TYP *G,315matrix_TYP *mat);316317matrix_TYP *extract_c(bravais_TYP *R);318319boolean is_k_subgroup(bravais_TYP *S,320bravais_TYP *R,321bravais_TYP *P,322int n,323matrix_TYP *pres);324325matrix_TYP *sg(bravais_TYP *R,326bravais_TYP *P);327328matrix_TYP *add_mod_D(matrix_TYP *A,329matrix_TYP *B,330matrix_TYP *D,331int first,332int diff);333334matrix_TYP *to_aff_normal_element(matrix_TYP *lin,335matrix_TYP *coz,336int flag,337bravais_TYP *P,338bravais_TYP *R);339340void my_translation(matrix_TYP *TR,341matrix_TYP *preimage,342matrix_TYP *coz,343bravais_TYP *G);344345bravais_TYP ****t_subgroups(bravais_TYP *G,346matrix_TYP **mats,347int no,348matrix_TYP *pres,349int *aff_no,350int **aff_cons,351int ***aff_cons_no,352bravais_TYP ***R,353int flag);354355coz_TYP identify_coz(bravais_TYP *G,356matrix_TYP *coz,357matrix_TYP **X);358359void free_coz_TYP(coz_TYP coz_info);360361matrix_TYP **calculate_H1(bravais_TYP *G,362word *relator,363int relatoranz);364365void cen_to_norm(bravais_TYP *G);366367matrix_TYP **max_sublattices(bravais_TYP *P,368int *anz,369int **trivialflag,370boolean debugflag);371372matrix_TYP **calculate_representatives(bravais_TYP *G,373bravais_TYP *GL,374matrix_TYP **H_G_Z,375matrix_TYP **H_GL_Z,376matrix_TYP *lattice,377matrix_TYP *phi,378H1_mod_ker_TYP H1_mod_ker,379matrix_TYP *preimage,380matrix_TYP *kernel_mat,381int *orbit_no,382int **orbit_length);383384int obergruppenzahl(matrix_TYP *L,385matrix_TYP **Norm,386matrix_TYP **NormInv,387matrix_TYP **StabStdCoz,388int Stab_anz,389int *wort);390391#else392393Q_data_TYP *get_Q_data();394395void free_Q_data();396397void put_Q_data();398399bravais_TYP *extract_r();400401matrix_TYP **all_cocycles();402403matrix_TYP *subgroupgraph();404405bravais_TYP *stab_coz();406407matrix_TYP *matrix_on_diagonal();408409matrix_TYP *standard_rep();410411MP_INT cohomology_size(matrix_TYP *D);412413int *aff_classes_in_image();414415int equal_zero();416417int yet_there();418419int **stab_lattice();420421void kernel_and_image();422423void calculate_phi();424425int **calculate_S1();426427int *aufspannen();428429matrix_TYP **col_to_list();430431matrix_TYP **orbit_ker();432433matrix_TYP **orbit_ksi_plus_ker();434435void free_H1_mod_ker_TYP();436437matrix_TYP **new_representation();438439matrix_TYP *graph_mapped_word();440441matrix_TYP ***H1_mod_ker_orbit_alg();442443void kernel_elements_2_affine();444445matrix_TYP *graph_mat_inv();446447int word_already_there();448449matrix_TYP *H1_of_standard_to_GL();450451int orbit_on_lattices();452453int number_of_affine_class();454455matrix_TYP **transl_aff_normal();456457int kernel_factor_fct();458459bravais_TYP *p_group();460461bravais_TYP **min_k_super();462463bravais_TYP **max_k_sub();464465void plus_translationen();466467matrix_TYP *extract_c();468469boolean is_k_subgroup();470471matrix_TYP *sg();472473matrix_TYP *add_mod_D();474475matrix_TYP *to_aff_normal_element();476477void my_translation();478479bravais_TYP ****t_subgroups();480481coz_TYP identify_coz();482483void free_coz_TYP();484485matrix_TYP **calculate_H1();486487void cen_to_norm();488489matrix_TYP **max_sublattices();490491matrix_TYP **calculate_representatives();492493int obergruppenzahl();494495#endif496497#endif /* _CARAT_GRAPH_H_ */498499500501#ifdef __cplusplus502}503#endif504505506507508509