Mathematical Reasoning and Discrete Math

Chapter 4: Propositional Proof Theory

Arguments, Inferences, and Proofs

A core reason why we study logic in mathematics, is to be able to prove mathematical theorems. Of course logic is also used in other domains, to prove arguments.

Consider the intuitive example argument "If you committed the murder then you must have been in the room with Mr. Higginswaddle when it happened. If you were in the room when it happened, then you could not be in Guadalajara that day. You were in Guadalajara that day. Therefore you could not have committed the murder."

Several of the statements here are not logical, they are merely "premises". A premise is any proposition which we accept without further argument.

In this example the premises of the argument are

  • If you committed the murder then you must have been in the room with Mr. Higginswaddle when it happened.
  • If you were in the room with Mr. Higginswaddle when it happened, then you could not be in Guadalajara that day.
  • You were in Guadalajara that day.

For each of these, we could argue their truth. That is relevant to the question of who committed the murder, but that is the job of "establishing the basic facts". This is not what logic is interested in.

Rather, logic comes in after we have established the basic facts. Logic is interested in how we make inferences from the premises which we already accept.

So what logic is interested in, for the purposes of the argument above, is the inference from all of the premises, to the conclusion

| You could not have committed the murder.

So logic is interested in inferences: the act of using established facts to infer other propositions which must be true because of the premises.

Definition

Any sequence of propositions, Γ=(ϕ1,ϕ2,...,ϕm)\Gamma = (\phi_1,\phi_2,...,\phi_m), may be called premises, where each of the propositions ϕi\phi_i is called a premise (1≤i≤m1\le i\le m).

Any proposition, ψ\psi, may be called a conclusion.

In that case, the pair (Γ,ψ)(\Gamma,\psi) is called an argument.

We say that the argument is valid if

(ϕ1∧ϕ2∧⋯∧ϕm)→ψ(\phi_1 \land \phi_2 \land \cdots \land \phi_m) \to \psi

is a tautology. Otherwise the argument is called invalid.

If the argument (Γ,ψ)(\Gamma,\psi) is valid, then we write

Γ⊨ψ\Gamma \vDash \psi

which is pronounced Γ\Gamma semantically entails ψ\psi.

If (Γ,ψ)(\Gamma,\psi) is not valid then we write

Γ⊭ψ\Gamma\not\vDash \psi

and we say that Γ\Gamma does not semantically entail ψ\psi.

Exercise

Consider the argument at the beginning of this section,

If you committed the murder then you must have been in the room with Mr. Higginswaddle when it happened. If you were in the room when it happened, then you could not be in Guadalajara that day. You were in Guadalajara that day. Therefore you could not have committed the murder.

Let us symbolize the premises as

  • P→QP\to Q
  • Q→¬RQ\to \neg R
  • RR

The conclusion of the argument is then ¬P\neg P.

Show that ((P→Q)∧(Q→¬R)∧R)→¬P((P\to Q)\land (Q\to \neg R) \land R)\to \neg P is a tautology.

Infer that the given argument is valid.

Exercise

Intuitvely, if you assume PP then it is valid to infer P∨QP\lor Q. I mean, if P is true then P∨QP\lor Q will have to be true, no matter what Q is. (Put formally, I am claiming that if Pम=टP^म = ट then (P∨Q)म=ट(P\lor Q)^म = ट. This is true whether Qम=टQ^म=ट or Qम=फQ^म=फ.)

Also intuitively, if you assume P then it is invalid to infer P∧QP\land Q. Since we don't assume the truth of Q then it is possible for Q to be false, and in that case P∧QP\land Q will be false. (Put formally, there is a model in which Pम=टP^म=ट and (P∧Q)म=फ(P\land Q)^म=फ.)

Make a truth-table which demonstrates

(P)⊨P∨Q(P) \vDash P\lor Q

and another which demonstrates

(P)⊭P∧Q(P) \not\vDash P\land Q

Simple Inference Rules

Usually a proof is not given all at once, but in small and intelligible steps. We call each step an "inference". A sequence of inferences then builds up to a proof.

Let's reuse the example from above,

If you committed the murder then you must have been in the room with Mr. Higginswaddle when it happened. If you were in the room when it happened, then you could not be in Guadalajara that day. You were in Guadalajara that day. Therefore you could not have committed the murder.

We might provide a proof by first making the following inference:

If you were in the room when it happened, then you could not be in Guadalajara that day. And you were in Guadalajara that day.

Therefore it is a relatively small and direct step, to infer that you were therefore not in the room when it happened.

We now accept

You were not in the room when it happened. And if you committed the murder then you must have been in the room with Mr. Higginswaddle when it happened.

Therefore another small and direct step is to infer that you did not commit the murder.

If we abstract the above proof into symbols, we would say:

  • We accept P→QP\to Q and Q→¬RQ\to \neg R, and R.
  • Because Q→¬RQ\to \neg R and R, we therefore infer ¬Q\neg Q.
  • Because ¬Q\neg Q and P→QP\to Q, we therefore infer ¬P\neg P.

The last two bullet points represent the use of an inference rule. The collection of all three bullet points is the entire proof. The first bullet point represents the premises of the proof, while the last line ends at the conclusion of the proof.

This proof demonstrates the validity claim,

(P→Q,Q→¬R,R)⊨¬P(P\to Q, Q\to \neg R, R)\vDash \neg P

Below we list several inference rules.

Definition

Conjunction Introduction is the inference rule “From ϕ\phi and ψ\psi we may infer ϕ∧ψ\phi\land\psi.”

Conjunction Elimination is the inference rule “From ϕ∧ψ\phi\land\psi we may infer ϕ\phi, and we may infer ψ\psi.”

Disjunction Introduction is “From ϕ\phi we may infer ϕ∨ψ\phi\lor\psi, or we may infer ψ∨ϕ\psi\lor\phi, for any formula ψ\psi.”

