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

Similar documents
λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications

Computer-Checked Meta-Logic

Interactive Theorem Provers

Gerwin Klein, June Andronick, Ramana Kumar S2/2016

Isabelle/FOL Proof Assistant

Automated Reasoning Lecture 5: First-Order Logic

Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison

Propositional Logic. CS 3234: Logic and Formal Systems. Martin Henz and Aquinas Hobor. August 26, Generated on Tuesday 31 August, 2010, 16:54

LCF + Logical Frameworks = Isabelle (25 Years Later)

Formal Verification of Mathematical Algorithms

An Introduction to Proof Assistants

Discrete Mathematics

Classical First-Order Logic

The Formal Proof Susan Gillmor and Samantha Rabinowicz Project for MA341: Appreciation of Number Theory Boston University Summer Term

Validating QBF Invalidity in HOL4

Learning Goals of CS245 Logic and Computation

Recursion and Intro to Coq

Last Time. Inference Rules

Code Generation for a Simple First-Order Prover

Classical First-Order Logic

Write your own Theorem Prover

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus

02 Propositional Logic

Lecture 5 : Proofs DRAFT

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Human-Readable Machine-Verifiable Proofs for Teaching Constructive Logic

Introduction to Isabelle/HOL

Computational Logic and the Quest for Greater Automation

Program verification using Hoare Logic¹

Logic for Computer Science - Week 4 Natural Deduction

The Reflection Theorem

Proof assistants as a tool for thought

Beyond First-Order Logic

Requirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness

Advanced Topics in LP and FP

Lecture 13: Soundness, Completeness and Compactness

Type Systems. Lecture 9: Classical Logic. Neel Krishnaswami University of Cambridge

Inductive Theorem Proving

07 Practical Application of The Axiomatic Method

Automated Proving in Geometry using Gröbner Bases in Isabelle/HOL

Intel s Successes with Formal Methods

Logic. Propositional Logic: Syntax. Wffs

A Machine Checked Model of Idempotent MGU Axioms For a List of Equational Constraints

Executing the formal semantics of the Accellera Property Specification Language

Logic. Propositional Logic: Syntax

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

The LCF Approach to Theorem Proving

CSE 20. Final Review. CSE 20: Final Review

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Logic: Bottom-up & Top-down proof procedures

02 The Axiomatic Method

CITS2211 Discrete Structures Proofs

Program-ing in Coq. Matthieu Sozeau under the direction of Christine Paulin-Mohring

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

Formalization and Automation of Euclidean Geometry

Propositional Logic: Syntax

Propositional logic (revision) & semantic entailment. p. 1/34

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

26. Januar Introduction to Computational Semantics

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Implementing Proof Systems for the Intuitionistic Propositional Logic

cis32-ai lecture # 18 mon-3-apr-2006

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logic As Algebra COMP1600 / COMP6260. Dirk Pattinson Australian National University. Semester 2, 2017

Theoretical Computer Science

COMP6463: λ-calculus

CSC236 Week 3. Larry Zhang

Mathematical Logic. Introduction to Reasoning and Automated Reasoning. Hilbert-style Propositional Reasoning. Chiara Ghidini. FBK-IRST, Trento, Italy

Alan Bundy. Automated Reasoning LTL Model Checking

3 Propositional Logic

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

A Termination Checker for Isabelle Hoare Logic

The Curry-Howard Isomorphism

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Interpretation of Locales in Isabelle: Theories and Proof Contexts

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Introduction. Pedro Cabalar. Department of Computer Science University of Corunna, SPAIN 2013/2014

Analysing the microrna-17-92/myc/e2f/rb Compound Toggle Switch by Theorem Proving

Manual of Logical Style (fresh version 2018)

Logic for Computer Science Handout Week 8 DERIVED RULE MODUS TOLLENS DERIVED RULE RAA DERIVED RULE TND

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs

Agent-Based HOL Reasoning 1

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Topics in Model-Based Reasoning

Introducing Proof 1. hsn.uk.net. Contents

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

An Informal introduction to Formal Verification

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Classical Propositional Logic

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Equalities and Uninterpreted Functions. Chapter 3. Decision Procedures. An Algorithmic Point of View. Revision 1.0

A Brief Introduction to Proofs

Nunchaku: Flexible Model Finding for Higher-Order Logic

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions

September 13, Cemela Summer School. Mathematics as language. Fact or Metaphor? John T. Baldwin. Framing the issues. structures and languages

Introduction to Logic and Axiomatic Set Theory

Transcription:

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

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

