A temporal logic prover from Volpe’s work

Table of Contents

nkt is a temporal logic prover built on the labeled natural deduction systems of Marco Volpe’s thesis [1]. For a sequent it first searches for a countermodel with an unsigned tree in the style of Jeffrey and Copeland; if there is none, it searches for a derivation in Volpe’s system, and every countermodel and every derivation is checked by an independent checker. The derivations are given as trees (bussproofs) and in Fitch style. This page condenses the part of Volpe’s work that the prover implements and explains how it is realized. The prover runs in the browser, in SWI-Tinker, beside the first-order prover G4+.

Try it now: the query builder (write a sequent with the symbol buttons, choose the system, tick the conditions on time, and run it), or SWI-Tinker directly, where nkt_help. lists the commands.

1. Introduction

Prior’s tense logic [2], with which modern temporal logic began (as Volpe recalls), adds to classical propositional logic four operators: \(\mathbf{P}A\) (it has been the case that \(A\)), \(\mathbf{F}A\) (it will be the case that \(A\)), and their duals \(\mathbf{H}A\) (it has always been the case that \(A\)) and \(\mathbf{G}A\) (it will always be the case that \(A\)). Its semantics is that of a modal logic with two converse modalities: a formula is true or false at an instant of a flow of time \((W, \prec)\).

Marco Volpe’s thesis, Labeled Natural Deduction for Temporal Logics, gives natural deduction systems for a whole family of temporal logics, from the minimal tense logic \(K_t\) to linear time, LTL and branching time. The systems are labeled: they reason about formulas true at named instants, \(b : A\), and about the order between instants, \(b < c\). This is the method of Simpson [3] and Viganò [4] for modal logic, carried over to time; part of the thesis was published with Viganò [5].

Labeled natural deduction has two virtues that matter for a prover. The rules for the tense operators are pure introduction and elimination rules, as for the quantifiers: \(\mathbf{G}A\) at \(b\) behaves like “for every \(c\) such that \(b < c\), \(A\) at \(c\)”. And the properties of time (transitivity, linearity, density …) are not axioms but rules about the relation \(<\) only, which can be added or removed one by one. A prover can therefore offer a family of systems, and a derivation found for one of them shows exactly which properties of time it uses.

The prover was first written to check the formal derivations of a work in progress on the philosophy of time; it has since grown to cover more of the thesis.

2. Temporal logic in a nutshell

2.1. Language and semantics

The formulas are built from atoms, \(\bot\), \(\land\), \(\to\) and the four tense operators; \(\neg A\) is \(A \to \bot\). A frame is a set \(W\) of instants with a relation \(\prec\) (“earlier than”); a model adds a valuation of the atoms. At an instant \(w\):

  • \(\mathbf{F}A\) is true iff \(A\) is true at some \(v\) with \(w \prec v\);
  • \(\mathbf{P}A\) is true iff \(A\) is true at some \(v\) with \(v \prec w\);
  • \(\mathbf{G}A\) is true iff \(A\) is true at every \(v\) with \(w \prec v\);
  • \(\mathbf{H}A\) is true iff \(A\) is true at every \(v\) with \(v \prec w\).

2.2. Systems

The minimal tense logic \(K_t\) (Lemmon) is the set of formulas valid in every frame: it puts no condition on \(\prec\). Stronger logics are obtained by restricting the class of frames, or equivalently by adding axioms. Volpe’s table 2.4 lists the usual ones; those implemented in the prover are:

condition on \(\prec\) axiom option
transitive \(\mathbf{G}A \to \mathbf{GG}A\) trans
connected (linear) \(\mathbf{H}A \land A \land \mathbf{G}A \to \mathbf{GH}A\) kl
no last instant \(\mathbf{F}\top\) ser_r
no first instant \(\mathbf{P}\top\) ser_l
dense \(\mathbf{F}A \to \mathbf{FF}A\) dens

Each condition has a mirror image for the past (\(\mathbf{H}A \to \mathbf{HH}A\), \(\mathbf{P}A \to \mathbf{PP}A\) …). The prover knows four systems by name:

