Logic

Five axioms and fifteen logics

Five familiar axioms of modal logic can be added to the basic system in thirty-two combinations. Only fifteen different logics come out, because the axioms are properties of arrows between worlds and some properties force others. Checking every frame with up to four worlds finds the fifteen, the order among them, and the small pictures that tell each from its neighbours.

Worth reading first: The axiom is the shape of the graph · Worlds built out of sentences.

Each axiom of modal logic is a property of the arrows between worlds. Add □p→p\Box p \to p to the basic logic KK and the formulas that become valid are exactly those true on every frame in which each world sees itself; add □p→□□p\Box p \to \Box\Box p and the frames are the transitive ones. Five axioms of this kind turn up again and again, because they say the most natural things a modality might satisfy:

  • D: □p→◊p\Box p \to \Diamond p — what is necessary is possible; every world sees at least one world.
  • T: □p→p\Box p \to p — what is necessary is true; every world sees itself.
  • B: p→□◊pp \to \Box\Diamond p — what is true is necessarily possible; the arrows are symmetric.
  • 4: □p→□□p\Box p \to \Box\Box p — what is necessary is necessarily necessary; the arrows are transitive.
  • 5: ◊p→□◊p\Diamond p \to \Box\Diamond p — what is possible is necessarily possible; two worlds seen from one see each other.

Any subset of the five can be added to KK, so there are thirty-two candidate logics. Only fifteen of them are different. The figure below is all fifteen, arranged by which contains which, and everything in it — the count, the order and the coincidences — is computed from frames rather than proofs.

Fifteen logics from five axioms. K: rank 0, covered by D, KB, K4, K5; D: rank 1, covered by T, KDB, D4, D5; T: rank 2, covered by B, S4; KB: rank 1, covered by KDB, KB5; KDB: rank 2, covered by B; B: rank 3, covered by S5; K4: rank 1, covered by D4, K45; D4: rank 2, covered by S4, KD45; S4: rank 3, covered by S5; KB5: rank 3, covered by S5; S5: rank 4, covered by nothing; K5: rank 1, covered by D5, K45; D5: rank 2, covered by KD45; K45: rank 2, covered by KB5, KD45; KD45: rank 3, covered by S5.
Fig. 1 The fifteen distinct normal modal logics obtained by adding any combination of the axioms D, T, B, 4 and 5 to K, with a line from each logic up to every smallest logic that contains it. The order is computed from frames.

This diagram is usually called the modal cube, because with a little distortion it can be drawn on the corners and edges of three nested cubes. Its bottom is KK, valid on every frame; its top is S5S5, the logic of a necessity that means “true in every world there is”. Between them sit the logics that philosophers and computer scientists actually use — TT for necessity that implies truth, S4S4 for provability and intuitionistic knowledge, KD45KD45 for belief, DD for obligation — and several that nobody uses but that the axioms produce anyway.

What the five axioms are for

Each axiom earns its place by a reading of the box. Read □p\Box p as “it is obligatory that pp” and DD says that what is obligatory is permitted — a code of conduct that never demands the impossible — while TT would wrongly say that whatever is obligatory happens; deontic logic is DD and stops there. Read □p\Box p as “the agent knows pp” and TT says that knowledge is true, 44 that an agent who knows something knows that it knows (positive introspection), and 55 that an agent who does not know something knows that it does not (negative introspection); the epistemic logics run from TT through S4S4 to S5S5 depending on how much introspection is granted. Read it as “the agent believes pp” and TT must go — beliefs can be false — while DD keeps beliefs consistent, which is KD45KD45.

Read □p\Box p as “pp is provable” and the right logic is not in the cube at all: provability satisfies Löb’s axiom, whose frames are transitive with no infinite ascending chains, a condition that no combination of these five axioms expresses. And read it as “pp will always be true” and transitivity is natural while symmetry is absurd — the future does not see the past — which leaves the logics with 44 and without BB. The cube is a menu, and each application picks the corner whose frame conditions match its reading.

How frames decide sameness

Two sets of axioms give the same logic when they prove the same formulas. That is a question about infinitely many formulas, and it would be hopeless to settle by listing them. The frames settle it instead.

All five axioms are canonical: the frame built out of a logic’s own maximal consistent sets satisfies the axiom’s condition. A consequence is that the logic generated by any set of these axioms is exactly the set of formulas valid on every frame satisfying the corresponding conditions. So two axiom sets give the same logic exactly when they define the same class of frames — and frame classes can be compared by looking at frames.

