6.3  Finding First-Order Derivations

Chapter 5 added one step to the search method in each rule section, and Section 6.2 added laws. This section puts the steps into one method, puts in order the moves that do most of the work with quantifiers and names a third, admits the propositional step TAUT into derivations with quantifiers, and runs the four kinds of task of Section 3.2 again. The new difficulty is names: which term to instantiate at, when to open a box for a witness, and which names a line may mention when a box closes.

Remark (Looking back). Section 3.1 assembled the search method for the connectives, and Section 3.2 sorted the tasks it serves. Here both return with flags and witnesses. Backward from the goal and forward from the premises is unchanged; what is new is that a box may carry a name, and a closing line must not mention it.

6.3.1. The search method, extended

Section 3.1 put the moves for the connectives in order. Each of Sections 5.3–5.7 added a step. Here is the method with all of them.

Algorithm. Searching for a derivation of Γ⊢φ in predicate logic.

  1. Set up. Write the premises Γ at the top and φ at the bottom, with one gap between. Translate any definition in words into a formula first, as in Example (Five definitions, translated).
  2. Goal-directed step. Take the current goal’s main symbol and set up its introduction rule:
    • ∧, →, ¬, ↔: as in Section 3.1;
    • ∀xψ: open a flagged box with a fresh name x0; the new goal, the box’s last line, is ψ[x0/x] (Section 5.4). For ∀x∈Aψ, the box opens with the assumption x0∈A;
    • ∨: postpone, as in Section 3.1;
    • ∃xψ: postpone; work on the premises until an available line shows a term t with ψ[t/x], then use ∃I (Section 5.5). For ∃x∈Aψ, the line t∈A is needed too.
    Repeat while the goal is ∧, →, ¬, ↔, or ∀.
  3. Premise-directed step. Take the main symbol of a resource and apply its elimination rule:
    • ∧, →, ∨, ↔, and the derived rules: as in Section 3.1;
    • ∃xψ: open the ∃E box early, as soon as the line is available, with a fresh witness x0, and make its last line the current goal, which must not mention x0 (Section 5.6). An early box lets the witness serve the goals that come later;
    • ∀xψ: do not instantiate blindly; instantiate at the term that the goal, or another resource, mentions (Section 5.3). For ∀x∈Aψ, the line t∈A is needed too;
    • an equation t1=t2: use =E with a φ chosen so that one substitution turns an available line into the goal, turning the equation round first if needed (Section 5.7).
  4. Clash. As in Section 3.1: for the goal ⊥, find or manufacture a pair χ, ¬χ; an impossible case closes itself by ⊥E.
  5. Stuck. As in Section 3.1: RAA on the current goal, or LEM on a well-chosen statement.

When no gap is left, number the lines and check the derivation as Definition 1.4.2, extended in Section 5.4, says: every citation is available, and every side condition holds (t free for x at ∀E and ∃I, bounded or not; t1 and t2 free for x at =E; a fresh name at each line that closes a flagged box).

Two of the new steps deserve a word on their place in the order. The goal step for ∀ is safe in the same way as the goal steps for → and ¬ (Section 3.1): if ∀xψ is derivable at all, then so is ψ[x0/x] for a fresh x0, by one more ∀E; so opening the box loses nothing. The goal step for ∃ is unsafe in the same way as the one for ∨: a witness chosen too early may be the wrong one, as in Example (Derivations with existential introduction), where “take y=c” stalled. That is why ∃ is postponed and the ∃E boxes of the premises are opened early: the witnesses they supply are often the terms the postponed goal is waiting for, as N0 was in the limit derivation of Section 6.1.

6.3.2. Three moves for quantifiers

Most first-order searches turn on three moves. The first two carry the names Chapter 5 gave them; what is new here is their order, which the method above already follows.

Name the witness early (Section 5.6). When an ∃ line is among the resources, open its box at once, with a fresh witness, and make the box’s last line the current goal. The witness costs nothing to name, and it is often the very term that a ∀ line or the goal is waiting for.

Instantiate at the term you need (Section 5.3), and so not before that term is known. A ∀ line can be instantiated at any term at all, which is exactly why instantiating it before the goal or a witness names the term is a blind choice. Wait for the witnesses, then instantiate at them.

The propositional core. Once the boxes are open and the ∀ lines are instantiated, what is left is often a step that holds for propositional reasons alone. The subsection “The propositional core” below names this move and gives it a one-line step.

Two pairs of steps recur: ∀E followed by →E, which applies a general law at one point, and ∃E followed, inside its box, by ∃I with a term built from the names in hand.

The next move, read off the goal and the lines in hand:

Diagram. Labels: no, the current goal\and the available lines, goal begins with forall ,\\wedge , to , neg or leftrightarrow ?, an exists line available,\box not yet opened?, a forall line not yet\instantiated at a term\the goal or a witness names?, goal exists x\, psi , and a line\showing psi [t/x]?, stuck: test the subgoal\by a counter-reading;\then RAA or LEM, set up its introduction rule\\(for forall : a fresh flag), open its existsE box now;\fresh witness, same goal, forallE at that term, existsI at t

The last edge reads “no”, not “impossible”: the chart is a guide to the next move, and it makes no claim that every derivable sequent is found by following it. It leaves out the premise-directed connective steps, the clash and the propositional core (TAUT, below); for those, follow the method above.

Example (A search that waits for its witnesses)

