Logic

The sentence between a premise and its consequence

When one formula implies another, something sits between them written only in the words the two have in common: a sentence the first implies and that implies the second. A refutation of the first together with the denial of the second hands such a sentence over, and every possible one lies between a strongest and a weakest that can be computed outright.

Worth reading first: A lemma, and the proof that never mentions one · Every derivation is a term.

A proof with no lemma in it never leaves its goal’s own subformulas. That was introduced as the property that makes such proofs searchable — nothing about the goal says which lemma to try, so a proof that tries none is a proof that can be looked for.

The same property has a second consequence, and it is about vocabulary rather than search.

A implies B, and r ∨ s sits between them. A = ((p ∨ q) ∧ (p → r)) ∧ (q → s) implies B = (r ∨ s) ∨ t. A resolution refutation of A with the negation of B yields the interpolant r ∨ s. It uses only the shared atoms r, s, follows from A and implies B, and lies between the strongest and weakest interpolants.
Fig. 1 A=((pq)(pr))(qs)A = ((p \lor q) \land (p \to r)) \land (q \to s) implies B=(rs)tB = (r \lor s) \lor t. The two formulas share the atoms rr and ss; only AA mentions pp and qq, and only BB mentions tt. A resolution refutation of AA together with the denial of BB, nine steps long, hands over the sentence rsr \lor s, which is checked on all 32 assignments to follow from AA and to imply BB.

Whenever AA implies BB, there is a sentence II that uses only the atoms AA and BB have in common, such that AA implies II and II implies BB. That is William Craig’s interpolation theorem, from 1957, and II is called an interpolant. In the figure the interpolant is rsr \lor s: what AA says about pp and qq is irrelevant to BB, which has never heard of them, and what AA says that BB can use is exactly that rr or ss holds.

Only the shared words can matter

The theorem sounds like a technicality and is closer to a statement about communication.

AA is a claim about the atoms pp, qq, rr and ss. BB is a claim about rr, ss and tt. For AA to force BB, the only channel through which it can do so is what it says about rr and ss, because nothing AA says about pp and qq can constrain tt, and nothing it says constrains tt directly. The interpolant is the content of that channel: everything AA has to say about the shared atoms that is needed for BB, and nothing about the atoms only one side uses.

That is why a formula mentioning pp could never serve. Whatever it says about pp, BB cannot use; and if the formula’s truth depended on pp, there would be values of pp making it false while AA still held, or true while BB still failed. The theorem is the claim that the channel is always wide enough — that whenever AA implies BB at all, it does so through a statement in their shared vocabulary.

Reading it off a refutation

The figure does not search for an interpolant. It extracts one from a proof, and the proof is a resolution refutation.

Resolution works on clauses — disjunctions of atoms and their negations — and has a single rule: from a clause containing an atom and another containing its negation, derive the clause with both removed. The same rule, checked against a truth table, refutes a set of clauses exactly when no assignment satisfies them all, and AA implies BB exactly when AA together with the denial of BB is unsatisfiable. So the figure turns AA into clauses over AA’s own atoms, turns ¬B\lnot B into clauses over BB’s own atoms, and resolves until the empty clause appears.

A resolution refutation of four clauses on three variables. A derivation tree: the given clauses at the top, each later clause obtained by cancelling one variable between two clauses above it, ending in the empty clause.
Fig. 2 The rule the extraction runs on, drawn on a small case: four clauses on three variables, pqp \lor q, p¬qp \lor \lnot q, ¬pr\lnot p \lor r and ¬p¬r\lnot p \lor \lnot r, which no assignment satisfies. Resolving the first two on qq gives pp, the last two on rr give ¬p\lnot p, and those two give the empty clause — each step checked to be a legal resolvent of the clauses above it.

Every clause in the refutation then gets a label, by four rules due to Kenneth McMillan. A clause that came from AA is labelled with the part of it that uses shared atoms — its literals on pp and qq dropped. A clause that came from ¬B\lnot B is labelled “true.” When two clauses are resolved on an atom that only AA mentions, the new clause’s label is the disjunction of the two labels; when they are resolved on any other atom, it is the conjunction. The label of the empty clause is the interpolant.

The rules, run by hand

The rules are easier to believe on an example small enough to follow completely.

Take A=p(¬pr)A = p \land (\lnot p \lor r) and B=rsB = r \lor s. As clauses, AA is pp and ¬pr\lnot p \lor r, and the denial of BB is ¬r\lnot r and ¬s\lnot s. The shared atom is rr; only AA mentions pp, and only BB mentions ss.

The four starting labels come straight from the rules. The clause pp is from AA and has no shared literal, so its label is “false”. The clause ¬pr\lnot p \lor r is from AA and its shared part is rr, so its label is rr. The two clauses from ¬B\lnot B are labelled “true”.

Resolving pp with ¬pr\lnot p \lor r on pp gives the clause rr. The atom pp belongs to AA alone, so the new label is the disjunction of the two, “false or rr”, which is rr. Resolving rr with ¬r\lnot r on rr gives the empty clause. The atom rr is shared, so the label is the conjunction, “rr and true”, which is rr. The interpolant is rr: AA says pp and that pp forces rr, so AA implies rr, and rr implies rsr \lor s.