The figures look at every frame with one, two, three or four worlds: 2+16+512+65,536=66,0662 + 16 + 512 + 65{,}536 = 66{,}066 frames, one for each possible arrow relation on each set of labelled worlds. For each of the thirty-two axiom sets the computation records which of those frames satisfy all its conditions, and groups together the sets with the same record.

Thirty-two sets of axioms, fifteen logics. K: ∅; D: D; KB: B; K4: 4; K5: 5; T: T, DT; KDB: DB; D4: D4; D5: D5; K45: 45; B: TB, DTB; S4: T4, DT4; KB5: B4, B5, B45; KD45: D45; S5: DB4, TB4, DTB4, T5, DT5, DB5, TB5, DTB5, T45, DT45, DB45, TB45, DTB45.
Fig. 2 Every one of the 32 sets of axioms drawn from D, T, B, 4 and 5, added to K, grouped by the logic it generates — two sets grouped exactly when they are valid on the same frames among all 66,066 frames with up to four worlds.

The thirty-two sets fall into fifteen groups, and the groups are the same with three-world frames alone as with four: small frames already separate everything that is separate. S5S5 absorbs thirteen of the thirty-two sets; KB5KB5 absorbs three; TT, BB and S4S4 absorb two each; and the remaining ten logics have one name apiece.

Finding fifteen groups on finite frames proves that there are at least fifteen logics, since frames that separate two axiom sets separate their logics. That there are at most fifteen — that the sets grouped together really generate the same logic — needs the implications in the next section to hold on every frame, of every size, which a short argument shows for each. The finite computation finds the answer; the arguments confirm it.

The implications behind the collapse

Six implications between the frame conditions account for every coincidence.

The implications behind the collapse. T ⇒ D: holds; B4 ⇒ 5: holds; B5 ⇒ 4: holds; T5 ⇒ B: holds; T5 ⇒ 4: holds; DB4 ⇒ T: holds; D45 ⇒ T: fails (2 worlds); T4 ⇒ 5: fails (2 worlds); B ⇒ D: fails (1 worlds); 45 ⇒ B: fails (2 worlds); DB ⇒ 4: fails (2 worlds).
Fig. 3 Implications between the frame conditions — D serial, T reflexive, B symmetric, 4 transitive, 5 euclidean — each tested on every frame with up to four worlds. The six that hold have short proofs for every frame; the five that fail are refuted by frames of at most three worlds.

Reflexive implies serial: a world that sees itself sees something, so TT makes DD redundant. Symmetric and transitive implies euclidean: if a world sees uu and vv, then uu sees the world by symmetry and so sees vv by transitivity. Symmetric and euclidean implies transitive, by a similar two-step argument, so BB with either 44 or 55 gives the other. Reflexive and euclidean implies symmetric — a world seeing uu also sees itself, so uu sees the world — and then transitive, so TT with 55 is already S5S5. And serial, symmetric and transitive implies reflexive: a world sees some uu, uu sees it back, and by transitivity it sees itself.

The five failures in the figure are refuted by tiny frames: a single world that sees nothing is symmetric without being serial; two worlds, one seeing the other and itself, the other seeing only itself, are reflexive and transitive without being euclidean. Every non-implication among these five conditions is refuted by a frame of at most three worlds, which is why three-world frames suffice to separate the fifteen logics.

The axioms are thus like a small algebra in which some products collapse. That is the reason the classical modal systems acquired so many names for so few logics: in the decades after C. I. Lewis named S4S4 and S5S5, several different axiomatisations of each were proposed and compared, and the frames show at a glance which of them coincide.

The implications also explain the name cube. Sort the thirty-two axiom sets by how they treat DD and TT — neither, DD only, or TT — and each of the three levels is a cube of eight corners, one for each choice of BB, 44 and 55. On the bottom level, without DD or TT, the eight corners give six logics, because BB with 44, BB with 55 and all three coincide. On the middle level, with DD, they give five new logics and three corners that are already S5S5. On the top level, with TT, they give only TT, BB, S4S4 and S5S5, because TT with 55 is S5S5 whatever else is added. Six, five and four, with S5S5 shared between the upper two, make fifteen — the three cubes nested inside one another, with their corners folded together wherever an implication forces it.