WHAT YOU WILL LEARN how to use a theorem prover WHAT YOU WILL LEARN 3

WHAT YOU WILL LEARN how to use a theorem prover background, how it works WHAT YOU WILL LEARN 3-A

WHAT YOU WILL LEARN how to use a theorem prover background, how it works how to prove and specify WHAT YOU WILL LEARN 3-B

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

WHAT YOU WILL NOT LEARN semantics / model theory WHAT YOU WILL NOT LEARN 4

WHAT YOU WILL NOT LEARN semantics / model theory soundness / completeness proofs WHAT YOU WILL NOT LEARN 4-A

WHAT YOU WILL NOT LEARN semantics / model theory soundness / completeness proofs decision procedures WHAT YOU WILL NOT LEARN 4-B

CONTENT Intro & motivation, getting started with Isabelle (today) CONTENT 5

CONTENT Intro & motivation, getting started with Isabelle (today) Foundations & Principles Lambda Calculus Higher Order Logic, natural deduction Term rewriting CONTENT 5-A

CONTENT 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 CONTENT 5-B

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

WHAT IS A PROOF? to prove WHAT IS A PROOF? 7

WHAT IS A PROOF? to prove (Marriam-Webster) from Latin probare (test, approve, prove) WHAT IS A PROOF? 7-A

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

WHAT 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 WHAT IS A PROOF? 7-C

WHAT 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) WHAT IS A PROOF? 7-D

WHAT 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: WHAT IS A MATHEMATICAL PROOF? 8

WHAT 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 2q 2 = p 2, i.e. p 2 is divisible by 2. 2 is prime, hence it also divides p, i.e. p = 2s. Substituting this into 2q 2 = p 2 and dividing by 2 gives q 2 = 2s 2. Hence, q is also divisible by 2. Contradiction. Qed. WHAT IS A MATHEMATICAL PROOF? 8-A

NICE, 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 NICE, BUT.. 9

NICE, 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. NICE, BUT.. 9-A

WHAT IS A FORMAL PROOF? A derivation in a formal calculus WHAT IS A FORMAL PROOF? 10

WHAT IS A FORMAL PROOF? A derivation in a formal calculus Example: A B B A derivable in the following system Rules: X S S X (assumption) S X S Y S X Y (conji) S {X} Y S X Y (impi) S {X, Y } Z S {X Y } Z (conje) WHAT IS A FORMAL PROOF? 10-A

WHAT IS A FORMAL PROOF? A derivation in a formal calculus Example: A B B A derivable in the following system Rules: Proof: X S S X (assumption) S X S Y S X Y (conji) S {X} Y S X Y (impi) S {X, Y } Z S {X Y } Z (conje) 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) WHAT IS A FORMAL PROOF? 10-B

WHAT 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) WHAT IS A THEOREM PROVER? 11

WHAT 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 WHAT IS A THEOREM PROVER? 11-A

WHAT 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) verification tools: model checking, static analysis,... usually do not deliver proofs WHAT IS A THEOREM PROVER? 11-B

WHY THEOREM PROVING? Analysing systems/programs thoroughly WHY THEOREM PROVING? 12

WHY THEOREM PROVING? Analysing systems/programs thoroughly Finding design and specification errors early WHY THEOREM PROVING? 12-A

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

WHY 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 WHY THEOREM PROVING? 12-C

Main theorem proving system for this course: = Isabelle λ β α 13

WHAT IS ISABELLE? A generic interactive proof assistant WHAT IS ISABELLE? 14

WHAT IS ISABELLE? A generic interactive proof assistant generic: not specialised to one particular logic (two large developments: HOL and ZF, will mainly use HOL) WHAT IS ISABELLE? 14-A

WHAT IS ISABELLE? 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 WHAT IS ISABELLE? 14-B

WHAT IS ISABELLE? 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 WHAT IS ISABELLE? 14-C

WHY ISABELLE? free widely used system active development high expressiveness and automation reasonably easy to use WHY ISABELLE? 15

WHY ISABELLE? free widely used system active development high expressiveness and automation reasonably easy to use (and because I know it best ;-)) WHY ISABELLE? 15-A

