Interface Logic<T>

All Known Subinterfaces:
FirstOrderLogic<T>, ModalLogic<T>, TemporalLogic<T>
All Known Implementing Classes:
BooleanLogic, FuzzyLogic, GodelLogic, IntuitionisticLogic, LukasiewiczLogic, ParaconsistentLogic, ThreeValuedLogic

public interface Logic<T>
Represents a logical system.

A logical system defines the set of truth values and the operations on them.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Summary

    Modifier and Type
    Method
    Description
    and(T a, T b)
    Logical AND (Conjunction).
    default T
    equivalent(T a, T b)
    Logical Equivalence (a invalid input: '<'-> b).
    Returns the truth value representing "False" (contradiction).
    default T
    implies(T a, T b)
    Logical Implication (a -> b).
    not(T a)
    Logical NOT (Negation).
    or(T a, T b)
    Logical OR (Disjunction).
    Returns the truth value representing "True" (tautology).
  • Method Details

    • trueValue

      T trueValue()
      Returns the truth value representing "True" (tautology).
      Returns:
      the true value
    • falseValue

      T falseValue()
      Returns the truth value representing "False" (contradiction).
      Returns:
      the false value
    • and

      T and(T a, T b)
      Logical AND (Conjunction).
      Parameters:
      a - first operand
      b - second operand
      Returns:
      a AND b
    • or

      T or(T a, T b)
      Logical OR (Disjunction).
      Parameters:
      a - first operand
      b - second operand
      Returns:
      a OR b
    • not

      T not(T a)
      Logical NOT (Negation).
      Parameters:
      a - operand
      Returns:
      NOT a
    • implies

      default T implies(T a, T b)
      Logical Implication (a -> b).
      Parameters:
      a - antecedent
      b - consequent
      Returns:
      a IMPLIES b
    • equivalent

      default T equivalent(T a, T b)
      Logical Equivalence (a invalid input: '<'-> b).
      Parameters:
      a - first operand
      b - second operand
      Returns:
      a IFF b