• No results found

Rules of Inference.pptx

N/A
N/A
Protected

Academic year: 2020

Share "Rules of Inference.pptx"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Rules of Inference

CS 111

(2)

Nature & Importance of Proofs

• In mathematics, a proof is:

– A sequence of statements that form an argument.

– Must be correct (well-reasoned, logically valid) and complete (clear, detailed) that rigorously & undeniably establishes the truth of a mathematical statement.

Why must the argument be correct & complete?Correctness prevents us from fooling ourselves.

(3)

Rules of Inference

Rules of inference are patterns of logically

valid deductions from hypotheses to

conclusions

.

“If you have a current password, then you can log onto the network”

“You have a current password”

therefore

• “You can log onto the network”

(4)

Inference Rules - General Form

Inference Rule

– Pattern establishing that if we know that a set of

hypotheses are all true, then a certain related

conclusion statement is true.

Hypothesis 1

Hypothesis 2 …

(5)

Inference Rules & Implications

Each logical inference rule corresponds to an

implication that is a tautology.

Hypothesis 1

Inference rule

Hypothesis 2 …

conclusion

Corresponding tautology:

((Hypoth. 1)  (Hypoth. 2)  …)  conclusion

(6)

Modus Ponens

p

p

q (p

(p

q))

q

q

You have a current password

If you have a current password, then you can log onto the network

_________________________________

(7)

Modus Tollens

q

p

q (

q

(p

q))

q



p

“You cannot log onto the network”

“If you have a current password, then you can log onto the network”

therefore

• “You have not a current password”

(8)

Some Inference Rules

p

Rule of Addition

p

q

“It is cloudy now. Therefore, it is either cloudy or raining now.”

p

q

Rule of Simplification

(9)

Some Inference Rules

p q

pq

Rule of Conjunction

01/06/2021 L.Niepel 2016 9

“It is cloudy.

It is raining now.

(10)

Syllogism Inference Rules

p

q

Rule of hypothetical

q

r

syllogism

p

r

p

q

Rule of disjunctive

p

syllogism

(11)

Resolution Inference Rule

p

q

p

r

q

r

The rule is based on the tautology:

((p

q)

(

p

r))

(q

r)

This rule is frequently used in automatic proving

of theorems

(12)

Formal Proofs

• A formal proof of a conclusion C, given premises

p1, p2,…,pn consists of a sequence of steps, each of which applies some inference rule to premises or to previously-proven statements (as hypotheses) to yield a new true statement (the conclusion).

• A proof demonstrates that if the premises are true,

(13)

Formal Proof – Example 1

• Suppose we have the following premises:

“It is not sunny and it is cold.”

“if it is not sunny, we will not swim”

“If we do not swim, then we will canoe.” “If we canoe, then we will be home early.”

• Given these premises, prove the theorem

“We will be home early” using inference rules.

(14)

Proof Example 1

cont.

Let us adopt the following abbreviations:

sunny = “It is sunny”; cold = “It is cold”;

swim = “We will swim”; canoe = “We will canoe”; early = “We will be home early”.

Then, the premises can be written as:

(1)

sunny

cold

(2)

sunny

swim

(3)

swim

canoe

(4) canoe

early

(15)

Proof Example 1

cont.

We construct an argument as follows:

step reason

(1) sunny cold Premise

(2) sunny Simplification using (1)

(3) sunny  swim Premise

(4) swim Modus ponens for (2), (3)

(5) swim canoe Premise

(5) canoe Modus ponens for (4), (5) (6) canoe early Premise

(7) Early Modus ponens for (5), (6)

(16)

Proof Example

2.

Show that the premises

“If you send me an

e-mail message, then I will finish writing the

program,” “If you do not send me an e-mail

message, then I will go to sleep early,”

and

“If

I go to sleep early, then I will wake up feeling

refreshed”

lead to the conclusion

“If I do not

finish writing the program, then I will wake up

feeling refreshed.”

(17)

Proof Example 2

cont.

Let us adopt the following abbreviations:

mail= “you send me an e-mail message”; finish = “I will finish writing the program”;

sleep = “I will go to sleep early”;

refreshed = “I will wake up feeling refreshed

Then, the premises can be written as:

(1) mail finish

(2)

mail

sleep

(3) sleep

refreshed

(18)

Proof Example 2

cont

.

Step Proved by

1. mail finish Premise #1.

2 finish  mail contrapositive of 1. 3. mail sleep Premise #2.

4. finish sleep Hypothetical syllogism (2)(3). 5. sleeprefreshed Premise #3.

(19)

Proof by resolution – Example 3.

Show that the premises (pq) r and rs imply the conclusion p s.

Solution:

(pq) r (p r) (q r) premise 1 rs (r s) premise 2

(p r) simplification from premise1

From (p r) (r s) using resolution follows p s.

(20)

Inference Rules for Quantifiers

• x P(x)

P(o) (substitute any object o)

P(g) (for g a general element of

discourse)

x P(x)

• x P(x)

P(c) (substitute a new constant c)

P(o) (substitute any extant object o) x P(x)

Universal instantiation

Universal generalization

Existential instantiation

Existential generalization

(21)

Example

Everyone in this discrete math class has taken a course in computer science” and “Fatmah is a student in this class” imply “Fatmah has taken a course in computer science

D(x): “x is in discrete math class”

C(x): “x has taken a course in computer science” x (D(x) C(x)) Premise 1

D(Fatmah) Premise 2

C(Fatmah)

(22)

Example – cont.

Step Proved by

1. x (D(x) C(x)) Premise #1.

2. D(Fatmah) C(Fatmah) Univ. instantiation. 3. D(Fatmah) Premise #2.

(23)

Universal modus ponens.

We can use together universal instantiation and rule Modus ponens:

x (P(x) Q(x)) Premise 1

P(a), where a is a particular element in domain

__________________________________________

Q(a)

(24)

Example.

Assume that for all positive numbers n, if n is greater than 4, then n2 is less the 2n. Use universal modus

ponens to show that 1002 < 2 100.

n>4 (n2 <2n)

n= 100

___________

References

Related documents

Sampel pada inti nukleus ini dipilih unit ruko yang dianggap mewakili dan dapat mendukung tujuan penelitian yaitu untuk menjelaskan morfologi fasade ruko dan

While the Internet does not seem to have much effect on the wage bill shares of the various age groups per se, the correlation becomes positive for the youngest age group (20-29

 Racers  would  gain  valuable

Certification service provider (CSP) creation device Signature-creation process and environment Signature-format and syntax Signature-validation process and

The two methods for determining azimuth from the sun are methods for determining azimuth from the sun are the the hour angle method and the altitude method.. hour angle method and

Heat transfer in compression chamber of a revolving vane (RV) compressor. Journal bearings design for a novel revolving vane compressor. Experimental Study of the Revolving

First example is the Amazon Simple Storage Service (Amazon S3) [22] which supports file storage service. Another example is Image Exchange which utilizes the large storage space

Animals at high risk of developing colon cancer were given probiotics and the researchers looked for the appearance of tumours, or early signs of damage to the intestinal