Show that ∀x(P(x)→∃yR(x,y)), ∀x∀y(R(x,y)→Q(y)), ∃xP(x)⊢∃yQ(y).

Idea. The goal is an ∃: postpone it. Premise 3 is an ∃: open its box now, with witness x0 (left). Premise 1 is a ∀, and x0 is now the term it needs: ∀E then →E gives an ∃y line. Open that box at once, with witness y0 (right). Premise 2 needs two terms, and both are in hand: x0, then y0. The postponed goal gets its witness, y0.

In the left snapshot the gap’s goal is still ∃yQ(y): an ∃E box keeps the goal it was opened for, and its assumption, line 4, says “P(x0)” and nothing more. In the right snapshot the same goal has moved one box further in, and line 7 is now the only line that asserts R of particular terms.

1∀x(P(x)→∃yR(x,y))
2∀x∀y(R(x,y)→Q(y))
3∃xP(x)
4x0P(x0)asm, for ∃E
⋮
12∃yQ(y)?
13∃yQ(y)?
1∀x(P(x)→∃yR(x,y))
2∀x∀y(R(x,y)→Q(y))
3∃xP(x)
4x0P(x0)asm, for ∃E
5P(x0)→∃yR(x0,y)∀E 1
6∃yR(x0,y)→E 5, 4
7y0R(x0,y0)asm, for ∃E
⋮
11∃yQ(y)?
12∃yQ(y)?
13∃yQ(y)?

Solution.

1∀x(P(x)→∃yR(x,y))
2∀x∀y(R(x,y)→Q(y))
3∃xP(x)
4x0P(x0)asm, for ∃E
5P(x0)→∃yR(x0,y)∀E 1
6∃yR(x0,y)→E 5, 4
7y0R(x0,y0)asm, for ∃E
8∀y(R(x0,y)→Q(y))∀E 2
9R(x0,y0)→Q(y0)∀E 8
10Q(y0)→E 9, 7
11∃yQ(y)∃I 10
12∃yQ(y)∃E 6, 7–11
13∃yQ(y)∃E 3, 4–12

At line 12, y0 is not in line 12, in line 6, in the premises, or in the open assumption on line 4. At line 13, x0 is not in line 13, in line 3, or in the premises, and no assumption is open.

Read over Z, with P(x) as “x>0”, R(x,y) as “y=2x+1” and Q(y) as “y is odd”: every positive integer has a 2x+1; every number of the form 2x+1 is odd; some integer is positive; so some integer is odd.

Compare a search that starts with premise 1, before any witness is named. It must instantiate at some term, a variable or a constant that nothing mentions, say c; the line P(c)→∃yR(c,y) then waits for P(c), which no premise gives. The box of premise 3 supplies the term that makes premise 1 usable.

Quick check. Why is line 8 an instance at x0, and not at some other term?

Solution. Line 7, the only line that asserts R of particular terms, mentions x0 and y0. Premise 2 is useful only at the terms that line names. This is the move “instantiate at the term you need”: the terms were known only once the witnesses were named.

6.3.3. Steps that are right for propositional reasons

Inside the boxes of a first-order derivation, many steps are propositional: ∧E, →E, a contrapositive, a case split. Section 4.8 let a propositional derivation take such steps in one line, as TAUT. With quantifiers the step must not look inside a quantifier, and the next definition says exactly what it may look at.

Definition 6.3.1 (Propositional Skeleton)

Call a first-order formula prime if it is atomic and not ⊥, or begins with a quantifier, bounded or not. Assign to each prime formula a propositional atom, the same atom to two prime formulas exactly when one can be turned into the other by finitely many renamings of bound variables (Section 5.2), in either direction; this is an equivalence relation, so the assignment is well defined. The propositional skeleton sk(φ) of a formula φ is defined by recursion: sk(⊥)=⊥; sk(π) is the atom of π for a prime formula π; sk(¬φ)=¬sk(φ); and sk(φ∘ψ)=sk(φ)∘sk(ψ) for each of ∧, ∨, →, ↔. The formulas of one list take their skeletons from one assignment.

The skeleton keeps the connectives outside every quantifier and hides everything else; this is not the skeleton of a derivation that Section 3.1 reads off the goal, and wherever the two could be confused, the book says “propositional skeleton” for this one. For example, sk(∀xP(x)→(∃yR(y,c)∨¬∀zP(z)))=p→(q∨¬p), since ∀xP(x) and ∀zP(z) differ only by renaming and so share the atom p.

Why only renaming? The formulas ∀x(P(x)∧Q(x)) and ∀xP(x)∧∀xQ(x) are provably equivalent (Proposition 6.2.6 (a)), yet the first is prime and the second is a conjunction of two prime formulas. If provable equivalence were allowed to merge atoms, the skeleton would depend on what has been derived, and a TAUT line could hide a quantifier step inside a table. Renaming is different: whether two formulas differ only by renaming bound variables can be seen by comparing them symbol by symbol, so anyone can compute the skeleton without a derivation. And ⊥ is kept as itself, not given an atom, so that ¬⊥ is a tautology and a cited line ⊥ entails every skeleton, as ⊥E says it should; an atom would have neither property.

Proposition 6.3.1 (Tautological Steps on the Skeleton)

Let Γ be a list of first-order formulas and ψ a formula, with skeletons taken from one assignment. If the skeletons of Γ semantically entail sk(ψ) (Definition 4.5.3), then Γ⊢ψ. If no two different prime formulas occurring outside all quantifiers in Γ and ψ share an atom, the derivation uses only the rules of Chapters 1 and 2.

