# Formal Logic/Sentential Logic/Substitution and Interchange

 ← Properties of Sentential Connectives ↑ Sentential Logic Translations →

# Substitution and Interchange

This page will use the notions of occurrence and subformula introduced at the Additional terminology section of Formal Syntax. These notions have been little used if at all since then, so you might want to review them.

## Substitution

### Tautological forms

We have introduced a number of tautologies, one example being

(1)    ${\displaystyle \mathrm {Q} \rightarrow (\mathrm {P} \rightarrow \mathrm {Q} )\,\!}$

Use the metavariables ${\displaystyle \psi }$  and ${\displaystyle \varphi }$  to replace ${\displaystyle \mathrm {Q} }$  and ${\displaystyle \mathrm {R} }$  in (1). This produces the form

(2)    ${\displaystyle \psi \rightarrow (\varphi \rightarrow \psi )\,\!}$

As it turns out, any formula matching this form is a tautology. Thus, for example, let ${\displaystyle \psi =\mathrm {R} \land \mathrm {S} }$  and ${\displaystyle \varphi =\mathrm {P} \lor \mathrm {Q} }$ . Then,

(3)    ${\displaystyle \mathrm {R} \land \mathrm {S} \rightarrow (\mathrm {P} \lor \mathrm {Q} \rightarrow \mathrm {R} \land \mathrm {S} )\,\!}$

is a tautology. This process can be generalized to all tautologies: for any tautology, find its explicit form by replacing each sentence letters with distinct metavariables (written as Greek letters, as shown in (2)). We can call this a tautological form, which is a metalogical expression rather than a formula. Any instance of this tautological form is a tautology.

### Substitution instances

The preceding illustrated how we can generate new tautologies from old ones via tautological forms. Here, we will show how to generate tautologies without resorting to tautological forms. To do this, we define a substitution instance of a formula. Any substitution instance of a tautology is also a tautology.

First, we define the simple substitution instance of a formula for a sentence letter. Let ${\displaystyle \varphi \,\!}$  and ${\displaystyle \psi \,\!}$  be formulae and ${\displaystyle \pi \,\!}$  be a sentence letter. The simple substitution instance ${\displaystyle \varphi [\pi /\psi ]\,\!}$  is the result of replacing every occurrence of ${\displaystyle \pi \,\!}$  in ${\displaystyle \varphi \,\!}$  with an occurrence of ${\displaystyle \psi \,\!}$ . A substitution instance of formulae for a sentence letters is the result of a chain of simple substitution instances. In particular, a chain of zero simple substitutions instances starting from ${\displaystyle \varphi \,\!}$  is a substitution instance and indeed is just ${\displaystyle \varphi \,\!}$  itself. Thus, any formula is a substitution instance of itself.

It turns out that if ${\displaystyle \varphi \,\!}$  is a tautology, then so is any simple substitution instance ${\displaystyle \varphi [\pi /\psi ]\,\!}$ . If we start with a tautology and generate a chain of simple substitution instances, then every formula in the chain is also a tautology. Thus any (not necessarily simple) substitution instance of a tautology is also a tautology.

### Substitution examples

Consider (1) again. We substitute ${\displaystyle \mathrm {R} \land \mathrm {S} \,\!}$  for every occurrence of ${\displaystyle \mathrm {Q} \,\!}$  in (1). This gives us the following simple substitution instance of (1):

(4)    ${\displaystyle \mathrm {R} \land \mathrm {S} \rightarrow (\mathrm {P} \rightarrow \mathrm {R} \land \mathrm {S} )\,\!}$

In this, we substitute ${\displaystyle \mathrm {P} \lor \mathrm {Q} \,\!}$  for ${\displaystyle \mathrm {P} \,\!}$ . That gives us (3) as a simple substitution instance of (4). Since (3) is the result of a chain of two simple substitution instances, it is a (non-simple) substitution instance of (1) Since (1) is a tautology, so is (3). We can express the chain of substitutions as

${\displaystyle \mathrm {Q} \rightarrow (\mathrm {P} \rightarrow \mathrm {Q} )[\mathrm {Q} /\mathrm {R} \land \mathrm {S} ][\mathrm {P} /\mathrm {P} \lor \mathrm {Q} ]\,\!}$

Take another example, also starting from (1). We want to obtain

(5)    ${\displaystyle \mathrm {P} \rightarrow (\mathrm {Q} \rightarrow \mathrm {P} )\,\!}$

Our first attempt might be to substitute ${\displaystyle \mathrm {P} \,\!}$  for ${\displaystyle \mathrm {Q} \,\!}$ ,

