<<

Propositional natural deduction COMP2600 / COMP6260

Dirk Pattinson Australian National University

Semester 2, 2016 Major proof techniques

Three major styles of proof in and mathematics Model based computation: truth tables for propositional logic Algebraic proof: simplification rules e.g. De Morgan’s : rules of

I Natural deduction is one example

I Other examples: tableau calculi, resolution, Hilbert calculi

1 / 25 T TT T T T T T T TF T T T T T T FT T T F T T T FF F F F F T F TT T F F T T F TF T F F F T F FT T F F T T F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r))

2 / 25 T TF T T T T T T FT T T F T T T FF F F F F T F TT T F F T T F TF T F F F T F FT T F F T T F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T

2 / 25 T FT T T F T T T FF F F F F T F TT T F F T T F TF T F F F T F FT T F F T T F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T T TF T T T T T

2 / 25 T FF F F F F T F TT T F F T T F TF T F F F T F FT T F F T T F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T T TF T T T T T T FT T T F T T

2 / 25 F TT T F F T T F TF T F F F T F FT T F F T T F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T T TF T T T T T T FT T T F T T T FF F F F F T

2 / 25 F TF T F F F T F FT T F F T T F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T T TF T T T T T T FT T T F T T T FF F F F F T F TT T F F T T

2 / 25 F FT T F F T T F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T T TF T T T T T T FT T T F T T T FF F F F F T F TT T F F T T F TF T F F F T

2 / 25 F FF F F F F T

Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T T TF T T T T T T FT T T F T T T FF F F F F T F TT T F F T T F TF T F F F T F FT T F F T T

2 / 25 Example proof using truth tables

Statement to be proved: (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) For all 8 (= 23) possibilities of p,q,r, calculate truth value of the statement p q r q ∨ r p ∧ (q ∨ r) p ∧ q (p ∧ q) ∨ r (p ∧ (q ∨ r)) → ((p ∧ q) ∨ r)) T TT T T T T T T TF T T T T T T FT T T F T T T FF F F F F T F TT T F F T T F TF T F F F T F FT T F F T T F FF F F F F T

2 / 25 The notion of a deductive proof

A proof is a sequence of steps. Each step is either:

I an or an assumption; or

I a statement which follows from previous steps via a valid . Natural deduction:

I for each connective, there is an introduction and an elimination rule

I rules are formal, but resemble natural, i.e., human reasoning

3 / 25 Example of a natural deduction proof

Statement to be proved: (p ∧ (q ∨ r)) → ((q → s) ∨ p)

1 p ∧ (q ∨ r) Assumption

2 p ∧-E, 1

3 (q → s) ∨ p ∨-I, 2

4 (p ∧ (q ∨ r)) → ((q → s) ∨ p) →-I, 1–3

4 / 25 ∧-E (and elimination)

p ∧ q p ∧ q p q

Conjunction rules

∧-I (and introduction)

p q p ∧ q

5 / 25 Conjunction rules

∧-I (and introduction)

p q p ∧ q ∧-E (and elimination)

p ∧ q p ∧ q p q

5 / 25 Example

Commutativity of conjunction (derived rule)

p ∧ q q ∧ p

1 p ∧ q

2 p ∧-E, 1

3 q ∧-E, 1

4 q ∧ p ∧-I, 2, 3

6 / 25 →-E (implication elimination) p p → q q

Implication rules

→-I (implication introduction) [ p ] . q p → q This notation means that by assuming p, you can prove q. p is then discharged - no longer an assumption.

7 / 25 Implication rules

→-I (implication introduction) [ p ] . q p → q This notation means that by assuming p, you can prove q. p is then discharged - no longer an assumption.

→-E (implication elimination) p p → q q

7 / 25 1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 p → r →-I, 3–5

Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

8 / 25 2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 p → r →-I, 3–5

Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

1 p → q

8 / 25 3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 p → r →-I, 3–5

Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

1 p → q

2 q → r

8 / 25 4 q →-E, 1, 3

5 r →-E, 2, 4

6 p → r →-I, 3–5

Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

1 p → q

2 q → r

3 p

8 / 25 5 r →-E, 2, 4

6 p → r →-I, 3–5

Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

8 / 25 6 p → r →-I, 3–5

Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

8 / 25 Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 p → r →-I, 3–5

8 / 25 Example - transitivity of implication (derived rule)

