nicta advanced course theorem proving principles
play

NICTA Advanced Course Theorem Proving Principles, Techniques, - PowerPoint PPT Presentation

NICTA Advanced Course Theorem Proving Principles, Techniques, Applications Gerwin Klein Formal Methods 1 O RGANISATORIALS When Mon 14:00 15:30 Wed 10:30 12:00 7 weeks ends Mon, 20.9.2004 Exceptions Mon 6.9., 13.9., 20.9. at


  1. NICTA Advanced Course Theorem Proving Principles, Techniques, Applications Gerwin Klein Formal Methods 1

  2. O RGANISATORIALS When Mon 14:00 – 15:30 Wed 10:30 – 12:00 7 weeks ends Mon, 20.9.2004 Exceptions Mon 6.9., 13.9., 20.9. at 15:00 – 16:30 Web page: http://www.cse.unsw.edu.au/˜kleing/teaching/thprv-04/ free – no credits – no assigments O RGANISATORIALS 2

  3. W HAT YOU WILL LEARN ➜ how to use a theorem prover W HAT YOU WILL LEARN 3

  4. W HAT YOU WILL LEARN ➜ how to use a theorem prover ➜ background, how it works W HAT YOU WILL LEARN 3- A

  5. W HAT YOU WILL LEARN ➜ how to use a theorem prover ➜ background, how it works ➜ how to prove and specify W HAT YOU WILL LEARN 3- B

  6. W HAT YOU WILL LEARN ➜ how to use a theorem prover ➜ background, how it works ➜ how to prove and specify Health Warning Theorem Proving is addictive W HAT YOU WILL LEARN 3- C

  7. W HAT YOU WILL NOT LEARN ➜ semantics / model theory W HAT YOU WILL NOT LEARN 4

  8. W HAT YOU WILL NOT LEARN ➜ semantics / model theory ➜ soundness / completeness proofs W HAT YOU WILL NOT LEARN 4- A

  9. W HAT YOU WILL NOT LEARN ➜ semantics / model theory ➜ soundness / completeness proofs ➜ decision procedures W HAT YOU WILL NOT LEARN 4- B

  10. C ONTENT ➜ Intro & motivation, getting started with Isabelle (today) C ONTENT 5

  11. C ONTENT ➜ Intro & motivation, getting started with Isabelle (today) ➜ Foundations & Principles • Lambda Calculus • Higher Order Logic, natural deduction • Term rewriting C ONTENT 5- A

  12. C ONTENT ➜ Intro & motivation, getting started with Isabelle (today) ➜ Foundations & Principles • Lambda Calculus • Higher Order Logic, natural deduction • Term rewriting ➜ Proof & Specification Techniques • Datatypes, recursion, induction • Inductively defined sets, rule induction • Calculational reasoning, mathematics style proofs • Hoare logic, proofs about programs C ONTENT 5- B

  13. C REDITS material (in part) shamelessly stolen from Tobias Nipkow, Larry Paulson, Markus Wenzel David Basin, Burkhardt Wolff Don’t blame them, errors are mine C REDITS 6

  14. W HAT IS A PROOF ? to prove W HAT IS A PROOF ? 7

  15. W HAT IS A PROOF ? to prove (Marriam-Webster) ➜ from Latin probare (test, approve, prove) W HAT IS A PROOF ? 7- A

  16. W HAT IS A PROOF ? to prove (Marriam-Webster) ➜ from Latin probare (test, approve, prove) ➜ to learn or find out by experience (archaic) W HAT IS A PROOF ? 7- B

  17. W HAT IS A PROOF ? to prove (Marriam-Webster) ➜ from Latin probare (test, approve, prove) ➜ to learn or find out by experience (archaic) ➜ to establish the existence, truth, or validity of (by evidence or logic) prove a theorem, the charges were never proved in court W HAT IS A PROOF ? 7- C

  18. W HAT IS A PROOF ? to prove (Marriam-Webster) ➜ from Latin probare (test, approve, prove) ➜ to learn or find out by experience (archaic) ➜ to establish the existence, truth, or validity of (by evidence or logic) prove a theorem, the charges were never proved in court pops up everywhere ➜ politics (weapons of mass destruction) ➜ courts (beyond reasonable doubt) ➜ religion (god exists) ➜ science (cold fusion works) W HAT IS A PROOF ? 7- D

  19. W HAT IS A MATHEMATICAL PROOF ? In mathematics, a proof is a demonstration that, given certain axioms, some statement of interest is necessarily true. (Wikipedia) √ Example: 2 is not rational. Proof: W HAT IS A MATHEMATICAL PROOF ? 8

  20. W HAT IS A MATHEMATICAL PROOF ? In mathematics, a proof is a demonstration that, given certain axioms, some statement of interest is necessarily true. (Wikipedia) √ Example: 2 is not rational. Proof: assume there is r ∈ Q such that r 2 = 2 . Hence there are mutually prime p and q with r = p q . Thus 2 q 2 = p 2 , i.e. p 2 is divisible by 2 . 2 is prime, hence it also divides p , i.e. p = 2 s . Substituting this into 2 q 2 = p 2 and dividing by 2 gives q 2 = 2 s 2 . Hence, q is also divisible by 2 . Contradiction. Qed. W HAT IS A MATHEMATICAL PROOF ? 8- A

  21. N ICE , BUT .. ➜ still not rigorous enough for some • what are the rules? • what are the axioms? • how big can the steps be? • what is obvious or trivial? ➜ informal language, easy to get wrong ➜ easy to miss something, easy to cheat N ICE , BUT .. 9

  22. N ICE , BUT .. ➜ still not rigorous enough for some • what are the rules? • what are the axioms? • how big can the steps be? • what is obvious or trivial? ➜ informal language, easy to get wrong ➜ easy to miss something, easy to cheat Theorem. A cat has nine tails. Proof. No cat has eight tails. Since one cat has one more tail than no cat, it must have nine tails. N ICE , BUT .. 9- A

  23. W HAT IS A FORMAL PROOF ? A derivation in a formal calculus W HAT IS A FORMAL PROOF ? 10

  24. W HAT IS A FORMAL PROOF ? A derivation in a formal calculus Example: A ∧ B − → B ∧ A derivable in the following system S ∪ { X } ⊢ Y X ∈ S S ⊢ X (assumption) → Y (impI) Rules: S ⊢ X − S ∪ { X, Y } ⊢ Z S ⊢ X S ⊢ Y S ∪ { X ∧ Y } ⊢ Z (conjE) (conjI) S ⊢ X ∧ Y W HAT IS A FORMAL PROOF ? 10- A

  25. W HAT IS A FORMAL PROOF ? A derivation in a formal calculus Example: A ∧ B − → B ∧ A derivable in the following system S ∪ { X } ⊢ Y X ∈ S S ⊢ X (assumption) → Y (impI) Rules: S ⊢ X − S ∪ { X, Y } ⊢ Z S ⊢ X S ⊢ Y S ∪ { X ∧ Y } ⊢ Z (conjE) (conjI) S ⊢ X ∧ Y Proof: 1. { A, B } ⊢ B (by assumption) 2. { A, B } ⊢ A (by assumption) 3. { A, B } ⊢ B ∧ A (by conjI with 1 and 2) 4. { A ∧ B } ⊢ B ∧ A (by conjE with 3) 5. {} ⊢ A ∧ B − → B ∧ A (by impI with 4) W HAT IS A FORMAL PROOF ? 10- B

  26. W HAT IS A THEOREM PROVER ? Implementation of a formal logic on a computer. ➜ fully automated (propositional logic) ➜ automated, but not necessarily terminating (first order logic) ➜ with automation, but mainly interactive (higher order logic) W HAT IS A THEOREM PROVER ? 11

  27. W HAT IS A THEOREM PROVER ? Implementation of a formal logic on a computer. ➜ fully automated (propositional logic) ➜ automated, but not necessarily terminating (first order logic) ➜ with automation, but mainly interactive (higher order logic) ➜ based on rules and axioms ➜ can deliver proofs W HAT IS A THEOREM PROVER ? 11- A

  28. W HAT IS A THEOREM PROVER ? Implementation of a formal logic on a computer. ➜ fully automated (propositional logic) ➜ automated, but not necessarily terminating (first order logic) ➜ with automation, but mainly interactive (higher order logic) ➜ based on rules and axioms ➜ can deliver proofs There are other (algorithmic) verifi cation tools: ➜ model checking, static analysis, ... ➜ usually do not deliver proofs W HAT IS A THEOREM PROVER ? 11- B

  29. W HY THEOREM PROVING ? ➜ Analysing systems/programs thoroughly W HY THEOREM PROVING ? 12

  30. W HY THEOREM PROVING ? ➜ Analysing systems/programs thoroughly ➜ Finding design and specification errors early W HY THEOREM PROVING ? 12- A

  31. W HY THEOREM PROVING ? ➜ Analysing systems/programs thoroughly ➜ Finding design and specification errors early ➜ High assurance (mathematical, machine checked proof) W HY THEOREM PROVING ? 12- B

  32. W HY THEOREM PROVING ? ➜ Analysing systems/programs thoroughly ➜ Finding design and specification errors early ➜ High assurance (mathematical, machine checked proof) ➜ it’s not always easy ➜ it’s fun W HY THEOREM PROVING ? 12- C

  33. Main theorem proving system for this course: Isabelle ∀ = α λ β → 13

  34. W HAT IS I SABELLE ? A generic interactive proof assistant W HAT IS I SABELLE ? 14

  35. W HAT IS I SABELLE ? A generic interactive proof assistant ➜ generic: not specialised to one particular logic (two large developments: HOL and ZF, will mainly use HOL) W HAT IS I SABELLE ? 14- A

  36. W HAT IS I SABELLE ? A generic interactive proof assistant ➜ generic: not specialised to one particular logic (two large developments: HOL and ZF, will mainly use HOL) ➜ interactive: more than just yes/no, you can interactively guide the system W HAT IS I SABELLE ? 14- B

  37. W HAT IS I SABELLE ? A generic interactive proof assistant ➜ generic: not specialised to one particular logic (two large developments: HOL and ZF, will mainly use HOL) ➜ interactive: more than just yes/no, you can interactively guide the system ➜ proof assistant: helps to explore, find, and maintain proofs W HAT IS I SABELLE ? 14- C

  38. W HY I SABELLE ? ➜ free ➜ widely used system ➜ active development ➜ high expressiveness and automation ➜ reasonably easy to use W HY I SABELLE ? 15

  39. W HY I SABELLE ? ➜ free ➜ widely used system ➜ active development ➜ high expressiveness and automation ➜ reasonably easy to use ➜ (and because I know it best ;-)) W HY I SABELLE ? 15- A

  40. W HY I SABELLE ? ➜ free ➜ widely used system ➜ active development ➜ high expressiveness and automation ➜ reasonably easy to use ➜ (and because I know it best ;-)) We will see other systems, too: HOL4, Coq, Waldmeister W HY I SABELLE ? 15- B

  41. If I prove it on the computer, it is correct, right? 16

  42. I F I PROVE IT ON THE COMPUTER , IT IS CORRECT , RIGHT ? No, because: I F I PROVE IT ON THE COMPUTER , IT IS CORRECT , RIGHT ? 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend