Download What is a First

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CS1502 Formal Methods in
Computer Science
Notes 15
Problem Sessions
1
Preliminaries
3 proofs we will be able replace with Taut Con
1 proof we will be able to replace with FO Con
First 4 proofs in
http://www.cs.pitt.edu/~wiebe/courses/CS1502/lectures/lec15solutions.pdf
Why?
– Review
– Illustrate that you don’t *need* any of the con rules
2
6 Fitch Proofs
We’ll do them in Fitch in lecture
Next 6 proofs in
http://www.cs.pitt.edu/~wiebe/courses/CS1502/lectures/lec15solutions.pdf
Problems 1-3: use only Intro/Elim rules
Problem 4: may use Taut Con on at most
two support sentences
Problems 5-6: May use FO Con on at
most one support sentence, and Taut Con
for the resolution step
3
Problem 7
Prove the argument below is valid using a Fitchstyle proof.
Some teachers are scholars.
No scholar has time for either football or
basketball.
 Some teachers do not have time for
basketball.
4
Informal Proof
Prove that if the square of an integer is even,
then so is that integer.
Proving the contrapositive is easier: If an integer
is not even, then its square isn’t even either.
Let n be an integer. Assume ~Even(n), i.e.,
Odd(n). Then we can express n as 2m + 1 for
some m. But we see that n*n = 2(2m*m + 2m) +
1, showing that n*n is odd. Thus, we have
shown ~Even(n)  ~Even(n*n)
5
Review Questions around 10.13, 10.17; (see
next slide)
1.
2.
3.
4.
Recall the circles from lecture:
inner – tautological consequence
middle – FO but not tautological cons
Outer – logical but not FO cons
Outside the circle – not a logical cons
Here are answers:10.10: 2; 10.13: 1;
10.14: 3; 10.15: 2; 10.16: 1; 10.17: 3;
Varations: in lecture
6
Necessary
S is always true
Possible
Satisfiable
S could be true
Equivalence
Consequence
S and S’ always
have the same
truth values
Whenever
P1…Pn are true,
Q is also true
Tautological
Translate sentences into
propositional logic using
TFF algorithm
S is a tautology
S is Tautologically
possible
S and S’ are
Tautologically
equivalent
Q is a tautological
consequence of
P1…Pn
First Order (FO)
Replace predicates with
nonsense names
S is an FO validity
S is FO possible
(FO satisfiable)
S and S’ are FO
equivalent
Q is a FO
consequence of
P1…Pn
Logical
S is logically
necessary
(a logical truth)
(logically valid)
S is logically
possible
(satisfiable)
S and S’ are
logically
equivalent
Q is a logical
consequence of
P1…Pn
7
Problem 8
Does x  y P(x, y) follow from
x  y P(x, y)?
Hint: does
x  y SameRow(x, y)
follow from
x  y SameRow(x, y)?
8
Problem 9
 Does x  y [P(x, y)  Q(x)] follow from
x [y P(x, y)  Q(x)]?
 Hint: does
x  y [LeftOf(x,y)  Large(x)]
follow from
x [y LeftOf(x,y)  Large(x)]?
9
Problem 10
all x (P(x)  Q(x))
all x (Q(x)  P(x))
----All x (P(x)  Q(x))
10
Related documents