Countermodels

Test propositional arguments with truth tables and modal arguments with Kripke-frame search. Build and inspect your own Kripke models in the playground.

Argument

~ or ¬ not   & or ∧ and   | or ∨ or   -> or → if-then   <-> or ↔ iff   [] or □ necessarily   <> or ◇ possibly

Truth-Functional Skeleton

A full, classical truth table over ¬, ∧, ∨, →, ↔, for propositional logic. It does not work with modal operators □ or ◇.

Kripke Frame Playground

Click anywhere on the canvas to place a world. Drag worlds to reposition them.

About This Project

Countermodels is an interactive tool for exploring logical validity through truth tables and Kripke semantics. It was built to make formal logic more concrete by letting users construct models, search for countermodels, and visually inspect the results.

The project supports both classical propositional logic and modal logic. Propositional arguments can be checked with truth-functional tables, while arguments containing (necessarily) or (possibly) are evaluated using Kripke models.

Modal Logic

In modal logic, the truth of a formula can depend on which possible worlds are accessible from the current world.

□P — P is true at every accessible world.
◇P — P is true at at least one accessible world.

If a world has no accessible worlds, □P is true vacuously: there is no accessible world at which P fails. In contrast, ◇P is false because there is no accessible world at which P holds.

Kripke Models

A Kripke frame consists of a set of worlds together with an accessibility relation between them:

F = (W, R)
W = set of worlds
R = accessibility relation

A valuation assigns truth values to propositional variables at each world. Together, a frame and a valuation form a Kripke model.

The checker evaluates formulas at a designated evaluation world, w0. For example, □P is true at w0 exactly when P is true at every world accessible from w0.

Countermodels

To show that an argument is invalid, it is enough to find a countermodel: a model in which every premise is true while the conclusion is false.

Countermodel: premises = true    conclusion = false

The Kripke Search tab generates frames satisfying the selected modal system's frame conditions, generates valuations, and checks the resulting models for counterexamples.

Search Limits

The Kripke Search performs an exhaustive search over the finite model space specified by the selected number of worlds.

For example, with four worlds and an unrestricted accessibility relation, there are 16 possible ordered accessibility pairs, so there are:

216 = 65,536 possible accessibility relations

The search also considers different valuations of the propositional variables at each world. Because both the number of frames and the number of valuations grow rapidly, larger searches can become computationally expensive.

Finding no countermodel within a finite search space does not, by itself, establish validity over every possible Kripke frame. A finite search establishes the result only for the models that were actually searched, unless a separate completeness or finite-model argument justifies the bound.

Modal Systems

Different modal systems impose different conditions on the accessibility relation.

K — no frame condition
D — serial
T — reflexive
B — reflexive and symmetric
S4 — reflexive and transitive
S5 — reflexive, symmetric, and transitive

These conditions restrict which Kripke frames are included in the search.