M384 · Logic · Week 8

Semantic Consequence, Equivalence and Deduction

Day 1: semantic consequence \(\Gamma\models\varphi\). Day 2: logical equivalence and adequate sets of connectives. Day 3: deductions from assumptions and \(\Gamma\vdash\varphi\).

Goals for this week

By the end of this week you will be able to:

Day 1: Semantic consequence

Today we define when a formula follows from a set of formulas by truth alone. We learn how to decide this, and how to prove general facts about it from the definition.

What we are using from before
  • A valuation is a function \(v:\mathrm{PROP}\to\{\mathrm T,\mathrm F\}\). The truth value \([\![\varphi]\!]_v\) is computed from the values of the primitive propositions with the truth tables of the connectives:
    Truth tables of the connectives.
    \(p\)\(q\)\(\neg p\)\(p \wedge q\)\(p \vee q\)\(p \to q\)
    TTFTTT
    TFFFTF
    FTTFTT
    FFTFFT
  • We write \(\models\varphi\), and say that \(\varphi\) is a tautology, if \([\![\varphi]\!]_v=\mathrm T\) for every valuation \(v\). A formula \(\varphi\) is satisfiable if \([\![\varphi]\!]_v=\mathrm T\) for some valuation \(v\).
  • \([\![\varphi]\!]_v\) depends only on the values that \(v\) gives to the primitive propositions occurring in \(\varphi\). So if \(n\) primitive propositions occur in \(\varphi\), the \(2^n\) rows of its truth table describe all valuations.

1. Satisfying a set of formulas

Last week we asked whether one formula is true under a valuation. In mathematics, and in everyday reasoning, we usually start from several assumptions at once. So we now look at sets of formulas.

Definition 8.1: satisfying a set

Let \(\Gamma\) be a set of formulas. A valuation \(v\) satisfies \(\Gamma\) if \([\![\psi]\!]_v=\mathrm T\) for every \(\psi\in\Gamma\). The set \(\Gamma\) is satisfiable if some valuation satisfies it, and unsatisfiable otherwise.

Example 8.2: satisfiable and unsatisfiable sets
(a) \(\Gamma_1=\{p\vee q,\ \neg p\}\). A valuation that satisfies \(\Gamma_1\) must make \(\neg p\) true, so \(v(p)=\mathrm F\). Then \(p\vee q\) is true only if \(v(q)=\mathrm T\). So the valuations that satisfy \(\Gamma_1\) are exactly those with \(v(p)=\mathrm F\) and \(v(q)=\mathrm T\). In particular \(\Gamma_1\) is satisfiable.
(b) \(\Gamma_2=\{p\to q,\ p,\ \neg q\}\). A valuation that satisfies \(p\) and \(\neg q\) has \(v(p)=\mathrm T\) and \(v(q)=\mathrm F\). Then \([\![p\to q]\!]_v=\mathrm T\to\mathrm F=\mathrm F\). So no valuation satisfies all three formulas, and \(\Gamma_2\) is unsatisfiable.
(c) Any two formulas of \(\Gamma_2\) form a satisfiable set: \(v(p)=v(q)=\mathrm T\) satisfies \(\{p\to q,\,p\}\); \(v(p)=\mathrm T,\ v(q)=\mathrm F\) satisfies \(\{p,\,\neg q\}\); \(v(p)=v(q)=\mathrm F\) satisfies \(\{p\to q,\,\neg q\}\). So a set can be unsatisfiable even though each of its members, and each pair of them, is satisfiable.
(d) The empty set \(\varnothing\) is satisfied by every valuation: there is no member of \(\varnothing\) that could be false.

2. Semantic consequence

An argument is good when its conclusion cannot be false while its premises are true. Valuations make the word "cannot" precise: there is no valuation that makes the premises true and the conclusion false.

Definition 8.3: semantic consequence

Let \(\Gamma\) be a set of formulas and \(\varphi\) a formula. We say that \(\Gamma\) entails \(\varphi\), or that \(\varphi\) is a semantic consequence of \(\Gamma\), and write \(\Gamma\models\varphi\), if every valuation that satisfies \(\Gamma\) also makes \(\varphi\) true:

\[\Gamma\models\varphi\quad\text{iff}\quad\text{for every valuation }v:\ \text{if }v\text{ satisfies }\Gamma, \text{ then }[\![\varphi]\!]_v=\mathrm T.\]

We write \(\Gamma\not\models\varphi\) if this fails. Then there is a valuation \(v\) that satisfies \(\Gamma\) with \([\![\varphi]\!]_v=\mathrm F\). Such a \(v\) is called a counterexample.

We use a few short forms. We write \(\psi_1,\dots,\psi_n\models\varphi\) for \(\{\psi_1,\dots,\psi_n\}\models\varphi\), and \(\Gamma,\psi\models\varphi\) for \(\Gamma\cup\{\psi\}\models\varphi\). For \(\Gamma=\varnothing\) we write \(\models\varphi\). This agrees with the notation for tautologies: every valuation satisfies \(\varnothing\), so \(\varnothing\models\varphi\) says that \([\![\varphi]\!]_v=\mathrm T\) for every \(v\).

Example 8.4: a first truth table check

Claim: \(p,\ p\to q\models q\). Here \(\Gamma=\{p,\ p\to q\}\). We build one table with a column for each formula of \(\Gamma\) and a column for the conclusion \(q\):

Rows in which some formula of \(\Gamma\) is false are greyed out. In the only remaining row, \(q\) is true.
\(p\)\(q\)\(p\)\(p \to q\)\(q\)
TTTTT
TFTFF
FTFTT
FFFTF

Only the first row satisfies \(\Gamma\), and in this row \(q\) is \(\mathrm T\). So the claim holds. The other rows do not matter, whatever the value of \(q\) is there.

Method: deciding \(\Gamma\models\varphi\) for a finite set \(\Gamma\)
  1. Truth table. Make a table for the primitive propositions that occur in \(\Gamma\) or \(\varphi\), with one column for each formula of \(\Gamma\) and one for \(\varphi\). Keep only the rows in which every formula of \(\Gamma\) is \(\mathrm T\). Then \(\Gamma\models\varphi\) iff \(\varphi\) is \(\mathrm T\) in every kept row. A kept row where \(\varphi\) is \(\mathrm F\) is a counterexample.
  2. Search for a counterexample. Assume that \(v\) satisfies \(\Gamma\) and \([\![\varphi]\!]_v=\mathrm F\), and write down the values this forces. If you reach a contradiction, there is no counterexample, so \(\Gamma\models\varphi\). If you find a valuation with no contradiction, check it: it is a counterexample.

The search is usually faster, because \(\varphi=\mathrm F\) and the formulas of \(\Gamma\) force many values at once.

Example 8.5: four argument forms
(a) \(p\to q,\ \neg q\models\neg p\) (modus tollens). Suppose \(v\) satisfies both assumptions and \([\![\neg p]\!]_v=\mathrm F\). Then \(v(p)=\mathrm T\). From \(\neg q\) we get \(v(q)=\mathrm F\). But then \([\![p\to q]\!]_v=\mathrm T\to\mathrm F=\mathrm F\), a contradiction. So the claim holds.
(b) \(p\to q,\ q\not\models p\) (affirming the consequent). We want \(v(p)=\mathrm F\) and \(v(q)=\mathrm T\). Check: \(p\to q\) is \(\mathrm F\to\mathrm T=\mathrm T\), and \(q\) is \(\mathrm T\). Both assumptions are true and \(p\) is false, so this valuation is a counterexample.
(c) \(p\vee q,\ \neg p\models q\) (disjunctive syllogism). Suppose \(v(q)=\mathrm F\) and \(v\) satisfies the assumptions. From \(\neg p\) we get \(v(p)=\mathrm F\). Then \(p\vee q\) is \(\mathrm F\vee\mathrm F=\mathrm F\), a contradiction. So the claim holds.
(d) \(p\to q\not\models\neg p\to\neg q\) (denying the antecedent). For \(\neg p\to\neg q\) to be false we need \(\neg p=\mathrm T\) and \(\neg q=\mathrm F\), so \(v(p)=\mathrm F\) and \(v(q)=\mathrm T\). Check the assumption: \(\mathrm F\to\mathrm T=\mathrm T\). So this valuation is a counterexample.

Forms (a) and (c) are valid patterns of reasoning. Forms (b) and (d) are common mistakes: each looks like a valid form, but a single valuation shows that it is not.

Exercise 1: entailment or counterexample

Self-check only. Nothing here counts towards your grade.

For each claim, choose whether it holds or fails. If it fails, also give a counterexample: a valuation that makes every formula on the left true and the formula on the right false. The check computes the values under your valuation, so every correct counterexample is accepted.

