GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#include <typedef.h>1#include <getput.h>2#include <matrix.h>3#include <base.h>4#include <longtools.h>5#include <presentation.h>6#include <sort.h>78/*************************************************************************9@10@-------------------------------------------------------------------------11@12@ void check_base(bahn **s,13@ bravais_TYP *G)14@15@ checks the integrity of the structure s for the finite16@ group G, ie. checks all words in s[i]->words (0<=i<G->dim)17@ wheter they produce the right matrix if one insert G->gen18@ into them.19@ Neither s nor G are changed, and if an error occurs20@ the function gives a message to stderr.21@22@-------------------------------------------------------------------------23@24**************************************************************************/25void check_base(bahn **s,26bravais_TYP *G){2728int i,29j;303132matrix_TYP *M,33**GENINV;3435GENINV = (matrix_TYP **) calloc(G->gen_no , sizeof(matrix_TYP *));3637for (i=0;i<G->dim;i++){38for (j=0;j<s[i]->length;j++){39if (s[i]->words[j] == NULL){40fprintf(stderr,"error: no word\n");41}42}43}444546for (i=0;i<G->dim;i++){47for (j=0;j<s[i]->length;j++){48M = mapped_word(s[i]->words[j],G->gen,GENINV);49if (mat_comp(M,s[i]->representatives[j])){50fprintf(stderr,"error: word is wrong i=%d j=%d\n",i,j);51put_word(s[i]->words[j],"G");52}53else if (FALSE){54fprintf(stderr,"word is good i=%d j=%d\n",i,j);55put_word(s[i]->words[j],"G");56}57free_mat(M);58}59}6061for (i=0;i<G->gen_no;i++)62if (GENINV[i]) free_mat(GENINV[i]);6364if (GENINV) free(GENINV);6566return;6768} /* check_base(.....) */69707172