In words: a step that is right for propositional reasons alone is derivable, with the quantified parts carried along untouched.

The proof takes the propositional derivation that completeness provides and puts the prime formulas back in place of their atoms; it is in the fold below.

Second readingThe proof: completeness on the skeleton, then substitution

Proof. Step 1: no two different prime formulas outside all quantifiers share an atom. By Corollary 4.8.5 (completeness, Section 4.8) there is a derivation D of sk(Γ)⊢sk(ψ) with the rules of Chapters 1 and 2; its lines are propositional formulas. Replace, in every line of D, each atom of sk(Γ), sk(ψ) by the prime formula of Γ, ψ to which it was assigned, and any other atom by ⊥. This is the substitution of formulas for atoms that Definition 2.3.1 makes for letters, and that Lemma 4.5.3 makes for meaning. Every rule of Chapters 1 and 2 is a schema in formulas, and the replacement commutes with each connective and leaves ⊥ alone. So each line keeps its rule and its citations, and each box keeps its extent and its assumption; this holds for RAA, LEM and ⊥E as for the others. D has no flagged box, so no side condition about names arises. Each premise sk(γ) becomes γ, and the last line becomes ψ. So the result is a first-order derivation of Γ⊢ψ (Definition 1.4.2, as Section 5.4 extended it), and it uses only the rules of Chapters 1 and 2. This is the second sentence of the statement.

Step 2: the general case. Choose one prime formula for each atom, and let γ∗ be γ with every prime formula occurring outside all quantifiers (the occurrences the skeleton sees) replaced by the chosen one of its atom. Prime formulas with one atom differ only by renaming. A renaming is a provable equivalence whose closure is derivable (the renaming sentence after Proposition 6.2.4), so Proposition 6.2.4, applied one occurrence and one renaming step at a time (through a letter new to the formula where needed), with the steps chained by Lemma 2.3.3 (c), gives γ⊣⊢γ∗ for each formula γ of the list, and ψ⊣⊢ψ∗. The formulas Γ∗ and ψ∗ have the same skeletons as Γ and ψ, and in them no two different prime formulas outside all quantifiers share an atom, so Step 1 gives Γ∗⊢ψ∗. Now Lemma 2.3.3 (Section 2.3) chains Γ⊢γ∗ for each γ, then Γ∗⊢ψ∗, then ψ∗⊢ψ. Each pasted block’s flags are first renamed to names new to the whole derivation, as “The laws as one line” (Section 6.2) argues. Then no flag of a pasted block occurs in a premise or an open assumption of the derivation it is pasted into, so every ∀I and ∃E side condition of the block still holds, and Lemma 2.3.3 (c) holds for these first-order derivations by the same pasting. So Γ⊢ψ.

TAUT on the skeleton. From now on, a line of a derivation may be justified TAUT, citing available lines, when their skeletons semantically entail its skeleton (Definition 4.5.3), all from one assignment; with no cited lines, when its skeleton is a tautology. This is Definition 4.8.1 of Section 4.8, applied to skeletons. By Proposition 6.3.1 the line abbreviates a block of primitive steps, pasted in with any flags renamed to names new to the whole derivation, as “The laws as one line” (Section 6.2) allows. As in Section 4.8, use TAUT only for a step a written proof would leave unsaid.

These are TAUT steps:

  • from ¬(∃xP(x)∧Q(c)) and Q(c) to ¬∃xP(x), since ¬(p∧q),q⊨¬p;
  • from ∀x(P(x)→Q(x))→R and ¬R to ¬∀x(P(x)→Q(x)): modus tollens on the skeleton, p→r,¬r⊨¬p.

These are not:

  • from ∀x∀yR(x,y) to ∀y∀xR(x,y): the two prime formulas do not differ by renaming, so the skeletons are p and q, and p⊭q. The step is derivable, by Example (Flagged boxes at work) (c), and that derivation looks inside the quantifiers;
  • from ∀xP(x) to P(c): the skeletons are p and q; this is ∀E;
  • x=x: the skeleton is one atom, not a tautology; this is =I.

Quick check. Which are TAUT steps? (a) From ∃xP(x)∧∀yQ(y) to ∀yQ(y)∧∃xP(x). (b) From ∀x(P(x)∧Q(x)) to ∀xP(x). (c) From ¬∀xP(x) to ∃x¬P(x).

Solution.

  • (a) Yes: p∧q⊨q∧p. (b) No: the skeletons are two different atoms; the step is Proposition 6.2.6 (a), which looks inside ∀x. (c) No: the skeletons are ¬p and q; the step is QN (a) of Section 6.2, which needs the quantifier rules and RAA.

Warning (Not allowed: TAUT).

  • From ∀x(P(x)∧Q(x)) to ∀xQ(x). Looks inside a quantifier; needs a flagged box.
  • From ∀xP(x) to P(f(c)). An instance, not an entailment of skeletons; needs ∀E.
  • From P(c) to ∃xP(x). Needs ∃I.
  • From s=t and P(s) to P(t). The skeleton is p,q⊨r, which fails; needs =E.
  • Citing a line inside a box that has closed. Not available, whatever the table says (Definition 1.4.2).

6.3.4. The propositional core

Many first-order derivations have the same shape. Open the boxes the goal asks for, instantiate every ∀ line at the names in play, then finish with a step that is propositional. The quantifiers frame the derivation, and its core is a truth-table fact.