Disjunction Elimination is “From ϕ∨ψ\phi\lor\psi and ¬ϕ\neg \phi we may infer ψ\psi. From ϕ∨ψ\phi\lor\psi and ¬ψ\neg \psi we may infer ϕ\phi.”

Conditional Elimination is “From ϕ→ψ\phi\to\psi and ϕ\phi we may infer ψ\psi.”

Biconditional Elimination is “From ϕ↔ψ\phi\leftrightarrow \psi and ϕ\phi we may infer ψ\psi. From ϕ↔ψ\phi\leftrightarrow \psi and ψ\psi we may infer ϕ\phi.”

Each of the above inference rules are justified by the fact that, when its assumptions are true, then its conclusion is guaranteed to also be true. This can always be confirmed by a truth-table.

Here is a demonstration for Conjunction Elimination:

PQP∧QPटटटटटफफटफटफफफफफफ\begin{array}{|c|c||c|c|c||c|} \hline P & Q & P & \land & Q & P \\ \hline \color{red} ट & \color{red}ट & & \color{red}ट & & \color{red}ट \\ ट & फ & & फ & & ट \\ \color{red}फ & \color{red}ट & & \color{red}फ & & \color{red}फ \\ फ & फ & & फ & & फ \\ \hline \end{array}

Here we have the truth-table for the premise P∧QP\land Q and the conclusion P. The first two columns show all possible combinations of truth-values for P and Q. The next three columns show the truth-value of the premise, P∧QP\land Q, with the truth-value placed under its main connective, ∧\land. The final column shows the truth-value of the conclusion, P.

There is just one row where P∧QP\land Q is true, on row number 1. In this row, we also have that P is true.

So this shows that “Whenever P∧QP\land Q is true, we have P is true.” This means that the inference rule is valid, because it will never take us from a true proposition to a false one.

Let’s check the Disjunction Elimination rule. Here is the truth-table for P∨QP\lor Q and ¬P\neg P and Q.

PQP∨Q¬PQटटटफटटफटफफफटटटटफफफटफ\begin{array}{|c|c||c|c|c||c|c||c|}\hline P & Q & P & \lor & Q & \neg & P & Q \\\hline \color{red}{ट} & \color{red}{ट} & & \color{red}{ट} & & \color{red}{फ} & & \color{red}{ट} \\\hline ट & फ & & ट & & फ & & फ \\\hline \color{red}{फ} & \color{red}{ट} & & \color{red}{ट} & & \color{red}{ट} & & \color{red}{ट} \\\hline फ & फ & & फ & & ट & & फ \\\hline \end{array}

Let’s look only at the rows in which the assumptions of the inference rule are true. These would be the rows where both P∨QP\lor Q and ¬P\neg P are true. This happens only at one row, which is row number 3.

In this row, the value of Q is true. So yet again, the inference rule is valid.


It can be helpful to see an example of an inference rule that is not valid. This would require a rule in which the premises can be true but the inferred proposition false.

An example would be "From PP we can infer P∧QP\land Q". Let's see a truth-table which demonstrates why this is invalid.

PQPP∧Qटटटटटफटफफटफफफफफफ\begin{array}{|c|c||c||c|c|c|}\hline P & Q & P & P & \land & Q \\\hline \color{red}{ट} & \color{red}{ट} & \color{red}{ट} & & \color{red}{ट} & \\\hline ट & फ & ट & & फ & \\\hline \color{red}{फ} & \color{red}{ट} & \color{red}{फ} & & \color{red}{फ} & \\\hline फ & फ & फ & & फ & \\\hline \end{array}

Here we have the truth-table for P and then P∧QP\land Q.

For the inference "If P then P∧QP\land Q" to be valid, we should look at each model (row of the truth-table). If there is a model where P is true, we check that in that model also P∧QP\land Q is true.

However, this time, that's not true! There is an offending row!

It is row 2, the model in which Pम=टP^म=ट and Qम=फQ^म=फ. In this model, P is true while P∧QP\land Q is false.

For this reason, the inference "If P then P∧QP\land Q" is invalid.

It just takes one model.

Note that just one "offending" model is all it takes to demonstrate that an inference is invalid. (By "offending" model I mean a model in which the premise(s) is(are) true while the conclusion is false.)

If there are many such offending models, then the argument is invalid. But even if there is just one, then that still means the inference is invalid.

Exercise

Show that all of the other inference rules are valid.

Exercise

We could (but will not) have an inference rule “From ¬(¬ϕ)\neg(\neg \phi) we may infer ϕ\phi.”

Prove that this inference rule is valid.

Proofs

In the section above we mostly focused on inference rules, but of course, inference rules exist so that we may combine them into a proof. Again, a proof is just a sequence of inferences.

For example, suppose that we accept the formulas

  • ¬P\neg P
  • P∨QP\lor Q
  • Q→RQ\to R.

Let’s write a "paragraph-style" proof, from these assumptions, to the conclusion R.

Because we accept ¬P\neg P and P∨QP\lor Q, therefore we may use the Disjunction Elimination rule to infer Q. Therefore we now accept Q.

Because we now accept Q and Q→RQ\to R, then we may use the Conditional Elimination rule to infer R.

Because we now accept R, which is the intended conclusion of the proof, then this proof is complete.


Notice the way that the proof above works:

  1. We start by assuming the truth of some formulas.
  2. Using these assumptions, we apply the inference rules to infer new formulas. When a new formula is inferred, it may then be used in further steps.
  3. We continue this process until we eventually infer the conclusion of the proof.

Exercise

Assume the formulas (P∧Q)→(R∧S)(P\land Q)\to (R\land S), and P, and Q.

Prove the formula R∨TR\lor T.

Substitution

In this section, we are going to discuss substitution, because it will help us to define more inference rules.

Let's start with an example.

Suppose that we already accept (P∨Q)∧R(P\lor Q)\land R. Notice that the formula P∨QP\lor Q is a subformula.