name conditions system
kt none \(K_t\) (Lemmon, Copeland, Volpe)
k4t transitive \(K4_t\)
kl transitive, connected \(K_l\), Volpe’s linear tense logic
linq linear, no first or last instant, dense Lin.Q, the logic of the rationals

The conditions ser_r, ser_l, ser (both) and dens can be added to any system. They are independent of each other and compatible: the rationals satisfy all of them, and each combination has a model of its own (the integers are linear and unbounded but not dense, an interval of the rationals is dense but bounded, and so on). A word of warning on names: in Venema’s chapter [6], \(K_t\) already includes transitivity; here, as in Lemmon, Copeland and Volpe, it does not.

3. Volpe’s labeled natural deduction

3.1. Labels and relational formulas

Volpe’s systems derive two kinds of formulas: labeled formulas \(b : A\) (“\(A\) is true at the instant \(b\)”) and relational formulas \(b < c\) (“\(b\) is earlier than \(c\)”). Premisses may be of both kinds; the conclusion is a labeled formula. An interpretation maps labels to instants, and \(\Gamma \models b : A\) means that every interpretation making \(\Gamma\) true makes \(b : A\) true.

3.2. The rules of \(N(K_t)\)

The system \(N(K_t)\) (Volpe’s fig. 4.1) has the rules for \(\to\) and classical \(\bot\), and introduction and elimination rules for \(\mathbf{G}\) and \(\mathbf{H}\). The rules for \(\mathbf{F}\), \(\mathbf{P}\) and \(\land\) are derived (fig. 4.2); the prover uses them as primitive rules.

rule from infer proviso
\(\to\)I a derivation of \(b : B\) from \([b : A]\) \(b : A \to B\)  
\(\to\)E \(b : A \to B\) and \(b : A\) \(b : B\)  
\(\bot\)E a derivation of \(c : \bot\) from \([b : \neg A]\) \(b : A\) classical
\(\mathbf{G}\)I a derivation of \(c : A\) from \([b < c]\) \(b : \mathbf{G}A\) \(c\) fresh
\(\mathbf{G}\)E \(b : \mathbf{G}A\) and \(b < c\) \(c : A\)  
\(\mathbf{H}\)I a derivation of \(c : A\) from \([c < b]\) \(b : \mathbf{H}A\) \(c\) fresh
\(\mathbf{H}\)E \(b : \mathbf{H}A\) and \(c < b\) \(c : A\)  
\(\mathbf{F}\)I \(c : A\) and \(b < c\) \(b : \mathbf{F}A\)  
\(\mathbf{F}\)E \(b : \mathbf{F}A\), and \(d : B\) from \([c : A]\), \([b < c]\) \(d : B\) \(c\) fresh
\(\mathbf{P}\)I \(c : A\) and \(c < b\) \(b : \mathbf{P}A\)  
\(\mathbf{P}\)E \(b : \mathbf{P}A\), and \(d : B\) from \([c : A]\), \([c < b]\) \(d : B\) \(c\) fresh
\(\land\)I, \(\land\)E as usual, at one label    

The label may change in \(\bot\)E: a contradiction at any instant yields anything at any instant. “Fresh” means that the label does not occur in the conclusion nor in any open assumption other than the discharged ones; \(\mathbf{G}\)I and \(\mathbf{F}\)E are the exact counterparts of \(\forall\)I and \(\exists\)E. Volpe proves \(N(K_t)\) sound and complete for \(K_t\) (theorems 4.4 and 4.5).

3.3. Properties of time as rules

The properties of \(\prec\) are captured by rules that discharge relational assumptions (fig. 4.3 and section 4.2.3). Each has the form: from some relational premisses, and from a derivation of a labeled formula \(d : B\) in each branch under some relational assumptions, infer \(d : B\).