p → q q → r We prove p → r

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 p → r →-I, 3–5

Lines 1 and 2 are the assumptions given, you may use these throughout the proof Line 3 is an assumption made within the proof, you may use it only within its scope (lines 3 to 5)

8 / 25 1 p → q

2 p

3 q →-E, 1, 2

4 p → q →-I, 2–3 This is a rather silly proof, we succeed in proving what we started with. But it illustrates the meaning of the line number notation: →-E,1,2 means that rule →-E proves line 3 from lines 1 and2 →-I,2-3 means rule →-I proves line 4 from the fact that we could assume line 2 and (using that assumption) prove line 3

Notation: justification of a step

9 / 25 2 p

3 q →-E, 1, 2

4 p → q →-I, 2–3 This is a rather silly proof, we succeed in proving what we started with. But it illustrates the meaning of the line number notation: →-E,1,2 means that rule →-E proves line 3 from lines 1 and2 →-I,2-3 means rule →-I proves line 4 from the fact that we could assume line 2 and (using that assumption) prove line 3

Notation: justification of a step

1 p → q

9 / 25 3 q →-E, 1, 2

4 p → q →-I, 2–3 This is a rather silly proof, we succeed in proving what we started with. But it illustrates the meaning of the line number notation: →-E,1,2 means that rule →-E proves line 3 from lines 1 and2 →-I,2-3 means rule →-I proves line 4 from the fact that we could assume line 2 and (using that assumption) prove line 3

Notation: justification of a step

1 p → q

2 p

9 / 25 4 p → q →-I, 2–3 This is a rather silly proof, we succeed in proving what we started with. But it illustrates the meaning of the line number notation: →-E,1,2 means that rule →-E proves line 3 from lines 1 and2 →-I,2-3 means rule →-I proves line 4 from the fact that we could assume line 2 and (using that assumption) prove line 3

Notation: justification of a step

1 p → q

2 p

3 q →-E, 1, 2

9 / 25 This is a rather silly proof, we succeed in proving what we started with. But it illustrates the meaning of the line number notation: →-E,1,2 means that rule →-E proves line 3 from lines 1 and2 →-I,2-3 means rule →-I proves line 4 from the fact that we could assume line 2 and (using that assumption) prove line 3

Notation: justification of a step

1 p → q

2 p

3 q →-E, 1, 2

4 p → q →-I, 2–3

9 / 25 Notation: justification of a step

1 p → q

2 p

3 q →-E, 1, 2

4 p → q →-I, 2–3 This is a rather silly proof, we succeed in proving what we started with. But it illustrates the meaning of the line number notation: →-E,1,2 means that rule →-E proves line 3 from lines 1 and2 →-I,2-3 means rule →-I proves line 4 from the fact that we could assume line 2 and (using that assumption) prove line 3

9 / 25 1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 q ∧ r WRONG ∧-I, 4, 5 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

Rules involving assumptions

10 / 25 2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 q ∧ r WRONG ∧-I, 4, 5 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

Rules involving assumptions

1 p → q

10 / 25 3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 q ∧ r WRONG ∧-I, 4, 5 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

Rules involving assumptions

1 p → q

2 q → r

10 / 25 4 q →-E, 1, 3

5 r →-E, 2, 4

6 q ∧ r WRONG ∧-I, 4, 5 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

Rules involving assumptions

1 p → q

2 q → r

3 p

10 / 25 5 r →-E, 2, 4

6 q ∧ r WRONG ∧-I, 4, 5 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

Rules involving assumptions

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

10 / 25 6 q ∧ r WRONG ∧-I, 4, 5 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

Rules involving assumptions

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

10 / 25 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

Rules involving assumptions

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 q ∧ r WRONG ∧-I, 4, 5

10 / 25 Rules involving assumptions

1 p → q

2 q → r

3 p

4 q →-E, 1, 3

5 r →-E, 2, 4

6 q ∧ r WRONG ∧-I, 4, 5 If a statement is inside the scope of an assumption, then it depends on that assumption. Given p → q and q → r, we then assumed p and ”proved” q ∧ r, but q ∧ r depends on p. Indentation and vertical lines indicate scoping Similar to scoping in program code: eg lines 3 to 5 are a a method, and p is a local variable to that method.

10 / 25 1 p ∧ q

2 q ∧-E, 1