WHY ISABELLE? 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 WHY ISABELLE? 15-B

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

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: ➀ hardware could be faulty IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17-A

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: ➀ hardware could be faulty ➁ operating system could be faulty IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17-B

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: ➀ hardware could be faulty ➁ operating system could be faulty ➂ implementation runtime system could be faulty IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17-C

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: ➀ hardware could be faulty ➁ operating system could be faulty ➂ implementation runtime system could be faulty ➃ compiler could be faulty IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17-D

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: ➀ hardware could be faulty ➁ operating system could be faulty ➂ implementation runtime system could be faulty ➃ compiler could be faulty ➄ implementation could be faulty IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17-E

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: ➀ hardware could be faulty ➁ operating system could be faulty ➂ implementation runtime system could be faulty ➃ compiler could be faulty ➄ implementation could be faulty ➅ logic could be inconsistent IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17-F

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, because: ➀ hardware could be faulty ➁ operating system could be faulty ➂ implementation runtime system could be faulty ➃ compiler could be faulty ➄ implementation could be faulty ➅ logic could be inconsistent ➆ theorem could mean something else IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 17-G

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, but: IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 18

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, but: probability for 1 and 2 reduced by using different systems IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 18-A

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, but: probability for 1 and 2 reduced by using different systems 3 and 4 reduced by using different compilers IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 18-B

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, but: probability for 1 and 2 reduced by using different systems 3 and 4 reduced by using different compilers faulty implementation reduced by right architecture IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 18-C

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, but: probability for 1 and 2 reduced by using different systems 3 and 4 reduced by using different compilers faulty implementation reduced by right architecture inconsistent logic reduced by implementing and analysing it IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 18-D

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, but: probability for 1 and 2 reduced by using different systems 3 and 4 reduced by using different compilers faulty implementation reduced by right architecture inconsistent logic reduced by implementing and analysing it wrong theorem reduced by expressive/intuitive logics IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 18-E

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? No, but: probability for 1 and 2 reduced by using different systems 3 and 4 reduced by using different compilers faulty implementation reduced by right architecture inconsistent logic reduced by implementing and analysing it wrong theorem reduced by expressive/intuitive logics No guarantees, but assurance way higher than manual proof IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 18-F

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? Soundness architectures careful implementation PVS IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 19

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? Soundness architectures careful implementation LCF approach, small proof kernel PVS HOL4 Isabelle IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 19-A

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? Soundness architectures careful implementation LCF approach, small proof kernel explicit proofs + proof checker PVS HOL4 Isabelle Coq Twelf Isabelle IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 19-B

META LOGIC Meta language: The language used to talk about another language. META LOGIC 20

META LOGIC Meta language: The language used to talk about another language. Examples: English in a Spanish class, English in an English class META LOGIC 20-A

META LOGIC Meta language: The language used to talk about another language. Examples: English in a Spanish class, English in an English class Meta logic: The logic used to formalize another logic Example: Mathematics used to formalize derivations in formal logic META LOGIC 20-B

META LOGIC EXAMPLE Syntax: Formulae: F ::= V F F F F F alse V ::= [A Z] Derivable: S X X a formula, S a set of formulae META LOGIC EXAMPLE 21

META LOGIC EXAMPLE Syntax: Formulae: F ::= V F F F F F alse V ::= [A Z] Derivable: S X X a formula, S a set of formulae logic / meta logic X S S X S X S Y S X Y S {X} Y S X Y S {X, Y } Z S {X Y } Z META LOGIC EXAMPLE 21-A

ISABELLE S META LOGIC = λ ISABELLE S META LOGIC 22

Syntax: in ASCII: x. F!!x. F (F another meta level formula) 23

Syntax: in ASCII: x. F!!x. F (F another meta level formula) universial quantifier on the meta level used to denote parameters example and more later 23-A

= Syntax: A = B (A, B other meta level formulae) in ASCII: A ==> B = 24

= Syntax: A = B (A, B other meta level formulae) in ASCII: A ==> B Binds to the right: A = B = C = A = (B = C) Abbreviation: [A; B ] = C = A = B = C read: A and B implies C used to write down rules, theorems, and proof states = 24-A

EXAMPLE: A THEOREM mathematics: if x < 0 and y < 0, then x + y < 0 EXAMPLE: A THEOREM 25

EXAMPLE: A THEOREM mathematics: if x < 0 and y < 0, then x + y < 0 formal logic: x < 0 y < 0 x + y < 0 variation: x < 0; y < 0 x + y < 0 EXAMPLE: A THEOREM 25-A

EXAMPLE: A THEOREM mathematics: if x < 0 and y < 0, then x + y < 0 formal logic: x < 0 y < 0 x + y < 0 variation: x < 0; y < 0 x + y < 0 Isabelle: lemma x < 0 y < 0 x + y < 0 variation: lemma [x < 0; y < 0] = x + y < 0 EXAMPLE: A THEOREM 25-B