Example (A propositional core inside a flagged box)

Show that ∀x(P(x)→(Q(x)∨R(x))), ∀x¬Q(x)⊢∀x(P(x)→R(x)).

Solution.

1∀x(P(x)→(Q(x)∨R(x)))
2∀x¬Q(x)
3x0P(x0)→(Q(x0)∨R(x0))∀E 1
4¬Q(x0)∀E 2
5P(x0)→R(x0)TAUT 3, 4
6∀x(P(x)→R(x))∀I 3–5

The skeleton of line 5’s step is p→(q∨r),¬q⊨p→r. At line 6, x0 is not in a premise or in line 6, and no assumption is open.

Read over Z, with P(n) as “n>1”, Q(n) as “n2=2” and R(n) as “n>0”. The first premise says “if n>1, then n2=2 or n>0”, true since n>1 gives n>0; the second says that no integer squares to 2. Both premises are true under this reading, and so is the conclusion, which says that every integer greater than 1 is positive. The quantifier part of the derivation is two instantiations and one generalization, and its core is propositional.

The order of the steps is the point. TAUT could not have been applied to the premises themselves: their skeletons are two atoms p and q, and the goal’s is a third, r, and p,q⊭r. Only after the flagged box is open and both premises are instantiated at its flag do the lines show the connectives that the table needs. So the move reads: boxes first, instances at the flag second, and the table last.

Quick check. Write out what line 5 abbreviates, with the rules of Chapters 1 and 2.

Solution. Lines 5–13 below replace the one TAUT line:

1∀x(P(x)→(Q(x)∨R(x)))
2∀x¬Q(x)
3x0P(x0)→(Q(x0)∨R(x0))∀E 1
4¬Q(x0)∀E 2
5P(x0)asm, for →I
6Q(x0)∨R(x0)→E 3, 5
7Q(x0)asm, for ∨E
8⊥¬E 7, 4
9R(x0)⊥E 8
10R(x0)asm, for ∨E
11R(x0)R 10
12R(x0)∨E 6, 7–9, 10–11
13P(x0)→R(x0)→I 5–12
14∀x(P(x)→R(x))∀I 3–13

That is nine lines in place of one. A written proof would say “so R(x0), since ¬Q(x0)”.

6.3.5. Four kinds of task, with quantifiers

Section 3.2 sorted propositional problems into four kinds, and the kind decides how the search begins. The same four come back. A theorem ⊢φ has no premises; an equivalence φ⊣⊢ψ needs two derivations; inconsistency of a list is a derivation of ⊥ from it (Section 3.2’s definition reads the same for first-order formulas, now with all the rules); and derive or break withholds the verdict. A claim is broken by a counter-reading, which makes every member of its counterexample set true (Section 7.2).

Example (One pair of predicates, four tasks)
  • (a) Theorem. Show that ⊢∀xP(x)→∃x(P(x)∨Q(x)).
  • (b) Equivalence. Show that ∀x(P(x)→¬Q(x))⊣⊢∀x(Q(x)→¬P(x)).
  • (c) Inconsistency. Show that the list ∀x(P(x)→Q(x)), ∃x(P(x)∧¬Q(x)) is inconsistent.
  • (d) Derive or break. Decide ∀x(P(x)→Q(x))⊢∀xP(x)→∀xQ(x) and its converse.

Solution. (a) With no premises the search starts from the goal alone: an →I box, then the ∃ goal waits for a line that shows an instance.

1∀xP(x)asm, for →I
2P(x)∀E 1
3P(x)∨Q(x)∨I 2
4∃x(P(x)∨Q(x))∃I 3
5∀xP(x)→∃x(P(x)∨Q(x))→I 1–4

Line 2 instantiates at the variable x itself, and line 4 uses ∃I at x, as in Proposition 5.5.1. Any term would have done as the witness, since line 1 holds at every term; the variable x is simply the term at hand, and no constant has to be invented.

(b) The E form of Section 6.2 says the same with its two predicates exchanged: “no P is Q” is “no Q is P”. An equivalence is two searches, and here the second is the first with the letters exchanged, so one search does the work of both. Each direction opens a flagged box, instantiates at its flag, takes one TAUT step and generalizes:

1∀x(P(x)→¬Q(x))
2x0P(x0)→¬Q(x0)∀E 1
3Q(x0)→¬P(x0)TAUT 2
4∀x(Q(x)→¬P(x))∀I 2–3
1∀x(Q(x)→¬P(x))
2x0Q(x0)→¬P(x0)∀E 1
3P(x0)→¬Q(x0)TAUT 2
4∀x(P(x)→¬Q(x))∀I 2–3

The skeletons are p→¬q⊨q→¬p and the same with p and q exchanged.

(c) An A form and its O form (Section 6.2). The goal is ⊥, so the clash step of the method applies, but no pair χ, ¬χ is in sight among the premises: the clash lives at a witness. The ∃ premise opens its box at once, the ∀ premise is instantiated at the witness, and the clash is propositional:

1∀x(P(x)→Q(x))
2∃x(P(x)∧¬Q(x))
3x0P(x0)∧¬Q(x0)asm, for ∃E
4P(x0)→Q(x0)∀E 1
5⊥TAUT 3, 4
6⊥∃E 2, 3–5

Line 5’s skeleton is p∧¬q,p→q⊨⊥.

