1 / 10

CS1502 Formal Methods in Computer Science

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

Download Presentation

CS1502 Formal Methods in Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS1502 Formal Methods in Computer Science Notes 15 Problem Sessions

  2. 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

  3. 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

  4. 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.

  5. 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)

  6. 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

  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))

More Related