EXAMPLE: A THEOREM mathematics: if x < 0 and y < 0, then x + y < 0 formal logic: x < 0 y < 0 x + y < 0 variation: x < 0; y < 0 x + y < 0 Isabelle: lemma x < 0 y < 0 x + y < 0 variation: lemma [x < 0; y < 0] = x + y < 0 variation: lemma assumes x < 0 and y < 0 shows x + y < 0 EXAMPLE: A THEOREM 25-C

EXAMPLE: A RULE logic: X Y X Y EXAMPLE: A RULE 26

EXAMPLE: A RULE logic: X Y X Y variation: S X S Y S X Y EXAMPLE: A RULE 26-A

EXAMPLE: A RULE logic: X Y X Y variation: S X S Y S X Y Isabelle: [X; Y ] = X Y EXAMPLE: A RULE 26-B

EXAMPLE: A RULE WITH NESTED IMPLICATION X... logic: X Y Z Z Ỵ.. Z EXAMPLE: A RULE WITH NESTED IMPLICATION 27

EXAMPLE: A RULE WITH NESTED IMPLICATION X... logic: X Y Z Z Ỵ.. Z variation: S {X} Z S {Y } Z S {X Y } Z EXAMPLE: A RULE WITH NESTED IMPLICATION 27-A

EXAMPLE: A RULE WITH NESTED IMPLICATION X... logic: X Y Z Z Ỵ.. Z variation: S {X} Z S {Y } Z S {X Y } Z Isabelle: [X Y ; X = Z; Y = Z ] = Z EXAMPLE: A RULE WITH NESTED IMPLICATION 27-B

λ Syntax: λx. F (F another meta level formula) in ASCII: %x. F λ 28

λ Syntax: λx. F (F another meta level formula) in ASCII: %x. F lambda abstraction used to for functions in object logics used to encode bound variables in object logics more about this in the next lecture λ 28-A

ENOUGH THEORY! GETTING STARTED WITH ISABELLE 29

SYSTEM ARCHITECTURE Isabelle generic, interactive theorem prover SYSTEM ARCHITECTURE 30

SYSTEM ARCHITECTURE Isabelle generic, interactive theorem prover Standard ML logic implemented as ADT SYSTEM ARCHITECTURE 30-A

SYSTEM ARCHITECTURE HOL, ZF object-logics Isabelle generic, interactive theorem prover Standard ML logic implemented as ADT SYSTEM ARCHITECTURE 30-B

SYSTEM ARCHITECTURE Proof General user interface HOL, ZF object-logics Isabelle generic, interactive theorem prover Standard ML logic implemented as ADT SYSTEM ARCHITECTURE 30-C

SYSTEM ARCHITECTURE Proof General user interface HOL, ZF object-logics Isabelle generic, interactive theorem prover Standard ML logic implemented as ADT User can access all layers! SYSTEM ARCHITECTURE 30-D

SYSTEM REQUIREMENTS Linux, MacOS X or Solaris Standard ML (PolyML fastest, SML/NJ supports more platforms) XEmacs or Emacs (for ProofGeneral) If you do not have Linux, MacOS X or Solaris, try IsaMorph: http://www.brucker.ch/projects/isamorph/ SYSTEM REQUIREMENTS 31

DOCUMENTATION Available from http://isabelle.in.tum.de Learning Isabelle Tutorial on Isabelle/HOL (LNCS 2283) Tutorial on Isar Tutorial on Locales Reference Manuals Isabelle/Isar Reference Manual Isabelle Reference Manual Isabelle System Manual Reference Manuals for Object-Logics DOCUMENTATION 32

PROOFGENERAL User interface for Isabelle Runs under XEmacs or Emacs Isabelle process in background Interaction via Basic editing in XEmacs (with highlighting etc) Buttons (tool bar) Key bindings ProofGeneral Menu (lots of options, try them) PROOFGENERAL 33

X-SYMBOL CHEAT SHEET Input of funny symbols in ProofGeneral via menu ( X-Symbol ) via ASCII encoding (similar to L A T E X): \<and>, \<or>,... via abbreviation: /\, \/, -->,... via rotate: l C-. = λ (cycles through variations of letter) λ ➀ \<forall> \<exists> \<lambda> \<not> /\ \/ --> => ➁ ALL EX % & ➀ converted to X-Symbol ➁ stays ASCII X-SYMBOL CHEAT SHEET 34

DEMO 35

EXERCISES Download and install Isabelle from http://isabelle.in.tum.de or http://mirror.cse.unsw.edu.au/pub/isabelle/ Switch on X-Symbol in ProofGeneral Step through the demo file from the lecture web page Write an own theory file, look at some theorems, try find theorem EXERCISES 36