Chalkboard - v3.0.4
    Preparing search index...

    Function isIdentity

    • Checks if an element is the identity of an algebraic structure.

      Type Parameters

      • T

      Parameters

      • struc: ChalkboardStructure<T>

        The algebraic structure

      • element: T

        The element

      • Optionaltype: "add" | "mul" = "add"

        The type of identity to check ("add" for additive identity, "mul" for multiplicative identity, defaults to "add")

      Returns boolean

      const Z4 = Chalkboard.abal.group(Chalkboard.abal.Z(4), (a, b) => (a + b) % 4, 0, (a) => (4 - a) % 4);
      const valid = Chalkboard.abal.isIdentity(Z4, 0); // Returns true