Moreover notice that Q∨PQ\lor P is equivalent to P∨QP\lor Q.

Therefore if we substitute P∨QP\lor Q with Q∨PQ\lor P, it shouldn’t change the value of the formula. That is to say, (P∨Q)∧R(P\lor Q)\land R should be equivalent to (Q∨P)∧R(Q\lor P)\land R.

Exercise

Draw a truth-table to prove that (P∨Q)∧R(P\lor Q)\land R is equivalent to (Q∨P)∧R(Q\lor P)\land R.

More generally suppose that

  • ϕ\phi is a formula,
  • χ\chi is a subformula of ϕ\phi,
  • and ψ\psi is equivalent to χ\chi.

Then it should be true that, if you substitute ψ\psi for χ\chi then the result should be equivalent to ϕ\phi.

Substitution of a subformula with an equivalent subformula results in an equivalent formula.

In order to define an inference rule for substitution, we first have to define substitution.

Definition

Suppose that ϕ,χ,ψ\phi,\chi,\psi are all propositional formulas. We define [ϕ]χ:=ψ[\phi]_{\chi := \psi} to mean “everywhere that χ\chi is a subformula of ϕ\phi, replace it with ψ\psi.”

We will mostly be interested in substituting equivalent subformulas, but in principle it is possible to substitute non-equivalent subformulas.

For example, let’s calculate [(P∧((¬Q)∨R))]¬Q:=P∧S[(P\land ((\neg Q)\lor R))]_{\neg Q := P\land S}.

First we take the formula P∧((¬Q)∨R)P\land ((\neg Q)\lor R) and identify where it has the subformula ¬Q\neg Q. We see that it has the subformula here:

P∧((¬Q)∨R)P\land (\colorbox{yellow}{$(\neg Q)$}\lor R)

We then replace this subformula with the subformula P∧SP\land S, to obtain the result,

P∧((P∧S)∨R)P\land ((P\land S)\lor R)

There ya go, that's how do you do substitution in general!

Exercise

Show that [P∧(Q→P)]P:=¬P[P\land (Q\to P)]_{P:= \neg P} is equal to (¬P)∧(Q→¬P)(\neg P)\land (Q\to\neg P).

Show that [P∧Q]R:=S[P\land Q]_{R:= S} is equal to P∧QP\land Q.

Exercise

Suppose that ϕ\phi is a propositional formula such that χ\chi does not occur as a subformula of ϕ\phi. Let ψ\psi be any formula.

Explain why ϕχ:=ψ=ϕ\phi_{\chi:= \psi}=\phi.

Now that we understand substitution, we can state the following inference rules.

Definition

Let ϕ,χ,ψ,ω\phi,\chi,\psi,\omega be propositional formulas.

Double negation is the inference rule that, from ϕ\phi, one can infer either [ϕ]χ:=¬(¬χ)[\phi]_{\chi:= \neg(\neg\chi)} or [ϕ]¬(¬χ):=χ[\phi]_{\neg(\neg\chi):= \chi}.

What double negation says.

What does "[ϕ]χ:=¬(¬χ)[\phi]_{\chi := \neg(\neg \chi)}" mean?

It means "In any formula (ϕ\phi), you can always replace any part (χ\chi) with its double-negation (¬(¬χ)\neg(\neg \chi))."

Conjunction commutativity is the inference rule that, from ϕ\phi one can infer ϕχ∧ψ:=ψ∧χ\phi_{\chi\land\psi := \psi\land\chi}.

Conjunction associativity is the inference rule that, from ϕ\phi one can infer either ϕχ∧(ψ∧ω):=(χ∧ψ)∧ω\phi_{\chi\land(\psi\land\omega) := (\chi\land\psi)\land\omega} or ϕ(χ∧ψ)∧ω:=χ∧(ψ∧ω)\phi_{(\chi\land\psi)\land\omega:= \chi\land(\psi\land\omega)}.

Disjunction commutativity is the inference rule that, from ϕ\phi one can infer ϕχ∨ψ:=ψ∨χ\phi_{\chi\lor\psi:=\psi\lor\chi}.

Disjunction associativity is the inference rule that, from ϕ\phi one can infer either ϕχ∨(ψ∨ω):=(χ∨ψ)∨ω\phi_{\chi\lor(\psi\lor\omega) := (\chi\lor\psi)\lor\omega} or ϕ(χ∨ψ)∨ω:=χ∨(ψ∨ω)\phi_{(\chi\lor\psi)\lor\omega:= \chi\lor(\psi\lor\omega)}.

De Morgan’s is the inference rule that, from ϕ\phi one can infer either ϕ¬(χ∨ψ):=(¬χ)∧(¬ψ)\phi_{\neg(\chi\lor\psi):=(\neg\chi)\land(\neg\psi)} or ϕ(¬χ)∧(¬ψ):=¬(χ∨ψ)\phi_{(\neg\chi)\land(\neg\psi):=\neg(\chi\lor\psi)} or ϕ¬(χ∧ψ):=(¬χ)∨(¬ψ)\phi_{\neg(\chi\land\psi):= (\neg\chi)\lor(\neg\psi)} or ϕ(¬χ)∨(¬ψ):=¬(χ∧ψ)\phi_{(\neg \chi)\lor(\neg\psi):=\neg(\chi\land\psi)}.

Distribution is the inference rule that, from ϕ\phi one can infer either ϕχ∧(ψ∨ω):=(χ∧ψ)∨(χ∧ω)\phi_{\chi\land(\psi\lor\omega) := (\chi\land\psi)\lor(\chi\land \omega)} or ϕχ∨(ψ∧ω):=(χ∨ψ)∧(χ∨ω)\phi_{\chi\lor(\psi\land\omega):= (\chi\lor\psi)\land(\chi\lor\omega)}.

