Class PossibleWorlds<W,P>
java.lang.Object
org.episteme.core.mathematics.logic.modal.PossibleWorlds<W,P>
Represents possible worlds semantics for modal logic.
In possible worlds semantics, modal operators are interpreted relative to accessibility relations between worlds. A proposition is necessarily true if it's true in all accessible worlds, and possibly true if it's true in at least one accessible world.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAccessibility(W from, W to) Adds an accessibility relation between two worlds.voidAdds a world to the model.getAccessibleWorlds(W world) Returns all worlds accessible from the given world.Returns all worlds in the model.booleanGets the truth value of a proposition in a world.booleanisNecessary(W world, P proposition) Checks if a proposition is necessarily true in a world (true in all accessible worlds).booleanisPossible(W world, P proposition) Checks if a proposition is possibly true in a world (true in at least one accessible world).booleanChecks if the accessibility relation is reflexive (every world accesses itself).booleanChecks if the accessibility relation is symmetric (if w1 accesses w2, then w2 accesses w1).booleanChecks if the accessibility relation is transitive (if w1 accesses w2 and w2 accesses w3, then w1 accesses w3).voidSets the truth value of a proposition in a world.toString()
-
Constructor Details
-
PossibleWorlds
public PossibleWorlds()Creates an empty possible worlds model.
-
-
Method Details
-
addWorld
-
addAccessibility
-
setValue
-
getValue
-
isNecessary
-
isPossible
-
getAccessibleWorlds
-
getAllWorlds
-
isReflexive
public boolean isReflexive()Checks if the accessibility relation is reflexive (every world accesses itself).- Returns:
- true if reflexive
-
isSymmetric
public boolean isSymmetric()Checks if the accessibility relation is symmetric (if w1 accesses w2, then w2 accesses w1).- Returns:
- true if symmetric
-
isTransitive
public boolean isTransitive()Checks if the accessibility relation is transitive (if w1 accesses w2 and w2 accesses w3, then w1 accesses w3).- Returns:
- true if transitive
-
toString
-