Chop Logic Core - v1.4.0
    Preparing search index...
    isWFF: (expression: PropExpression) => boolean = isWellFormedFormula

    Type declaration

      • (expression: PropExpression): boolean
      • Checks whether a given propositional expression is a well-formed formula (WFF).

        A WFF follows these rules:

        1. Any single variable itself is a WFF.
        2. Any WFF can be prefixed with "~" to form another WFF.
        3. Any two WFFs can be combined with "&", "|", "=>", or "<=>" inside parentheses to form another WFF.

        Parentheses are mandatory when joining two WFFs using binary operators.

        Parameters

        • expression: PropExpression

          The propositional expression as an array of PropSymbols.

        Returns boolean

        true if the expression is a valid WFF, otherwise false.