(a) Holds. If \(p\wedge q\) is true, then \(p\) is true, so \(p\vee q\) is true.
(b) Fails. Counterexample \(v(p)=\mathrm T,\ v(q)=\mathrm F\) (or \(v(p)=\mathrm F,\ v(q)=\mathrm T\)): \(p\vee q\) is true and \(p\wedge q\) is false.
(c) Holds. If \((p\vee q)\to r\) is false, then \(r\) is false and \(p\vee q\) is true, so \(p\) or \(q\) is true. If \(p\) is true, then \(p\to r\) is false; if \(q\) is true, then \(q\to r\) is false. Either way an assumption is false.
(d) Fails. Counterexample \(v(p)=\mathrm F,\ v(q)=\mathrm T,\ v(r)=\mathrm F\): \(p\vee q\) is true, \(p\to r\) is \(\mathrm F\to\mathrm F=\mathrm T\), and \(r\) is false.
(e) Holds. If \(p\to r\) is false, then \(v(p)=\mathrm T\) and \(v(r)=\mathrm F\). From \(\neg q\), \(v(q)=\mathrm F\). Then \(q\vee r\) is false, so \(p\to(q\vee r)\) is false, a contradiction.
(f) Fails. Counterexample \(v(p)=\mathrm T,\ v(q)=\mathrm F,\ v(r)=\mathrm F\): \(p\wedge q\) is false, so \((p\wedge q)\to r\) is true, but \(p\to r\) is \(\mathrm T\to\mathrm F=\mathrm F\).

3. General facts about \(\models\)

Example 8.6: an unsatisfiable set entails everything

Claim: \(p,\neg p\models q\). No valuation satisfies \(\{p,\neg p\}\). So the condition "every valuation that satisfies \(\Gamma\) makes \(q\) true" has no case to check, and it holds. The same reasoning shows that an unsatisfiable set \(\Gamma\) entails every formula.

The converse is also true. Suppose \(\Gamma\) entails every formula. Then \(\Gamma\models p\) and \(\Gamma\models\neg p\). A valuation that satisfies \(\Gamma\) would make both \(p\) and \(\neg p\) true, which is impossible. So \(\Gamma\) is unsatisfiable.

Next we prove four general facts. Each proof only unfolds Definitions 8.1 and 8.3 and uses the clauses for the truth value of a formula.

Proposition 8.7: properties of \(\models\)

Let \(\Gamma,\Delta\) be sets of formulas and \(\varphi,\psi\) formulas.

(a) If \(\varphi\in\Gamma\), then \(\Gamma\models\varphi\).
(b) If \(\Gamma\subseteq\Delta\) and \(\Gamma\models\varphi\), then \(\Delta\models\varphi\).
(c) If \(\Gamma\models\varphi\) and \(\Gamma\models\varphi\to\psi\), then \(\Gamma\models\psi\).
(d) \(\Gamma\cup\{\varphi\}\models\psi\) if and only if \(\Gamma\models\varphi\to\psi\).

Proof. (a) If \(v\) satisfies \(\Gamma\), then \(v\) makes every member of \(\Gamma\) true, and \(\varphi\) is a member.

(b) Let \(v\) satisfy \(\Delta\). Every member of \(\Gamma\) is a member of \(\Delta\), so \(v\) also satisfies \(\Gamma\). Since \(\Gamma\models\varphi\), \([\![\varphi]\!]_v=\mathrm T\).

(c) Let \(v\) satisfy \(\Gamma\). Then \([\![\varphi]\!]_v=\mathrm T\) and \([\![\varphi\to\psi]\!]_v=\mathrm T\). By the clause for \(\to\), \([\![\varphi]\!]_v=\mathrm F\) or \([\![\psi]\!]_v=\mathrm T\). The first is false, so \([\![\psi]\!]_v=\mathrm T\).

(d) (\(\Rightarrow\)) Suppose \(\Gamma\cup\{\varphi\}\models\psi\), and let \(v\) satisfy \(\Gamma\). If \([\![\varphi]\!]_v=\mathrm F\), then \([\![\varphi\to\psi]\!]_v=\mathrm T\) by the clause for \(\to\). If \([\![\varphi]\!]_v=\mathrm T\), then \(v\) satisfies \(\Gamma\cup\{\varphi\}\), so \([\![\psi]\!]_v=\mathrm T\), and again \([\![\varphi\to\psi]\!]_v=\mathrm T\).

(\(\Leftarrow\)) Suppose \(\Gamma\models\varphi\to\psi\), and let \(v\) satisfy \(\Gamma\cup\{\varphi\}\). Then \(v\) satisfies \(\Gamma\), so \([\![\varphi\to\psi]\!]_v=\mathrm T\), and also \([\![\varphi]\!]_v=\mathrm T\). As in (c), \([\![\psi]\!]_v=\mathrm T\). □

Part (d) moves a formula from the left of \(\models\) into the antecedent of an implication, and back. If we use it \(n\) times, starting from the empty set, we get

\[\psi_1,\dots,\psi_n\models\varphi\quad\text{iff}\quad\models\psi_1\to(\psi_2\to(\cdots\to(\psi_n\to\varphi)\cdots)).\]

So for a finite set of assumptions, entailment is the same as a tautology. On Day 3 we meet a second relation, \(\vdash\). The statement for \(\vdash\) that corresponds to (d) is called the Deduction Theorem.

Example 8.8: using Proposition 8.7(d)

Is \((p\to q)\to((q\to r)\to(p\to r))\) a tautology? Apply Proposition 8.7(d) three times:

\[\models(p\to q)\to((q\to r)\to(p\to r))\iff p\to q\models(q\to r)\to(p\to r)\iff p\to q,\ q\to r\models p\to r \iff p\to q,\ q\to r,\ p\models r.\]

The last claim is easy. Let \(v\) satisfy the three assumptions. Then \(v(p)=\mathrm T\); from \(p\to q\), \(v(q)=\mathrm T\); from \(q\to r\), \(v(r)=\mathrm T\). So the formula is a tautology, and we did not need its eight-row truth table.

Example 8.9: an infinite set of assumptions

Let \(p_0,p_1,p_2,\dots\) be distinct primitive propositions, and let

\[\Gamma=\{p_0\}\cup\{p_n\to p_{n+1}: n\in\mathbb N\}=\{p_0,\ p_0\to p_1,\ p_1\to p_2,\ \dots\}.\]

Claim: \(\Gamma\models p_n\) for every \(n\). We use induction on \(n\). Let \(v\) satisfy \(\Gamma\). For \(n=0\): \(p_0\in\Gamma\), so \(v(p_0)=\mathrm T\). Step: if \(v(p_n)=\mathrm T\), then since \([\![p_n\to p_{n+1}]\!]_v=\mathrm T\), the clause for \(\to\) gives \(v(p_{n+1})=\mathrm T\).

On the other hand, let \(q\) be a primitive proposition different from all \(p_n\). The valuation with \(v(p_n)=\mathrm T\) for every \(n\) and \(v(q)=\mathrm F\) satisfies \(\Gamma\), so \(\Gamma\not\models q\).

A truth table cannot be used here, since infinitely many primitive propositions occur in \(\Gamma\). The definition still works: we reason about an arbitrary valuation.

Exercise 2: consequences of one set

Self-check only. Nothing here counts towards your grade.

Let \(\Gamma=\{p\vee q,\ q\to r\}\). For each formula \(\varphi\), decide whether \(\Gamma\models\varphi\). Hint: first find all valuations of \(p,q,r\) that satisfy \(\Gamma\).

If \(v(q)=\mathrm T\), then \(q\to r\) forces \(v(r)=\mathrm T\), and \(p\) can be anything. If \(v(q)=\mathrm F\), then \(p\vee q\) forces \(v(p)=\mathrm T\), and \(r\) can be anything. So exactly four valuations satisfy \(\Gamma\) (values of \(p,q,r\)): \(\mathrm{TTT}\), \(\mathrm{FTT}\), \(\mathrm{TFT}\), \(\mathrm{TFF}\). A formula is a consequence iff it is true in all four.

(a) \(p\vee r\): true in all four. \(\Gamma\models p\vee r\).
(b) \(r\): false at \(\mathrm{TFF}\). Not a consequence.
(c) \(p\vee(q\wedge r)\): in \(\mathrm{FTT}\) we have \(q\wedge r=\mathrm T\); in the others \(p=\mathrm T\). A consequence.
(d) \(q\vee r\): false at \(\mathrm{TFF}\). Not a consequence.
(e) \(\neg p\to r\): the antecedent is true only at \(\mathrm{FTT}\), and there \(r=\mathrm T\). A consequence.
(f) \(p\): false at \(\mathrm{FTT}\). Not a consequence.

Day 2: Logical equivalence and adequacy

Today we compare formulas by their truth values, and we ask which sets of connectives are enough to express every formula.