3 (p ∧ q) → q →-I, 1–2

1 p ∧ You are a giraffe

2 You are a giraffe ∧-E, 1

3 p ∧ You are a giraffe → You are a giraffe →-I, 1–2

Useless assumptions

You can assume anything, but it might not be useful.

11 / 25 2 q ∧-E, 1

3 (p ∧ q) → q →-I, 1–2

1 p ∧ You are a giraffe

2 You are a giraffe ∧-E, 1

3 p ∧ You are a giraffe → You are a giraffe →-I, 1–2

Useless assumptions

You can assume anything, but it might not be useful.

1 p ∧ q

11 / 25 3 (p ∧ q) → q →-I, 1–2

1 p ∧ You are a giraffe

2 You are a giraffe ∧-E, 1

3 p ∧ You are a giraffe → You are a giraffe →-I, 1–2

Useless assumptions

You can assume anything, but it might not be useful.

1 p ∧ q

2 q ∧-E, 1

11 / 25 1 p ∧ You are a giraffe

2 You are a giraffe ∧-E, 1

3 p ∧ You are a giraffe → You are a giraffe →-I, 1–2

Useless assumptions

You can assume anything, but it might not be useful.

1 p ∧ q

2 q ∧-E, 1

3 (p ∧ q) → q →-I, 1–2

11 / 25 Useless assumptions

You can assume anything, but it might not be useful.

1 p ∧ q

2 q ∧-E, 1

3 (p ∧ q) → q →-I, 1–2

1 p ∧ You are a giraffe

2 You are a giraffe ∧-E, 1

3 p ∧ You are a giraffe → You are a giraffe →-I, 1–2

11 / 25 ∨-E (or elimination)

[p][q] . . p ∨ q r r r

Disjunction rules

∨-I (or introduction)

p p p ∨ q q ∨ p

12 / 25 Disjunction rules

∨-I (or introduction)

p p p ∨ q q ∨ p

∨-E (or elimination)

[p][q] . . p ∨ q r r r

12 / 25 1 p ∨ q

2 p

. .

a r

b q

. .

c r

d r ∨-E, 1, 2–a, b–c

∨-E template

13 / 25 2 p

. .

a r

b q

. .

c r

d r ∨-E, 1, 2–a, b–c

∨-E template

1 p ∨ q

13 / 25 . .

a r

b q

. .

c r

d r ∨-E, 1, 2–a, b–c

∨-E template

1 p ∨ q

2 p

13 / 25 a r

b q

. .

c r

d r ∨-E, 1, 2–a, b–c

∨-E template

1 p ∨ q

2 p

. .

13 / 25 b q

. .

c r

d r ∨-E, 1, 2–a, b–c

∨-E template

1 p ∨ q

2 p

. .

a r

13 / 25 . .

c r

d r ∨-E, 1, 2–a, b–c

∨-E template

1 p ∨ q

2 p

. .

a r

b q

13 / 25 c r

d r ∨-E, 1, 2–a, b–c

∨-E template

1 p ∨ q

2 p

. .

a r

b q

. .

13 / 25 d r ∨-E, 1, 2–a, b–c

∨-E template

1 p ∨ q

2 p

. .

a r

b q

. .

c r

13 / 25 ∨-E template

1 p ∨ q

2 p

. .

a r

b q

. .

c r

d r ∨-E, 1, 2–a, b–c

13 / 25 1 p ∨ q

2 p

3 q ∨ p ∨-I, 2

4 q

5 q ∨ p ∨-I, 4

6 q ∨ p ∨-E, 1, 2–3, 4–5

Example: commutativity of disjunction (derived rule)

p ∨ q q ∨ p

14 / 25 2 p

3 q ∨ p ∨-I, 2

4 q

5 q ∨ p ∨-I, 4

6 q ∨ p ∨-E, 1, 2–3, 4–5

Example: commutativity of disjunction (derived rule)

p ∨ q q ∨ p 1 p ∨ q

14 / 25 3 q ∨ p ∨-I, 2

4 q

5 q ∨ p ∨-I, 4

6 q ∨ p ∨-E, 1, 2–3, 4–5

Example: commutativity of disjunction (derived rule)

p ∨ q q ∨ p 1 p ∨ q

2 p

14 / 25 4 q

5 q ∨ p ∨-I, 4

6 q ∨ p ∨-E, 1, 2–3, 4–5

