<<

Linguistics 280: Language and Formal Reasoning Proofs: finding solutions Robert Levine Autumn Quarter, 2010

Strategies for devising proofs: direct proofs Once you understand how to apply inference rules to formulæ, the next step in modeling reasoning as a series of deductions is to work out just how the rules can get you from a given statement to another statement which is a necessary consequence of the first. Take something very basic: the claim that p ∧ q ⊢ p ∨ q. This is a logically valid statement—it holds every time. When p ∧ q has the value 1, p ∨ q has the value 1, without exception, no matter what sentences of English p and q represent. The truth table for the two formulæ makes this crystal-clear:

p q p ∧ q p ∨ q

11 1 1

10 0 1

01 0 1

00 0 0

What the table tells you is that the entailment only goes one way: whenever p ∧ q has the truth value 1, p ∨ q also has the value one, which is what p ∧ q ⊢ p ∨ q means—if we have a proof of p ∧ q, then p ∨ q must be true—but the reverse doesn’t hold: there are two cases in which the disjunction is true, but the conjunction is . But given that p ∧ q ⊢ p ∨ q does hold, it should be possible—if the Gentzen rules really are the deductive counterpart to the truth tables—to prove this entailment. The trick is figure out what the reasoning steps are. Proofs don’t solve themselves, and staring at the problem for long enough isn’t going to make the answer occur to you. Formal proofs are the purest form of logic puzzle. There is, as you may be aware, an explosion in publishing based on logic puzzles. Amazon.com lists more than 1600 titles in this area; everyone from USA today to Johns Hopkins University Press has published collections, and Soduku—which is a purely deductive number-based logic puzzle genre has probably surpassed crossword puzzles in terms of numbers of ‘players’. But a lot of the logic puzzles that you find in these books involve not just deductive tasks, but misleading or tricky formulations or contexts which lead you to jump to false conclusions, from which it’s impossible to reason to the solution. Formal proofs don’t have this element—everything is laid out in front of you, with no way to deceive you or guide you down a false path. It’s just you against the proof. But without a strategy for solving the proof in front of you, you aren’t going to succeed. And to develop such a strategy you need to think very carefully about what it is that you’re given, and what it is you have to end up with. In this case, you start with a conjunction. What does that tell you? Given a conjunction, we know from the Gentzen rules (themselves based on the truth tables) that in p ∧ q, both p and q must be true. That’s what we’re allowed to deduce from p ∧ q, and when you start a proof such as this one, you must review exactly what it is that you can legitimately infer from the statement you’re asked to assume at the beginning. You then have to go from that knowledge to the conclusion. In the very simple case we’re now looking at, that’s eay. We know that p is true, and we have to get from p to p ∨ q. Are we allowed to do that? Is there an entailment of the form p ⊢ p ∨ q anywhere in our rule system? Look at the rule for ∨ Intro, and you’ll see that that’s exactly what the rule allows:

∨ Intro 1: Γ ⊢ ϕ Γ ⊢ ϕ ∨ ψ where ϕ and ψ range over all possible logical statement. What this means is that we have a green light in our logical setup for the conclusion we want, based on what that setup tells us about conjunctions. All we have to do is set up the proof correctly, as a way of ensuring that it’s really valid. Begin at the beginning, with the startup . We need to get the original premise, p∧q, into play, and the line underneath is a reminder that we’re not just staring at the formula, but are about to make an inference from it:

p ∧ q ⊢ p ∧ q | {z } |{z} |{z} Γ ϕ ψ

The rule for making inferences from conjunctions is

∧ Elim 1: Γ ⊢ ϕ ∧ ψ Γ ⊢ ϕ

According to the rule above, with Γ = {p ∧ q}, ϕ = p, ψ = q, we are allowed to infer p ∧ q ⊢ p:

p ∧ q ⊢ p ∧ q | {z } |{z} |{z} Γ ϕ ψ ∧E1 p ∧ q ⊢ p | {z } |{z} Γ ϕ

And at this point, the labeling that got us through the inference step from p ∧ q ⊢ p ∧ q to p ∧ q ⊢ p is no longer relevant. As explained in the preceding handout on proofs, one we’ve made an inference from a given assumption set, we need to match the formula we’ve inferred to the rule we want to use. And that may be possible only if we interpret symbols such as Γ, ∆ and others that show in the rule as covering different parts of the formula we wish to apply the next rule to than they did in the previous rule. We therefore need to decide how to treat the next reasoning step so that the result of the previous step can undergo the next rule we wish to apply. We have, so far,

