440 likes | 702 Views
2. Goals. To understand the definitions ofArguments, valid arguments, sound argumentsLogical consequenceCounterexample, proof,Fitch-style argument, Fitch-style proofTo know what is needed todemonstrate consequencedemonstrate non-consequenceTo gain skills in recognizingarguments, valid argum
E N D
1. 1 Formal Methods in Computer ScienceCS1502Atomic Sentences and their Logic Patchrawat Uthaisombut
University of Pittsburgh
2. 2 Goals To understand the definitions of
Arguments, valid arguments, sound arguments
Logical consequence
Counterexample, proof,
Fitch-style argument, Fitch-style proof
To know what is needed to
demonstrate consequence
demonstrate non-consequence
To gain skills in recognizing
arguments, valid arguments, sound arguments
3. 3 Properties of and Relationships among sentences A logic sentence has a property, its truth value.
The truth value of a sentence indicates whether the sentence is true or false (with respect to a world).
If we have 2 or more sentences, what can we do with them?
What interesting relationships should we consider?
4. 4 Figure out the relationship in each group LeftOf(a,b)
RightOf(b,a)
FrontOf(c,d)
SameRow(c,d)
Larger(e,f)
~Large(f) LeftOf(a,b)
LeftOf(b,c)
LeftOf(c,d)
RightOf(d,a)
5. 5 Argument An argument is a collection of sentences divided into premises and a conclusion.
The purpose of an argument is to state a “claim” that
the conclusion “follows” from the premises.
Note
This “claim” could be true or false.
An argument does not claim that any or all of the sentences in an argument is true.
6. 6 Example Argument 1 Premises:
Socrates is a man.
All men are mortal.
No mortal lives forever.
Everyone who will eventually die sometimes worries about it.
Conclusion:
Socrates sometimes worries about dying.
7. 7 Fitch-style Argument
8. 8 Validity Definition: An argument is valid if
whenever all the premises are true, the conclusion is also true.
We also say that
the conclusion is a consequence of the premises,
the conclusion follows from the premises, and
the premises imply the conclusion.
Note
If an argument is valid, then it does mean that the premises are true.
That is, validity of an argument has nothing to do with the truth value of the premises in a world or any world.
9. 9 Soundness Definition: An argument is sound if
the argument is valid and
all premises in the argument are true
In this course, we are concerned with validity, and not soundness. Determining the truth value of premises is the job of domain experts.
10. 10 Classifying Arguments Not an argument at all
Invalid argument
Valid argument but unsound
Sound argument
11. 11 Example Argument 1 Premises:
Socrates is a man.
All men are mortal.
No mortal lives forever.
Everyone who will eventually die sometimes worries about it.
Conclusion:
Socrates sometimes worries about dying.
12. 12 Example Argument 2 A turtle and a bunny race one another.
The faster animal always win in a race.
The turtle is faster than the bunny.
Hence, the turtle wins the race.
13. 13 Example Argument 3 Football is a sport.
Soccer is a sport.
All men like football.
All women like soccer.
Therefore, TJ likes a sport.
14. 14 Example Argument 4 Four-legged animals can walk.
If an animal can walk, it can run.
Thus, all horses can run.
15. 15 Example Argument 5 Sue is a student.
Sue goes to class regularly.
Sue is smart.
So, Sue will one day graduate.
16. 16 Example Argument 7 L(a)
E(a,b)
LG(b,c)
SL(c,a)
17. 17 Example Argument 8 L(a) and M(a)
P(b) and Q(b)
L(a) and Q(b)
18. 18 Example Argument 8 LeftOf(a,b)
LeftOf(b,c)
Between(b,a,c)
19. 19 Validity and Soundness (recall) Definition: An argument is valid if
whenever all the premises are true, the conclusion is also true.
We also say that
the conclusion is a consequence of the premises, and
the conclusion follows from the premises.
Definition: An argument is sound if
the argument is valid and
all premises in the argument are true
20. 20 Goals To understand the definitions of
Arguments, valid arguments, sound arguments
Logical consequence
Counterexample, proof,
Fitch-style argument, Fitch-style proof
To know what is needed to
demonstrate consequence
demonstrate non-consequence
To gain skills in recognizing
arguments, valid arguments, sound arguments
21. 21 Example Argument 1 Premises:
Socrates is a man.
All men are mortal.
No mortal lives forever.
Everyone who will eventually die sometimes worries about it.
Conclusion:
Socrates sometimes worries about dying.
How can we demonstrate that the conclusion follows from the premises?
22. 22 Step-by-Step Inference Write down all the premises.
Write down an intermediate conclusion that is an obvious consequence of the premises and previous intermediate conclusions.
Repeat step 2 until we obtain the desired conclusion.
23. 23 Example Reasoning 1. Socrates is a man. (premise)
2. All men are mortal. (premise)
3. No mortal lives forever. (premise)
4. Everyone who will eventually die sometimes worries about it. (premise)
5. Socrates is mortal (because Socrates is a man (1) and all men are mortal (2))
6. Socrates does not live forever (because Socrates is mortal (5) and no mortal lives forever (3))
7. Socrates will eventually die (because Socrates does not live forever (5) and not living forever means dying eventually)
8. Socrates sometimes worries about dying (because Socrates will eventually die (7) and everyone who will eventually die sometimes worries about it.
24. 24 What’s a “proof”? A proof is a step-by-step demonstration that the conclusion follows from the premises.
A proof is a sequence of sentences. Each one is a simple consequence of the premises and earlier sentences, and last one is the desired conclusion.
25. 25 Methods of Proof
26. 26 Fitch-style Proof
27. 27 Formalizing the way we do “reasoning” What are considered “obvious steps”?
Obvious step for one person could be non-obvious to another to verify.
Can we categorize these?
Compare this to “instructions” in a programming language.
What instructions are considered obvious (or elementary), so obvious that even a computer can execute?
28. 28 Deduction System A deduction system consists a set of inference rules, which are a fixed set of rules specifying what counts as an acceptable step in a proof.
We will learn a deduction system called F.
We will also refer to it as “Fitch”.
29. 29 Inference Rules Involving “=” = Intro
For any object c, c = c is always true.
= Elim
If b = c, then whatever holds of b also holds of c.
That is if b = c and P(b) is a true sentence, then P(c) is also a true sentence.
That is we can replace b with c.
Note, the reverse is not claimed. (We can’t replace c with b)
At this time, we will use only these 2 rules and nothing else.
30. 30 Example: proof with = LeftOf(a,d)
a=b
b=c
d=e
LeftOf(c,e) 1. LeftOf(a,d)
2. a=b
3. b=c
4. d=e
5. LeftOf(b,d) = Elim 1,2
6. LeftOf(c,d) = Elim 5,3
7. LeftOf(c,e) = Elim 6,4
31. 31 Symmetry argument Premise:
a = b
Conclusion
b = a
32. 32 Symmetry Proof Suppose that a=b.
We know that a=a, by the introduction of identity
Now substitute the name b for the first use of the name a in a=a, using identity elimination.
We come up with b=a, as desired.
33. 33 Exercise: proof of consequence Premise:
a = b
b = c
Conclusion
c = a
34. 34 Example: proof of consequence Premises
Between(a,d,b)
a = c
e = b
Conclusion
Between(c,d,e)
35. 35 Example: proof of consequence 1. Between(a,d,b)
2. a = c
3. e = b
4. Between(c,d,b) = Elim 1,2
5. e = e = Intro
6. b = e = Elim 5,3
7. Between(c,d,e) = Elim 4,7
36. 36 = Elim2? = Elim rule says that if b = c, then we can replace b anywhere with c.
Why don’t we have another rule “= Elim2” that says that if b = c, then we can replace c anywhere with b? (the reverse)
37. 37 Example: Non-consequence Between(c,a,b)
Adjoins(a,c)
SameRow(c,b)
How do we show that an argument is not valid? (or that the conclusion is not a consequence of the premises?)
38. 38 Proof of Non-consequence Definition: An argument is valid if
whenever all the premises are true, the conclusion is also true.
So, an argument is not valid if
there is at least one circumstance such that all the premises are true, but the conclusion is false.
To demonstrate non-consequence, we need to find one such circumstance, which is called a counterexample.
39. 39 Example: showing non-Consequence SameRow(b,c)
SameRow(a,d)
SameRow(d,f)
LeftOf(a,b)
LeftOf(f,c)
40. 40 Exercise: showing non-consequence Between(c,a,b)
Adjoins(a,c)
SameRow(c,b)
41. 41 Valid or Not Between(c,a,b)
Between(d,a,b)
Adjoins(a,c)
Between(d,c,b)
42. 42 Summary: proofs, counterexamples Demonstrating consequence
Use a proof: a sequence of sentences, each one is a simple consequence of the premises and earlier sentences, and last one is the desired conclusion.
Demonstrating non-consequence
Use a counterexample: a circumstance where all the premises are true but the conclusion is not
43. 43 Goals: Have you achieved the followings? To understand the definitions of
Arguments, valid arguments, sound arguments
Logical consequence
Counterexample, proof,
Fitch-style argument, Fitch-style proof
To know what is needed to
demonstrate consequence
demonstrate non-consequence
To gain skills in recognizing
arguments, valid arguments, sound arguments
44. 44 Additional Slides
45. 45 Proofs vs Algorithms A proof for a valid argument is likea program for a function.
A program is a step-by-step procedure for computing the output from the input.
Correct input yields correct output.
A proof is a step-by-step demonstration forshowing that the conclusion follows from the premises.
True premises yields true conclusion.