Example: commutativity of disjunction (derived rule)

p ∨ q q ∨ p 1 p ∨ q

2 p

3 q ∨ p ∨-I, 2

14 / 25 5 q ∨ p ∨-I, 4

6 q ∨ p ∨-E, 1, 2–3, 4–5

Example: commutativity of disjunction (derived rule)

p ∨ q q ∨ p 1 p ∨ q

2 p

3 q ∨ p ∨-I, 2

4 q

14 / 25 6 q ∨ p ∨-E, 1, 2–3, 4–5

Example: commutativity of disjunction (derived rule)

p ∨ q q ∨ p 1 p ∨ q

2 p

3 q ∨ p ∨-I, 2

4 q

5 q ∨ p ∨-I, 4

14 / 25 Example: commutativity of disjunction (derived rule)

p ∨ q q ∨ p 1 p ∨ q

2 p

3 q ∨ p ∨-I, 2

4 q

5 q ∨ p ∨-I, 4

6 q ∨ p ∨-E, 1, 2–3, 4–5

14 / 25 [¬p] ¬-E (not elimination) . (eliminates ¬ from q ∧ ¬q an assumption) p

Negation rules

Idea: assume the opposite of what you want to prove and find a contradiction — so your assumption must have been wrong

[p] ¬-I (not introduction) . q ∧ ¬q ¬p

15 / 25 rules

Idea: assume the opposite of what you want to prove and find a contradiction — so your assumption must have been wrong

[p] ¬-I (not introduction) . q ∧ ¬q ¬p [¬p] ¬-E (not elimination) . (eliminates ¬ from q ∧ ¬q an assumption) p

15 / 25 1 p

2 ¬p

3 p ∧ ¬p ∧-I, 1, 2

4 ¬¬p ¬I, 2–3

Example: double (derived rule)

p It is raining ¬¬p It is not the case that is is not raining

16 / 25 1 p

2 ¬p

3 p ∧ ¬p ∧-I, 1, 2

4 ¬¬p ¬I, 2–3

Example: double negation introduction (derived rule)

p It is raining ¬¬p It is not the case that is is not raining

16 / 25 2 ¬p

3 p ∧ ¬p ∧-I, 1, 2

4 ¬¬p ¬I, 2–3

Example: double negation introduction (derived rule)

p It is raining ¬¬p It is not the case that is is not raining

1 p

16 / 25 3 p ∧ ¬p ∧-I, 1, 2

4 ¬¬p ¬I, 2–3

Example: double negation introduction (derived rule)

p It is raining ¬¬p It is not the case that is is not raining

1 p

2 ¬p

16 / 25 Example: double negation introduction (derived rule)

p It is raining ¬¬p It is not the case that is is not raining

1 p

2 ¬p

3 p ∧ ¬p ∧-I, 1, 2

4 ¬¬p ¬I, 2–3

16 / 25 1 p ∧ ¬p

2 ¬q

3 p ∧ ¬p R, 1

4 q ¬E, 2–3

Example: contradiction elimination (derived rule)

p ∧ ¬p q

17 / 25 1 p ∧ ¬p

2 ¬q

3 p ∧ ¬p R, 1

4 q ¬E, 2–3

Example: contradiction elimination (derived rule)

p ∧ ¬p q

17 / 25 2 ¬q

3 p ∧ ¬p R, 1

4 q ¬E, 2–3

Example: contradiction elimination (derived rule)

p ∧ ¬p q

1 p ∧ ¬p

17 / 25 3 p ∧ ¬p R, 1

4 q ¬E, 2–3

Example: contradiction elimination (derived rule)

p ∧ ¬p q

1 p ∧ ¬p

2 ¬q

17 / 25 4 q ¬E, 2–3

Example: contradiction elimination (derived rule)

p ∧ ¬p q

1 p ∧ ¬p

2 ¬q

3 p ∧ ¬p R, 1

17 / 25 Example: contradiction elimination (derived rule)

p ∧ ¬p q

1 p ∧ ¬p

2 ¬q

3 p ∧ ¬p R, 1

4 q ¬E, 2–3

17 / 25 1 ¬¬p

2 ¬p

3 ¬p ∧ ¬¬p ∧-I, 1, 2

4 p ¬E, 2–3

Example: double negation elimination (derived rule)

¬¬p p