Each logic also has a largest set of axioms among those that generate it — the set closed under all six implications — and naming a logic by that closed set removes the ambiguity: S5S5 is DTB45DTB45, KB5KB5 is B45B45, S4S4 is DT4DT4. The fifteen closed sets are exactly the fifteen logics, and the cube’s order is inclusion among them.

How many frames each logic allows

Each logic is a class of frames, and the classes can be measured.

How many three-world frames each logic allows. K: 2/16/512 frames on 1/2/3 worlds; D: 1/9/343 frames on 1/2/3 worlds; K4: 2/13/171 frames on 1/2/3 worlds; D4: 1/6/68 frames on 1/2/3 worlds; T: 1/4/64 frames on 1/2/3 worlds; KB: 2/8/64 frames on 1/2/3 worlds; KDB: 1/5/45 frames on 1/2/3 worlds; K5: 2/7/39 frames on 1/2/3 worlds; K45: 2/7/33 frames on 1/2/3 worlds; S4: 1/4/29 frames on 1/2/3 worlds; D5: 1/4/23 frames on 1/2/3 worlds; KD45: 1/4/17 frames on 1/2/3 worlds; KB5: 2/5/15 frames on 1/2/3 worlds; B: 1/2/8 frames on 1/2/3 worlds; S5: 1/2/5 frames on 1/2/3 worlds.
Fig. 4 How many of the 512 frames on three labelled worlds validate each of the fifteen logics, on a logarithmic scale.

KK allows all 512 frames on three worlds and S5S5 only five. On four worlds the gap widens to all 65,536 frames against fifteen, and it keeps widening: the number of relations on nn labelled worlds is 2n22^{n^2}, while the number of equivalence relations grows roughly like (n/ln⁡n)n(n/\ln n)^n, far more slowly, so the share of frames that validate S5S5 shrinks towards nothing as the number of worlds grows — and since every S5S5 frame validates every logic below it, that share is the smallest in the cube. Every axiom cuts the frames down, but not independently: TT allows the 64 reflexive frames, and adding DD changes nothing, because reflexive frames are already serial. The counts are another way to see the order of the cube — a logic higher up allows fewer frames than every logic below it — and a way to see how strong each axiom is. Seriality removes a third of the frames; transitivity removes two-thirds; euclideanness, nine-tenths.

The counts also measure something about reasoning. The fewer frames a logic allows, the more formulas it validates and the fewer distinctions it can draw. In S5 nesting boxes and diamonds adds nothing — there are only six distinct modalities — while in KK every depth of nesting is different. A logic with fewer frames is a logic in which more things collapse.

Frames that tell the logics apart

Every line in the cube is a strict inclusion, and each can be witnessed by a small frame on which the smaller logic’s axioms hold and the larger logic’s fail.

Frames that tell the logics apart. K vs D: 1 worlds, relation 0; D vs T: 2 worlds, relation 0101; T vs S4: 3 worlds, relation 100011101; S4 vs S5: 2 worlds, relation 1011; K4 vs K45: 2 worlds, relation 0010; KB vs KDB: 1 worlds, relation 0.
Fig. 5 For six pairs of neighbouring logics in the cube, the first frame, in order of size, on which every axiom of the smaller logic holds and some axiom of the larger fails. Worlds are dots, arrows the accessibility relation, a loop a world that sees itself.

A single world that sees nothing separates KK from DD: the formula □p→◊p\Box p \to \Diamond p fails there, because every box is true vacuously and every diamond false. Two worlds, one seeing the other, the other seeing itself, satisfy DD and fail TT. Three worlds, each seeing itself and one seeing the other two, fail transitivity and separate TT from S4S4. Two reflexive worlds with a one-way arrow are a preorder that is not an equivalence, and separate S4S4 from S5S5.

Each picture is also a countermodel to a formula. The frame separating S4S4 from S5S5 makes ◊p→□◊p\Diamond p \to \Box\Diamond p false at the world with the one-way arrow, when pp is true only at that world: from there pp is possible, but the other world, which cannot see back, has no pp in view — and a formula refuted by some frame of a logic is not a theorem of it. Countermodels found by search are how the cube’s strictness is usually established, and the finite model property guarantees that for these logics a search through finite frames always finds one when one exists.

The frame counts have familiar names further down the cube. The S4S4 frames are the preorders — reflexive and transitive relations — of which there are 29 on three labelled worlds and 355 on four, and every finite preorder is a set of clusters arranged in a partial order, which is exactly the structure of an order that leaves some comparisons open. The KB5KB5 frames are clusters with some worlds seeing nothing; the BB frames, reflexive and symmetric, are simple graphs with a loop at every vertex, eight of them on three labelled worlds. Each corner of the cube is a familiar combinatorial family wearing a modal name.