(d) With the verdict withheld, spend a minute on each side before committing. For the first claim, a reading that makes the premise true and the conclusion false would need every P to be a Q, every element to be a P, and some element not a Q, which cannot happen; so try to derive it. For the converse, a false hypothesis ∀xP(x) makes the premise true cheaply, which suggests a break.

The first claim derives. Lines 3–6 are Example (Flagged boxes at work) (b), run inside the box of line 2:

1∀x(P(x)→Q(x))
2∀xP(x)asm, for →I
3x0P(x0)∀E 2
4P(x0)→Q(x0)∀E 1
5Q(x0)→E 4, 3
6∀xQ(x)∀I 3–5
7∀xP(x)→∀xQ(x)→I 2–6

At line 6, x0 is not in the premise, in line 6, or in the open assumption on line 2.

The converse breaks. Over Z, read P as “even” and Q as “positive”. “Every integer is even” is false, so the premise “if every integer is even, then every integer is positive” is true; the conclusion “every even integer is positive” is false at 0.

Test the subgoal by a counter-reading. Section 4.7 tested a propositional subgoal by a refuting row before chasing it. The first-order form of the move is the same. When a search produces a subgoal, look for a reading that makes the available lines true and the subgoal false before you chase it. If you find one, the subgoal is the wrong one: Section 7.2 states that such a reading rules out every derivation of it from those lines. Return to the step that produced it, and choose differently there: another term for a ∀E, a box opened earlier, or a different case split. A reading takes a minute to find, and it can save the search a long chase.

Quick check. A search for the limit derivation of Section 6.1 instantiates the premise at ε0 instead of ε0/2, and reaches the subgoal |2an0−2L|<ε0 with |an0−L|<ε0 available. Find a sequence and numbers that make every available line true and the subgoal false.

Solution. Take ε0=1; an=L for every n except an0=L+0.75; and N0=n0. The premise holds, since the sequence is eventually constant at L. Every term is within 0.75<1 of L, so the instance of the premise at ε0 and the box line ∀n∈N(n≥N0→|an−L|<ε0) hold; n0≥N0 holds; and |an0−L|=0.75<1. But |2an0−2L|=1.5≥1. The subgoal is the wrong one; go back to the choice of term.

Quick check. Which task is ∃x(P(x)∧¬P(x))⊢⊥, and how long is its derivation with TAUT?

Solution. Inconsistency. Three lines below the premise:

1∃x(P(x)∧¬P(x))
2x0P(x0)∧¬P(x0)asm, for ∃E
3⊥TAUT 2
4⊥∃E 1, 2–3

6.3.6. A library of first-order sequents

Here is what the book has proved about quantifiers, grouped by use; a search that needs one of these can copy its derivation, with formulas in place of letters, rather than rediscover it.

Use Sequent Where
exchange two like quantifiers ∀x∀yφ⊣⊢∀y∀xφ Example (Flagged boxes at work) (c)
rename a bound variable ∀yφ⊣⊢∀zφ[z/y], and the same for ∃ Section 5.4 (the fold after Example (Flagged boxes at work)); Section 5.6
every gives some ∀xφ⊢∃xφ Proposition 5.5.1
some-all gives all-some ∃x∀yR(x,y)⊢∀y∃xR(x,y) Proposition 5.6.2
distribute ∀ over ∧ and ∃ over ∨ both ways; ∀ over ∨ and ∃ over ∧ one way Proposition 6.2.6 (the instances for P, Q first in Proposition 5.4.1 and Proposition 5.6.1)
negate “not every” and “some not”; “none” and “every not”; a negated implication; bounded forms Proposition 6.2.1, Proposition 6.2.2, Proposition 6.2.3
move across a connective the passage laws Proposition 6.2.7
replace a part a provable equivalence, inside any formula Proposition 6.2.4
equality symmetric and transitive; equals share every property Proposition 5.7.1, Proposition 5.7.2
bounds in one step the bounded rules Proposition 6.1.1
propositional steps TAUT on the skeleton Proposition 6.3.1

The laws of Section 6.2 may already be used as one line, by “The laws as one line”; the other rows are patterns to copy. Either way, a row is used by matching its shape and then checking its conditions: the passage laws need the moved variable not free in the other side, a renaming needs a letter new to the formula, and an instance of a row’s letters must be free for the variables it replaces.

Remark (Looking ahead). Every claim this section broke, it broke by a counter-reading. Chapter 7 gives counter-readings an exact form, the counter-model, and states that a counter-model rules out every derivation.

6.3.7. Exercises

A. Check your understanding

Exercise (A1)
  • (a) What is the propositional skeleton of ¬∃xP(x)∨(Q(c)∧∃yP(y))? Is it a tautology?
  • (b) What is the propositional skeleton of ∃x(P(x)∧Q(x))∧¬∃x(Q(x)∧P(x))? Can a TAUT step derive ⊥ from this formula?
  • (c) Which are TAUT steps? (i) From ∀xP(x) and ∀xP(x)→∃yQ(y) to ∃yQ(y). (ii) From ∀x(P(x)→Q(x)) and P(c) to Q(c). (iii) From ¬¬∃xP(x) to ∃xP(x).
  • (d) In Example (A search that waits for its witnesses), why is the box on premise 3 opened before premise 1 is used?
  • (e) A counter-reading makes the premises of a claim true and its conclusion false. What may you say now, and what will Section 7.2 add?