18 / 25 1 ¬¬p

2 ¬p

3 ¬p ∧ ¬¬p ∧-I, 1, 2

4 p ¬E, 2–3

Example: double negation elimination (derived rule)

¬¬p p

18 / 25 2 ¬p

3 ¬p ∧ ¬¬p ∧-I, 1, 2

4 p ¬E, 2–3

Example: double negation elimination (derived rule)

¬¬p p

1 ¬¬p

18 / 25 3 ¬p ∧ ¬¬p ∧-I, 1, 2

4 p ¬E, 2–3

Example: double negation elimination (derived rule)

¬¬p p

1 ¬¬p

2 ¬p

18 / 25 Example: double negation elimination (derived rule)

¬¬p p

1 ¬¬p

2 ¬p

3 ¬p ∧ ¬¬p ∧-I, 1, 2

4 p ¬E, 2–3

18 / 25 Equivalence

p ↔ q means p is true if and only if q is true We can make the definition p ↔ q ≡ (p → q) ∧ (q → p) which would naturally give us these rules introduction rule: p → q q → p p ↔ q elimination rules:

p ↔ q p ↔ q p → q q → p

19 / 25 Equivalence — Rules

Alternatively we can get rules which don’t involve the → ↔-I (↔ introduction) [p][q] . . q p p ↔ q ↔-E (↔ elimination)

p ↔ q p p ↔ q q q p Note the similarities to the →-I and →-E rules

20 / 25 Which rule to use next?

Guided by the “form” of your goal, and what you already have proved “form” — ie, look at the connective: ∧,∨,→,¬ always can consider using ¬-E (not elimination) rule to prove p ∨ q, ∨-I (or introduction) may not work p q p ∨ q p ∨ q p may not be necessarily true, q may not be necessarily true

21 / 25 To prove p ∨ q, sometimes you need to do this:

1 Using ¬-E, assume ¬(p ∨ q) (hoping to prove some contradiction) 2 When is ¬(p ∨ q) true ? When both p and q false! 3 From ¬(p ∨ q) how to prove ¬p ? (next slide) 4 Having proved both ¬p and ¬q, prove some further contradiction ¬p → q Exercise: prove p ∨ q

22 / 25 1 ¬(p ∨ q)

2 p

3 p ∨ q ∨-I, 2

4 (p ∨ q) ∧ ¬(p ∨ q) ∧-I, 1, 3

5 ¬p ¬I, 2–4

Not-or elimination (derived rule)

¬(p ∨ q) ¬p

23 / 25 1 ¬(p ∨ q)

2 p

3 p ∨ q ∨-I, 2

4 (p ∨ q) ∧ ¬(p ∨ q) ∧-I, 1, 3

5 ¬p ¬I, 2–4

Not-or elimination (derived rule)

¬(p ∨ q) ¬p

23 / 25 2 p

3 p ∨ q ∨-I, 2

4 (p ∨ q) ∧ ¬(p ∨ q) ∧-I, 1, 3

5 ¬p ¬I, 2–4

Not-or elimination (derived rule)

¬(p ∨ q) ¬p

1 ¬(p ∨ q)

23 / 25 3 p ∨ q ∨-I, 2

4 (p ∨ q) ∧ ¬(p ∨ q) ∧-I, 1, 3

5 ¬p ¬I, 2–4

Not-or elimination (derived rule)

¬(p ∨ q) ¬p

1 ¬(p ∨ q)

2 p

23 / 25 4 (p ∨ q) ∧ ¬(p ∨ q) ∧-I, 1, 3

5 ¬p ¬I, 2–4

Not-or elimination (derived rule)

¬(p ∨ q) ¬p

1 ¬(p ∨ q)

2 p

3 p ∨ q ∨-I, 2

23 / 25 5 ¬p ¬I, 2–4

Not-or elimination (derived rule)

¬(p ∨ q) ¬p

1 ¬(p ∨ q)

2 p

3 p ∨ q ∨-I, 2

4 (p ∨ q) ∧ ¬(p ∨ q) ∧-I, 1, 3

23 / 25 Not-or elimination (derived rule)

¬(p ∨ q) ¬p

1 ¬(p ∨ q)

2 p

3 p ∨ q ∨-I, 2

4 (p ∨ q) ∧ ¬(p ∨ q) ∧-I, 1, 3