(6)    ${\displaystyle \mathrm {P} \rightarrow (\mathrm {P} \rightarrow \mathrm {P} )\,\!}$

This is indeed a tautology, but it is not the one we wanted. Instead, we substitute ${\displaystyle \mathrm {R} \,\!}$  for ${\displaystyle \mathrm {P} \,\!}$  in (1), obtaining

${\displaystyle \mathrm {Q} \rightarrow (\mathrm {R} \rightarrow \mathrm {Q} )\,\!}$

Now substitute ${\displaystyle \mathrm {P} \,\!}$  for ${\displaystyle \mathrm {Q} \,\!}$  obtaining

${\displaystyle \mathrm {P} \rightarrow (\mathrm {R} \rightarrow \mathrm {P} )\,\!}$

Finally, substituting ${\displaystyle \mathrm {Q} \,\!}$  for ${\displaystyle \mathrm {R} \,\!}$  gets us the result we wanted, namely (5). Since (1) is a tautology, so is (5). We can express the chain of substitutions as

${\displaystyle \mathrm {Q} \rightarrow (\mathrm {P} \rightarrow \mathrm {Q} )[\mathrm {P} /\mathrm {R} ][\mathrm {Q} /\mathrm {P} ][\mathrm {R} /\mathrm {Q} ]\!}$

### Simultaneous substitutions

We can compress a chain of simple substitutions into a single complex substitution. Let ${\displaystyle \varphi \,\!}$ , ${\displaystyle \psi _{1}\,\!}$ , ${\displaystyle \psi _{2}\,\!}$ , ... be formulae; let ${\displaystyle \pi _{1}\,\!}$ , ${\displaystyle \pi _{2}\,\!}$ , ... be sentence letters. We define a simultaneous substitution instance of formulas for sentence letters ${\displaystyle \varphi [\pi _{1}/\psi _{1},\ \pi _{2}/\psi _{2},\ ...]\,\!}$  be the result of starting with ${\displaystyle \varphi \,\!}$  and simultaneously replacing ${\displaystyle \pi _{1}\,\!}$  with ${\displaystyle \psi _{1}\,\!}$ , ${\displaystyle \pi _{2}\,\!}$  with ${\displaystyle \psi _{2}\,\!}$ , .... We can regenerate our examples.

The previously generated formula (3) is

${\displaystyle \mathrm {Q} \rightarrow (\mathrm {P} \rightarrow \mathrm {Q} )[\mathrm {P} /\mathrm {P} \lor \mathrm {Q} ,\mathrm {Q} /\mathrm {R} \land \mathrm {S} ]\,\!}$

Similarly, (5) is

${\displaystyle \mathrm {Q} \rightarrow (\mathrm {P} \rightarrow \mathrm {Q} )[\mathrm {P} /\mathrm {Q} ,\ \mathrm {Q} /\mathrm {P} ]\,\!}$

Finally (6) is

${\displaystyle \mathrm {Q} \rightarrow (\mathrm {P} \rightarrow \mathrm {Q} )[\mathrm {Q} /\mathrm {P} ]\,\!}$

When we get to predicate logic, simultaneous substitution instances will not be available. That is why we defined substitution instance by reference to a chain of simple substitution instances rather than as a simultaneous substitution instance.

## Interchange

### Interchange of equivalent subformulae

We previously saw the following equivalence at Properties of Sentential Connectives:

(7)    ${\displaystyle \mathrm {P} \,\!}$          ${\displaystyle \lnot \lnot \mathrm {P} \,\!}$

You then might expect the following equivalence:

${\displaystyle \mathrm {P} \rightarrow \mathrm {Q} \land \mathrm {R} \,\!}$          ${\displaystyle \lnot \lnot (\mathrm {P} \rightarrow \mathrm {Q} \land \mathrm {R} )\,\!}$

This expectation is correct; the two formulae are equivalent. Let ${\displaystyle \varphi \,\!}$  and ${\displaystyle \psi \,\!}$  be equivalent formulae. Let ${\displaystyle \chi _{1}\,\!}$  be a formula in which ${\displaystyle \varphi \,\!}$  occurs as a subformula. Finally, let ${\displaystyle \chi _{2}\,\!}$  be the result of replacing in ${\displaystyle \chi \,\!}$  at least one (not necessarily all) occurrences of ${\displaystyle \varphi \,\!}$  with ${\displaystyle \psi \,\!}$ . Then ${\displaystyle \chi _{1}\,\!}$  and ${\displaystyle \chi _{2}\,\!}$  are equivalent. This replacement is called an interchange.