What we are using from before
  • \(\models\chi\) means that \([\![\chi]\!]_v=\mathrm T\) for every valuation \(v\) (\(\chi\) is a tautology). The formula \(\varphi\leftrightarrow\psi\) abbreviates \((\varphi\to\psi)\wedge(\psi\to\varphi)\); it is true under \(v\) exactly when \(\varphi\) and \(\psi\) have the same value under \(v\).
  • We also use two more binary connectives: the Sheffer stroke \(\varphi\mid\psi\), read "not both \(\varphi\) and \(\psi\)" (nand), and \(\varphi\downarrow\psi\), read "neither \(\varphi\) nor \(\psi\)" (nor). Their truth tables:
    \(p\leftrightarrow q\) is true when \(p\) and \(q\) have the same value; \(p\mid q\) is false only when both are true; \(p\downarrow q\) is true only when both are false.
    \(p\)\(q\)\(p \leftrightarrow q\)\(p \mid q\)\(p \downarrow q\)
    TTTFF
    TFFTF
    FTFTF
    FFTTT
  • For a set \(A\) of connectives, \(\mathcal L(A)\) is the set of formulas built from the primitive propositions using only connectives in \(A\). For example, \(\mathcal L(\neg,\wedge)\) is given by \(\varphi::=p\mid\neg\varphi\mid\varphi\wedge\psi\). Structural induction on \(\mathcal L(A)\): to show that every formula of \(\mathcal L(A)\) has a property, show that every primitive proposition has it, and that each connective of \(A\) turns formulas with the property into a formula with the property.
  • A formula scheme such as \(\neg(\varphi\wedge\psi)\to(\neg\varphi\vee\neg\psi)\) stands for all formulas obtained by replacing \(\varphi,\psi\) by formulas. Its truth value depends only on the values of \(\varphi\) and \(\psi\), so a truth table that treats \(\varphi\) and \(\psi\) like primitive propositions decides it for all instances at once.

4. Logical equivalence

The formulas \(p\wedge q\) and \(q\wedge p\) are different strings of symbols, but they say the same thing: under every valuation they have the same truth value. We give this a name.

Definition 8.10: logical equivalence

Two formulas \(\varphi\) and \(\psi\) are logically equivalent, written \(\varphi\approx\psi\), if \(\models\varphi\leftrightarrow\psi\). Since \(\varphi\leftrightarrow\psi\) is true exactly when both sides have the same value, this means:

\[\varphi\approx\psi\quad\text{iff}\quad[\![\varphi]\!]_v=[\![\psi]\!]_v\ \text{ for every valuation }v.\]

Like \(\models\), the symbol \(\approx\) belongs to the metalanguage. We write \(\varphi\not\approx\psi\) when the formulas are not equivalent; then some valuation gives them different values.

Example 8.11: equivalent and not equivalent
(a) \(p\wedge q\approx q\wedge p\): both are true exactly when \(v(p)=v(q)=\mathrm T\).
(b) \(p\approx p\wedge p\approx p\vee p\): all three have the value of \(p\). Very different formulas can be equivalent.
(c) \(p\to q\approx\neg p\vee q\). We compare the two columns:
The last two columns agree in every row.
\(p\)\(q\)\(\neg p\)\(\neg p \vee q\)\(p \to q\)
TTFTT
TFFFF
FTTTT
FFTTT
(d) \(p\to q\not\approx q\to p\). The valuation \(v(p)=\mathrm F\), \(v(q)=\mathrm T\) gives \(p\to q\) the value \(\mathrm T\) and \(q\to p\) the value \(\mathrm F\). One valuation is enough to show non-equivalence.

In terms of Day 1, \(\varphi\approx\psi\) holds exactly when \(\varphi\models\psi\) and \(\psi\models\varphi\): each formula is true wherever the other one is.

Proposition 8.12: \(\approx\) is an equivalence relation

For all formulas \(\varphi,\psi,\chi\): \(\varphi\approx\varphi\) (reflexive); if \(\varphi\approx\psi\) then \(\psi\approx\varphi\) (symmetric); if \(\varphi\approx\psi\) and \(\psi\approx\chi\) then \(\varphi\approx\chi\) (transitive).

Proof. Each property of \(\approx\) comes from the same property of equality of truth values. Let \(v\) be any valuation. Clearly \([\![\varphi]\!]_v=[\![\varphi]\!]_v\). If \([\![\varphi]\!]_v=[\![\psi]\!]_v\), then \([\![\psi]\!]_v=[\![\varphi]\!]_v\). If \([\![\varphi]\!]_v=[\![\psi]\!]_v\) and \([\![\psi]\!]_v=[\![\chi]\!]_v\), then \([\![\varphi]\!]_v=[\![\chi]\!]_v\). Since \(v\) was arbitrary, the three properties hold. □

An equivalence relation splits a set into classes. Here each class collects the formulas that have the same truth value under every valuation. For example, every formula whose only primitive proposition is \(p\) is in one of exactly four classes, one for each of the four ways a truth value can depend on \(p\) (Figure 1).

tautologiesp ∨ ¬p, p → pthe class of pp, p ∧ p, ¬¬pthe class of ¬p¬p, p → ¬pcontradictionsp ∧ ¬p, ¬(p → p)
Figure 1. The four classes of formulas built from \(p\) alone, with two or three members of each. A line goes up from one class to another when every formula of the lower class entails every formula of the upper class. The classes of \(p\) and \(\neg p\) are not connected: \(p\not\models\neg p\) and \(\neg p\not\models p\).

Table 1 lists equivalences that we use all the time. Each line is a pair of formula schemes. Each can be checked with a truth table in which \(\varphi,\psi,\chi\) are treated like primitive propositions, so each holds for all formulas \(\varphi,\psi,\chi\).

Table 1. Standard equivalences.
NameEquivalence
Double negation\(\neg\neg\varphi\approx\varphi\)
De Morgan\(\neg(\varphi\wedge\psi)\approx\neg\varphi\vee\neg\psi\qquad \neg(\varphi\vee\psi)\approx\neg\varphi\wedge\neg\psi\)
Implication\(\varphi\to\psi\approx\neg\varphi\vee\psi\qquad \varphi\to\psi\approx\neg(\varphi\wedge\neg\psi)\)
Negated implication\(\neg(\varphi\to\psi)\approx\varphi\wedge\neg\psi\)
Contraposition\(\varphi\to\psi\approx\neg\psi\to\neg\varphi\)
Exportation\((\varphi\wedge\psi)\to\chi\approx\varphi\to(\psi\to\chi)\)
Commutativity\(\varphi\wedge\psi\approx\psi\wedge\varphi\qquad \varphi\vee\psi\approx\psi\vee\varphi\)
Associativity\((\varphi\wedge\psi)\wedge\chi\approx\varphi\wedge(\psi\wedge\chi)\qquad (\varphi\vee\psi)\vee\chi\approx\varphi\vee(\psi\vee\chi)\)
Distributivity\(\varphi\wedge(\psi\vee\chi)\approx(\varphi\wedge\psi)\vee(\varphi\wedge\chi) \qquad\varphi\vee(\psi\wedge\chi)\approx(\varphi\vee\psi)\wedge(\varphi\vee\chi)\)

To use these equivalences inside bigger formulas, we need one more fact: replacing a part of a formula by an equivalent part gives an equivalent formula.

Proposition 8.13: equivalence respects the connectives