Factorization is the inference rule that, from ϕ\phi one can infer either ϕ(χ∧ψ)∨(χ∧ω):=χ∧(ψ∨ω)\phi_{(\chi\land\psi)\lor(\chi\land\omega):=\chi\land(\psi\lor\omega)} or ϕ(χ∨ψ)∧(χ∨ω):=χ∨(ψ∧ω)\phi_{(\chi\lor\psi)\land(\chi\lor\omega):=\chi\lor(\psi\land\omega)}.

Material implication is the inference rule that, from ϕ\phi one can infer ϕχ→ψ:=(¬χ)∨ψ\phi_{\chi\to\psi:= (\neg \chi)\lor\psi} or ϕ(¬χ)∨ψ:=χ→ψ\phi_{(\neg\chi)\lor\psi:=\chi\to\psi}.

Biconditional commutativity is the inference rule that, from ϕ\phi one can infer ϕχ↔ψ:=ψ↔χ\phi_{\chi\leftrightarrow\psi := \psi\leftrightarrow\chi}.

Reiteration is the inference rule that, if ϕ\phi has been proved before, then it can be used later in a proof, at any time.

Let's see how we can use these rules to show that from P we can infer ¬(¬P)\neg(\neg P). To do so we'll use the double negation rule.

In this example, ϕ=P\phi=P and χ=P\chi = P.

We are using the version of double negation, in which we infer ϕχ:=¬(¬χ)\phi_{\chi:=\neg(\neg\chi)}. In this case, that means we are inferring PP:=¬(¬P)P_{P:=\neg(\neg P)}.

Let's calculate that

PP:=¬(¬P)=¬(¬P)P_{P:=\neg(\neg P)} = \neg(\neg P)

The double negation rule therefore says that from P we may infer ¬(¬P)\neg(\neg P).


Here is another worked example, again using double negation but this time in the other direction.

From P∨¬(¬Q)P\lor \neg(\neg Q) we can infer P∨QP\lor Q.

In this example, we use ϕ=P∨¬(¬Q)\phi=P\lor \neg(\neg Q) and χ=Q\chi = Q. We use the version of double negation which lets us infer ϕ¬(¬χ):=χ\phi_{\neg(\neg \chi):=\chi}.

Since

P∨¬(¬Q)¬(¬Q):=Q=P∨QP\lor\neg(\neg Q)_{\neg(\neg Q):= Q} = P\lor Q

this explains how the rule allows us to infer P∨QP\lor Q.

Exercise

Use conjunction commutativity to infer, from P∧(Q∨R)P\land(Q\lor R), that (Q∨R)∧P(Q\lor R)\land P.

Identify ϕ,χ,ψ\phi,\chi,\psi as you apply the rule.

Exercise

Use disjunction commutativity to infer, from P∧(Q∨R)P\land (Q\lor R), that P∧(R∨Q)P\land (R\lor Q).

Exercise

Use distribution to infer, from P∧(Q∨R)P\land (Q\lor R), that (P∧Q)∨(P∧R)(P\land Q)\lor(P\land R).

Exercise

Infer from P∧(Q∨R)P\land (Q\lor R) that (R∨P)∧(Q∨P)(R\lor P)\land (Q\lor P).

Note: This inference requires several steps. One way to do it is to first use distribution, and then use commutativity three times.

Fitch-style Proofs

We will now develop a formal system of writing proofs.

Let's begin from an example. From the assumption P∧(Q∧R)P\land (Q\land R) we will prove R.

Here is a presentation of the proof in a "Fitch-style" sequence of lines. Each line carries an index (numbering), the formula, and the inference rule which allows us to infer it together with the previously accepted formula indices which are used in the inference rule.

I've colored assumptions in red and the conclusion in green.

Index Formula Reason
1. P∧(Q∧R)P\land (Q\land R) Assumption
2. Q∧RQ\land R Conjunction Elimination from 1
3. R Conjunction Elimination from 2.

Let’s see another example. From the assumptions ¬Q\neg Q and P→QP\to Q, we prove ¬P\neg P.

Index Formula Reason
1. ¬Q\neg Q Assumption
2. P→QP\to Q Assumption
3. (¬P)∨Q(\neg P)\lor Q Material Implication from 2
4. ¬P\neg P Disjunction Elimination from 1, 3.

The table is a nice way to display the proof, but it is just a visual aid.

The proof itself is just the sequence of propositions. Consider the first table proof that I presented above. It is a sequence of assumptions, P∧(Q∧R)P\land (Q\land R), and then a sequence of inferences, Q∧R,RQ\land R, R.

If we did not care about readability at all, we would write proofs as mere sequences. This is, in fact, how we will formally define what a proof is.

But note that a proof is not just any two sequences of propositions. There must be a sequence of assumptions, and a sequence of inferences. Each formula in the sequence of inferences must be justified by an inference rule that uses earlier formulas.

Alternate styles of proof systems.

There are other ways of displaying a proof. All of them are valid.

  1. Before this section on Fitch-style proofs, we presented proofs in a "paragraph style". This writes proofs like they are just in natural language prose.

  2. There are also “Gentzen-style proofs” and “the sequent calculus”. They all prove the same things, they just do so with different styles of notation.

    See this article from the SEP for more information on proof styles. https://plato.stanford.edu/archives/fall2025/entries/natural-deduction/

Definition

Let Γ=(ϕ1,ϕ2,...,ϕm)\Gamma = (\phi_1, \phi_2,...,\phi_m) be a finite sequence of formulas, which we will call the (sequence of) assumptions.

Let Ψ=(ψ1,ψ2,...,ψn)\Psi = (\psi_1,\psi_2,...,\psi_n) be a finite sequence of formulas. We say that Ψ\Psi is a proof of ψn\psi_n from Γ\Gamma if the following conditions hold.

For every 1≤i≤n1\le i\le n,

  • Either ψi∈Γ\psi_i \in\Gamma, or
  • there is an inference rule such that the formulas ϕ1,ϕ2,...,ϕm,ψ1,ψ2,...,ψi−1\phi_1,\phi_2,...,\phi_m, \psi_1,\psi_2,...,\psi_{i-1} allow one to infer ψi\psi_i.

