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

nicta advanced course theorem proving principles
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

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

1

slide-2
SLIDE 2

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

slide-3
SLIDE 3

WHAT YOU WILL LEARN

➜ how to use a theorem prover

WHAT YOU WILL LEARN 3

slide-4
SLIDE 4

WHAT YOU WILL LEARN

➜ how to use a theorem prover ➜ background, how it works

WHAT YOU WILL LEARN 3-A

slide-5
SLIDE 5

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

slide-6
SLIDE 6

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

slide-7
SLIDE 7

WHAT YOU WILL NOT LEARN

➜ semantics / model theory

WHAT YOU WILL NOT LEARN 4

slide-8
SLIDE 8

WHAT YOU WILL NOT LEARN

➜ semantics / model theory ➜ soundness / completeness proofs

WHAT YOU WILL NOT LEARN 4-A

slide-9
SLIDE 9

WHAT YOU WILL NOT LEARN

➜ semantics / model theory ➜ soundness / completeness proofs ➜ decision procedures

WHAT YOU WILL NOT LEARN 4-B

slide-10
SLIDE 10

CONTENT

➜ Intro & motivation, getting started with Isabelle (today)

CONTENT 5

slide-11
SLIDE 11

CONTENT

➜ Intro & motivation, getting started with Isabelle (today) ➜ Foundations & Principles

  • Lambda Calculus
  • Higher Order Logic, natural deduction
  • Term rewriting

CONTENT 5-A

slide-12
SLIDE 12

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

slide-13
SLIDE 13

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

slide-14
SLIDE 14

WHAT IS A PROOF?

to prove

WHAT IS A PROOF? 7

slide-15
SLIDE 15

WHAT IS A PROOF?

to prove (Marriam-Webster)

➜ from Latin probare (test, approve, prove)

WHAT IS A PROOF? 7-A

slide-16
SLIDE 16

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

slide-17
SLIDE 17

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

slide-18
SLIDE 18

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

slide-19
SLIDE 19

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

slide-20
SLIDE 20

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 r2 = 2. Hence there are mutually prime p and q with r = p

q .

Thus 2q2 = p2, i.e. p2 is divisible by 2. 2 is prime, hence it also divides p, i.e. p = 2s. Substituting this into 2q2 = p2 and dividing by 2 gives q2 = 2s2. Hence, q is also divisible by 2. Contradiction. Qed.

WHAT IS A MATHEMATICAL PROOF? 8-A

slide-21
SLIDE 21

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

slide-22
SLIDE 22

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

slide-23
SLIDE 23

WHAT IS A FORMAL PROOF?

A derivation in a formal calculus

WHAT IS A FORMAL PROOF? 10

slide-24
SLIDE 24

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} ⊢ Y S ⊢ X − → Y (impI) S ⊢ X S ⊢ Y S ⊢ X ∧ Y (conjI) S ∪ {X, Y } ⊢ Z S ∪ {X ∧ Y } ⊢ Z (conjE)

WHAT IS A FORMAL PROOF? 10-A

slide-25
SLIDE 25

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} ⊢ Y S ⊢ X − → Y (impI) S ⊢ X S ⊢ Y S ⊢ X ∧ Y (conjI) S ∪ {X, Y } ⊢ Z S ∪ {X ∧ Y } ⊢ Z (conjE) 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)

WHAT IS A FORMAL PROOF? 10-B

slide-26
SLIDE 26

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

slide-27
SLIDE 27

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

slide-28
SLIDE 28

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) verifi cation tools:

➜ model checking, static analysis, ... ➜ usually do not deliver proofs

WHAT IS A THEOREM PROVER? 11-B

slide-29
SLIDE 29

WHY THEOREM PROVING?

➜ Analysing systems/programs thoroughly

WHY THEOREM PROVING? 12

slide-30
SLIDE 30

WHY THEOREM PROVING?

➜ Analysing systems/programs thoroughly ➜ Finding design and specification errors early

WHY THEOREM PROVING? 12-A

slide-31
SLIDE 31

WHY THEOREM PROVING?

➜ Analysing systems/programs thoroughly ➜ Finding design and specification errors early ➜ High assurance (mathematical, machine checked proof)

WHY THEOREM PROVING? 12-B

slide-32
SLIDE 32

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

slide-33
SLIDE 33

Main theorem proving system for this course:

λ → ∀

=

Isabelle

β α

13

slide-34
SLIDE 34

WHAT IS ISABELLE?

A generic interactive proof assistant

WHAT IS ISABELLE? 14

slide-35
SLIDE 35

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

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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

slide-38
SLIDE 38

WHY ISABELLE?

➜ free ➜ widely used system ➜ active development ➜ high expressiveness and automation ➜ reasonably easy to use

WHY ISABELLE? 15

slide-39
SLIDE 39

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

slide-40
SLIDE 40

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

slide-41
SLIDE 41

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

16

slide-42
SLIDE 42

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

slide-43
SLIDE 43

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

slide-44
SLIDE 44

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

slide-45
SLIDE 45

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

slide-46
SLIDE 46

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

slide-47
SLIDE 47

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

slide-48
SLIDE 48

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

