100 likes | 255 Views
CS1502 Formal Methods in Computer Science. Notes 15 Problem Sessions. 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
E N D
CS1502 Formal Methods in Computer Science Notes 15 Problem Sessions
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
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
Problem 7 • Prove the argument below is valid using a Fitch-style proof.Some teachers are scholars.No scholar has time for either football or basketball. Some teachers do not have time for basketball.
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)
Review Questions around 10.13, 10.17; (see next slide) • 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
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)?
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)]?
Problem 10 all x (P(x) Q(x)) all x (Q(x) P(x)) ----- All x (P(x) Q(x))