Solution. (a) ¬p∨(q∧p): ∃xP(x) and ∃yP(y) differ only by renaming, so they share p. It is not a tautology: p true and q false make it false.

(b) p∧¬q. The two prime formulas are not renamings of each other (P(x)∧Q(x) against Q(x)∧P(x)), so they get different atoms, and p∧¬q is true in a row: no. ⊥ is derivable all the same, by an ∃E box on the first conjunct, a TAUT step inside it to Q(x0)∧P(x0), ∃I, and a clash with the second conjunct.

(c) (i) Yes: p,p→q⊨q. (ii) No: p,q⊭r; it is ∀E at c, then →E. (iii) Yes: ¬¬p⊨p.

(d) Premise 1 is a ∀ whose useful term is not yet known, and the box supplies it, x0. These are the moves “name the witness early” and “instantiate at the term you need”, in that order.

(e) Now: the claim breaks, and a search for it is abandoned. Section 7.2 states that such a claim has no derivation.

B. Practice

Exercise (B1: Derive or break, twelve claims)

Derive each claim, with TAUT allowed, or break it by a reading over Z that makes every member of its counterexample set true. The groups say which move to try first; they do not say which claims hold. Claims 1–3: name the witness early. Claims 4 and 5: instantiate at the term you need. Claims 6–8: the propositional core. Claims 9–12: move a quantifier, or derive ⊥.

  1. ∃x(P(x)∧Q(x)), ∀x(P(x)→(Q(x)→R(f(x))))⊢∃yR(y).
  2. ∃xR(x,x)⊢∀x∃yR(x,y).
  3. ∃xP(x), ∀x(P(x)→∀yR(x,y))⊢∀y∃xR(x,y).
  4. ∀x∀y(R(x,y)→R(y,x)), ∀xR(x,f(x))⊢∀xR(f(x),x).
  5. ∀xR(x,f(x))⊢∀xR(f(x),x).
  6. ∀x(P(x)→Q(x)), ∀x(Q(x)→R(x))⊢∀x(¬R(x)→¬P(x)).
  7. ∀x(P(x)∨Q(x)), ∀x¬P(x)⊢∀xQ(x).
  8. ∀x(P(x)∨Q(x)), ¬∀xP(x)⊢∀xQ(x).
  9. ∀x(P(x)→Q(x))⊢∃xP(x)→∃xQ(x).
  10. ∀x(P(x)→Q(x))⊢∃xP(x)→∀xQ(x).
  11. ∀x(P(x)↔¬P(f(x))), ∀xP(x)⊢⊥.
  12. ∀x∃yR(x,y), ∀x∀y(R(x,y)→¬R(y,x))⊢⊥.

Solution. 1. Derive. The box of the witness opens first; inside it, premise 2 is instantiated at x0, and the postponed goal takes the compound witness f(x0).

1∃x(P(x)∧Q(x))
2∀x(P(x)→(Q(x)→R(f(x))))
3x0P(x0)∧Q(x0)asm, for ∃E
4P(x0)→(Q(x0)→R(f(x0)))∀E 2
5R(f(x0))TAUT 3, 4
6∃yR(y)∃I 5
7∃yR(y)∃E 1, 3–6

Line 5’s skeleton is p∧q,p→(q→r)⊨r. At line 7, x0 is not in line 7, in line 1, or in a premise.

2. Breaks. Read R(x,y) as “x⋅y=1”. The premise is true, since 1⋅1=1; the conclusion fails at x=0, since 0⋅y=0 for every y.

3. Derive.

1∃xP(x)
2∀x(P(x)→∀yR(x,y))
3x0P(x0)asm, for ∃E
4P(x0)→∀yR(x0,y)∀E 2
5∀yR(x0,y)→E 4, 3
6y0R(x0,y0)∀E 5
7∃xR(x,y0)∃I 6
8∀y∃xR(x,y)∀I 6–7
9∀y∃xR(x,y)∃E 1, 3–8

At line 8, y0 is not in a premise, in the open assumption on line 3, or in line 8. At line 9, x0 is not in line 9, in line 1, or in a premise.

4. Derive. The term premise 1 needs is f(x0), and premise 2 names it.

1∀x∀y(R(x,y)→R(y,x))
2∀xR(x,f(x))
3x0R(x0,f(x0))∀E 2
4∀y(R(x0,y)→R(y,x0))∀E 1
5R(x0,f(x0))→R(f(x0),x0)∀E 4
6R(f(x0),x0)→E 5, 3
7∀xR(f(x),x)∀I 3–6

Line 5 instantiates at f(x0), which is free for y. At line 7, x0 is not in a premise or in line 7, and no assumption is open.

5. Breaks. Read f(x) as x+1 and R as <. Every x<x+1, so the premise is true; no x+1<x, so the conclusion is false.

6. Derive.

1∀x(P(x)→Q(x))
2∀x(Q(x)→R(x))
3x0P(x0)→Q(x0)∀E 1
4Q(x0)→R(x0)∀E 2
5¬R(x0)→¬P(x0)TAUT 3, 4
6∀x(¬R(x)→¬P(x))∀I 3–5

Line 5’s skeleton is p→q,q→r⊨¬r→¬p.

7. Derive.

1∀x(P(x)∨Q(x))
2∀x¬P(x)
3x0P(x0)∨Q(x0)∀E 1
4¬P(x0)∀E 2
5Q(x0)TAUT 3, 4
6∀xQ(x)∀I 3–5

Line 5’s skeleton is p∨q,¬p⊨q.