For a second example, suppose we want to generate the equivalence

(8)    ${\displaystyle \mathrm {P} \rightarrow \mathrm {Q} \land \mathrm {R} \,\!}$          ${\displaystyle \mathrm {P} \rightarrow \lnot \lnot (\mathrm {Q} \land \mathrm {R} )\,\!}$

We note the following equivalence:

(9)    ${\displaystyle \mathrm {Q} \land \mathrm {R} \,\!}$          ${\displaystyle \lnot \lnot (\mathrm {Q} \land \mathrm {R} )\,\!}$

These two formulae can be confirmed to be equivalent either by truth table or, more easily, by substituting ${\displaystyle \mathrm {Q} \land \mathrm {R} \,\!}$  for ${\displaystyle \mathrm {P} \,\!}$  in both formulae of (7).

This substitution does indeed establish (9) as an equivalence. We already noted that ${\displaystyle \varphi \,\!}$  and ${\displaystyle \psi \,\!}$  are equivalent if and only if ${\displaystyle \varphi \leftrightarrow \psi \,\!}$  is a tautology. Based on (7), we get the tautology

${\displaystyle \mathrm {P} \leftrightarrow \lnot \lnot \mathrm {P} \,\!}$

Our substitution then yields

${\displaystyle \mathrm {Q} \land \mathrm {R} \leftrightarrow \lnot \lnot (\mathrm {Q} \land \mathrm {R} )\,\!}$

which is also a tautology. The corresponding equivalence is then (9).

Based on (9), we can now replace the consequent of ${\displaystyle \mathrm {P} \rightarrow \mathrm {Q} \land \mathrm {R} \,\!}$  with its equivalent. This generates the desired equivalence, namely (8).

Every formula equivalent to a tautology is also a tautology. Thus an interchange of equivalent subformulae within a tautology results in a tautology. For example, we can use the substitution instance of (7):

${\displaystyle \mathrm {Q} \,\!}$          ${\displaystyle \lnot \lnot \mathrm {Q} \,\!}$

together with the tautology previously seen at Properties of Sentential Connectives:

${\displaystyle (\mathrm {P} \rightarrow \mathrm {Q} )\lor (\mathrm {Q} \rightarrow \mathrm {R} )\,\!}$

to obtain

${\displaystyle (\mathrm {P} \rightarrow \lnot \lnot \mathrm {Q} )\lor (\mathrm {Q} \rightarrow \mathrm {R} )\,\!}$

as a new tautology.

### Interchange example

As an example, we will use the interdefinability of connectives to express

(10)    ${\displaystyle \mathrm {P} \leftrightarrow \mathrm {Q} \lor \mathrm {R} \,\!}$

using only conditionals and negations.

Based on

${\displaystyle \mathrm {P} \lor \mathrm {Q} \,\!}$          ${\displaystyle \lnot \mathrm {P} \rightarrow \mathrm {Q} \,\!}$

we get the substitution instance

${\displaystyle \mathrm {Q} \lor \mathrm {R} \,\!}$          ${\displaystyle \lnot \mathrm {Q} \rightarrow \mathrm {R} \,\!}$

which in turn allows us to replace the appropriate subformula in (10) to get:

(11)    ${\displaystyle \mathrm {P} \leftrightarrow \lnot \mathrm {Q} \rightarrow \mathrm {R} \,\!}$

The equivalence

${\displaystyle \mathrm {P} \leftrightarrow \mathrm {Q} \,\!}$    ${\displaystyle (\mathrm {P} \rightarrow \mathrm {Q} )\land (\mathrm {Q} \rightarrow \mathrm {P} )\,\!}$

together with the appropriate substitution gives us

(12)    ${\displaystyle (\mathrm {P} \rightarrow (\lnot \mathrm {Q} \rightarrow \mathrm {R} ))\land ((\lnot \mathrm {Q} \rightarrow \mathrm {R} )\rightarrow \mathrm {P} )\,\!}$

as equivalent to (11).

Finally, applying

${\displaystyle \mathrm {P} \land \mathrm {Q} \,\!}$          ${\displaystyle \lnot (\mathrm {P} \rightarrow \lnot \mathrm {Q} )\,\!}$

together with the appropriate substitution, yields our final result:

${\displaystyle \lnot (\mathrm {P} \rightarrow (\lnot \mathrm {Q} \rightarrow \mathrm {R} )\rightarrow \lnot ((\lnot \mathrm {Q} \rightarrow \mathrm {R} )\rightarrow \mathrm {P} ))\,\!}$