Chalkboard - v3.0.4
    Preparing search index...

    Function homomorphism

    • Defines a homomorphism between two algebraic structures.

      Type Parameters

      • T
      • U

      Parameters

      • struc1: ChalkboardStructure<T>

        The first algebraic structure which is the domain of the morphism

      • struc2: ChalkboardStructure<U>

        The second algebraic structure which is the codomain of the morphism

      • mapping: (element: T) => U

        The function that takes an element from the first structure and maps it to the second structure

      Returns ChalkboardMorphism<T, U>

      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 parity = Chalkboard.abal.homomorphism(Z4, Z2, (x) => x % 2); // Defines the quotient map