Class GodelLogic

java.lang.Object
org.episteme.core.mathematics.logic.multivalued.GodelLogic
All Implemented Interfaces:
Logic<Double>

public class GodelLogic extends Object implements Logic<Double>
Gödel infinite-valued logic (also called Gödel-Dummett logic).

In Gödel logic, truth values are real numbers in [0,1]. Operations are defined as: - Negation: ¬a = 1 if a = 0, else 0 - Implication: a → b = 1 if a ≤ b, else b - Conjunction: a ∧ b = min(a, b) - Disjunction: a ∨ b = max(a, b)

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

    • getInstance

      public static GodelLogic getInstance()
      Returns the singleton instance.
      Returns:
      the instance
    • trueValue

      public Double trueValue()
      Description copied from interface: Logic
      Returns the truth value representing "True" (tautology).
      Specified by:
      trueValue in interface Logic<Double>
      Returns:
      the true value
    • falseValue

      public Double falseValue()
      Description copied from interface: Logic
      Returns the truth value representing "False" (contradiction).
      Specified by:
      falseValue in interface Logic<Double>
      Returns:
      the false value
    • and

      public Double and(Double a, Double b)
      Description copied from interface: Logic
      Logical AND (Conjunction).
      Specified by:
      and in interface Logic<Double>
      Parameters:
      a - first operand
      b - second operand
      Returns:
      a AND b
    • or

      public Double or(Double a, Double b)
      Description copied from interface: Logic
      Logical OR (Disjunction).
      Specified by:
      or in interface Logic<Double>
      Parameters:
      a - first operand
      b - second operand
      Returns:
      a OR b
    • not

      public Double not(Double a)
      Description copied from interface: Logic
      Logical NOT (Negation).
      Specified by:
      not in interface Logic<Double>
      Parameters:
      a - operand
      Returns:
      NOT a
    • implies

      public Double implies(Double a, Double b)
      Description copied from interface: Logic
      Logical Implication (a -> b).
      Specified by:
      implies in interface Logic<Double>
      Parameters:
      a - antecedent
      b - consequent
      Returns:
      a IMPLIES b
    • validate

      public Double validate(Double value)
      Validates that a value is in [0,1].
      Parameters:
      value - the value to validate
      Returns:
      the validated value
      Throws:
      IllegalArgumentException - if value is not in [0,1]
    • approximatelyEqual

      public boolean approximatelyEqual(Double a, Double b)
      Checks if two values are equal within epsilon.
      Parameters:
      a - first value
      b - second value
      Returns:
      true if approximately equal
    • toString

      public String toString()
      Overrides:
      toString in class Object