8. Breaks. Read P as “even” and Q as “odd”. Every integer is even or odd; not every integer is even; and 0 is not odd, so “every integer is odd” is false.

9. Derive.

1∀x(P(x)→Q(x))
2∃xP(x)asm, for →I
3x0P(x0)asm, for ∃E
4P(x0)→Q(x0)∀E 1
5Q(x0)→E 4, 3
6∃xQ(x)∃I 5
7∃xQ(x)∃E 2, 3–6
8∃xP(x)→∃xQ(x)→I 2–7

At line 7, x0 is not in line 7, in line 2, in the premise, or in an open assumption (line 2’s box is still open, and line 2 does not mention x0).

10. Breaks. Read P(x) as “x=0” and Q(x) as “x⋅x=x”. The premise holds, since the only x with x=0 has 0⋅0=0. In the conclusion, ∃x(x=0) is true and ∀x(x⋅x=x) is false, since 2⋅2=4; so the implication is false.

11. Derive. Premise 2 is instantiated twice, at y and at f(y), the two terms that premise 1 at y mentions.

1∀x(P(x)↔¬P(f(x)))
2∀xP(x)
3P(y)↔¬P(f(y))∀E 1
4P(y)∀E 2
5P(f(y))∀E 2
6⊥TAUT 3, 4, 5

Line 6’s skeleton is p↔¬q,p,q⊨⊥: no row makes all three true.

12. Breaks. Read R as <. Every integer has a larger one, and x<y excludes y<x. Both premises are true, and ¬⊥ is true, so the whole counterexample set is true: the list is not shown inconsistent.

Seven claims derive and five break. Four breaks sit beside a derivable look-alike: 5 beside 4, 8 beside 7, 10 beside 9, and 12 beside 11. Claim 2 weakens the premise of the derivable ∀xR(x,x)⊢∀x∃yR(x,y) of Example (Derivations with existential introduction) (c). Every break is a counter-reading (Section 7.2).

Marking scheme. (10 points) - 4: the twelve verdicts, 13 point for each correct one, rounded down. - 3: the seven derivations, each with every closing side condition checked and every TAUT line’s skeleton named. - 3: the five readings, each with every premise and the conclusion evaluated. Fatal errors (0 for the claim): a TAUT line that looks inside a quantifier; a “break” with a premise false.

Exercise (B2: Two witnesses in a row)

The premises are 1 ∀x(P(x)→∃yR(x,y)), 2 ∀x∀y(R(x,y)→P(y)) and 3 P(c); the goal is ∃y∃z(R(c,y)∧R(y,z)). Here is a partial derivation:

1∀x(P(x)→∃yR(x,y))
2∀x∀y(R(x,y)→P(y))
3P(c)
⋮
6y0R(c,y0)asm, for ∃E
⋮
16∃y∃z(R(c,y)∧R(y,z))?
17∃y∃z(R(c,y)∧R(y,z))?

Name the move, then complete it.

Solution. The move is “name the witness early”, twice, with each ∀ line instantiated only at the terms in hand: c (premise 3) first, then the witness y0.

1∀x(P(x)→∃yR(x,y))
2∀x∀y(R(x,y)→P(y))
3P(c)
4P(c)→∃yR(c,y)∀E 1
5∃yR(c,y)→E 4, 3
6y0R(c,y0)asm, for ∃E
7∀y(R(c,y)→P(y))∀E 2
8R(c,y0)→P(y0)∀E 7
9P(y0)→E 8, 6
10P(y0)→∃yR(y0,y)∀E 1
11∃yR(y0,y)→E 10, 9
12z0R(y0,z0)asm, for ∃E
13R(c,y0)∧R(y0,z0)∧I 6, 12
14∃z(R(c,y0)∧R(y0,z))∃I 13
15∃y∃z(R(c,y)∧R(y,z))∃I 14
16∃y∃z(R(c,y)∧R(y,z))∃E 11, 12–15
17∃y∃z(R(c,y)∧R(y,z))∃E 5, 6–16

Lines 4 and 7 instantiate at c, and lines 8 and 10 at y0; line 15 is ∃I at y0, which is free for y. At line 16, z0 is not in line 16, in line 11, in the premises, or in the open assumption on line 6. At line 17, y0 is not in line 17, in line 5, or in the premises.

Marking scheme. (10 points) - 2: names the move. - 3: opens the two boxes as soon as their ∃ lines exist. - 3: the ∀E lines at c, c, y0 and y0, the terms read off the lines in hand. - 2: the two side conditions. Fatal error (0 for the step): ∃I on line 15 before line 14, so that the witness z0 appears in the box’s last line.

Exercise (B3: How much TAUT saves)
  • (a) Derive ∀x(P(x)→Q(x)), ∀x(Q(x)→¬P(x))⊢∀x¬P(x) twice: once without TAUT, once with exactly one TAUT line. Count the lines.
  • (b) Is the step from ∀x(P(x)→Q(x)) to ∀x(¬Q(x)→¬P(x)) a TAUT step?

Solution. (a) With TAUT, six lines (left); without it, ten (right):