Clusters: the frames of S5

At the top of the cube the frames are simple enough to describe completely.

Clusters: the frames of S5. S5 frames on 4 worlds: 15; KD45 frames on 3 worlds: 17, on 4 worlds: 89.
Fig. 6 Above, the five frames on three labelled worlds that validate S5: every way to split the worlds into clusters in which every world sees every other. Below, the first five frames validating KD45, where a world may lie outside every cluster as long as it sees into one.

An S5S5 frame is an equivalence relation: the worlds split into clusters, and within each cluster every world sees every other, itself included. On three worlds there are five ways to do that, and on four there are fifteen, the Bell numbers that count the ways of splitting a set into groups; the computation confirms that the S5S5 frames on four worlds are exactly those fifteen. In S5S5 a world’s view is its own cluster, so □p\Box p says “pp holds throughout this cluster”, and that is why boxes nested inside boxes add nothing: every world in the cluster sees the same cluster.

KD45KD45, now the standard logic of belief in the tradition Jaakko Hintikka began in 1962, has frames that are clusters plus outsiders: a world may lie outside every cluster provided it sees into exactly one. Belief differs from knowledge in exactly that respect — a believer’s own world need not be among the worlds compatible with what is believed, since beliefs can be false — and the frames say so in a picture: the outsider’s arrows point into a cluster that does not contain it. On three worlds there are seventeen such frames, against five for S5S5.

What finite frames cannot settle

The computation finds fifteen classes among frames with up to four worlds, and that number is a lower bound for logics. It becomes the exact answer only together with the six implications, which hold on frames of every size by the arguments given; the computation tests them on small frames, which is a check, not a proof. Without those arguments, the possibility would remain that two axiom sets agreeing on small frames differ on some large one.

There is also the question of which logics are complete for their frames at all. For these five axioms completeness is a theorem — all are Sahlqvist formulas, whose canonical frames satisfy their conditions, as Henrik Sahlqvist showed in 1975 — but there are axioms with no property of the arrows at all, and for logics built from those, comparing frame classes says nothing about whether two axiom sets prove the same formulas. The cube is clean because its five axioms are among the best-behaved there are.

The figures also compare logics by frames, not by models, and the difference matters. A single model — a frame with a choice of which letters are true where — can satisfy an axiom’s instances without its frame having the axiom’s property, because the particular valuation may happen to avoid every counterexample. Two models that the modal language cannot tell apart can sit on frames with quite different properties. Validity on a frame means truth under every valuation, and it is only at that level that the axioms correspond exactly to the five conditions; the computation checks the conditions directly for that reason, rather than testing formulas under particular valuations.

And the cube is a small corner of a vast space. There are uncountably many normal modal logics; even the logics containing S4S4 form a lattice of uncountable size, studied in detail since the 1970s. The fifteen here are the ones generated by five particular axioms, and their simplicity is a property of that choice.

Still open: how hard each logic is to use

The fifteen logics differ in how hard their reasoning problems are, and for some the picture is complete: deciding whether a formula is satisfiable is complete for polynomial space in KK, TT and S4S4, as Richard Ladner showed in 1977, and only NP-complete in S5S5 and KD45KD45, because a model can always be found with one cluster and a few outsiders. For many logics beyond the cube, the exact complexity of satisfiability is open, and even for natural extensions of these fifteen — adding a second modality, or a fixed-point operator, or axioms relating knowledge and time — the boundary between the tractable and the intractable is still being mapped. The cube is the part of the map that is finished.

Fifteen from thirty-two

Adding any combination of the axioms D, T, B, 4 and 5 to the basic modal logic gives only fifteen different logics, because the axioms are properties of the arrows between worlds and some properties force others. Every frame with up to four worlds — 66,066 of them — sorts the thirty-two combinations into those fifteen; six short implications explain every coincidence, from reflexive implying serial to serial, symmetric and transitive implying reflexive; tiny frames separate every neighbouring pair; and at the top, S5S5’s frames are the ways of splitting worlds into clusters, five on three worlds and fifteen on four.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

AxiomCompletenessCorrespondence theoryEquivalence relationExhaustive searchKripke frameModal logicPartial order