slide-49
SLIDE 49

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

slide-50
SLIDE 50

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

slide-51
SLIDE 51

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

slide-52
SLIDE 52

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

slide-53
SLIDE 53

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

slide-54
SLIDE 54

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

slide-55
SLIDE 55

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

slide-56
SLIDE 56

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

slide-57
SLIDE 57

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

slide-58
SLIDE 58

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT?

Soundness architectures careful implementation PVS LCF approach, small proof kernel HOL4 Isabelle

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 19-A

slide-59
SLIDE 59

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT?

Soundness architectures careful implementation PVS LCF approach, small proof kernel HOL4 Isabelle explicit proofs + proof checker Coq Twelf Isabelle

IF I PROVE IT ON THE COMPUTER, IT IS CORRECT, RIGHT? 19-B

slide-60
SLIDE 60

META LOGIC

Meta language: The language used to talk about another language.

META LOGIC 20

slide-61
SLIDE 61

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

slide-62
SLIDE 62

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

slide-63
SLIDE 63

META LOGIC – EXAMPLE

Syntax: Formulae: F ::= V | F − → F | F ∧ F | False V ::= [A − Z] Derivable: S ⊢ X X a formula, S a set of formulae

META LOGIC – EXAMPLE 21

slide-64
SLIDE 64

META LOGIC – EXAMPLE

Syntax: Formulae: F ::= V | F − → F | F ∧ F | False V ::= [A − Z] Derivable: S ⊢ X X a formula, S a set of formulae logic / meta logic X ∈ S S ⊢ X S ∪ {X} ⊢ Y S ⊢ X − → Y S ⊢ X S ⊢ Y S ⊢ X ∧ Y S ∪ {X, Y } ⊢ Z S ∪ {X ∧ Y } ⊢ Z

META LOGIC – EXAMPLE 21-A

slide-65
SLIDE 65

ISABELLE’S META LOGIC

  • =

⇒ λ

ISABELLE’S META LOGIC 22

slide-66
SLIDE 66
  • Syntax:
  • x. F

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

  • 23
slide-67
SLIDE 67
  • Syntax:
  • x. F

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

➜ universial quantifier on the meta level ➜ used to denote parameters ➜ example and more later

  • 23-A
slide-68
SLIDE 68

= ⇒

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

= ⇒

24

slide-69
SLIDE 69

= ⇒

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

slide-70
SLIDE 70

EXAMPLE: A THEOREM

mathematics: if x < 0 and y < 0, then x + y < 0

EXAMPLE: A THEOREM 25

slide-71
SLIDE 71

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

slide-72
SLIDE 72

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

slide-73
SLIDE 73

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

slide-74
SLIDE 74

EXAMPLE: A RULE

logic: X Y X ∧ Y

EXAMPLE: A RULE 26

slide-75
SLIDE 75

EXAMPLE: A RULE

logic: X Y X ∧ Y variation: S ⊢ X S ⊢ Y S ⊢ X ∧ Y

EXAMPLE: A RULE 26-A

slide-76
SLIDE 76

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

slide-77
SLIDE 77

EXAMPLE: A RULE WITH NESTED IMPLICATION

logic: X ∨ Y X . . . . Z Y . . . . Z Z

EXAMPLE: A RULE WITH NESTED IMPLICATION 27

slide-78
SLIDE 78

EXAMPLE: A RULE WITH NESTED IMPLICATION

logic: X ∨ Y X . . . . Z Y . . . . Z Z variation: S ∪ {X} ⊢ Z S ∪ {Y } ⊢ Z S ∪ {X ∨ Y } ⊢ Z

EXAMPLE: A RULE WITH NESTED IMPLICATION 27-A

slide-79
SLIDE 79

EXAMPLE: A RULE WITH NESTED IMPLICATION

logic: X ∨ Y X . . . . Z Y . . . . 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

slide-80
SLIDE 80

λ

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

λ

28

slide-81
SLIDE 81

λ

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

slide-82
SLIDE 82

ENOUGH THEORY! GETTING STARTED WITH ISABELLE

29

slide-83
SLIDE 83

SYSTEM ARCHITECTURE

Isabelle – generic, interactive theorem prover

SYSTEM ARCHITECTURE 30

slide-84
SLIDE 84

SYSTEM ARCHITECTURE

Isabelle – generic, interactive theorem prover Standard ML – logic implemented as ADT

SYSTEM ARCHITECTURE 30-A

slide-85
SLIDE 85

SYSTEM ARCHITECTURE

HOL, ZF – object-logics Isabelle – generic, interactive theorem prover Standard ML – logic implemented as ADT

SYSTEM ARCHITECTURE 30-B

slide-86
SLIDE 86

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

slide-87
SLIDE 87

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

slide-88
SLIDE 88

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

slide-89
SLIDE 89

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

slide-90
SLIDE 90

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

slide-91
SLIDE 91

X-SYMBOL CHEAT SHEET

Input of funny symbols in ProofGeneral

➜ via menu (“X-Symbol”) ➜ via ASCII encoding (similar to L

AT

EX): \<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

slide-92
SLIDE 92

DEMO

35

slide-93
SLIDE 93

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