Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346/****************************************************************************1**2*A class1_eliminate.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 "pq_functions.h"1213/* eliminate all redundant generators to construct the consistent14power commutator presentation for the class 1 quotient;1516this procedure is called only for class 1 in order to17eliminate redundancies brought about by collecting and18then echelonising words against an existing consistent19class 1 presentation;2021in all other circumstances, the usual eliminate procedure22is called */2324void class1_eliminate(struct pcp_vars *pcp)25{26register int *y = y_address;2728register int i;29register int j;30register int k;31register int p1;32register int ba;33register int lg;34register int bound;3536register int structure = pcp->structure;37register int current_class = pcp->cc;38register int lused = pcp->lused;39register int dgen = pcp->dgen;40register int ndgen = pcp->ndgen;4142/* calculate new values for irredundant generators and set them up43in a renumbering table of length pcp->lastg - pcp->ccbeg + 144which looks to compact like a normal exponent-generator string45pointed to by y[dgen] */4647structure = pcp->structure;48lused = pcp->lused;49y[lused + 1] = dgen;50y[dgen] = -(lused + 1);51y[lused + 2] = pcp->lastg - pcp->ccbeg + 1;52ba = lused + 3 - pcp->ccbeg;53pcp->lused += pcp->lastg - pcp->ccbeg + 3;54lused = pcp->lused;55lg = pcp->ccbeg - 1;56for (i = pcp->ccbeg, bound = pcp->lastg; i <= bound; i++) {57y[ba + i] = 0;58if (y[structure + i] > 0)59y[ba + i] = ++lg;60}6162/* update the redundant defining generators and inverses */63for (i = 1; i <= ndgen; i++) {64update(dgen + i, pcp);65if (pcp->overflow)66return;67update(dgen - i, pcp);68if (pcp->overflow)69return;70}7172/* finally update and move structure information */7374pcp->ppcomm = pcp->structure;75pcp->ppower = pcp->ppcomm;76k = pcp->ppower;77structure = pcp->structure;78for (i = pcp->lastg; i >= pcp->ccbeg; i--) {79if ((j = y[structure + i]) > 0) {80y[k] = j;81k--;82} else if (j < 0) {83/* deallocate equation for redundant generator i */84p1 = -j;85y[p1] = 0;86}87}8889for (; i > 0; i--)90y[k--] = y[structure + i];91if (pcp->subgrp != structure)92delete_tables(0, pcp);93pcp->structure = k;94structure = pcp->structure;95pcp->words = k;96pcp->subgrp = k;97pcp->submlg = pcp->subgrp - lg;9899pcp->lastg = lg;100y[pcp->clend + current_class] = pcp->lastg;101102/* deallocate the renumbering table */103p1 = -y[dgen];104y[p1] = 0;105return;106}107108109