GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/****************************************************************************1**2*A pq_functions.h 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/* prototypes for functions used in the p-Quotient Program */1011#ifndef ANUPQ_FUNCTIONS_H12#define ANUPQ_FUNCTIONS_H1314#include "pq_defs.h"15#include "pcp_vars.h"16#include "pga_vars.h"17#include "exp_vars.h"1819void autgp_order ();20void collect_defining_generator (int ptr, int cp, struct pcp_vars *pcp);21void factor_subgroup (struct pcp_vars *pcp);22void handle_error (Logical group_present);23void is_timelimit_exceeded ();24void CreateGAPLibraryFile (void);25void compute_padic (int *powers, int x, int k, int p, int *expand);26void print_pcp_relations (struct pcp_vars *pcp);27int **find_allowable_subgroup ();28int*** determine_action (int format, int *nmr_of_auts, struct pcp_vars *pcp);29void check_input (int output, int *max_class, struct pcp_vars *pcp);30FILE *OpenTemporaryFile ();31void close_queue (Logical report, int list_length, int limit, int *head, int *list, int *queue, int queue_length, struct pcp_vars *pcp);32void enforce_exponent (Logical report, struct exp_vars *exp_flag, int **head, int **list, struct pcp_vars *pcp);33void bubble_sort (int *x, int len, struct pcp_vars *pcp);34void complete_echelon (Logical trivial, int redgen, struct pcp_vars *pcp);35void traverse_list (int exponent, int head, int *list, int cp, struct pcp_vars *pcp);36void extend ();37void extend_power (int cp1, int cp2, int u, int **auts, struct pcp_vars *pcp);38void extend_commutator (int cp1, int cp2, int u, int v, int **auts, struct pcp_vars *pcp);39void collect_image_of_generator (int cp, int *auts, struct pcp_vars *pcp);40void collect_image_of_string (int string, int cp, int **auts, struct pcp_vars *pcp);41int ***reallocate_array (int ***a, int orig_n, int orig_m, int orig_r, int n, int m, int r, Logical zero);42int *reallocate_vector (int *a, int original, int new, int start, Logical zero);43void next_class (Logical report, int **head, int **list, struct pcp_vars *pcp);44FILE *OpenSystemFile (const char *file_name, const char *mode);45void create_tail (int address, int f, int s, struct pcp_vars *pcp);46void extend_tail (int address, int f, int s, struct pcp_vars *pcp);47void enforce_laws (struct pga_vars *flag, struct pga_vars *pga, struct pcp_vars *pcp);48void orbit_option (int option, int **perms, int **a, int **b, char **c, int **orbit_length, struct pga_vars *pga);49void stabiliser_option (int option, int ***auts, int **perms, int *a, int *b, char *c, int *orbit_length, struct pga_vars *pga, struct pcp_vars *pcp);50void calculate_tails (int final_class, int start_weight, int end_weight, struct pcp_vars *pcp);51void calculate_power (int exp, int ptr, int cp, struct pcp_vars *pcp);52void write_GAP_matrix ();53int *bitstring_to_subset (int K, struct pga_vars *pga);54int ***allocate_array (int n, int m, int r, Logical zero);55int *allocate_vector (int n, int start, Logical zero);56char *allocate_char_vector (int n, int start, Logical zero);57int **allocate_matrix (int n, int m, int start, Logical zero);58char **allocate_char_matrix (int n, int m, int start, Logical zero);59int **commutator_matrix (struct pga_vars *pga, struct pcp_vars *pcp);60int ***restore_group (Logical rewind_flag, FILE *input_file, int group_number, struct pga_vars *pga, struct pcp_vars *pcp);61void invalid_group (struct pcp_vars *pcp);62void report (int nmr_of_capables, int nmr_of_descendants, int nmr_of_covers, struct pga_vars *pga, struct pcp_vars *pcp);63void print_group_details (struct pga_vars *pga, struct pcp_vars *pcp);64int*** restore_pga (FILE *ifp, struct pga_vars *pga, struct pcp_vars *pcp);65FILE *OpenFile (const char *file_name, const char *mode);66FILE *OpenFileOutput (const char *file_name);67void set_defaults (struct pga_vars *flag);68void read_subgroup_rank (int *k);69void read_step_size (struct pga_vars *pga, struct pcp_vars *pcp);70void query_metabelian_law (struct pga_vars *pga);71void query_degree_aut_information (struct pga_vars *pga);72void query_exponent_law (struct pga_vars *pga);73void query_perm_information (struct pga_vars *pga);74void query_space_efficiency (struct pga_vars *pga);75void query_group_information (int p, struct pga_vars *pga);76void query_aut_group_information (struct pga_vars *pga);77void query_orbit_information (struct pga_vars *pga);78void query_solubility (struct pga_vars *pga);79void query_terminal (struct pga_vars *pga);80void Extend_Aut (int start, int max_length, int *list_length, int *head, int **list, int offset, int *index, struct pcp_vars *pcp);81void Extend_Comm (int cp1, int cp2, int u, int v, int offset, int *head, int *list, struct pcp_vars *pcp);82void Extend_Pow (int cp1, int cp2, int u, int offset, int *head, int *list, struct pcp_vars *pcp);83void Collect_Image_Of_Str (int string, int cp, int offset, int *head, int *list, struct pcp_vars *pcp);84void Collect_Image_Of_Gen (int cp, int head, int *list, struct pcp_vars *pcp);85int** label_to_subgroup (int *Index, int **subset, int label, struct pga_vars *pga);86int** transpose (int **a, int n, int m);87int** multiply_matrix (int **a, int n, int m, int **b, int q, int p);88void add_to_list (int *subset, struct pga_vars *pga);89void visit (int k, int d, struct pga_vars *pga);90void get_definition_sets (struct pga_vars *pga);91int*** central_automorphisms (struct pga_vars *pga, struct pcp_vars *pcp);92void list_interactive_pga_menu (void);93void list_interactive_pq_menu (void);94void start_group (FILE **StartFile, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);95int* find_orbit_reps (int *a, int *b, struct pga_vars *pga);96int** permute_subgroups (FILE *LINK_input, int **a, int **b, char **c, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);97void list_pga_menu (void);98void image_to_word (int string, int *image, struct pcp_vars *pcp);99void Copy_Matrix (int **A, int **B, int nmr_of_rows, int nmr_of_bytes);100void CreateName (char *name, int call_depth, struct pcp_vars *pcp);101void find_padic (int x, int k, int p, int *expand, struct pga_vars *pga);102void trace_action (int *permutation, int j, int *a, int *b, char *c);103void update_image (int **A, int column, int **Image, int row, struct pga_vars *pga);104void compute_permutation (int *permutation, int **A, struct pga_vars *pga);105void find_available_positions (int K, int **A, int **Image, int **row, int **column, int depth, struct pga_vars *pga);106void compute_images (int **A, int K, int depth, int *permutation, struct pga_vars *pga);107void start_group (FILE **StartFile, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);108FILE *OpenFileInput (const char *file_name);109FILE *TemporaryFile (void);110int*** read_auts (int option, int *nmr_of_auts, int *nmr_of_exponents, struct pcp_vars *pcp);111int ***invert_automorphisms (int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);112char* find_permutation (int *b, char *c, struct pga_vars *pga);113int*** immediate_descendant (FILE *descendant_file, struct pga_vars *pga, struct pcp_vars *pcp);114void process_rep (int **perms, int *a, int *b, char *c, char *d, int ***auts, int rep, int orbit_length, FILE *tmp_file, FILE *descendant_file, FILE *covers_file, struct pga_vars *pga, struct pcp_vars *pcp);115void evaluate_image (int *head, int *list, int offset, int ptr, int cp, struct pcp_vars *pcp);116void stabiliser_generators (int **perms, int rep, int *a, int *b, char *c, char *d, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);117void image_of_generator (int generator, int pointer, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);118void intermediate_stage (FILE *descendant_file, FILE *input_file, int nmr_of_covers, struct pga_vars *pga, struct pcp_vars *pcp);119void list_pqa_menu (void);120void space_for_orbits (int **a, int **b, char **c, struct pga_vars *pga);121void orbits (int *permutation, int *a, int *b, char *c, struct pga_vars *pga);122Logical is_space_exhausted (int required, struct pcp_vars *pcp);123Logical is_genlim_exceeded (struct pcp_vars *pcp);124void trace_relation (int *sequence, int *index, int ptr, int generator, struct pcp_vars *pcp);125void output_information(int *sequence, int nmr_of_exponents, struct pcp_vars *pcp);126int *compact_description (Logical write_to_file, struct pcp_vars *pcp);127void CloseFile (FILE* file);128void power (int exp, int cp, struct pcp_vars *pcp);129void vector_to_string (int cp, int str, struct pcp_vars *pcp);130int vector_to_word (int cp, int ptr, struct pcp_vars *pcp);131void string_to_vector (int str, int cp, struct pcp_vars *pcp);132133#if defined (GROUP)134void collect (int pointer, int collected_part, struct pcp_vars *pcp);135#endif136137138/* collect_relations.c */139void collect_relations (struct pcp_vars *pcp);140141/* degree.c */142void compute_degree (struct pga_vars *pga);143144/* echelon.c */145int echelon (struct pcp_vars *pcp);146147/* eliminate.c */148void eliminate (Logical middle_of_tails, struct pcp_vars *pcp);149150/* exponent_info.c */151void initialise_exponent (struct exp_vars *exp_flag, struct pcp_vars *pcp);152153/* extend_automorphisms.c */154void extend_automorphisms (int ***auts, int nmr_of_auts, struct pcp_vars *pcp);155156/* extra_relations.c */157#if defined (GROUP)158void extra_relations (struct exp_vars *exp_flag, struct pcp_vars *pcp);159#endif160161/* FreeSpace.c */162void free_vector (int *a, int start);163void free_matrix (int **a, int n, int start);164void free_array (int ***a, int n, int m, int start);165void free_char_vector (char *a, int start);166void free_char_matrix (char **a, int n);167void free_space (Logical soluble_computation, int **perms, int *orbit_length, int *a, int *b, char *c, struct pga_vars *pga);168169/* GAP_link_via_file.c */170void start_GAP_file ( FILE **GAP_input, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp );171172/* last_class.c */173void last_class (struct pcp_vars *pcp);174175/* map_relations.c */176void map_relations (int **map, struct pga_vars *pga, struct pcp_vars *pcp);177178/* print_arrays.c */179void print_array (int *a, int first, int last);180void print_chars (char *a, int first, int last);181182/* print_presentation.c */183void print_map (struct pcp_vars *pcp);184void print_presentation (Logical full, struct pcp_vars *pcp);185186/* print_structure.c */187int find_definition (int generator, int pointer, int weight, struct pcp_vars *pcp);188189/* read.c */190void verify_read (int nmr_items, int required);191void restore_pcp (FILE *ifp, struct pcp_vars *pcp);192int*** restore_pga (FILE *ifp, struct pga_vars *pga, struct pcp_vars *pcp);193194/* read_value.c */195void read_line (void);196void read_value (Logical newline, char *string, int *value, int lower_bound);197int string_to_int (char *s, Logical *error);198char* GetString (char *string);199200/* read_word.c */201void setup_symbols (struct pcp_vars *pcp);202void read_word (FILE *file, int disp, int type, struct pcp_vars *pcp);203void pretty_read_word (FILE *file, int disp, int type, struct pcp_vars *pcp);204205/* report_error.c */206void report_error (int a, int b, int c);207208/* setup_reps.c */209void setup_reps (int *reps, int nmr_of_reps, int *orbit_length,210int **perms, int *a, int *b, char *c, int ***auts,211FILE *descendant_file, FILE *covers_file,212struct pga_vars *pga, struct pcp_vars *pcp);213214/* soluble_orbits.c */215void process_identity_perm (int *a, int *b, char *c, struct pga_vars *pga);216217/* stabiliser.c */218int*** stabiliser_of_rep (int **perms, int rep, int orbit_length,219int *a, int *b, char *c, char *d, int ***auts,220struct pga_vars *pga, struct pcp_vars *pcp);221void stabiliser_generators (int **perms, int rep, int *a, int *b, char *c, char *d,222int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);223void image_of_generator (int generator, int pointer, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);224int preimage (int perm, struct pga_vars *pga);225int ***read_stabiliser_gens (int nmr_of_generators, int ***soluble_generators, struct pga_vars *pga, struct pcp_vars *pcp);226227/* standard.c */228#if defined (GROUP) && defined (STANDARD_PCP)229void standard_presentation (Logical *identity_map, int standard_output, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);230void print_aut_description (int ***central, int ***stabiliser, struct pga_vars *pga, struct pcp_vars *pcp);231int ***read_auts_from_file (FILE *file, int *nmr_of_auts, struct pcp_vars *pcp);232#endif233234/* step_range.c */235void step_range (int k, int *lower_step, int *upper_step, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);236237/* store_definition_sets.c */238void store_definition_sets (int r, int lower_step, int upper_step, struct pga_vars *pga);239int choose (int r, int s);240241/* strip_identities.c */242void strip_identities (int ***auts, struct pga_vars *pga, struct pcp_vars *pcp);243244/* subgroup_to_label.c */245int subgroup_to_label (int **S, int K, int *subset, struct pga_vars *pga);246247/* system.c */248void print_message (int work_space);249250/* update_generators.c */251void update_generators (struct pcp_vars *pcp);252253/* write.c */254void save_pcp (FILE *ofp, struct pcp_vars *pcp);255256257#endif258259260