CS245-S21-S03
CS245-S21-S03
Copyright ©2021
1 if Bt = 1 and Ct = 0
(B g13 C)t = {
0 otherwise
Solution: Throughout this solution, the student may write g13 in prefix notation instead
of infix notation, i.e. g13 (B, C) instead of (B g13 C). In the Lecture Slides, we showed that
S1 = {¬, ∧} is an adequate set of connectives. ✓ To show that S = {→, g13 } is an adequate
set of connectives, it is sufficient to show that we can implement each of ¬ and ∧ in terms of
S only.
First, note that B g13 C ⧦ B ∧ ¬C.
i. Implement ¬B via ¬B ⧦ B → (B g13 B)✓. This truth table shows why this construction
is correct.
B ¬B (B g13 B) B → (B g13 B)
1 0 0 0
0 1 0 1
ii. Implement B ∧ C via B ∧ C ⧦ (B g13 (B g13 C))✓✓. This truth table shows why this
construction is correct.
B C B ∧ C (B g13 C) (B g13 (B g13 C))
1 1 1 0 1
1 0 0 1 0
0 1 0 0 0
0 0 0 0 0
Since every connective in S0 can be implemented using the connectives in S1 , therefore S1 is
adequate. ✓
[5] (b) This is Exercise 2.8.5 in Lu. Show that the connective ↔ cannot be defined in terms of {→}.
In particular, if p, q are proposition symbols and if A is any propositional formula using only
the proposition symbols p and q and the connective →, show that A is not tautologically
equivalent to p ↔ q.
Hint: Prove the following Lemma, by Structural Induction on A. Then apply the Lemma to
establish the above result.
Lemma 1 Let A be any propositional formula, using only the proposition symbols p and q
and the connective →. Let t0 be the truth valuation defined by pt0 = 0, qt0 = 1. Let t1 be the
truth valuation defined by pt1 = 1, qt1 = 0. Then At0 = 1 or At1 = 1.
Solution: Let R(A) denote the property that At0 = 1 or At1 = 1. The proof by structural
induction on A.
Base:
• If the formula A is p, then since pt1 = 1, R(A) clearly holds.
• If the formula A is q, then since qt0 = 1, R(A) clearly holds.
Induction: A is (B → C), for some formulas B and C. The induction hypothesis applies to
C, so that Ct0 = 1 or Ct1 = 1. We need to show that R((B → C)) holds.
t
• If Ct0 = 1, then by the → rule, (B → C) 0 = 1, and
t
• If Ct1 = 1, then by the → rule, (B → C) 1 = 1.
Hence R((B → C)) holds.
By the principle of structural induction, R(A) holds for any formula A, as constructed above.
This completes the proof of the lemma.
Now to prove the desired result, we need to show that any formula A constructed as above
cannot be tautologically equivalent to p ↔ q.
2
Question 2 (25 marks).
Use formal deduction to prove each of the following. The only inference rules you are allowed to
use in your proofs are the 11 basic rules, plus (∈) and (¬+).
[5] (a) {p ∨ (q ∧ r)} ⊢ (p ∨ q) ∧ (p ∨ r)
Solution:
(1) p ⊢ p (by (∈)) OR (by (Ref))
(2) p ⊢ p∨q (by (∨ +), (1))
(3) p ⊢ p∨r (by (∨ +), (1))
(4) p ⊢ (p ∨ q) ∧ (p ∨ r) (by (∧ +), (2), (3))
(5) q∧r ⊢ q∧r (by (∈)) OR (by (Ref))
(6) q∧r ⊢ q (by (∧ −), (5))
(7) q∧r ⊢ p∨q (by (∨ +), (6))
(8) q∧r ⊢ r (by (∧ −), (5))
(9) q∧r ⊢ p∨r (by (∨ +), (8))
(10) q ∧ r ⊢ (p ∨ q) ∧ (p ∨ r) (by (∧ +), (7), (9))
(11) p ∨ (q ∧ r) ⊢ (p ∨ q) ∧ (p ∨ r) (by (∨ −), (4), (10))
Solution:
(1) p∧q ⊢ p∧q (by (∈)) OR (by (Ref))
(2) p∧q ⊢ p (by (∧ −), (1))
(3) p∧q ⊢ q (by (∧ −), (1))
(4) p∧q ⊢ q∨r (by (∨ +), (3))
(5) p∧q ⊢ p ∧ (q ∨ r) (by (∧ +), (2), (4))
(6) p∧r ⊢ p∧r (by (∈)) OR (by (Ref))
(7) p∧r ⊢ p (by (∧ −), (6))
(8) p∧r ⊢ r (by (∧ −), (6))
(9) p∧r ⊢ q∨r (by (∨ +), (8))
(10) p ∧ r ⊢ p ∧ (q ∨ r) (by (∧ +), (7), (9))
(11) (p ∧ q) ∨ (p ∧ r) ⊢ p ∧ (q ∨ r) (by (∨ −), (5), (10))
Alternative Soution:
(1) p∧q ⊢ p∧q (by (∈)) OR (by (Ref))
(2) p∧q ⊢ p (by (∧ −), (1))
(3) p∧r ⊢ p∧r (by (∈)) OR (by (Ref))
(4) p∧r ⊢ p (by (∧ −), (3))
(5) (p ∧ q) ∨ (p ∧ r) ⊢ p (by (∨ −), (2), (4))
(6) p∧q ⊢ q (by (∧ −), (1))
(7) p∧q ⊢ q∨r (by (∨ +), (6))
(8) p∧r ⊢ r (by (∧ −), (3))
(9) p∧r ⊢ q∨r (by (∨ +), (8))
(10) (p ∧ q) ∨ (p ∧ r) ⊢ q∨r (by (∨ −), (7), (9))
(11) (p ∧ q) ∨ (p ∧ r) ⊢ p ∧ (q ∨ r) (by (∧ +), (5), (11))
3
[7] (c) Theorem 2.6.4[4] in the text:
A → (B → C), A → B ⊢ A → C.
Solution:
(1) A → (B → C), A → B, A ⊢ A → (B → C) (by (∈))
(2) A → (B → C), A → B, A ⊢ A→B (by (∈))
(3) A → (B → C), A → B, A ⊢ A (by (∈))
(4) A → (B → C), A → B, A ⊢ B (by (→ −), (2), (3))
(5) A → (B → C), A → B, A ⊢ B→C (by (→ −), (1), (3))
(6) A → (B → C), A → B, A ⊢ C (by (→ −), (4), (5))
(7) A → (B → C), A → B ⊢ A→C (by (→ +), (6))
(A ∨ B) → C ⊢⊢ (A → C) ∧ (B → C).
Solution: Proof of ⊢:
(1) (A ∨ B) → C, A ⊢ (A ∨ B) → C (by (∈))
(2) (A ∨ B) → C, A ⊢ A (by (∈))
(3) (A ∨ B) → C, A ⊢ A ∨ B (by (∨ +), (2)) ✓
(4) (A ∨ B) → C, A ⊢ C (by (→ −), (1), (3)) ✓
(5) (A ∨ B) → C ⊢ A→C (by (→ +), (4)) ✓
(6) (A ∨ B) → C, B ⊢ (A ∨ B) → C (by (∈)) OR (by (Ref))
(7) (A ∨ B) → C, B ⊢ B (by (∈)) OR (by (Ref))
(8) (A ∨ B) → C, B ⊢ A ∨ B (by (∨ +), (7))
(9) (A ∨ B) → C, B ⊢ C (by (→ −), (6), (8))
(10) (A ∨ B) → C ⊢ B→C (by (→ +), (9))
(11) (A ∨ B) → C ⊢ (A → C) ∧ (B → C) (by (∧ +), (5), (10)) ✓
Proof of ⊢:
(1) (A → C) ∧ (B → C), A ⊢ (A → C) ∧ (B → C) (by (∈))
(2) (A → C) ∧ (B → C), A ⊢ (A → C) (by (∧ −), (1)) ✓
(3) (A → C) ∧ (B → C), A ⊢ A (by (∈))
(4) (A → C) ∧ (B → C), A ⊢ C (by (→ −), (2), (3)) ✓
(5) (A → C) ∧ (B → C), B ⊢ (A → C) ∧ (B → C) (by (∈)) OR (by (Ref))
(6) (A → C) ∧ (B → C), B ⊢ (B → C) (by (∧ −), (5))
(7) (A → C) ∧ (B → C), B ⊢ B (by (∈))
(8) (A → C) ∧ (B → C), B ⊢ C (by (→ −), (6), (7))
(9) (A → C) ∧ (B → C), A ∨ B ⊢ C (by (∨ −), (4), (8)) ✓
(10) (A → C) ∧ (B → C) ⊢ (A ∨ B) → C (by (→ +), (9)) ✓
4
Question 3 (6 marks).
Consider the proof of Theorem 2.6.2 on pp 51–52 of the text. The Theorem says that: If Σ ⊢ A
then there is some finite Σ𝜊 ⊆ Σ such that Σ𝜊 ⊢ A.
Prove the inductive step for the case of a proof whose last inference rule is (∨−) (or-elimination).
That is: assuming that we have previously established Σ, A ⊢ C and Σ, B ⊢ C then we conclude
Σ, A ∨ B ⊢ C.
Solution:
• The induction hypotheses are that there exist finite subsets
– Σ1 ⊆ Σ ∪ {A} such that Σ1 ⊢ C✓, and
– Σ2 ⊆ Σ ∪ {B} such that Σ2 ⊢ C.✓
• Then by applying (+) to each of previous two facts, we obtain
– Σ1 \{A}, Σ2 \{B}, A ⊢ C✓, and
– Σ1 \{A}, Σ2 \{B}, B ⊢ C.✓
• Applying (∨ −) to the previous two facts yields Σ1 \{A}, Σ2 \{B}, A ∨ B ⊢ C✓
• Since Σ1 \{A}, Σ2 \{B} are both finite, it follows that (Σ1 \{A}) ∪ (Σ2 \{B}) ∪ {A ∨ B} is a finite
subset of Σ ∪ {A ∨ B}. ✓