Top Banner
EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson, “Discrete Mathematics with Combinatorics” (referred to in lecture 1)
41

EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

EE1J2 – Discrete Maths Lecture 4 Analysis of arguments

Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments

See: Anderson, “Discrete Mathematics with Combinatorics” (referred to in lecture 1)

Page 2: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Logical Consequence Let be a set of formulae and f a formula

f is a logical consequence of if for any assignment of truth values to atomic propositions for which all of the members of true, f is also true

If f is a logical consequence of , write ⊨f Note: this is consistent with ⊨f when f is a tautology

This is important! It is the basis of formalisation of arguments

Page 3: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Arguments

An argument consists of: A set of formulae, called the assumptions or

hypotheses A formula f, called the conclusion

If ⊨f then the argument is a valid argument

Page 4: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Valid Arguments In other words:

An argument is valid if its conclusion is a logical consequence of its assumptions

Page 5: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Notation An intuitive way to write an argument with

a set of hypotheses and conclusion f is as follows:

---f

hypotheses

conclusion

Page 6: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example 1 Suppose = {p, pq, q r}, f = p q r Then the corresponding argument can be

written: ppqq r

------------ pq r

Assume that p is true, pq is true, and qr is true. Then p and q and r are all true.

Page 7: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example 1 (continued)

Test validity of argument using truth table:

p q r p pq qr pqr

T T T T T T TT T F T T F FT F T T F T FT F F T F T FF T T F T T FF T F F T F FF F T F T T FF F F F T T F

Page 8: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example 1 (continued)

p q r p pq qr pqr

T T T T T T TT T F T T F FT F T T F T FT F F T F T FF T T F T T FF T F F T F FF F T F T T FF F F F T T F

This is the only row for which all hypotheses are true.Conclusion is also trueTherefore argument is valid

Page 9: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example 2 Suppose = {pq, q r, r}, f = p Then the corresponding argument can be

written: pqq r

r------- p

Page 10: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example 2 (continued) Test validity of argument using truth table:

p q r pq qr r pT T T T T T TT T F T F F TT F T F T T TT F F F T F TF T T T T T FF T F T F F FF F T T T T FF F F T T F F

Page 11: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example 2 (continued)p q r pq qr r pT T T T T T TT T F T F F TT F T F T T TT F F F T F TF T T T T T FF T F T F F FF F T T T T FF F F T T F F

In this row all hypotheses are true.But the conclusion is falseTherefore argument is not valid

Page 12: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Proofs in Propositional Logic

In mathematics, a proof is a sequence of steps, each of which is: Self-evident (or axiomatic), or An explicitly stated assumption (or hypothesis),

or Deduced from previous steps using rules of

deduction

Page 13: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example ‘traditional’ proof Show that if n is an integer and n is even

then n2 is even. Proof

1. n is even, so there exists an integer m such that n = 2m (by definition of ‘even’)

2. So, n2 = (2m)2 = 4m2 = 2(2m2) (by rules of arithmetic)

3. Hence n2 = 2l (where l=2m2), so n2 is even.

Page 14: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Rules of deduction

The rules of logic which are used to derive new theorems from axioms, assumptions and existing theorems are called rules of deduction

A rule of deduction is just a simple argument which is known to be valid.

So, it consists of a set of hypotheses and a conclusion f such that ⊨f is true

Page 15: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Rules of inference

Rules of deduction are simple arguments which can be validated using truth tables

For more complex arguments, involving many propositions, use of truth tables is not practical

Complex arguments are validated via formal proofs, using simpler arguments which are known to be valid already

Page 16: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Review of the last lecture Valid arguments

An argument is valid if its conclusion is a logical consequence of its assumptions

The simplest way to prove that an argument is valid is to use a truth table For any assignment of T and F to the

elementary propositions in the assumptions and conclusion, if all assumptions are true then the conclusion must be true

Page 17: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Review of last lecture Problems:

If the number of elementary propositions is large then the number of rows in the truth table will be very large

If the formulae are complex, then the number of columns in the truth table will be large

So, try to show that more complex arguments are valid using formal proofs

Page 18: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Proofs in Propositional Logic

In mathematics, a proof is a sequence of steps,

Each step is: Self-evident (or axiomatic), or An explicitly stated assumption, or Deduced from previous steps using rules of

deduction

Page 19: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Review of last lecture Rules of deduction are just simple

arguments which have already been proved to be valid Because they are simple, can use truth tables to

show that they are valid

Page 20: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example rules of deduction Law of Detachment:

Syllogism:

pqp

------- q

pqq r