We call ψn\psi_n the conclusion of the proof.

Let Γ\Gamma be a sequence or formulas, and ψ\psi a formula. If there exists a proof of ψ\psi from Γ\Gamma, then we write

Γ⊢ψ\Gamma \vdash \psi

which is pronounced, Γ\Gamma syntactically entails (or proves) ψ\psi.

The definition put simply.

The simple version of what this definition says, is that a proof is a sequence (the sequence is made up of both Γ\Gamma and Ψ\Psi) of formulas, each with a justification. A formula may be justified by being an assumption. (If there are any assumptions, we traditionally place these at the beginning of the proof, but it's not technically required.)

If a formula is not an assumption, then it must be justified by an inference rule. An inference rule must refer only to propositions which have already been accepted earlier in the proof.

And a proof must always end on with the concluding formula.

Notice the difference between semantic and syntactic entailment. Let Γ\Gamma be a finite sequence of formulas, and ψ\psi a formula.

The expression

Γ⊨ψ\Gamma \vDash \psi

is a semantic notion. It is stated in terms of truth values.

The expression

Γ⊢ψ\Gamma \vdash \psi

is a syntactic notion. It is stated entirely in terms of the existence of certain formulas.

The point of a proof, is to demonstrate that an argument is valid. That is to say, we hope that Γ⊢ψ\Gamma\vdash\psi will ensure that Γ⊨ψ\Gamma\vDash\psi. We will have more to say about this later.


Based on the formal definition of a proof above, the following is a proof:

Γ=(P,Q),Ψ=(P∧Q,(P∧Q)∧P)\Gamma = (P, Q), \Psi = (P\land Q, (P\land Q)\land P)

Notice that Γ\Gamma is allowed to be any finite sequence of propositions.

The propositions of Ψ\Psi, however, must be inferrable. That is to say, for each proposition in Ψ\Psi, there must be an inference rule which can infer that proposition from Γ\Gamma or the earlier propositions.

For example, ψ1=P∧Q\psi_1 = P\land Q is justified by Conjunction Introduction with reference to ϕ1=P∈Γ\phi_1 = P \in \Gamma and ϕ2=Q∈Γ\phi_2=Q\in\Gamma.

Next ψ2=(P∧Q)∧P\psi_2 = (P\land Q)\land P is justified by Conjunction Introduction with reference to ϕ1=P∈Γ\phi_1=P\in\Gamma and ψ1=P∧Q\psi_1 = P\land Q.

The conclusion of a proof is always the last proposition, so the conclusion is (P∧Q)∧P(P\land Q)\land P.

Exercise

Decide whether the following pairs of sequences of propositions is a proof or not. If it is a proof, identify the conclusion of the proof.

  1. Γ=(P,Q)\Gamma = (P,Q) and Ψ=(R,S)\Psi = (R, S).
  2. Γ=(P,Q)\Gamma = (P,Q) and Ψ=(P)\Psi = (P).
  3. Γ=(P,Q)\Gamma = (P,Q) and Ψ=(Q,P,P∧Q,P)\Psi = (Q,P,P\land Q,P).

We now know the formal definition of a proof. From now on, we mostly ignore the formalism—we will only use tabular proofs.

For emphasis, I will color the assumptions with red and the conclusion with green.


Below is a long and challenging proof. Don’t worry if it seems like something you couldn’t do yourself—working out these proofs is a skill that grows with exercise and time.

From the assumptions P→QP\to Q and R→QR\to Q and P∨RP\lor R, we will prove Q. That is to say, the proof below demonstrates

(P→Q,R→Q,P∨R)⊢Q(P\to Q, R\to Q, P\lor R) \vdash Q

Index Formula Reason
1. P→QP\to Q Assumption
2. R→QR\to Q Assumption
3. P∨RP\lor R Assumption
4. (¬P)∨Q(\neg P)\lor Q Material Implication from 1
5. (¬R)∨Q(\neg R)\lor Q Material Implication from 2
6. Q∨¬PQ\lor \neg P Disjunction Commutativity from 4
7. Q∨¬RQ\lor \neg R Disjunction Commutativity from 5
8. (Q∨¬P)∧(Q∨¬R)(Q\lor \neg P)\land (Q\lor \neg R) Conjunction Introduction from 6, 7
9. Q∨((¬P)∧(¬R))Q\lor ((\neg P)\land (\neg R)) Factorization from 8
10. Q∨¬(P∨R)Q\lor\neg(P\lor R) De Morgan’s from 9
11. ¬(¬(P∨R))\neg(\neg(P\lor R)) Double Negation from 3
12. Q Disjunction Elimination from 10, 11.

Exercise

From the assumptions P and P→QP\to Q and Q→RQ\to R, prove R. That is to say, show that

(P,P→Q,Q→R)⊢R(P, P\to Q, Q\to R)\vdash R

From the assumption (P∧Q)∨(P∧R)(P\land Q)\lor (P\land R) prove P. That is to say, show

((P∧Q)∨(P∧R))⊢P((P\land Q)\lor (P\land R)) \vdash P

From the assumptions (¬P)∨Q(\neg P)\lor Q and P, prove Q. That is to say,

((¬P)∨Q,P)⊢Q((\neg P)\lor Q, P) \vdash Q

(The first proof requires six lines, and the others require significantly fewer.)

Conditional Introduction

Consider the argument that, from P→QP\to Q and Q→RQ\to R it should follow that P→RP\to R.

This is a valid argument, because whenever the assumptions are true, you will find that the conclusion is true. We could demonstrate this fact using a truth-table.

However, it is not possible (or at least, not easy) to prove this using the inference rules that we have defined up to this point. Therefore we need more inference rules, and here we introduce the Conditional Introduction rule. This rule is distinct from the others, in that it requires the idea of a “subproof”.

Before describing this rule, I want to point out that—although this rule might, at first, seem complicated—it is a very natural style of reasoning. It is so natural, that we have been used it repeatedly in the earlier case study on number theory.

Recall the proof that, for natural numbers a,na,n,

| If we have a∣na|n then na\frac n a is a natural number.

This is an "if-then" proposition, and we used a "conditional introduction" proof.

Without rehearsing the entire proof, the broad structure of the proof was:

  • Assume a∣na|n. (I.e. assume the antecedent.)
  • Go through a few reasoning steps.
  • We were able to show that na\frac n a was a natural number. (I.e. prove the consequent.)

That is exactly the structure of a Conditional Introduction proof. If you want to prove the conditional ϕ→ψ\phi\to\psi then

  • Assume ϕ\phi.
  • Go through a few reasoning steps.
  • Show ψ\psi.

Let's demonstrate with an example. We will now prove, from P→QP\to Q and Q→RQ\to R the conclusion that P→RP\to R.

Index Formula Reason
1. P→QP\to Q Assumption
2. Q→RQ\to R Assumption
3. P→RP\to R Conditional Introduction from sub-proof below.
3. conditional sub-proof
Index Formula Reason
3.1. P Assumption for Conditional Introduction
3.2. Q Conditional Elimination from 1, 3.1
3.3. R Conditional Elimination from 2, 3.2.

To explain how this works, notice line 3, which holds the proposition P→RP\to R. This line is justified by the subproof below it.

The sub-proof mirrors what we said generally:

  • It assumes the antecedent, P (line 3.1).
  • It goes through some reasoning steps (lines 3.2 and 3.3).
  • It shows the consequent, R (line 3.3).

As a comment about how we write sub-proofs in tabular form:

  • They are written with extra indentation.
  • They use a sub-indexing system. Since the conditional P→RP\to R was on line 3, then the indices of the sub-proof are 3.1, 3.2, and so on.

Here is another example. From P→RP\to R, and P→SP\to S, and (P→(R∧S))→Q(P\to (R\land S))\to Q we can prove that Q.

Index Formula Reason
1. P→RP\to R Assumption
2. P→SP\to S Assumption
3. (P→(R∧S))→Q(P\to (R\land S))\to Q Assumption
4. P→(R∧S)P\to (R\land S) Conditional Introduction from subproof below
4. conditional sub-proof
Index Formula Reason
4.1. P Assumption for Conditional Introduction
4.2. R Conditional Elimination from 1, 4.1
4.3. S Conditional Elimination from 2, 4.1
4.4. R∧SR\land S Conjunction Introduction from 4.2, 4.3.
Index Formula Reason
5. Q Conditional Elimination from 3, 4.

Let’s now see how a sub-proof can go wrong.

Consider the following invalid proof that, from P, we can infer Q.

Index Formula Reason
1. P Assumption
2. Q→PQ\to P Conditional Introduction from subproof below
2. conditional sub-proof
Index Formula Reason
2.1. Q Assumption for Conditional Introduction
2.2. P Reiteration from 1.
Index Formula Reason
3. Q Reiteration from 2.1.

This proof must be invalid—P does not imply Q. It is intuitively true that, from a given proposition (P) one should not be able to infer some other random and unrelated proposition (Q).

We can also demonstrate that the argument is invalid using a truth-table. I will leave that to you to work out in detail, but I promise: In the truth-table, there is a row at which P is true while Q is false.

Therefore something must have gone wrong. But specifically, where? It seems like we have only used inference rules at each step, which we previously accepted as valid.

The error is on line (3).

Why is this a mistake? It seems like it is merely reiteration of a previous line, which is an inference rule that we've accepted and used before.

The answer comes from thinking carefully about the logic of Conditional Introduction. When we prove a proposition by Conditional Introduction, we assume its antecedent, and the work from this assumption. Anything that we prove, under this assumption, must always come with the caveat "this is true only provided that the antecedent is true".

In line 3, we exported a statement from a subproof, to a line which is outside of the subproof. This removes the context. It removes the assumption of the antecedent.

Therefore when we formally define the Conditional Introduction inference rule, below, we should specify once a Conditional Introduction subproof is concluded, we may no longer use the propositions which occur inside of the Conditional Introduction.

Definition

Let ϕ,ψ\phi,\psi be propositional formulas.

Conditional Introduction is the following inference rule.

The following allows you to infer ϕ→ψ\phi\to\psi.

First, assume ϕ\phi.

Using ϕ\phi and any other formulas already accepted, then prove ψ\psi.

Once this is done, you must stop assuming ϕ\phi and any of the formulas proved after assuming ϕ\phi.

We can also have sub-proofs within sub-proofs. To demonstrate, here is a proof from (P∧Q)→R(P\land Q)\to R that P→(Q→R)P\to (Q\to R).

Index Formula Reason
1. (P∧Q)→R(P\land Q)\to R Assumption
2. P→(Q→R)P\to(Q\to R) Conditional Introduction from subproof below.
2. conditional sub-proof
Index Formula Reason
2.1. P Assumption
2.2. Q→RQ\to R Conditional Introduction from subproof below.
2.2. conditional sub-proof
Index Formula Reason
2.2.1. Q Assumption
2.2.2. P∧QP\land Q Conjunction Introduction from 2.1, 2.2.1
2.2.3. R Conditional Elimination from 1, 2.2.2.

In fact, we can now have proofs which use no premises at all!

In the example below, I give a proof, from no premises, to the conclusion that P→PP\to P. It makes sense that we should be able to prove tautologies like this: they are always true, regardless of your assumptions.

Index Formula Reason
1. P→PP\to P Conditional Introduction from subproof below.
1. conditional sub-proof
Index Formula Reason
1.1. P Assumption for Conditional Introduction
1.2. P Reiteration from 1.1.
Why proofs?

Any proof which is

Exercise

  1. Prove, from no premises, that P→(Q→P)P\to (Q\to P).
  2. Prove, from P and Q and (P↔Q)→(R∧S)(P\leftrightarrow Q) \to (R\land S), that R.

Exercise

There are times in mathematics when one wants to prove an “or” statement. This can be difficult if we approach it directly. In the most interesting cases, one cannot prove P∨QP\lor Q simply by proving each of P and Q. If you could that, then you could prove the stronger claim P∧QP\land Q! So why bother even stating the weaker claim, P∨QP\lor Q?

In these interesting cases, you need a more sophisticated strategy. In order to prove P∨QP\lor Q it is typical to prove the logically equivalent proposition (¬P)→Q(\neg P)\to Q.

Prove, from R→SR \to S, and T→UT\to U, and R∨TR\lor T, that S∨US\lor U.

Hint: Since what you want to prove is S∨US\lor U then I recommend instead proving (¬S)→U(\neg S)\to U. Once you have this, then use the Material Implication inference rule.

Biconditional Introduction

Definition

Biconditional Introduction is the following inference rule.

The following allows you to infer ϕ↔ψ\phi\leftrightarrow \psi.

Assume ϕ\phi.

Using ϕ\phi and any formulas already proved, then prove ψ\psi. Then stop assuming ϕ\phi and any of the formulas proved after it.

Now assume ψ\psi.

Using ψ\psi and any formulas already proved, then prove ϕ\phi. Then stop assuming ψ\psi and any of the formulas proved after it.

Here is a demonstration. We prove, from no premises, that P↔(P∧P)P\leftrightarrow (P\land P).

Notice that we must effectively do two separate conditional introduction proofs, one going in each of the directions.

The sub-indexing is designed to reflect each direction. We use the notation 1.only.1 to indicate the sub-proof in the “only if” direction. In this case, that means the P→(P∧P)P\to (P\land P) direction.

We use the notation 1.if.1 to indicate the “if” direction. In this case, that means (P∧P)→P(P\land P)\to P.

Index Formula Reason
1. P↔(P∧P)P\leftrightarrow (P\land P) Biconditional Introduction from subproof below.
1. "Only" sub-proof
Index Formula Reason
1.only.1 P Assumption for Biconditional Introduction
1.only.2 P∧PP\land P Conjunction Introduction from 1.only.1, 1.only.1.
1. "If" sub-proof
Index Formula Reason
1.if.1 P∧PP\land P Assumption for Biconditional Introduction
1.if.2 P Conjunction Elimination from 1.if.1.

Exercise

Prove ((P→Q)→R)↔((P∧¬Q)∨R)((P\to Q)\to R) \leftrightarrow ((P\land \neg Q)\lor R).

Proof by Cases

Recall the proof that every number is even or odd, but not both. This was a “proof by cases”.

By a very brief summary, let the number be n. Then if nmod  2=0n \mod 2 = 0, we proved that n is even or odd, but not both. However, if nmod  2=1n\mod 2 = 1, we proved that n is even or odd, but not both.

This generally is called a “proof by cases”. The two “cases” are nmod  2=0n\mod 2=0 or nmod  2=1n\mod 2 = 1.

In propositional logic it is structured like so: Let ϕ,χ,ψ\phi,\chi,\psi be formulas. Suppose we have already accepted ϕ∨ψ\phi\lor\psi, and we’ve accepted ϕ→χ\phi\to \chi, and we’ve accepted ψ→χ\psi\to\chi. Then we can infer χ\chi.

This is stated for two cases, when we have ϕ∨ψ\phi\lor\psi. However, we can generalize this to a rule for longer disjunction.

Definition

Proof by cases is the following inference rule. Let ϕ1,ϕ2,…,ϕn,ψ\phi_1,\phi_2,\dots,\phi_n,\psi be formulas.

From ϕ1∨⋯∨ϕn\phi_1\lor\cdots\lor\phi_n, and ϕ1→ψ\phi_1\to\psi and ϕ2→ψ\phi_2\to\psi and … and ϕn→ψ\phi_n\to\psi, you may infer ψ\psi.

In the example below I show you how we'll draw a proof by cases in tabular form. Let's prove that from P→QP\to Q and R→SR\to S we have (P∨R)→(Q∨S)(P\lor R)\to (Q\lor S).

Index Formula Reason
1. P→QP\to Q Assumption
2. R→SR\to S Assumption
3. (P∨R)→(Q∨S)(P\lor R)\to (Q\lor S) Conditional Introduction from subproof below
3. conditional sub-proof
Index Formula Reason
3.1. P∨RP\lor R Assumption for conditional introduction
3.2. P→(Q∨S)P\to (Q\lor S) Conditional Introduction from subproof below.

3.2. conditional subproof

Index Formula Reason
3.2.1. P Assumption for Conditional Introduction
3.2.2. Q Conditional Elimination from 1 and 3.2.1
3.2.3. Q∨SQ\lor S Disjunction Introduction from 3.2.2.
Index Formula Reason
3.3. R→(Q∨S)R\to (Q\lor S) Conditional Introduction from subproof below

3.3. conditional subproof

Index Formula Reason
3.3.1. R Assumption for Conditional Introduction
3.3.2. S Conditional Elimination from 2 and 3.3.1
3.3.3. Q∨SQ\lor S Disjunction Introduction from 3.3.2.
Index Formula Reason
3.4. Q∨SQ\lor S Proof by Cases from 3.1, 3.2, and 3.3.

Exercise

Use a proof by cases to prove, from P→QP\to Q and R→SR\to S, and T→(Q∧U)T\to (Q\land U), the conclusion (P∨R∨T)→(Q∨S)(P\lor R\lor T)\to (Q\lor S).

Proof by Contradiction

Here is a kind of every-day example of proof by contradiction:

A brilliant detective is investigating a crime, and questions the butler, “Did you kill Mr. Hitchens?”

The butler says “No, I was in the garden when Mr. Hitchens was killed in the kitchen, but I heard him scream.”

The detective’s eyes widen, “Oh? If you were in the garden, then you couldn’t hear Mr. Hitchens scream. The gardnen is walled, and the kitchen too far away. But you said that you did hear Mr. Hitchens scream! This is a contradiction!”

Let’s describe the general structure of a proof by contradiction. Suppose that you want to infer ϕ\phi. Then to give a proof of ϕ\phi by contradiction,

  • Assume ¬ϕ\neg\phi (only for the sake of argument).
  • Take some reasoning steps.
  • Prove a contradiction.

This justifies ϕ\phi.

Why? Well it shows that ¬ϕ\neg \phi leads to a contradiction. Therefore ¬ϕ\neg\phi must be false and so ϕ\phi must be true.

Let’s now see an example in practice. From P→QP\to Q and ¬Q\neg Q, we prove ¬P\neg P.

Index Formula Reason
1. P→QP\to Q Assumption
2. ¬Q\neg Q Assumption
3. ¬P\neg P Proof by Contradiction from subproof below.
3. contradiction sub-proof
Index Formula Reason
3.1. ¬(¬P)\neg(\neg P) Assumption for Proof by Contradiction
3.2. P Double Negation from 3.1
3.3. Q Conditional Elimination from 1, 3.2
3.4. Q∧¬QQ\land \neg Q Conjunction Introduction from 2, 3.3.

Look over this proof and see how it aligns with what we described earlier. The sub-proof is structured by:

  • We are trying to prove ¬P\neg P.
  • Therefore we assume ¬(¬P)\neg(\neg P).
  • We go through some reasoning steps after that (lines 3.2 to 3.4).
  • The last line of the sub-proof is the contradiction Q∧¬QQ\land \neg Q.

Once a sub-proof is closed off, the remaining proof is never allowed to refer to lines inside a finished sub-proof. We already saw how this can lead to invalid inferences in Conditional Introduction. Let’s see an example of how breaking this rule can lead to invalid inferences using Proof by Contradiction.

Here we give an invalid proof that from P we can infer Q. That is to say, we will give an incorrect "proof" that (P)⊢Q(P)\vdash Q.

Index Formula Reason
1. P Assumption
2. ¬(Q∧¬Q)\neg(Q\land \neg Q) Proof by Contradiction from subproof below
2. contradiction sub-proof
Index Formula Reason
2.1. ¬(¬(Q∧¬Q))\neg(\neg(Q\land \neg Q)) Assumption for Proof by Contradiction
2.2. Q∧¬QQ\land\neg Q Double negation from 2.1
2.3. Q Conjunction Elimination from 2.2
2.4. Q∧¬QQ\land \neg Q Reiteration from 2.2
Index Formula Reason
3. Q Reiteration from 2.2

We have said before that P⊭QP\not\vDash Q and therefore our proof rules should not show P⊢QP\vdash Q. (To reiterate, the entire point of a proof, like P⊢QP\vdash Q, is to ensure that the argument is valid, i.e. P⊨QP\vDash Q.) So something about the proof above must be wrong.

Here is what is wrong: It was possible to infer Q on line (3) because it made an invalid reference to line (2.3). This reference is invalid because line (2.3) is inside of a subproof, while line (3) is outside of that subproof.

We saw that the same sort of invalid reference when using Conditional Introduction as well. So there is a general phenomenon here: lines inside of any kind of subproof should never be referenced from a line outside the subproof.


Yet again, as with Conditional Introduction, Proof by Contradiction allows us to prove things from no premises at all.

Here we prove from no premises, that ¬(P∧¬P)\neg(P\land \neg P).

Index Formula Reason
1. ¬(P∧¬P)\neg(P\land \neg P) Proof by Contradiction from subproof below
1. contradiction sub-proof
Index Formula Reason
1.1. ¬(¬(P∧¬P))\neg(\neg(P\land\neg P)) Assumption for Proof by Contradiction
1.2. P∧¬PP\land \neg P Double Negation from 1.1

Definition

Proof by Contradiction is the following inference rule.

The following allows you to infer ϕ\phi. Assume ¬ϕ\neg \phi. Infer other formulas, from ¬ϕ\neg \phi and any other formulas already inferred. Prove any contradiction. Stop assuming ¬ϕ\neg \phi and any of the formulas which followed from it.

Exercise

Use Proof by Contradiction to prove, from P↔QP\leftrightarrow Q and ¬P\neg P, that Q.

Also prove, from no premises, that (P∧¬P)→Q(P\land \neg P)\to Q.

Also prove, from P∧¬PP\land \neg P, that Q.

The Principle of Explosion

As you presumably showed in the previous exercise, (P∧¬P)⊢Q(P\land \neg P) \vdash Q. You should feel invited to also confirm that (P∧¬P)⊨Q(P\land \neg P) \vDash Q, which only further confirms that our proof rules can prove valid arguments.

This particular argument is interesting, though. It shows that, from P∧¬PP\land \neg P it is possible to infer any propositions. We describe this as an "explosion", because the set of propositions that one can prove "explodes" to include every formula.

To be clear: this is a bad thing. You want to accept the premises which allow you to prove the true propositions and not the false ones. When you can prove all the true, and all the false propositions, you lose the ability to distinguish between the two.

The following is a generalization of this fact.

Definition

Let ϕ\phi be any contradiction, and ψ\psi any formula. Let Γ\Gamma be any sequence of formulas such that ϕ∈Γ\phi \in\Gamma.

The fact that (Γ,ψ)(\Gamma, \psi) is a valid argument, is called the principle of explosion.

Exercise

Prove that the principle of explosion is true. That is to say, prove

Γ⊨ψ\Gamma \vDash \psi

if Γ\Gamma contains a contradiction.

Also prove that

Γ⊢ψ\Gamma \vdash \psi

by exhibiting a proof. You you may find it more convenient to not represent this proof as a table, and instead merely represent it as a sequence of formulas meeting the conditions of a proof.