5 ¬p ¬I, 2–4

23 / 25 1 ¬q

2 p

3 q your proof of q from p

4 q ∧ ¬q ∧-I, 1, 3

5 ¬p ¬I, 2–4

Proving a contrapositive rule

p In the same way, whenever you can prove any q ¬q then you can prove ¬p

24 / 25 1 ¬q

2 p

3 q your proof of q from p

4 q ∧ ¬q ∧-I, 1, 3

5 ¬p ¬I, 2–4

Proving a contrapositive rule

p In the same way, whenever you can prove any q ¬q then you can prove ¬p

24 / 25 2 p

3 q your proof of q from p

4 q ∧ ¬q ∧-I, 1, 3

5 ¬p ¬I, 2–4

Proving a contrapositive rule

p In the same way, whenever you can prove any q ¬q then you can prove ¬p

1 ¬q

24 / 25 3 q your proof of q from p

4 q ∧ ¬q ∧-I, 1, 3

5 ¬p ¬I, 2–4

Proving a contrapositive rule

p In the same way, whenever you can prove any q ¬q then you can prove ¬p

1 ¬q

2 p

24 / 25 4 q ∧ ¬q ∧-I, 1, 3

5 ¬p ¬I, 2–4

Proving a contrapositive rule

p In the same way, whenever you can prove any q ¬q then you can prove ¬p

1 ¬q

2 p

3 q your proof of q from p

24 / 25 5 ¬p ¬I, 2–4

Proving a contrapositive rule

p In the same way, whenever you can prove any q ¬q then you can prove ¬p

1 ¬q

2 p

3 q your proof of q from p

4 q ∧ ¬q ∧-I, 1, 3

24 / 25 Proving a contrapositive rule

p In the same way, whenever you can prove any q ¬q then you can prove ¬p

1 ¬q

2 p

3 q your proof of q from p

4 q ∧ ¬q ∧-I, 1, 3

5 ¬p ¬I, 2–4

24 / 25 1 ¬(p ∨ ¬p)

2 ¬p ¬∨-E (previous slide), 1

3 ¬¬p ¬∨-E (previous slide), 1

4 ¬p ∧ ¬¬p ∧-I, 2, 3

5 p ∨ ¬p ¬E, 1–4

Law of the excluded middle (derived)

p ∨ ¬p “Everything must either be or not be.” – Russell

25 / 25 1 ¬(p ∨ ¬p)

2 ¬p ¬∨-E (previous slide), 1

3 ¬¬p ¬∨-E (previous slide), 1

4 ¬p ∧ ¬¬p ∧-I, 2, 3

5 p ∨ ¬p ¬E, 1–4

Law of the excluded middle (derived)

p ∨ ¬p “Everything must either be or not be.” – Russell

25 / 25 2 ¬p ¬∨-E (previous slide), 1

3 ¬¬p ¬∨-E (previous slide), 1

4 ¬p ∧ ¬¬p ∧-I, 2, 3

5 p ∨ ¬p ¬E, 1–4

Law of the excluded middle (derived)

p ∨ ¬p “Everything must either be or not be.” – Russell

1 ¬(p ∨ ¬p)

25 / 25 3 ¬¬p ¬∨-E (previous slide), 1

4 ¬p ∧ ¬¬p ∧-I, 2, 3

5 p ∨ ¬p ¬E, 1–4

Law of the excluded middle (derived)

p ∨ ¬p “Everything must either be or not be.” – Russell

1 ¬(p ∨ ¬p)

2 ¬p ¬∨-E (previous slide), 1

25 / 25 4 ¬p ∧ ¬¬p ∧-I, 2, 3

5 p ∨ ¬p ¬E, 1–4

Law of the excluded middle (derived)

p ∨ ¬p “Everything must either be or not be.” – Russell

1 ¬(p ∨ ¬p)

2 ¬p ¬∨-E (previous slide), 1

3 ¬¬p ¬∨-E (previous slide), 1

25 / 25 Law of the excluded middle (derived)

p ∨ ¬p “Everything must either be or not be.” – Russell

1 ¬(p ∨ ¬p)

2 ¬p ¬∨-E (previous slide), 1

3 ¬¬p ¬∨-E (previous slide), 1

4 ¬p ∧ ¬¬p ∧-I, 2, 3

5 p ∨ ¬p ¬E, 1–4

25 / 25