Chalkboard - v3.0.4
    Preparing search index...

    Function endomorphism

    • Defines an endomorphism of an algebraic structure.

      Type Parameters

      • T

      Parameters

      • struc: ChalkboardStructure<T>

        The algebraic structure which is both the domain and codomain of the morphism

      • mapping: (element: T) => T

        The function that takes an element from the structure and maps it to another element in the same structure

      Returns ChalkboardMorphism<T, T>

      const Z4 = Chalkboard.abal.group(Chalkboard.abal.Z(4), (a, b) => (a + b) % 4, 0, (a) => (4 - a) % 4);
      const double = Chalkboard.abal.endomorphism(Z4, (x) => (2 * x) % 4); // Defines x ↦ 2x