1∀x(P(x)→Q(x))
2∀x(Q(x)→¬P(x))
3x0P(x0)→Q(x0)∀E 1
4Q(x0)→¬P(x0)∀E 2
5¬P(x0)TAUT 3, 4
6∀x¬P(x)∀I 3–5
1∀x(P(x)→Q(x))
2∀x(Q(x)→¬P(x))
3x0P(x0)→Q(x0)∀E 1
4Q(x0)→¬P(x0)∀E 2
5P(x0)asm, for ¬I
6Q(x0)→E 3, 5
7¬P(x0)→E 4, 6
8⊥¬E 5, 7
9¬P(x0)¬I 5–8
10∀x¬P(x)∀I 3–9

Line 5 on the left has the skeleton p→q,q→¬p⊨¬p.

(b) No: the two formulas are prime and not renamings of each other, so their skeletons are two different atoms. The step is derivable by instantiating, one TAUT line (p→q⊨¬q→¬p) and generalizing, the pattern of Example (One pair of predicates, four tasks) (b).

Marking scheme. (10 points) - 3: the TAUT derivation, with the skeleton named. - 4: the derivation without TAUT. - 1: the count. - 2: (b), with the reason. Fatal error (0 for the step): a TAUT line citing the ∀ lines directly to reach ¬P(x0).

C. Going deeper

Exercise (C1: Some index decides, used later)

Let D(n) say “an>0” for a sequence (an), over a domain of indices.

  • (a) Derive ⊢∃n(D(n)→∀mD(m)), with LEM on ∀mD(m).
  • (b) Derive it again in two lines, from one TAUT line and one law of Section 6.2.
  • (c) Say in two sentences which index the sentence promises, and why the derivations of (a) and (b) name none.

Solution (Hint 1). For (a): in the case ¬∀mD(m), which law of Section 6.2 turns the negated ∀ into an ∃?

Solution (Hint 2). For (b): the formula ∀nD(n)→∀mD(m) has the skeleton p→p. Which passage law moves the ∀n out of the hypothesis of an implication, turning it into ∃n?

Solution. (a)

1∀mD(m)∨¬∀mD(m)LEM
2∀mD(m)asm, for ∨E
3D(n)asm, for →I
4∀mD(m)R 2
5D(n)→∀mD(m)→I 3–4
6∃n(D(n)→∀mD(m))∃I 5
7¬∀mD(m)asm, for ∨E
8∃m¬D(m)QN (a) 7
9m0¬D(m0)asm, for ∃E
10D(m0)→∀mD(m)VI 9
11∃n(D(n)→∀mD(m))∃I 10
12∃n(D(n)→∀mD(m))∃E 8, 9–11
13∃n(D(n)→∀mD(m))∨E 1, 2–6, 7–12

Line 6 is ∃I at the variable n itself, as in the proof of passage law (d); as there, the step is sound because every domain is non-empty (Section 7.1). Line 11 is ∃I at m0. At line 12, m0 is not in line 12, in line 8, or in the open assumption on line 7.

(b)

1∀nD(n)→∀mD(m)TAUT
2∃n(D(n)→∀mD(m))passage (d) 1

The two prime formulas of line 1 differ only by renaming, so the skeleton is p→p, a tautology. Line 2 is Proposition 6.2.7 (d), the direction ⊣, used as one line (“The laws as one line”), with φ the formula D(n) and ψ the formula ∀mD(m), in which n is not free.

(c) If every term is positive, any index will do; if not, an index with an≤0 does, since then the implication is vacuously true. The derivation splits on which case holds without deciding it (LEM in (a), the classical direction of (d) in (b)), so it never names the index.

Marking scheme. (10 points) - 4: (a), with the LEM split, both cases closed, with the side condition of every line that closes a flagged box checked. - 3: (b), with the TAUT line justified by renaming, and law (d) with its condition checked. - 3: (c). Fatal errors (0 for the step): giving ∀nD(n) and ∀mD(m) different atoms and then claiming the TAUT line anyway; ∃I at m0 after its box has closed.

Exercise (C2: Every M is P, every M is S, so some S is P?)
  • (a) Break ∀x(M(x)→P(x)), ∀x(M(x)→S(x))⊢∃x(S(x)∧P(x)) by a reading over N.
  • (b) Add the premise ∃xM(x) and derive the conclusion.
  • (c) Which line of (b) needs the new premise, and what does Section 5.1’s existential import have to do with it?

Solution. (a) Breaks. Read M(n) as “n is an even prime greater than 2”, which is true of no n; P(n) as “n is odd”; and S(n) as “n is even”. Both premises are vacuously true, since their hypothesis M(n) is false for every n, and “some even number is odd” is false (Section 7.2).

(b)

1∀x(M(x)→P(x))
2∀x(M(x)→S(x))
3∃xM(x)
4x0M(x0)asm, for ∃E
5M(x0)→P(x0)∀E 1
6M(x0)→S(x0)∀E 2
7S(x0)∧P(x0)TAUT 4, 5, 6
8∃x(S(x)∧P(x))∃I 7
9∃x(S(x)∧P(x))∃E 3, 4–8

Line 7’s skeleton is m,m→p,m→s⊨s∧p. At line 9, x0 is not in line 9, in line 3, or in a premise.

(c) Line 7: its TAUT needs M(x0), line 4, which only the box of premise 3 supplies. Without it, ∃I could still be applied at some term, but no line would say that term is S and P. A “for every” claims no instance, so the old reading of “every M is P” as also saying that there are Ms is not the book’s reading. With that reading the inference was valid; without it, the premise must be added.

Marking scheme. (10 points) - 3: (a), with all three truth values justified. - 4: (b). - 3: (c). Fatal error (0 for the step): a “break” whose M is true of some number.