If \(\varphi\approx\varphi'\) and \(\psi\approx\psi'\), then \(\neg\varphi\approx\neg\varphi'\), \(\varphi\wedge\psi\approx\varphi'\wedge\psi'\), \(\varphi\vee\psi\approx\varphi'\vee\psi'\) and \(\varphi\to\psi\approx\varphi'\to\psi'\).

Proof. Let \(v\) be a valuation. Then \([\![\varphi]\!]_v=[\![\varphi']\!]_v\) and \([\![\psi]\!]_v=[\![\psi']\!]_v\). The value of \(\neg\varphi\) is computed from the value of \(\varphi\) by the truth table of \(\neg\), and the value of \(\neg\varphi'\) from the same value by the same table, so they are equal. In the same way, \(\varphi\wedge\psi\) and \(\varphi'\wedge\psi'\) get their values from the same pair of values by the table of \(\wedge\); the same holds for \(\vee\) and \(\to\). □

Using Proposition 8.13 again and again, one can replace a subformula anywhere inside a formula. This fact is called the Substitution Theorem. Below we only need Proposition 8.13 itself.

Example 8.14: chains of equivalences
(a) \(\neg(\varphi\to\neg\psi)\approx\varphi\wedge\psi\):
\[\begin{aligned} \neg(\varphi\to\neg\psi)&\approx\varphi\wedge\neg\neg\psi &&\text{negated implication}\\ &\approx\varphi\wedge\psi &&\text{double negation, inside }\wedge\text{ by Proposition 8.13.} \end{aligned}\]
(b) \((\varphi\to\chi)\wedge(\psi\to\chi)\approx(\varphi\vee\psi)\to\chi\):
\[\begin{aligned} (\varphi\to\chi)\wedge(\psi\to\chi)&\approx(\neg\varphi\vee\chi)\wedge(\neg\psi\vee\chi) &&\text{implication, twice}\\ &\approx(\chi\vee\neg\varphi)\wedge(\chi\vee\neg\psi) &&\text{commutativity, twice}\\ &\approx\chi\vee(\neg\varphi\wedge\neg\psi) &&\text{distributivity, read from right to left}\\ &\approx(\neg\varphi\wedge\neg\psi)\vee\chi &&\text{commutativity}\\ &\approx\neg(\varphi\vee\psi)\vee\chi &&\text{De Morgan}\\ &\approx(\varphi\vee\psi)\to\chi &&\text{implication, read from right to left.} \end{aligned}\]

Each step replaces one part by an equivalent part (Proposition 8.13), and transitivity (Proposition 8.12) joins the steps. In English, (b) says: if \(\varphi\) gives \(\chi\) and \(\psi\) gives \(\chi\), then "\(\varphi\) or \(\psi\)" gives \(\chi\). This is proof by cases.

Exercise 3: equivalent or not?

Self-check only. Nothing here counts towards your grade.

For each pair, decide whether the two formulas are logically equivalent.

(a) Not equivalent. At \(v(p)=\mathrm T,\ v(q)=\mathrm F\): \(\neg(p\wedge q)=\mathrm T\) but \(\neg p\wedge\neg q=\mathrm F\). The correct De Morgan law is \(\neg(p\wedge q)\approx\neg p\vee\neg q\).
(b) Equivalent. By exportation both are equivalent to \((p\wedge q)\to r\) and \((q\wedge p)\to r\), and \(p\wedge q\approx q\wedge p\).
(c) Not equivalent. At \(v(p)=v(q)=v(r)=\mathrm F\): \((p\to q)\to r=\mathrm T\to\mathrm F=\mathrm F\), but \(p\to(q\to r)=\mathrm T\). The arrow is not associative.
(d) Equivalent. If \(p\) is true, both sides are true. If \(p\) is false, then \(p\wedge q\) is false, so both sides are false.
(e) Not equivalent. At \(v(p)=v(q)=\mathrm F\): \(\neg(p\to q)=\mathrm F\) but \(\neg p\to\neg q=\mathrm T\). Table 1 gives \(\neg(p\to q)\approx p\wedge\neg q\).
(f) Equivalent. Both are false exactly when \(p\) is true and at least one of \(q,r\) is false.

5. Adequate sets of connectives

Our language \(\mathcal L(\neg,\wedge,\vee,\to)\) has four connectives. Do we need all of them? If every formula has an equivalent formula that uses fewer connectives, then nothing is lost by dropping the others.

Definition 8.15: adequate set of connectives

A set \(A\) of connectives is adequate if for every formula \(\varphi\in\mathcal L(\neg,\wedge,\vee,\to)\) there is a formula \(\varphi'\in\mathcal L(A)\) with \(\varphi'\approx\varphi\).

For example, \(\{\neg,\wedge,\vee,\to\}\) is adequate: take \(\varphi'=\varphi\). For \(A=\{\neg,\wedge\}\), the formula \(p\to q\) has the equivalent \(\neg(p\wedge\neg q)\in\mathcal L(\neg,\wedge)\) (Table 1). One example is not enough, though: adequacy is a claim about every formula.

Theorem 8.16: \(\{\neg,\wedge\}\) is adequate

For every formula \(\varphi\in\mathcal L(\neg,\wedge,\vee,\to)\) there is a formula \(\varphi'\in\mathcal L(\neg,\wedge)\) such that \(\varphi'\approx\varphi\).

Proof. By structural induction on \(\varphi\).

Base case. \(\varphi=p\) is a primitive proposition. Then \(p\in\mathcal L(\neg,\wedge)\), so we take \(p'=p\).

Step for \(\neg\). Suppose \(\varphi'\in\mathcal L(\neg,\wedge)\) and \(\varphi'\approx\varphi\). Then \(\neg\varphi'\in\mathcal L(\neg,\wedge)\), and \(\neg\varphi'\approx\neg\varphi\) by Proposition 8.13. So \((\neg\varphi)'=\neg\varphi'\) works.

Step for \(\wedge\). Suppose \(\varphi'\approx\varphi\) and \(\psi'\approx\psi\) with \(\varphi',\psi'\in\mathcal L(\neg,\wedge)\). Then \(\varphi'\wedge\psi'\in\mathcal L(\neg,\wedge)\) and \(\varphi'\wedge\psi'\approx\varphi\wedge\psi\) by Proposition 8.13.

Step for \(\to\). With \(\varphi',\psi'\) as before, we claim \(\neg(\varphi'\wedge\neg\psi')\approx\varphi\to\psi\). Under every valuation \(\varphi'\) has the value of \(\varphi\) and \(\psi'\) the value of \(\psi\), so we only need the four rows for the values of \(\varphi\) and \(\psi\):

Only the values of \(\varphi\) and \(\psi\) are listed, because \(\varphi'\) always has the value of \(\varphi\) and \(\psi'\) the value of \(\psi\).
\(\varphi\)\(\psi\)\(\varphi \to \psi\)\(\varphi'\)\(\psi'\)\(\neg \psi'\)\(\varphi' \wedge \neg \psi'\)\(\neg (\varphi' \wedge \neg \psi')\)
TTTTTFFT
TFFTFTTF
FTTFTFFT
FFTFFTFT

The two marked columns, for \(\varphi\to\psi\) and \(\neg(\varphi'\wedge\neg\psi')\), agree in every row, and \(\neg(\varphi'\wedge\neg\psi')\in\mathcal L(\neg,\wedge)\).

Step for \(\vee\). In the same way we claim \(\neg(\neg\varphi'\wedge\neg\psi')\approx\varphi\vee\psi\):

\(\varphi\)\(\psi\)\(\varphi \vee \psi\)\(\varphi'\)\(\psi'\)\(\neg \varphi'\)\(\neg \psi'\)\(\neg \varphi' \wedge \neg \psi'\)\(\neg (\neg \varphi' \wedge \neg \psi')\)
TTTTTFFFT
TFTTFFTFT
FTTFTTFFT
FFFFFTTTF

Again the two marked columns agree, and \(\neg(\neg\varphi'\wedge\neg\psi')\in\mathcal L(\neg,\wedge)\). This completes the induction. □

The proof does more than show that \(\varphi'\) exists. It is a recipe: it builds \(\varphi'\) from the formulas \(p'\) for the primitive propositions, one connective at a time, using

\[\begin{gathered}p'=p,\qquad(\neg\varphi)'=\neg\varphi',\qquad(\varphi\wedge\psi)'=\varphi'\wedge\psi',\\ (\varphi\to\psi)'=\neg(\varphi'\wedge\neg\psi'),\qquad(\varphi\vee\psi)'=\neg(\neg\varphi'\wedge\neg\psi').\end{gathered}\]
Example 8.17: running the recipe

Let \(\varphi=(p\vee q)\to\neg r\). We work from the inside out:

  1. \(p'=p\), \(q'=q\), \(r'=r\).
  2. \((p\vee q)'=\neg(\neg p'\wedge\neg q')=\neg(\neg p\wedge\neg q)\).
  3. \((\neg r)'=\neg r'=\neg r\).
  4. \(\varphi'=\neg\big((p\vee q)'\wedge\neg(\neg r)'\big)=\neg\big(\neg(\neg p\wedge\neg q)\wedge\neg\neg r\big)\).

Check: \(\varphi'\) is false iff \(\neg(\neg p\wedge\neg q)\wedge\neg\neg r\) is true, that is, iff \(p\vee q\) is true and \(r\) is true. And \(\varphi\) is false iff \(p\vee q\) is true and \(\neg r\) is false, that is, the same condition. So \(\varphi'\approx\varphi\).

The recipe does not give the shortest answer. For example \(\neg(\neg(\neg p\wedge\neg q)\wedge r)\) is also equivalent to \(\varphi\), by double negation.

Once we know that \(\{\neg,\wedge\}\) is adequate, other sets are easier. It is enough to express \(\neg\) and \(\wedge\).

Proposition 8.18: a test for adequacy

Let \(A\) be a set of connectives. Suppose that for all formulas \(\varphi,\psi\in\mathcal L(A)\) there are formulas \(N(\varphi)\) and \(K(\varphi,\psi)\) in \(\mathcal L(A)\) with

\[N(\varphi)\approx\neg\varphi\qquad\text{and}\qquad K(\varphi,\psi)\approx\varphi\wedge\psi.\]

Then \(A\) is adequate.

Proof. Let \(\theta\in\mathcal L(\neg,\wedge,\vee,\to)\). By Theorem 8.16 there is \(\theta_1\in\mathcal L(\neg,\wedge)\) with \(\theta_1\approx\theta\). We show by structural induction on \(\mathcal L(\neg,\wedge)\) that every \(\chi\in\mathcal L(\neg,\wedge)\) has some \(\chi^*\in\mathcal L(A)\) with \(\chi^*\approx\chi\).

  • \(\chi=p\): take \(p^*=p\), which is in \(\mathcal L(A)\).
  • \(\chi=\neg\alpha\), where \(\alpha^*\approx\alpha\): take \(\chi^*=N(\alpha^*)\). Then \(N(\alpha^*)\approx\neg\alpha^*\approx\neg\alpha\), by the assumption and Proposition 8.13.
  • \(\chi=\alpha\wedge\beta\), where \(\alpha^*\approx\alpha\) and \(\beta^*\approx\beta\): take \(\chi^*=K(\alpha^*,\beta^*)\approx\alpha^*\wedge\beta^*\approx\alpha\wedge\beta\).

Then \(\theta_1^*\in\mathcal L(A)\) and \(\theta_1^*\approx\theta_1\approx\theta\), by transitivity. □

In practice we give \(N\) and \(K\) as formula schemes and check each with a four-row truth table, as in the next three examples.

Example 8.19: \(\{\neg,\vee\}\) is adequate

Take \(N(\varphi)=\neg\varphi\) and \(K(\varphi,\psi)=\neg(\neg\varphi\vee\neg\psi)\). The first needs no check. For the second:

\(\varphi\)\(\psi\)\(\neg \varphi\)\(\neg \psi\)\(\neg \varphi \vee \neg \psi\)\(\neg (\neg \varphi \vee \neg \psi)\)\(\varphi \wedge \psi\)
TTFFFTT
TFFTTFF
FTTFTFF
FFTTTFF

The two marked columns agree, so \(K(\varphi,\psi)\approx\varphi\wedge\psi\). By Proposition 8.18, \(\{\neg,\vee\}\) is adequate. (This is De Morgan's law used backwards.)

Example 8.20: \(\{\neg,\to\}\) is adequate

Take \(N(\varphi)=\neg\varphi\) and \(K(\varphi,\psi)=\neg(\varphi\to\neg\psi)\):

\(\varphi\)\(\psi\)\(\neg \psi\)\(\varphi \to \neg \psi\)\(\neg (\varphi \to \neg \psi)\)\(\varphi \wedge \psi\)
TTFFTT
TFTTFF
FTFTFF
FFTTFF

So \(\{\neg,\to\}\) is adequate.

Example 8.21: the Sheffer stroke alone is adequate

Now \(A=\{\mid\}\) has a single connective. We need \(N(\varphi)\) and \(K(\varphi,\psi)\) that use only \(\mid\). Since \(\varphi\mid\varphi\) is "not both \(\varphi\) and \(\varphi\)", it should be \(\neg\varphi\). And \(\varphi\wedge\psi\) is the negation of \(\varphi\mid\psi\), so we negate with the same trick:

\[N(\varphi)=\varphi\mid\varphi,\qquad K(\varphi,\psi)=(\varphi\mid\psi)\mid(\varphi\mid\psi).\]
\(\varphi\)\(\psi\)\(\varphi \mid \varphi\)\(\neg \varphi\)\(\varphi \mid \psi\)\((\varphi \mid \psi) \mid (\varphi \mid \psi)\)\(\varphi \wedge \psi\)
TTFFFTT
TFFFTFF
FTTTTFF
FFTTTFF

The column of \(\varphi\mid\varphi\) agrees with the column of \(\neg\varphi\), and the column of \((\varphi\mid\psi)\mid(\varphi\mid\psi)\) agrees with the column of \(\varphi\wedge\psi\). So \(\{\mid\}\) is adequate: every formula can be written with the Sheffer stroke alone. The set \(\{\downarrow\}\) is treated in Exercise 4 below.

Exercise 4: write it with fewer connectives

Self-check only. Nothing here counts towards your grade.

Write a formula that is equivalent to the given one and uses only the allowed connectives. The check compares truth values under all valuations, so every correct formula is accepted.

Typing formulas: use the buttons, or the keyboard: ~ for \(\neg\), & for \(\wedge\), \/ for \(\vee\), -> for \(\to\), <-> for \(\leftrightarrow\), | for the stroke \(\mid\). Use the button for \(\downarrow\). Primitive propositions are small letters such as \(p,q,r\). As in our convention, only the outermost parentheses may be left out: write \((p\wedge q)\to r\), not \(p\wedge q\to r\).

One possible answer for each part. Other equivalent formulas are also correct.

(a) \(\neg(\neg p\wedge\neg q)\), by De Morgan and double negation.
(b) \(\neg(p\to\neg q)\), as in Example 8.20.
(c) \((p\to q)\to q\). If \(p\) is true, then \(p\to q\) has the value of \(q\), and \(q\to q\) is true. If \(p\) is false, then \(p\to q\) is true, so the formula has the value of \(q\). In both cases it has the value of \(p\vee q\).
(d) \(p\downarrow p\): "neither \(p\) nor \(p\)" is true exactly when \(p\) is false.
(e) \((p\downarrow p)\downarrow(q\downarrow q)\): this is "neither \(\neg p\) nor \(\neg q\)", that is, \(\neg(\neg p\vee\neg q)\approx p\wedge q\). Together with (d) and Proposition 8.18 (with \(N(\varphi)=\varphi\downarrow\varphi\) and \(K(\varphi,\psi)=(\varphi\downarrow\varphi)\downarrow(\psi\downarrow\psi)\)), this shows that \(\{\downarrow\}\) is adequate.

6. Showing that a set is not adequate

To show that \(A\) is adequate, we exhibit formulas. To show that \(A\) is not adequate, we must show that some formula has no equivalent in \(\mathcal L(A)\) at all. Trying many formulas and failing proves nothing, since there are infinitely many formulas in \(\mathcal L(A)\). The standard method has three steps:

  1. Find a property of truth values that every formula of \(\mathcal L(A)\) has.
  2. Prove it by structural induction on \(\mathcal L(A)\).
  3. Find a formula \(\theta\) without the property. Since equivalent formulas have the same truth values, no formula of \(\mathcal L(A)\) is equivalent to \(\theta\).
Example 8.22: \(\{\vee,\to\}\) is not adequate

Let \(v_{\mathrm T}\) be the valuation with \(v_{\mathrm T}(p)=\mathrm T\) for every primitive proposition \(p\).

Claim. \([\![\varphi]\!]_{v_{\mathrm T}}=\mathrm T\) for every \(\varphi\in\mathcal L(\vee,\to)\).

Proof of the claim, by structural induction on \(\varphi\).

  • Base case: \([\![p]\!]_{v_{\mathrm T}}=v_{\mathrm T}(p)=\mathrm T\).
  • Step for \(\vee\): suppose \([\![\varphi]\!]_{v_{\mathrm T}}=[\![\psi]\!]_{v_{\mathrm T}}=\mathrm T\). Then \([\![\varphi\vee\psi]\!]_{v_{\mathrm T}}=\mathrm T\vee\mathrm T=\mathrm T\).
  • Step for \(\to\): with the same assumption, \([\![\varphi\to\psi]\!]_{v_{\mathrm T}}=\mathrm T\to\mathrm T=\mathrm T\).

Conclusion. Suppose some \(\varphi\in\mathcal L(\vee,\to)\) satisfies \(\varphi\approx\neg p\). Then \([\![\varphi]\!]_{v_{\mathrm T}}=[\![\neg p]\!]_{v_{\mathrm T}}=\mathrm F\), which contradicts the claim. So \(\neg p\) has no equivalent in \(\mathcal L(\vee,\to)\), and \(\{\vee,\to\}\) is not adequate.

The step for \(\wedge\) works in the same way (\(\mathrm T\wedge\mathrm T=\mathrm T\)). So even \(\{\wedge,\vee,\to\}\) is not adequate: without \(\neg\) we cannot turn true into false.

Example 8.23: \(\{\neg\}\) is not adequate

Every formula of \(\mathcal L(\neg)\) has the form \(\neg\neg\cdots\neg s\) for one primitive proposition \(s\). Formally, by structural induction: a primitive proposition \(s\) contains exactly one primitive proposition, and \(\neg\varphi\) contains the same primitive propositions as \(\varphi\). So every \(\varphi\in\mathcal L(\neg)\) contains exactly one primitive proposition \(s\), and its value depends only on \(v(s)\).

Suppose \(\varphi\approx p\wedge q\) with \(\varphi\in\mathcal L(\neg)\), and let \(s\) be its primitive proposition. We find two valuations that agree on \(s\) but give \(p\wedge q\) different values.

  • If \(s=q\): take \(v_1\) with \(v_1(p)=v_1(q)=\mathrm T\), and \(v_2\) with \(v_2(p)=\mathrm F\), \(v_2(q)=\mathrm T\).
  • If \(s\neq q\): take \(v_1\) with every primitive proposition true, and \(v_2\) equal to \(v_1\) except \(v_2(q)=\mathrm F\).

In both cases \([\![\varphi]\!]_{v_1}=[\![\varphi]\!]_{v_2}\), since \(v_1(s)=v_2(s)\). But \([\![p\wedge q]\!]_{v_1}=\mathrm T\) and \([\![p\wedge q]\!]_{v_2}=\mathrm F\). This contradicts \(\varphi\approx p\wedge q\). So \(\{\neg\}\) is not adequate.

Day 3: Deductions

Today we define deductions from a set of assumptions, list the axioms for each connective, and write our first deductions in Fitch notation.

What we are using from before
  • Formulas of \(\mathcal L(\neg,\wedge,\vee,\to)\) are built from primitive propositions; outermost parentheses may be dropped, and \(\neg\) applies to the smallest formula after it.
  • A formula scheme such as \(\varphi\to(\psi\to\varphi)\) uses Greek letters for arbitrary formulas. An instance replaces each Greek letter by a formula, the same formula at every place where the letter occurs. For example, \(p\to((q\vee r)\to p)\) is an instance of \(\varphi\to(\psi\to\varphi)\), with \(\varphi:=p\) and \(\psi:=q\vee r\).
  • \(\varphi\to\psi\) has the main connective \(\to\), the antecedent \(\varphi\) and the consequent \(\psi\).

On Day 1, \(\Gamma\models\varphi\) was defined through valuations: it talks about all possible assignments of truth values. Now we take a different approach. We fix some basic formulas and one rule of reasoning, and we say that \(\varphi\) can be deduced from \(\Gamma\) if there is a finite list of steps from \(\Gamma\) to \(\varphi\). Truth values play no role in this definition.

7. Axioms and modus ponens

We work in the language \(\mathcal L(\neg,\wedge,\vee,\to)\). For each connective we fix a few axiom schemes that say how it behaves, and we use a single rule of inference.

Definition 8.24: axioms and the rule MP

An axiom is any instance of one of the following nine schemes.

ConnectiveNameAxiom scheme
Implication(L1)\(\varphi \to (\psi \to \varphi)\)
(L2)\((\varphi \to (\psi \to \chi)) \to ((\varphi \to \psi) \to (\varphi \to \chi))\)
Negation(L3)\((\neg \psi \to \neg \varphi) \to (\varphi \to \psi)\)
Conjunction(L4)\((\varphi \wedge \psi) \to \varphi\)
(L5)\((\varphi \wedge \psi) \to \psi\)
(L6)\(\varphi \to (\psi \to (\varphi \wedge \psi))\)
Disjunction(L7)\(\varphi \to (\varphi \vee \psi)\)
(L8)\(\psi \to (\varphi \vee \psi)\)
(L9)\((\varphi \to \chi) \to ((\psi \to \chi) \to ((\varphi \vee \psi) \to \chi))\)

There is one rule of inference, modus ponens (MP): from \(\varphi\) and \(\varphi\to\psi\), infer \(\psi\).

Each axiom says something we accept about one connective.

The symbol \(\leftrightarrow\) is still an abbreviation, so it needs no axioms of its own. Every axiom is a tautology, which can be checked with a truth table. This will matter later, when we compare \(\vdash\) with \(\models\).

Example 8.25: recognizing axioms

To check whether a formula is an instance of a scheme, compare main connectives first, then the parts. The same Greek letter must be replaced by the same formula everywhere.

(a) \(\neg p\to((p\to q)\to\neg p)\) is an instance of (L1), with \(\varphi:=\neg p\) and \(\psi:=p\to q\).
(b) \((q\wedge\neg r)\to q\) is an instance of (L4), with \(\varphi:=q\) and \(\psi:=\neg r\).
(c) \(p\to(q\vee p)\) is an instance of (L8), with \(\varphi:=q\) and \(\psi:=p\). It is not an instance of (L7): in (L7) the formula before the arrow is the left side of the disjunction.
(d) \(p\to(p\vee p)\) is an instance of both (L7) and (L8), with \(\varphi:=\psi:=p\). Different letters may be replaced by the same formula.
(e) \((p\to r)\to((q\to r)\to((p\vee q)\to r))\) is an instance of (L9), with \(\varphi:=p\), \(\psi:=q\), \(\chi:=r\).
(f) \((p\vee q)\to p\) is not an instance of any axiom. Its consequent \(p\) is a primitive proposition. In (L1), (L2), (L3), (L6) and (L9) the consequent is an implication, and in (L7) and (L8) it is a disjunction. Only (L4) and (L5) remain, and they need a conjunction as the antecedent.

8. Deductions and \(\Gamma\vdash\varphi\)

Definition 8.26: deduction from \(\Gamma\)

Let \(\Gamma\) be a set of formulas. A deduction from \(\Gamma\) is a finite sequence of formulas \(\varphi_1,\dots,\varphi_n\) such that for each \(1\le i\le n\), either

  1. \(\varphi_i\) is an axiom, or
  2. \(\varphi_i\in\Gamma\), or
  3. there are \(j,k<i\) such that \(\varphi_k=\varphi_j\to\varphi_i\) (the line \(\varphi_i\) follows from two earlier lines by MP).

It is a deduction of \(\varphi\) if \(\varphi_n=\varphi\). We write \(\Gamma\vdash\varphi\) if there is a deduction of \(\varphi\) from \(\Gamma\). The members of \(\Gamma\) are called assumptions. For \(\Gamma=\varnothing\) we write \(\vdash\varphi\): a deduction without assumptions.

We use the same short forms as for \(\models\): \(\psi_1,\dots,\psi_n\vdash\varphi\) means \(\{\psi_1,\dots,\psi_n\}\vdash\varphi\). Two remarks on the definition:

9. Fitch notation

We write deductions in Fitch notation (Figure 2):

123pp → qq(assump.)(assump.)(1,2 MP)line numbersjustificationsFitch barvertical lineassumptions(members of Γ)deduced line
Figure 2. The parts of a deduction in Fitch notation. This one shows \(p,\ p\to q\vdash q\). Line 3 follows from lines 1 and 2 by MP, because line 2 is line 1 followed by \(\to\) and line 3.

Definition 8.26 allows a member of \(\Gamma\) at any line, not only at the top. Moving such a line up does not break anything: an assumption line cites no other line, and every line still comes after the lines it cites (the numbers in the MP justifications change, but the order does not). So we can always put the assumptions first. An assumption may also stay unused, and a line may be cited many times.

Example 8.27: \(\vdash\varphi\to\varphi\)

There are no assumptions, so the bar is at the top.

1\(\varphi \to ((\varphi \to \varphi) \to \varphi)\)(L1)2\((\varphi \to ((\varphi \to \varphi) \to \varphi)) \to ((\varphi \to (\varphi \to \varphi)) \to (\varphi \to \varphi))\)(L2)3\((\varphi \to (\varphi \to \varphi)) \to (\varphi \to \varphi)\)(1,2 MP)4\(\varphi \to (\varphi \to \varphi)\)(L1)5\(\varphi \to \varphi\)(3,4 MP)

Line 2 is the instance of (L2) with \(\varphi:=\varphi\), \(\psi:=\varphi\to\varphi\) and \(\chi:=\varphi\). Line 3: line 2 is line 1 followed by \(\to\) and line 3. Line 5: line 3 is line 4 followed by \(\to\) and line 5. Since all our axioms are schemes, the same deduction works for every formula \(\varphi\), for example \(\varphi:=p\).

The deduction is short but not obvious. The idea: (L2) followed by MP twice removes an antecedent in the form \(\varphi\to\cdots\), and the two instances of (L1) supply exactly what (L2) needs.

Example 8.28: \(\varphi,\ \psi\vdash\varphi\wedge\psi\)
1\(\varphi\)(assump.)2\(\psi\)(assump.)3\(\varphi \to (\psi \to (\varphi \wedge \psi))\)(L6)4\(\psi \to (\varphi \wedge \psi)\)(1,3 MP)5\(\varphi \wedge \psi\)(2,4 MP)

Axiom (L6) turns the two assumptions into their conjunction with two applications of MP. Since the line numbers in a justification can come in any order, line 5 cites line 2 (\(\psi\)) and line 4 (\(\psi\to(\varphi\wedge\psi)\)).

Example 8.29: \(\varphi\wedge\psi\vdash\psi\wedge\varphi\)
1\(\varphi \wedge \psi\)(assump.)2\((\varphi \wedge \psi) \to \psi\)(L5)3\(\psi\)(1,2 MP)4\((\varphi \wedge \psi) \to \varphi\)(L4)5\(\varphi\)(1,4 MP)6\(\psi \to (\varphi \to (\psi \wedge \varphi))\)(L6)7\(\varphi \to (\psi \wedge \varphi)\)(3,6 MP)8\(\psi \wedge \varphi\)(5,7 MP)

Lines 2 to 5 take the conjunction apart with (L5) and (L4). Lines 6 to 8 put the parts together again, in the other order, as in Example 8.28. Note line 6: it is (L6) with \(\varphi:=\psi\) and \(\psi:=\varphi\), so the letters swap.

Example 8.30: \(\varphi\vdash\psi\to\varphi\)
1\(\varphi\)(assump.)2\(\varphi \to (\psi \to \varphi)\)(L1)3\(\psi \to \varphi\)(1,2 MP)

(L1) followed by MP adds any antecedent \(\psi\) in front of a formula we already have. We will use this move often.

Example 8.31: \(\varphi\to\psi,\ \psi\to\chi\vdash\varphi\to\chi\)

Planning, backwards from the goal. The goal \(\varphi\to\chi\) is not an assumption and not an axiom, so it must come from MP: we need some \(\alpha\) and \(\alpha\to(\varphi\to\chi)\). Axiom (L2) ends in \((\varphi\to\psi)\to(\varphi\to\chi)\), and \(\varphi\to\psi\) is an assumption. So we aim for \((\varphi\to\psi)\to(\varphi\to\chi)\). By (L2) and MP, this follows from \(\varphi\to(\psi\to\chi)\). And that follows from the assumption \(\psi\to\chi\) by (L1) and MP, as in Example 8.30. Now we write the lines forwards:

1\(\varphi \to \psi\)(assump.)2\(\psi \to \chi\)(assump.)3\((\psi \to \chi) \to (\varphi \to (\psi \to \chi))\)(L1)4\(\varphi \to (\psi \to \chi)\)(2,3 MP)5\((\varphi \to (\psi \to \chi)) \to ((\varphi \to \psi) \to (\varphi \to \chi))\)(L2)6\((\varphi \to \psi) \to (\varphi \to \chi)\)(4,5 MP)7\(\varphi \to \chi\)(1,6 MP)
Method: planning a deduction
  1. Write the assumptions, then the goal at the bottom of a sheet of paper. Work from both ends.
  2. If the goal is the consequent of an assumption \(\alpha\to\text{goal}\), or the end of an axiom, aim for what is missing in front of it.
  3. Take conjunctions apart with (L4), (L5), and build them with (L6). Build disjunctions with (L7), (L8), and use a disjunction with (L9).
  4. To put an extra antecedent in front of a formula you have, use (L1) and MP (Example 8.30). To join \(\alpha\to\beta\) and \(\beta\to\gamma\), use the pattern of Example 8.31.
  5. When the lines are found, write them forwards, number them, and check each justification.
Example 8.32: \(\neg\varphi\vdash\varphi\to\psi\)

The only axiom with \(\neg\) is (L3), and its consequent is \(\varphi\to\psi\), exactly the goal. So we need its antecedent \(\neg\psi\to\neg\varphi\), which we get from \(\neg\varphi\) as in Example 8.30.

1\(\neg \varphi\)(assump.)2\(\neg \varphi \to (\neg \psi \to \neg \varphi)\)(L1)3\(\neg \psi \to \neg \varphi\)(1,2 MP)4\((\neg \psi \to \neg \varphi) \to (\varphi \to \psi)\)(L3)5\(\varphi \to \psi\)(3,4 MP)

In words: from \(\neg\varphi\), every implication with antecedent \(\varphi\) can be deduced.

Example 8.33: \(\varphi\vee\psi\vdash\psi\vee\varphi\)

We use (L9), proof by cases, with \(\chi:=\psi\vee\varphi\). We need \(\varphi\to(\psi\vee\varphi)\) and \(\psi\to(\psi\vee\varphi)\).

1\(\varphi \vee \psi\)(assump.)2\(\varphi \to (\psi \vee \varphi)\)(L8)3\(\psi \to (\psi \vee \varphi)\)(L7)4\((\varphi \to (\psi \vee \varphi)) \to ((\psi \to (\psi \vee \varphi)) \to ((\varphi \vee \psi) \to (\psi \vee \varphi)))\)(L9)5\((\psi \to (\psi \vee \varphi)) \to ((\varphi \vee \psi) \to (\psi \vee \varphi))\)(2,4 MP)6\((\varphi \vee \psi) \to (\psi \vee \varphi)\)(3,5 MP)7\(\psi \vee \varphi\)(1,6 MP)

Line 2 is (L8) with \(\varphi:=\psi\), \(\psi:=\varphi\); line 3 is (L7) with the same replacement. Line 4 is (L9) with \(\chi:=\psi\vee\varphi\) and the letters \(\varphi,\psi\) unchanged. Lines 5 to 7 apply MP three times, once for each antecedent of line 4.

Example 8.34: \(\neg\psi\to\neg\varphi,\ \varphi\wedge\chi\vdash\psi\)
1\(\neg \psi \to \neg \varphi\)(assump.)2\(\varphi \wedge \chi\)(assump.)3\((\varphi \wedge \chi) \to \varphi\)(L4)4\(\varphi\)(2,3 MP)5\((\neg \psi \to \neg \varphi) \to (\varphi \to \psi)\)(L3)6\(\varphi \to \psi\)(1,5 MP)7\(\psi\)(4,6 MP)

Lines 3 and 4 take \(\varphi\) out of the conjunction. Lines 5 and 6 turn the first assumption into \(\varphi\to\psi\) with (L3). Line 7 combines the two.

Exercise 5: fill in the justifications

Self-check only. Nothing here counts towards your grade.

The formulas below form a deduction of \(r\wedge p\) from \(\Gamma=\{p,\ p\to q,\ q\to r\}\). For each line, choose the justification. For MP, also enter the two line numbers, in either order.

1\(p\)(assump.)2\(p \to q\)(assump.)3\(q \to r\)(assump.)4\(q\)(1,2 MP)5\(r\)(3,4 MP)6\(r \to (p \to (r \wedge p))\)(L6)7\(p \to (r \wedge p)\)(5,6 MP)8\(r \wedge p\)(1,7 MP)

Line 6 is (L6) with \(\varphi:=r\) and \(\psi:=p\). Lines 4 and 5 use the assumptions as implications; lines 7 and 8 use MP with (L6) as in Example 8.28.

10. Using deductions inside deductions

Deductions can be joined together. This gives some general facts about \(\vdash\). Compare them with Proposition 8.7(a) to (c) for \(\models\).

Proposition 8.35: first properties of \(\vdash\)

Let \(\Gamma,\Delta\) be sets of formulas and \(\varphi,\psi\) formulas.

(a) If \(\varphi\in\Gamma\), then \(\Gamma\vdash\varphi\).
(b) If \(\Gamma\subseteq\Delta\) and \(\Gamma\vdash\varphi\), then \(\Delta\vdash\varphi\). In particular, if \(\vdash\varphi\) then \(\Gamma\vdash\varphi\) for every \(\Gamma\).
(c) If \(\Gamma\vdash\varphi\) and \(\Gamma\vdash\varphi\to\psi\), then \(\Gamma\vdash\psi\).

Proof. (a) The one-line sequence \(\varphi\) is a deduction from \(\Gamma\): its only line is justified by (assump.).

(b) Take a deduction of \(\varphi\) from \(\Gamma\). Each line is an axiom, a member of \(\Gamma\) (and so of \(\Delta\)), or follows from earlier lines by MP. So the same sequence is a deduction from \(\Delta\).

(c) Take a deduction \(\varphi_1,\dots,\varphi_n\) of \(\varphi\) from \(\Gamma\), and a deduction \(\chi_1,\dots,\chi_m\) of \(\varphi\to\psi\) from \(\Gamma\). Write the first, then the second, then \(\psi\):

\[\varphi_1,\ \dots,\ \varphi_n,\ \chi_1,\ \dots,\ \chi_m,\ \psi.\]

Lines \(1\) to \(n\) are justified as before. Line \(n+i\) is \(\chi_i\); if it was justified by MP from lines \(j,k\) of the second deduction, it is now justified by MP from lines \(n+j,n+k\), which are still earlier. The last line follows by MP from line \(n\) (\(\varphi\)) and line \(n+m\) (\(\varphi\to\psi\)). □

In the same way we can turn the pattern of Example 8.31 into a general rule.

Proposition 8.36: chaining implications

If \(\Gamma\vdash\varphi\to\psi\) and \(\Gamma\vdash\psi\to\chi\), then \(\Gamma\vdash\varphi\to\chi\).

Proof. Write a deduction of \(\varphi\to\psi\) from \(\Gamma\) (\(n\) lines), then a deduction of \(\psi\to\chi\) from \(\Gamma\) (\(m\) lines, with MP line numbers raised by \(n\), as in the proof of Proposition 8.35(c)). Then add the last five lines of Example 8.31:

\(n+m+1\)\((\psi\to\chi)\to(\varphi\to(\psi\to\chi))\)(L1)
\(n+m+2\)\(\varphi\to(\psi\to\chi)\)(\(n+m,\ n+m+1\) MP)
\(n+m+3\)\((\varphi\to(\psi\to\chi))\to((\varphi\to\psi)\to(\varphi\to\chi))\)(L2)
\(n+m+4\)\((\varphi\to\psi)\to(\varphi\to\chi)\)(\(n+m+2,\ n+m+3\) MP)
\(n+m+5\)\(\varphi\to\chi\)(\(n,\ n+m+4\) MP)

Line \(n\) is \(\varphi\to\psi\) and line \(n+m\) is \(\psi\to\chi\). □

This rule is called hypothetical syllogism (HS). Results like Propositions 8.35 and 8.36 are statements about deductions. They tell us that a deduction exists without writing it out.

Example 8.37: \(\vdash(\varphi\wedge\psi)\to(\varphi\vee\psi)\)

Short proof. By (L4), \(\vdash(\varphi\wedge\psi)\to\varphi\). By (L7), \(\vdash\varphi\to(\varphi\vee\psi)\). By Proposition 8.36 with \(\Gamma=\varnothing\), \(\vdash(\varphi\wedge\psi)\to(\varphi\vee\psi)\).

The deduction itself. Following the proof of Proposition 8.36 with \(n=m=1\):

1\((\varphi \wedge \psi) \to \varphi\)(L4)2\(\varphi \to (\varphi \vee \psi)\)(L7)3\((\varphi \to (\varphi \vee \psi)) \to ((\varphi \wedge \psi) \to (\varphi \to (\varphi \vee \psi)))\)(L1)4\((\varphi \wedge \psi) \to (\varphi \to (\varphi \vee \psi))\)(2,3 MP)5\(((\varphi \wedge \psi) \to (\varphi \to (\varphi \vee \psi))) \to (((\varphi \wedge \psi) \to \varphi) \to ((\varphi \wedge \psi) \to (\varphi \vee \psi)))\)(L2)6\(((\varphi \wedge \psi) \to \varphi) \to ((\varphi \wedge \psi) \to (\varphi \vee \psi))\)(4,5 MP)7\((\varphi \wedge \psi) \to (\varphi \vee \psi)\)(1,6 MP)
Exercise 6: write deductions

Self-check only. Nothing here counts towards your grade.

Write a deduction for each claim. Type one formula per line and choose its justification. The check tests every line against Definition 8.26, so every correct deduction is accepted, also one that differs from the solution. Type formulas as in Exercise 4.

(a) \(p\wedge q,\ p\to r\vdash r\)
(b) \(p\to(q\to r),\ p\wedge q\vdash r\)
(c) \(q\vdash p\to(p\wedge q)\)

Hint: (L6) gives \(p\to(q\to(p\wedge q))\). Then use (L2) to deal with the \(q\) inside, and get \(p\to q\) from \(q\) as in Example 8.30.

(a)

1\(p \wedge q\)(assump.)2\(p \to r\)(assump.)3\((p \wedge q) \to p\)(L4)4\(p\)(1,3 MP)5\(r\)(2,4 MP)

(b)

1\(p \to (q \to r)\)(assump.)2\(p \wedge q\)(assump.)3\((p \wedge q) \to p\)(L4)4\(p\)(2,3 MP)5\(q \to r\)(1,4 MP)6\((p \wedge q) \to q\)(L5)7\(q\)(2,6 MP)8\(r\)(5,7 MP)

(c)

1\(q\)(assump.)2\(p \to (q \to (p \wedge q))\)(L6)3\((p \to (q \to (p \wedge q))) \to ((p \to q) \to (p \to (p \wedge q)))\)(L2)4\((p \to q) \to (p \to (p \wedge q))\)(2,3 MP)5\(q \to (p \to q)\)(L1)6\(p \to q\)(1,5 MP)7\(p \to (p \wedge q)\)(4,6 MP)

In (c), line 3 is (L2) with \(\varphi:=p\), \(\psi:=q\), \(\chi:=p\wedge q\).

Next week

In Example 8.32 we showed \(\neg\varphi\vdash\varphi\to\psi\). Can we conclude \(\vdash\neg\varphi\to(\varphi\to\psi)\), with no assumptions? For \(\models\), Proposition 8.7(d) moves a formula from the left side into an antecedent. The corresponding statement for \(\vdash\) is the Deduction Theorem: \(\Gamma\cup\{\varphi\}\vdash\psi\) if and only if \(\Gamma\vdash\varphi\to\psi\). We prove it next week. Until then, show a claim \(\Gamma\vdash\varphi\) only by writing a deduction, or with Propositions 8.35 and 8.36.

Homework 8

Instructions

  • Write your full name in the box below before you start.
  • Show your work. For every answer give the reasons, not only the result.
  • Each question has two answer modes, Type and Write by hand. In Write by hand mode the text boxes are replaced by a drawing area where you can write with a pen, a finger or a mouse. For each question, only the answer in the selected mode goes into the PDF. Switching modes does not delete what you entered in the other mode.
  • The symbol buttons under a text box insert symbols at the cursor.
  • To submit, press Save homework as PDF, save the PDF and upload it to Canvas.
  • Your answers are saved automatically in this browser. If you open this page on a different computer or in a different browser, they will not be there.

Question 1: semantic consequence15 points

For each claim, decide whether it holds. If it holds, prove it, for example by assuming that a valuation satisfies the left side and makes the right side false, and reaching a contradiction. If it fails, give a counterexample and check it. Each part is worth 3 points.

(a) \(p\to(q\vee r),\ \neg r\models p\to q\)
(b) \((p\vee q)\to r\models p\to r\)
(c) \(p\to r\models(p\vee q)\to r\)
(d) \(p\to(q\to r)\models(p\to q)\to r\)
(e) \(p\vee q,\ \neg p\vee r\models q\vee r\)

Question 2: logical equivalence15 points

(a) (4 points) Decide whether \((p\to q)\vee(p\to r)\approx p\to(q\vee r)\). Justify your answer.
(b) (4 points) Decide whether \((p\to r)\vee(q\to r)\approx(p\vee q)\to r\). Justify your answer.
(c) (3 points) Using Table 1 and Proposition 8.13, show by a chain of equivalences that \(\neg(p\to(q\vee\neg r))\approx p\wedge(\neg q\wedge r)\). Name the equivalence you use at each step.
(d) (4 points) Let \(\varphi=(p\to q)\vee\neg r\). Apply the recipe from the proof of Theorem 8.16 to \(\varphi\), step by step as in Example 8.17, and write down the formula \(\varphi'\in\mathcal L(\neg,\wedge)\) that it produces. Do not simplify the result.

Question 3: a faulty deduction10 points

A student claims that the following is a deduction of \(r\wedge p\) from \(\Gamma=\{p\to q,\ q\to r,\ r\}\):

1\(p \to q\)(assump.)2\(q \to r\)(assump.)3\(r\)(assump.)4\(q\)(2,3 MP)5\(p\)(1,4 MP)6\(p \to (r \to (r \wedge p))\)(L6)7\(r \to (r \wedge p)\)(5,6 MP)8\(r \wedge p\)(3,7 MP)
(a) (6 points) Which lines are not correctly justified? For each such line, explain what is wrong.
(b) (4 points) Show that \(\Gamma\not\models r\wedge p\).

Question 4: deductions25 points

Write a deduction for each claim in Fitch notation. Use only (assump.), the axioms (L1) to (L9) and MP, and write the justifications as in the notes, for example (L6) or (1,2 MP). Write every line: do not cite Proposition 8.36 or earlier examples. Put the assumptions first. Use "Add line" for more lines.

(a) (4 points) \(p\vdash q\to(p\wedge q)\)
(b) (6 points) \(\neg(p\wedge q)\vdash(p\wedge q)\to r\)
(c) (7 points) \(p\wedge q,\ q\to r\vdash p\wedge r\)
(d) (8 points) \(p\to q\vdash(p\wedge r)\to q\)

Question 5: proofs about \(\models\)15 points

Prove each statement directly from Definitions 8.1 and 8.3. Here \(\Gamma\) is any set of formulas and \(\varphi,\psi\) are any formulas.

(a) (6 points) \(\Gamma\models\varphi\) if and only if \(\Gamma\cup\{\neg\varphi\}\) is unsatisfiable.
(b) (5 points) If \(\Gamma\models\varphi\) and \(\Gamma\cup\{\varphi\}\models\psi\), then \(\Gamma\models\psi\).
(c) (4 points) Give a satisfiable set \(\Gamma\) and a formula \(\varphi\) such that \(\Gamma\not\models\varphi\) and \(\Gamma\not\models\neg\varphi\). Then show that if \(\Gamma\) is satisfiable, \(\Gamma\models\varphi\) and \(\Gamma\models\neg\varphi\) cannot both hold.

Question 6: \(\{\neg,\leftrightarrow\}\) is not adequate20 points

In this question \(\leftrightarrow\) is a connective of its own: \(\varphi\leftrightarrow\psi\) is true exactly when \(\varphi\) and \(\psi\) have the same truth value. Let \(v_1,v_2,v_3,v_4\) be the four valuations that give \(p\) and \(q\) the four combinations of truth values and give every other primitive proposition the value \(\mathrm T\). For a formula \(\varphi\), let \(t(\varphi)\) be the number of \(i\in\{1,2,3,4\}\) with \([\![\varphi]\!]_{v_i}=\mathrm T\).

(a) (12 points) Prove by structural induction that \(t(\varphi)\) is even for every \(\varphi\in\mathcal L(\neg,\leftrightarrow)\). In the step for \(\leftrightarrow\), count separately the valuations \(v_i\) under which both sides are true and those under which both sides are false.
(b) (8 points) Conclude that no formula of \(\mathcal L(\neg,\leftrightarrow)\) is logically equivalent to \(p\wedge q\), and so \(\{\neg,\leftrightarrow\}\) is not adequate.