p ∧ q ⊢ p ∧ q ∧E1 p ∧ q ⊢ p

Based on our earlier informal storyline for the proof, we need to apply the particular ∨ Intro rule given earlier. We take Γ to be {p ∧ q}, ϕ = p, and ψ = q (which happen to be the previous values for these; more about that shortly), and get

2 p ∧ q ⊢ p | {z } |{z} Γ ϕ ∨I1 p ∧ q ⊢ p ∨ q | {z } |{z} |{z} Γ ϕ ψ

Suppressing the (now irrelevant) labelling, we have

p ∧ q ⊢ p ∨I1 p ∧ q ⊢ p ∨ q

By combining the first inference step together with this one, we can display the whole history of the proof, which establishes irrefutably that every step of the proof is licensed by the proof system we’ve adopted:

p ∧ q ⊢ p ∧ q ∧E1 p ∧ q ⊢ p ∨I1 p ∧ q ⊢ p ∨ q

where the black box notation indicates that the proof is now formally terminated successfully.

Trickery: proof by The strategy followed in the foregoing proof was quite simple, because nothing more indirect was necessary. The rule for ∧ Elimination ‘feeds’ the rule for ∨ Introduction. Such moves are quite common in proofs, but it’s unusual for a proof to consist only of such moves. Sometimes something much more devious is called for—even when the itself seems to be nothing but the essence of common sense. For example, the logical statement ¬p ⊢ ¬(p ∧ q) seems so self-evident as to be trivial: if something is false, the conjunction of it and something else cannot be true. And, unsurprisingly, the truth table show that the statement we’ve been asked to prove is indeed true:

p q ¬p p ∧ q ¬(p ∧ q)

110 1 0

100 0 1

011 0 1

001 0 1

When ¬p has 1 as its truth value, so does ¬(p ∧ q), just as we expect. Surely nothing very much is required here by way of proof—one or two lines should do it. But when you first encounter this theorem, it’s far from obvious how to translate the admittedly obvious truth of this statement into a proof. The problem is that you cannot directly relate the in ¬p to ¬(p ∧ q). A few moments’ thought should make it clear why: ¬p is definitive—p cannot be true—but ¬(p ∧ q) is not; in principle, the latter can be true even if ¬p itself is not true (as, indeed, the truth table makes evidence). So we cannot proceed directly from the premise ¬p to the conclusion ¬(p ∧ q). How then can the proof go forward? Here’s a general rule of thumb: whenever you see negation on the right side of the turnstile—particularly when that negation applies to a complex formula, as in the present case—it’s going to be difficult to establish

3 the negation directly. But you can almost always achieve such proofs by establishing a contradiction (⊥) and then resolving the contradiction by shifting one of the premises which creates the contradiction over to the right if the turnstile, in negated form. This move is exactly what is mandated by the ¬ Intro rule—we’ve already seen evidence of its effectiveness in proving the theorem p ⊃ q ⊢ ¬q ⊃ ¬p. A very useful tactic in the case of proof by contradiction is to work backwards from the last step to the contradiction which would have preceded it and enabled that last step. It’s clear from the Gentzen rule for ¬ Intro—namely

¬ Intro: Γ, ϕ ⊢⊥ Γ ⊢ ¬ϕ

—that if we had a stage in the derivation ¬p,p ∧ q ⊢ ⊥, we obtain the proof we seek directly frome the ¬ Intro rule. In other words, using proof by contraction changes our target: if we can prove ¬p,p ∧ q ⊢ ⊥, then the rest of the proof is trivial. But why should proving this statement be any easier than proving the original statement? Once you’ve worked out a few such proofs, the answer to this question will be clear to you in the sharpest way: with proof by contradiction, you’ve moved the thing you have to prove into the assumption set on the left of the turnstile. If one of the other members of that set has a consequence which contradicts some consequence of the target, then you can establish the contradiction and the proof is virtually done. And it is typically much easier to carry out such a proof than to establish the negative conclusiondirectly. The present case illustrates this point nicely. Can we show that ¬p and p ∧ q together generate a contradiction? We should be able to—after all, the assumption ¬p means p is false, whereas the assumption p ∧ q can only be true if both p and q are true, meaning that p has to be true in order for p ∧ q to be true. That means that the two assumptions collide head on, and if we assume them both, we will get a contradiction with no problem:

p ∧ q ⊢ p ∧ q ∧E ¬p ⊢ ¬p p ∧ q ⊢ p ⊥I ¬p,p ∧ q ⊢⊥

