GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/****************************************************************************1**2*A find_image.c ANUPQ source Eamonn O'Brien3**4*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany5*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia6**7*/89#include "pq_defs.h"10#include "pcp_vars.h"11#include "pga_vars.h"12#include "pq_functions.h"1314/* find the image of the allowable subgroup having supplied label under15the action of automorphism; compute and return its label */1617int18find_image(int label, int **auts, struct pga_vars *pga, struct pcp_vars *pcp)19{20int index;21int **A;22int **Image, **Image_transpose;23int **S, **S_transpose;24int *subset;25int K;2627subset = allocate_vector(pga->s, 0, 0);2829A = allocate_matrix(pga->q, pga->q, 0, FALSE);30assemble_matrix(A, pga->q, auts, pcp);3132S = label_to_subgroup(&index, &subset, label, pga);33S_transpose = transpose(S, pga->s, pga->q);34Image_transpose =35multiply_matrix(A, pga->q, pga->q, S_transpose, pga->s, pga->p);36Image = transpose(Image_transpose, pga->q, pga->s);37K = echelonise_matrix(Image, pga->s, pga->q, pga->p, subset, pga);3839free_matrix(A, pga->q, 0);40free_matrix(S, pga->s, 0);41free_matrix(S_transpose, pga->q, 0);42free_matrix(Image_transpose, pga->q, 0);4344label = subgroup_to_label(Image, K, subset, pga);45free_matrix(Image, pga->s, 0);46free_vector(subset, 0);4748return label;49}505152