rule premisses branches (discharged) proviso condition
trans< \(b_1 < b_2\), \(b_2 < b_3\) \([b_1 < b_3]\)   transitive
conn< \(b_1 : B\) \([b_2 : B]\); \([b_1 < b_2]\); \([b_2 < b_1]\)   connected
ser\(_R\)   \([b_1 < b_2]\) \(b_2\) fresh no last instant
ser\(_L\)   \([b_1 < b_2]\) \(b_1\) fresh no first instant
dens< \(b_1 < b_2\) \([b_1 < b'], [b' < b_2]\) \(b'\) fresh dense

\(N(K_l) = N(K_t) + \) trans< \(+\) conn< is sound and complete for linear time; the extensions with ser and dens are sound and complete for the corresponding logics (theorem 4.8). Irreflexivity has no rule: it does not change the set of valid formulas (section 4.2.2). Completeness is stated for labeled premisses: from relational premisses alone no contradiction can be derived (from \(b < c\) and \(c < b\), for instance, \(N(K_l)\) does not derive \(b : \bot\)); Volpe’s systems \(N'(K_l)\) with an explicit relational theory (section 4.3) remove this limit.

Here is Volpe’s derivation of the density axiom, as the prover finds it (the eigenlabels of \(\mathbf{F}\)E and dens< are flagged [s], [t]):

 1  │ │ b : FQ                              AS
    │ ├────────
 2  │ │ │ [s] s : Q                         AS
 3  │ │ │ b < s                             AS
    │ │ ├────────
 4  │ │ │ │ [t] b < t                       AS
 5  │ │ │ │ t < s                           AS
    │ │ │ ├────────
 6  │ │ │ │ t : FQ                          FI 2,5
 7  │ │ │ │ b : FFQ                         FI 6,4
 8  │ │ │ b : FFQ                           dens< 3,4-7
 9  │ │ b : FFQ                             FE 1,2-8
10  │ b : FQ → FFQ                          →I 1-9

Run it in SWI-Tinker

3.4. What the prover does not implement (yet)

The thesis goes much further: discrete time (an immediate-successor relation \(\lhd\), section 4.2.3), until-free LTL (4.2.4), the systems \(N'(K_l)\) with an explicit relational theory and their normalization (4.3), a treatment of until (4.4), branching time (bundled Ockhamist logics and BCTL*, chapter 5) and the mosaic method (chapter 6). Discrete time is the next candidate, because it matters for Diodorean modality: \(\Box A := A \land \mathbf{G}A\) gives S4.3 on dense time and S4.3.1 on discrete time.

4. How the prover realizes it

4.1. Countermodels first

For a sequent the prover first looks for a countermodel. It builds a labeled tree in the style of Jeffrey [7] and Copeland [8]: unsigned, with formulas and their negations at labelled instants, and the relations between instants written as lines of their own. Copeland’s tree system for \(K_t\) is extended with the rules for \(\land\), \(\mathbf{G}\) and \(\mathbf{H}\), with the rules of the chosen conditions on \(\prec\), and with Volpe’s labels. Here is the tree of a sequent that is not valid in linear time: from “\(Q\) will be the case” and “\(R\) will be the case” it does not follow that \(Q\) and \(R\) will be the case together. In \(K_l\) any two instants are comparable, hence the three branches of the rule conn (\(s < t\), \(t < s\), \(t = s\)):

1   b : FQ                                    premiss
2   b : FR                                    premiss
3   b : ¬F(Q ∧ R)                             denied conclusion
4   b < s                                     F 1 (new point s)
5   s : Q                                     F 1, 4
6   s : ¬(Q ∧ R)                              ¬F 3, 4
├─ 7   s : ¬Q                                 ¬∧ 6
│  ×  closed: 5, 7
└─ 8   s : ¬R                                 ¬∧ 6
   9   b < t                                  F 2 (new point t)
   10  t : R                                  F 2, 9
   11  t : ¬(Q ∧ R)                           ¬F 3, 9
   ├─ 12  s < t                               conn
   │  ├─ 13  t : ¬Q                           ¬∧ 11
   │  │  ○  open branch: countermodel
   │  └─ 14  t : ¬R                           ¬∧ 11
   │     ×  closed: 10, 14
   ├─ 15  t < s                               conn
   │  ├─ 16  t : ¬Q                           ¬∧ 11
   │  │  ○  open branch: countermodel
   │  └─ 17  t : ¬R                           ¬∧ 11
   │     ×  closed: 10, 17
   └─ 18  t = s                               conn
      ×  closed: 10, 8

Run it in SWI-Tinker

An open branch gives a countermodel: here \(b < s < t\), with \(Q\) true at \(s\) only and \(R\) at \(t\) only. Every countermodel is checked by a model checker, which evaluates the premisses and the conclusion and verifies the conditions of the frame. A countermodel shows, by soundness, that no derivation exists.

The tree rules mirror the rules of natural deduction: (\(\mathbf{F}\)) and (\(\mathbf{P}\)) introduce a new instant, as \(\mathbf{F}\)E and \(\mathbf{P}\)E introduce an eigenlabel; (\(\neg\mathbf{F}\)) and (\(\neg\mathbf{P}\)) run along an existing relation, as \(\mathbf{G}\)E and \(\mathbf{H}\)E; the denied conclusion, \(b : \neg A\) for a conclusion \(b : A\), is the assumption of classical \(\bot\)E; a closed branch is an application of \(\to\)E yielding \(\bot\). A closed tree is the outline of a derivation; an open branch is the countermodel.

4.2. Finite countermodels with clusters

A finite strict linear order has a first and a last instant and is not dense, so it can refute nothing in unbounded or dense time; and some formulas are refuted in \(K_l\) only by infinite orders, such as \(\neg(\mathbf{F}\top \land \mathbf{GF}\top)\), false at the start of the natural numbers. For linear time the prover therefore looks first for a strict finite countermodel and then, if there is none, for a finite linear order in which some instants are reflexive (\(w \prec w\)). Such an instant stands for a cluster: bulldozing (Segerberg [9], Burgess [10]) replaces every cluster by copies of the integers (of the rationals for dense time) and yields a strict linear order, with the same conditions, in which the same labeled formulas are true. This is also why Volpe needs no rule for irreflexivity. For instance, \(\mathbf{F}Q \to \mathbf{FF}Q\) is refuted in unbounded linear time by four points, with a cluster at each end (the integers after bulldozing):

W = {s, t, u, x}
< = {s < t, t < t, u < s, u < t, u < u, u < x, x < s, x < t}
V(Q) = {s}

Run it in SWI-Tinker

4.3. Proof search

If no countermodel is found, the prover searches for a derivation in Volpe’s system, by iterative deepening. The introduction rules are applied backwards from the goal, the elimination rules forwards from the hypotheses (\(\mathbf{G}\)E and \(\mathbf{H}\)E along every available relation, \(\mathbf{F}\)E and \(\mathbf{P}\)E eagerly), and classical \(\bot\)E is the last resort. conn< is used to identify two instants that are not comparable, by transporting hypotheses from one to the other. trans<, ser and dens< are tried only when the goal or the hypotheses call for them, and the search is bounded in depth and in number of inferences. Every derivation found is checked by an independent checker: each rule application, each discharge, the freshness of every eigenlabel.

The derivations that Volpe gives in chapter 4 are part of the tests of the prover: the axioms KG and GP (proof of theorem 4.5), TRANSR and CONNR (theorem 4.7), SERR and DENSR (section 4.2.3), and their mirror images. The prover finds each of them with the same rules, in the same order, as in the thesis; each axiom is also refuted, by a checked countermodel, in the system without the rule it needs.

4.4. Output

The countermodel tree is printed in ASCII and as LaTeX source for qtree; the derivation is printed as a tree (bussproofs) and in Fitch style (Klüwer’s fitch.sty, the package used by G4+), with the tense operators in bold. In SWI-Tinker, Ctrl-M renders the derivations; the trees are given as source, since MathJax has no qtree. Where a trans< step can be moved down the derivation, it is placed just above the rule that discharges its premisses.

5. Using the prover

The prover is loaded in SWI-Tinker, at g4-mic.vidal-rosset.net/wasm/tinker, beside G4+. A query is a sequent in a string, followed by the system and the options:

?- nkt("|- b : FQ => FFQ", [kl, dens]).
?- nkt("b : FQ, b : FR |- b : F(Q & R)", kl).
?- nkt_help.
ASCII Unicode meaning
~ ¬ negation, \(A \to \bot\)
& ∧ conjunction
| ∨ disjunction (\(\neg A \to B\))
=> → conditional
# ⊥ falsum
|- ⊢ turnstile
b < c   \(b\) is earlier than \(c\)
P F H G   tense operators

Labels and atoms are words; an atom cannot begin with an uppercase P, F, H or G, which are read as tense operators (PFQ is \(\mathbf{PF}Q\)). Premisses are separated by commas and may be labeled or relational. The options are the system (kt, k4t, kl, linq), the conditions (trans, ser, ser_r, ser_l, dens), lemma(S) to prove a labeled formula first and use it, and a few bounds; an unknown option is reported with the list of the known ones.

The easiest way in is the query builder: write the sequent with the symbol buttons, choose the system, tick the conditions on time, and run it in SWI-Tinker; in SWI-Tinker itself, nkt_page. opens the same page.

A few queries to try:

  • nkt("|- b : Q => GPQ", kt). Proved: the axiom \(A \to \mathbf{GP}A\) of \(K_t\). Run it
  • nkt("|- b : F(A | ~A)", [kl, ser_r]). Proved with ser\(_R\); refuted without it. Run it
  • nkt("|- b : FQ => FFQ", linq). Proved in Lin.Q, by density. Run it
  • nkt("|- x : FQ => FFQ", [kl, ser]). Countermodel with clusters: unbounded time is not dense. Run it
  • nkt("|- x : ~(F~# & GF~#)", kl). Countermodel with a cluster: the start of the natural numbers. Run it

6. Conclusion

The prover covers Volpe’s systems \(N(K_t)\) and \(N(K_l)\) and their extensions for unbounded and dense time, with countermodels for what they do not derive. Since the rules for the properties of time and the conditions on frames are tables in the program, the same architecture will serve for modal logic: a module for labeled natural deduction in the style of Simpson and Viganò (\(K\), \(T\), \(B\), \(S4\), \(S5\) and the other systems of the modal cube), and then a labeled sequent calculus in the style of Negri [11], whose geometric rules are the same tables. The source will be made public on GitHub; the tree display owes much to Wolfgang Schwarz’s Tree Proof Generator.

7. References

1.
Volpe, M. Labeled Natural Deduction for Temporal Logics. Department of Computer Science, University of Verona, Verona, Italy, 2010.
2.
Prior, A. N. Past, Present, and Future. Oxford University Press, 1967.
3.
Simpson, A. K. The Proof Theory and Semantics of Intuitionistic Modal Logic. University of Edinburgh, 1994.
4.
Viganò, L. Labelled Non-Classical Logics. Dordrecht: Kluwer Academic Publishers, 2000.
5.
Viganò, L., Volpe, M. Labeled Natural Deduction Systems for a Family of Tense Logics (Extended Version). arXiv:0803.3187, 2008.
6.
Venema, Y. Temporal Logic. In: The Blackwell Guide to Philosophical Logic (Goble, L., ed.). 2001, Oxford: Blackwell, 203–223.
7.
Jeffrey, R. C. Formal Logic: Its Scope and Limits. New York: McGraw-Hill, 1967.
8.
Copeland, B. J. Tense trees: a tree system for $ K_ t$. Notre Dame Journal of Formal Logic, 1983, 24(3), 318–322, doi: 10.1305/ndjfl/1093870374.
9.
Segerberg, K. Modal Logics with Linear Alternative Relations. Theoria, 1970, 36, 301–322.
10.
Burgess, J. P. Basic Tense Logic. In: Handbook of Philosophical Logic, Volume II: Extensions of Classical Logic (Gabbay, D., Guenthner, F., eds.). 1984, Dordrecht: Reidel, 89–133.
11.
Negri, S. Proof Analysis in Modal Logic. Journal of Philosophical Logic, 2005, 34, 507–544.

Published: 2026-10-16