------- p r

Page 21: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Proof using truth tablesp q pq p qT T T T TT F F T FF T T F TF F T F F

p q r pq qr prT T T T T TT T F T F FT F T F T TT F F F T FF T T T T TF T F T F TF F T T T TF F F T T T

Page 22: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

More rules of deduction Modus Tollens:

Addition:

pqq

------- p

p------- pq

Page 23: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

More rules of deduction Specialization:

Conjunction:

pq------- p

pq

------- pq

Page 24: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

More rules of deduction Cases:

Case elimination:

pp(rs)

r qs q

------- q

pqp(rr)

------- q

Page 25: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

More rules of inference Reductio ad Absurdum:

We’ll see later that this is also known as ‘Proof by Contradiction’

p(rr)---------------

p

Basically, this says that if q implies both r and r, then q must be false

Page 26: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

The symbol

Recall that the symbol means logical equivalence Recall that if f and g are both formulae involving the elementary

propositions p1,…,pN, then f g if and only if f and g have the same truth table.

So, in principle the simplest way to show that two formulae are logically equivalent is to construct their truth tables and show that they are the same

Page 27: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Standard equivalences Using this method we can establish a set of

standard equivalences which we can use later in proofs

Suppose p, q and r are elementary propositions:

Commutative Laws: p q q p p q q p

Page 28: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

More standard equivalences Associative Laws:

(p q) r p (q r) (p q) r p (q r)

Idempotent Laws: p p p p p p

Page 29: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

More standard equivalences Distributive Laws:

p (q r) (p q) (p r) p (q r) (p q) (p r)

De Morgan’s Laws: (p q) (p) (q) (p q) (p) (q)

Page 30: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example proof

p (q r) (p q) (p r)

p q r (p (q r)) ((p q) (p r))

T T T T T T T T T T T T T T T

T T F T T T F F T T T T T T F

T F T T T F F T T T F T T T T

T F F T T F F F T T F T T T F

F T T F T T T T F T T T F T T

F T F F F T F F F T T F F F F

F F T F F F F T F F F F F T T

F F F F F F F F F F F F F T F

Page 31: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

More standard equivalences Law of double negation:

p p Equivalence of contrapositive:

p q q p Another useful equivalence:

p q p q p p is a tautology p p is a contradiction

Page 32: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Definition of proof A proof that a formula f is a logical consequence

of a set of assumptions is a sequence of statements, ending with f, each of which is: True by assumption (i.e. in ), or An axiom or definition, or A previous theorem, or A statement implied by previous statements by a rule of

deduction, or Logically equivalent to a previous statement

Page 33: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example proof 1 Show that:

is a valid argument

p qrq

r------- p

Intuitively, if we assume r and rq are both true, then q must be true. If, in addition, p q is true, then q p is true. Combining q and q p, p must be true.

Page 34: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example proof 1 (continued)1. p q (given)

2. r q (given)

3. r (given)

4. q (from 2, 3 and Law of Detachment)

5. q p (from 1 by Equivalence)

6. p (from 4, 5 and Law of Detachment)

Assumptions

Conclusion

Page 35: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example proof 2 Show that:

is a valid argument

p qq rp s-------

r s

Intuitively, if p q is assumed true, then either p or q must be true (or both). If p is true and p s is true, then s must be true. If q is true and q r is true, then r must be true. Hence r or s must be true (or both)

Page 36: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example proof 2 Where do we start?

The assumptions combine the and connectives

These are related by p q p q Also p p, so p q p q So, conclusion can be written r s r s So, can we get r q p s ?

Page 37: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example proof 2 (continued)1. p q (given)

2. q r (given)

3. p s (given)

4. r q (2 and Equiv. of contrapositive)

5. q p (1 and commutativity)

6. q p (5 and law of double negation)

7. q p (6 and standard equivalence)

8. r s (4, 7 & 3 and syllogism)

9. r s (8 and standard equivalence)

Page 38: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Example 3

( p q ) r q

------- p r

Let’s try to prove:

Page 39: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

The Completeness Theorem In a more rigorous course on logic, a

distinction would be made between the statements: f is a logical consequence of (written ⊨f ),

and f is proveable from (written ⊢f )

The completeness theorem says that these two notions are the same.

Page 40: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Completeness Theorem for Propositional Logic

If is a set of formulae in Propositional Logic, and f is a formula in Propositional Logic, then ⊨f if and only if ⊢f

f is a logical consequence of

if and only if

f is provable from

Page 41: EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,

Summary Formal proof in propositional logic

Rules of inference Rules of equivalence Example proofs