And now we have a mate-in-one situation—the game is over. We simply apply ¬ Intro as given above, and the proof is done. p ∧ q ⊢ p ∧ q ∧E ¬p ⊢ ¬p p ∧ q ⊢ p ⊥I ¬p,p ∧ q ⊢⊥ ¬I ¬p ⊢ ¬(p ∧ q)

This proof gives you a small taste of the power of proof by contradiction: it allows you to challenge a complex expression indirectly, by establishing a consequence of that complex expression and then showing how that consequence is incompatible with the consequences of some other expression. Often, very difficult proofs can only be carried out by this method.

4 Proof by cases Another proof strategy which often works quite successfully is called ‘proof by cases’. This is a useful method when a disjunction is involved (and sometimes it’s possible to simplify a form of the proof by exploiting the fact that some particularly difficult formula is equivalent to a disjunction, and using proof-by-cases to solve the problem basing the solution on the conversion of the first formula into its disjunctive equivalent). The following example, involving the theorem (p ∧ q) ∨ r ⊢ r ∨ q shows how this approach works. Because we’re asked to assume a disjunction, we can only deduce a conclusion which holds regardless of which of the two disjuncts is true—i.e. we have to prove that it holds for both of them. What this means in the case of (p ∧ q) ∨ r ⊢ r ∨ q is that we need to prove two things: p ∧ q ⊢ r ∨ q and r ⊢ r ∨ q. If we can prove each of these, then by ∨ Elim we can prove the theorem. According to the ∨ Elim rule, which is

Γ ⊢ ϕ ∨ ψ ϕ ⊢ ̺ ψ ⊢ ̺ Γ ⊢ ̺

the proof of this theorem will be laid out in three parts. We establish each of the proofs separately and then put them together as the inference rule requires. To start with, we have to establish that p ∧ q ⊢ r ∨ q. This should ring a bell; you’ve already done something like that as the first proof in this file. The subproof looks like this:

p ∧ q ⊢ p ∧ q ∧E2 p ∧ q ⊢ q ∨I2 p ∧ q ⊢ r ∨ q

The second subproof is simpler still: we only have to prove r ⊢ r ∨q. And this is just a gift; it follows without anything fancy, in a single step, from the ∨ Intro rules:

r ⊢ r ∨I1 r ⊢ r ∨ q We now put these two subproofs together with the main assumption of the proof, and get the following:

p ∧ q ⊢ p ∧ q ∧E2 p ∧ q ⊢ q r ⊢ r ∨I2 ∨I1 (p ∧ q) ∨ r ⊢ (p ∧ q) ∨ r p ∧ q ⊢ r ∨ q r ⊢ r ∨ q ∨E (p ∧ q) ∨ r ⊢ r ∨ q

Exercises: In each case, construct a , along the lines that have been illustrated, of the state- ments given , using the system of Gentzen-style inference and structural rules that have been presented and illustrated in previous files. (Important hint/advisory: When you see a formula of the form ⊢ ϕ ⊃ ψ, it means that you have moved ϕ from the set of assumptions and ‘relocated’ it amongst the conclusions. The only rule which lets you do that in this setup is the ⊃ Intro rule.) The other hints I have for you are not to get too elaborate, and do not neglect the use of the structural rules in working out formal proofs!!. So far as the first point is concerned, these proof are all quite basic. They require a certain ingenuity in a couple of cases, but they were chosen for you to work on at this point in the course because they are doable, without demanding tremendous formal creativity. For purposes of what

5 we need to cover in this course, proofs that do require that kind of virtuosity are pointless, and you won’t be assigned them as problems either on homewore problem sets or on the take-home exams. So if you find yourself having to get extremely elaborate, you’re overthinking the problem and almost certainly missing a much simpler alternative. And concerning structural rules: these exist in order to make your life much, much easier than it would otherwise be. There is at least one problem in this group which will make you very glad that the structural rules are available.

1. p ∨ q ⊢ q ∨ p 2. p ⊃ q,p ⊢ p ∧ q 3. ⊢ q ⊃ (p ⊃ q) 4. p ∧ q, ¬p ⊢ r 5. ⊢ p ⊃ ¬¬p (Careful here! Don’t confuse this statement with the statement ¬¬p ⊃ p, which follows immediately from the ¬ Elim rule in conjunction with the ⊃ Intro rule (you should see this at once). 5. is the converse statement, and while the proof is simple in the extreme, it’s also somewhat devious (as all proofs by contradiction tend to be).)

6