Calculates the direct product or direct sum of two algebraic structures.
The first structure
The second structure
Optional
The type of direct operation ("product" or "sum", defaults to "product").
const Z4 = Chalkboard.abal.group(Chalkboard.abal.Z(4), (a, b) => (a + b) % 4, 0, (a) => (4 - a) % 4);const Z2 = Chalkboard.abal.group(Chalkboard.abal.Z(2), (a, b) => (a + b) % 2, 0, (a) => a);const product = Chalkboard.abal.direct(Z4, Z2); // Returns Z₄ × Z₂ Copy
const Z4 = Chalkboard.abal.group(Chalkboard.abal.Z(4), (a, b) => (a + b) % 4, 0, (a) => (4 - a) % 4);const Z2 = Chalkboard.abal.group(Chalkboard.abal.Z(2), (a, b) => (a + b) % 2, 0, (a) => a);const product = Chalkboard.abal.direct(Z4, Z2); // Returns Z₄ × Z₂
Calculates the direct product or direct sum of two algebraic structures.