Two things are visible that the general statement hides. The clause ¬s\lnot s was never used, and the atom ss never entered a label — the clauses from ¬B\lnot B contribute only “true”, which is how an interpolant stays clear of the atoms only BB mentions. And the disjunction at the first step has a reason. The two labels are what AA guarantees in the two cases for pp, an atom BB cannot see; since the outcome for pp is invisible from BB’s side, what passes across is only that one of the two labels holds. When the atom resolved is one both sides see, both labels are needed at once, and they are joined by a conjunction.

The rules keep one property of every clause’s label, and at the empty clause that property becomes exactly the two implications the figure checks: AA implies the label, and the label together with ¬B\lnot B is contradictory — which is to say the label implies BB. The labels are built from shared literals, “true” and the two connectives, so the result can mention nothing else. The figure checks all three facts on every assignment rather than trusting the construction.

A strongest and a weakest

There is usually more than one interpolant, and all of them sit in a definite range.

The strongest interpolant is AA with its private atoms removed by allowing them any value: the set of assignments to the shared atoms that can be extended to make AA true. Anything AA implies about the shared atoms is implied by this. The weakest is BB with its private atoms required to work for every value: the set of assignments to the shared atoms that make BB true whatever tt is. Every interpolant implies the weakest and is implied by the strongest, and every sentence in the shared atoms that lies between them is an interpolant.

A implies B, and r ∧ s sits between them. A = p ∧ (p → (r ∧ s)) implies B = r ∨ (s ∧ t). A resolution refutation of A with the negation of B yields the interpolant ((r ∨ s) ∧ (r ∨ ¬s)) ∧ (¬r ∨ s), equivalent to r ∧ s. It uses only the shared atoms r, s, follows from A and implies B, and lies between the strongest and weakest interpolants.
Fig. 3 A=p(p(rs))A = p \land (p \to (r \land s)) implies B=r(st)B = r \lor (s \land t), sharing rr and ss. The strongest interpolant is rsr \land s and the weakest is rr, and the grid shows where each is true across the four assignments to the shared atoms. The refutation, seven steps long, hands over ((rs)(r¬s))(¬rs)((r \lor s) \land (r \lor \lnot s)) \land (\lnot r \lor s), which is rsr \land s — the strongest — checked equivalent on every shared assignment.

The grid is the range drawn. The strongest interpolant is true at one of the four shared assignments, the weakest at two, and the one read off the refutation happens to coincide with the strongest. A different refutation of the same two formulas could have handed over rr, or anything else true at the assignment rsr s and false wherever rr is false.

The refutation’s answer is correct and not canonical. It depends on which resolutions were performed and in which order, and the formula it produces is written the way the refutation built it — here as a conjunction of three clauses that says no more than rsr \land s. The figure finds the short equivalent and checks the equivalence, because a correct interpolant that nobody can read has not told anybody what the channel between AA and BB carried.

A implies B, and r sits between them. A = (p ∧ (p → q)) ∧ (q → r) implies B = r ∨ s. A resolution refutation of A with the negation of B yields the interpolant r. It uses only the shared atoms r, follows from A and implies B, and lies between the strongest and weakest interpolants.
Fig. 4 A chain: pp, pqp \to q and qrq \to r imply rsr \lor s, and the only atom the two sides share is rr. The interpolant read off the refutation is rr itself, and with a single shared atom the strongest and weakest interpolants are both rr as well — the range has shrunk to one sentence.

The same range, seen on a cube

The strongest and weakest interpolants have a picture that makes their definitions look inevitable.

An assignment to nn atoms is a corner of an nn-dimensional cube, and a formula is the set of corners where it is true. AA lives on the cube of its own atoms and BB on the cube of its own, and the shared atoms span a face that both cubes project onto.

The strongest interpolant is the shadow of AA on that face: a shared corner is in it exactly when some corner of AA’s cube above it makes AA true. Casting the shadow is what “allowing the private atoms any value” means. The weakest interpolant is the set of shared corners whose whole column in BB’s cube lies inside BB: a shared corner is in it exactly when every value of tt above it makes BB true.

That AA implies BB says the shadow sits inside the set of full columns, and every interpolant is a set of shared corners lying between them. The grids in the figures are those three sets drawn on the face, one row each. Enumerating corners is how the figures compute the two extremes — sixteen assignments or thirty-two, against which each extracted interpolant is compared — and it is also why the extremes are propositional luxuries: a cube with infinitely many corners casts no shadow that can be computed by looking at them.

Why a lemma would spoil it

The extraction reads the interpolant off a refutation in which every clause was built from clauses of AA and ¬B\lnot B, and every atom in every clause was already in one of them. That confinement is what lets the labels stay inside the shared vocabulary, and it is the subformula property in the setting of resolution.

A proof with a lemma has no such confinement.

