where u_1, v_1, u_2, v_2 are exponent vectors with base addresses cp1, cp2, cp3, cp4, respectively;
the result is stored as an exponent vector with address result;
with appropriate initial values, this procedure may be used to calculate a commutator; the algorithm finds a
solution generator by generator */
void find_commutator( int cp1, int cp2, int cp3, int cp4, int result, struct pcp_vars *pcp)
{ registerint *y = y_address; int r; int exp; registerint i; int str = pcp->lused + 1; registerint p = pcp->p; registerint lastg = pcp->lastg;
#include"access.h"
y[str] = 1;
for (i = 1; i <= lastg; ++i) {
/* compute r and adjust its value mod p */
r = (y[cp3 + i] + y[cp4 + i]) - (y[cp1 + i] + y[cp2 + i]); while (r < 0)
r += p; while (r >= p)
r -= p;
/* store the exponent of generator i in x */
y[result + i] = r;
/* now compute the new u_2 */ if (y[cp4 + i] != 0) {
y[str + 1] = PACK2(y[cp4 + i], i);
collect(-str + 1, cp3, pcp);
y[cp3 + i] = 0;
}
/* compute the residue mod p */
exp = y[cp2 + i] + r; while (exp < 0)
exp += p;
exp %= p;
/* now compute the new v_1 */ if (y[cp2 + i] + r >= p)
y[cp2 + i] = p - r; if (r != 0) {
y[str + 1] = PACK2(r, i);
collect(-str + 1, cp2, pcp);
}
/* now compute the new u_1 */ if (y[cp1 + i] + exp >= p)
y[cp2 + i] = p - exp; if (exp != 0) {
y[str + 1] = PACK2(exp, i);
collect(-str + 1, cp1, pcp);
}
}
}
/* copy a section of the array, y, to another part of y */
/* calculate a power of a left-normed commutator of supplied depth by repeated calls to find_commutator; set up the result as an exponent vector with base address pcp->lused in order to permit
the result to be handed to echelon easily */
/* read in next component, b, and set it up at cp1 and cp4 */ if (format == BASIC)
read_word(stdin, disp, type, pcp); else
pretty_read_word(stdin, disp, type, pcp);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.