A lemma, and the proof that never mentions one. Two derivations of ((p → q) ∧ (q → r)) → (p → r) compared: the cut-free one uses 8 nodes and only subformulas of the goal, and the one through a lemma uses 21 and mentions a formula the goal does not contain.
Fig. 5 Two proofs of ((pq)(qr))(pr)((p \to q) \land (q \to r)) \to (p \to r). The one with no lemma uses eight nodes and only subformulas of the goal. The one that goes through the lemma s¬ss \lor \lnot s uses twenty-one nodes and mentions an atom, ss, that the goal does not contain at all.

The lemma s¬ss \lor \lnot s is true and useless, and it brings in an atom neither side of the implication mentions. An interpolant built by walking such a proof would have no reason to avoid ss. Craig’s theorem is a consequence of the fact that lemmas can be removed: take any proof, remove its lemmas, and in the proof that remains every formula is made of the words the conclusion already used — which is where the interpolant’s words come from. The extraction on this page is that argument carried out on resolution, where there were never any lemmas to remove.

The same extraction works on the other proof systems in this collection, because each has a form without detours. A semantic tableau that closes can be labelled branch by branch in the same spirit, and a natural-deduction derivation with its detours removed has the subformula property that the labelling needs. What differs is only the bookkeeping; what is shared is that a proof records what it used, and a proof with no lemma used nothing outside the problem.

What interpolation is used for

Craig proved the theorem in order to prove another one, and it is a theorem about what a vocabulary can say — the question a game between two players settles for a different purpose. Evert Beth had shown in 1953 that in first-order logic, if a theory pins a concept down uniquely — any two interpretations agreeing on everything else must agree on it — then the theory already contains an explicit definition of the concept. Craig’s interpolation theorem gives a short proof: uniqueness says that one copy of the concept implies another, and the interpolant between them, being in the shared vocabulary, is a definition that mentions neither copy.

Roger Lyndon sharpened the theorem in 1959: the interpolant can be chosen so that every atom appears in it only with a sign it has in both AA and BB, positively where both use it positively and negatively where both use it negatively. The figure’s first example obeys that — rr and ss occur only positively in both formulas, and the interpolant rsr \lor s has them only positively.

The theorem has also become practical. Systems that check whether a design can reach a bad state use interpolants as summaries: a refutation showing that no bad state is reached within some number of steps yields an interpolant describing, in the vocabulary of the current step alone, a set of states that includes every reachable one and excludes every bad one. The interpolant is an abstraction that the proof chose, rather than one a person had to guess.

Where the theorem needs its hypotheses

AA must actually imply BB. There is nothing to interpolate otherwise, and the figures check the implication on every assignment before building anything.

The shared vocabulary may be empty. Then the interpolant has no atoms and must be a constant. If it is “false”, AA was unsatisfiable on its own; if it is “true”, BB was valid on its own. The theorem is still true and says something sharp: a premise and a consequence with nothing in common can only be related by one of them being trivial.

The formulas here are propositional and small. The figures turn each formula into clauses by listing the assignments that falsify it, which is exact and grows with the number of atoms, and they keep to at most six atoms between the two formulas for that reason.

And the figures check the interpolant, not the extraction’s invariant. The two implications and the vocabulary are tested on every assignment. The property the labelling rules maintain at intermediate clauses is what makes the construction correct in general, and it is quoted rather than drawn.

One interpolant a pair, and labels computed but not drawn

The figures show three pairs of formulas and one interpolant each, read off one refutation. The theorem is about every pair and every proof, and the range between the strongest and weakest interpolants usually contains many sentences a single refutation never produces.

They also cannot show the refutation and its labels together. The resolution figure draws a refutation’s shape on a smaller set of clauses; the interpolation figures report the refutation’s length and its final label. The labels on the intermediate clauses — the actual content of McMillan’s rules — exist in the computation and are not drawn.

Still open: what the shared vocabulary is when there are quantifiers

In propositional logic the shared vocabulary is a set of atoms and the strongest interpolant can be computed by trying every value of the private ones. With quantifiers neither is so simple, and the question of what an interpolant must be allowed to say becomes the real content of the theorem.

Craig proved his theorem for first-order logic, where the shared vocabulary is the relation symbols both formulas use, and the interpolant may contain quantifiers over the domain even when neither formula quantifies over anything in particular. Constants and function symbols need care, since a formula can mention an individual that the other formula names in a different way, and equality has to be counted as shared. The search for a refutation to read one off can also fail to finish, since first-order validity has no decision procedure. And there is no longer a strongest interpolant to compute by enumeration: projecting a private relation symbol away cannot be done by trying its values, and in general the result is not expressible in first-order logic at all. The theorem survives the move to quantifiers; the strongest and weakest interpolants of this page do not, and what replaces them is a question about which logics are expressive enough to state their own projections.

A proof that says what was used

The habit is about reading a proof for more than its conclusion.

A refutation of AA together with ¬B\lnot B was produced to establish one bit: that AA implies BB. It turns out to contain much more — a sentence stating precisely what part of AA was needed, in words BB understands. A proof is a record of what was used, and a proof with no lemma in it is a record that cannot have used anything outside the problem’s own vocabulary.

That is worth asking of any argument, formal or not. When a conclusion follows from a premise, what is the smallest statement about the things they share that carries the inference? Often it is shorter than either, and it is the part of the argument that would survive a change to everything else.