Automated Reasoning Introduction Jacques Fleuriot Automated - - PowerPoint PPT Presentation

automated reasoning introduction
SMART_READER_LITE
LIVE PREVIEW

Automated Reasoning Introduction Jacques Fleuriot Automated - - PowerPoint PPT Presentation

Automated Reasoning Introduction Jacques Fleuriot Automated Reasoning Introduction Lecture 1, page 1 What is it to Reason? Informally, reasoning is: to seek or attain knowledge or truth or the process of drawing conclusions with


slide-1
SLIDE 1

Automated Reasoning Lecture 1, page 1 Introduction

Automated Reasoning Introduction

Jacques Fleuriot

slide-2
SLIDE 2

Automated Reasoning Lecture 1, page 2 Introduction

What is it to Reason?

  • Informally, reasoning is:

to seek or attain knowledge or truth or the process of drawing conclusions with justification

  • How can we be sure our reasoning does attain the truth?
  • Establishing truth is done in many different ways in everyday life:
  • Word of Authority: truth given by trusted source, eg religion.
  • Experimental science: hypothesis is formulated then

confirmed or refuted by experiments

  • Sampling: truth obtained by statistical analysis of many bits
  • f evidence
  • Mathematics: truth established through mathematical proof
  • Are any of the above methods proof of correctness?
slide-3
SLIDE 3

Automated Reasoning Lecture 1, page 3 Introduction

What is a Proof? (I)

  • For centuries proof was showing something by

breaking it down into agreed-upon steps

  • Social aspect as peers have to be convinced by

argument

  • However, this process is open to flaws
  • Could automation avoid the flaws?
  • We can require that a proof be a deductive chain
  • f inference

– formalisation of proof using logic

slide-4
SLIDE 4

Automated Reasoning Lecture 1, page 4 Introduction

Logic (Deductive Reasoning)

  • Formal proof notion developed in 20th century by

logicians and mathematicians such as Russell, Frege and Hilbert.

  • Benefit of formal logic is that it is a pure syntax.

– precisely defined language with predefined

inference rules allowing for deducing new statements from old ones.

  • No intuition needed, merely applications of

agreed upon rules to a set of agreed upon formulae.

slide-5
SLIDE 5

Automated Reasoning Lecture 1, page 5 Introduction

Automated Reasoning

  • Automated Reasoning (AR) refers to reasoning in

a computer using logic.

  • AR has been an active area of research since the

1950s.

  • It uses deductive reasoning to tackle problems

such as:

– constructing formal mathematical proofs; – verifying programs meet their specifications; – modelling human reasoning.

slide-6
SLIDE 6

Automated Reasoning Lecture 1, page 6 Introduction

Mathematical Reasoning

Automated mathematical theorem proving is a good test

  • domain. Why?
  • Intelligent, often non-trivial activity
  • Circumscribed domain with neat bounds which help control

reasoning

  • Notions of proof

– derivation of statements from axioms (facts or truths) using

logical rules (inference rules)

– so inference is a central aspect

  • Numerous applications

– the need for formal mathematical reasoning is increasing: need

for well-developed theories

– e.g. hardware and software verification

slide-7
SLIDE 7

Automated Reasoning Lecture 1, page 7 Introduction

Understanding mathematical reasoning

  • Two main aspects have been of interest

– logical: how should we reason, i.e. what are the legal modes of

  • reasoning. Want a calculus with rigorous rules.

– psychological: how we actually reason

  • Both aspects contribute to our understanding
  • (Mathematical) Logic:

– shows how we represent knowledge and inference rules – does not tell us how to guide the reasoning process

  • Psychological studies:

– do not provide a detailed and precise recipe for how to reason,

but can provide advice and hints or heuristics

– heuristics are especially valuable in automatic theorem proving-

however, finding good heuristics is a hard task

slide-8
SLIDE 8

Automated Reasoning Lecture 1, page 8 Introduction

Automated Theorem Proving

  • Many systems: Isabelle, Coq, HOL, Otter, ...

– provide a mechanism to formalise proof – user defines concepts in an object-logic – user expresses formal conjectures about concepts

  • Can these systems find proofs automatically?

– In some cases, yes! – But sometimes too difficult

  • Complicated verification tasks usually done in

interactive setting

slide-9
SLIDE 9

Automated Reasoning Lecture 1, page 9 Introduction

Interactive Proof

  • User guides the inference process to prove a

conjecture (hopefully!)

  • Systems provide:

– tedious bookkeeping – standard libraries (e.g. lists, complex numbers) – guarantee of correct reasoning – varying degrees of automation

  • powerful simplification process
  • may have decision procedures for decidable

theories such as linear arithmetic, propositional logic etc.

slide-10
SLIDE 10

Automated Reasoning Lecture 1, page 10 Introduction

What's it like?

  • Interactive proof can be difficult but is also very

rewarding

  • Combines aspects of programming and

mathematics

  • Difficult to learn:

– important that you know how to look up and

apply theorems

– often many tactics for automation, and takes

time to understand them

  • Representation matters!
slide-11
SLIDE 11

Automated Reasoning Lecture 1, page 11 Introduction

Can we prove everything? (I)

Do you think mathematics is:

– complete (can every statement be proved or

disproved)?

– consistent (no statement can be both true and false)? – decidable (there exists a terminating procedure to

determine the truth or falsity of any statement)?

slide-12
SLIDE 12

Automated Reasoning Lecture 1, page 12 Introduction

Can we prove everything? (II)

  • Gödel's incompleteness theorem showed

there are true statements that cannot be proven in inductive theories, eg. arithmetic.

  • Church and Turing showed that first-order

logic was undecidable.

  • Do not be disheartened!
  • We can still prove many interesting results

using logic.

slide-13
SLIDE 13

Automated Reasoning Lecture 1, page 13 Introduction

What is a proof? (II)

  • Computerised proofs are causing controversy in the

mathematical community

– proof steps may be in the hundreds of thousands – impractical for mathematicians to check by hand – can be hard to guarantee proofs are not flawed – example: Hales' proof of Kepler's Conjecture

  • The acceptance of a computerised proof can rely on

– formal specifications of the concepts and conjectures – soundness of the prover used – size of the community using the prover – surveyability of the proof

slide-14
SLIDE 14

Automated Reasoning Lecture 1, page 14 Introduction

Isabelle

  • In this course we will be using the popular

interactive theorem prover Isabelle:

– developed at Cambridge University (Larry

Paulson) and TU Munich (Tobias Nipkow)

– provides many different object-logics

(e.g. FOL, HOL, ZF Set Theory)

– extensive theory library – decision procedures for decidable fragments – widely accepted as a sound and rigorous system!

slide-15
SLIDE 15

Automated Reasoning Lecture 1, page 15 Introduction

  • Isabelle follows the LCF approach to ensure soundness

– declare a goal – split into subgoals using fixed set of commands – subgoals proved by simplifier or split into more subgoals – these commands create data structures which represents

the formal proof

  • Inference rules are the only functions that can create

and manipulate theorems

  • Axioms are generally not allowed; only definitions
  • New concepts should be conservative extensions of old
  • nes

Soundness in Isabelle

slide-16
SLIDE 16

Automated Reasoning Lecture 1, page 16 Introduction

Course contents

  • Logics: propositional, first order, aspects of

higher order logics and linear temporal logic

  • Formalized mathematics
  • Interactive theorem proving: introduction to

theorem proving with Isabelle

  • Formal verification using model checking
  • Proof planning and rippling: AI approach used to

automatically guide proofs e.g. inductive proofs

slide-17
SLIDE 17

Automated Reasoning Lecture 1, page 17 Introduction

Module Outline

  • 2 lectures per week: 16.10-17.00 Mon/Thurs.
  • 2 coursework assignments and exams
  • Examination: 75%
  • Coursework: 25% (12.5% each)
  • Help?

– Lecturer

– Office 6.06b Appleton Tower – Email (jdf@inf.ed.ac.uk)

– Coursework demonstrators – AR web pages: http://www.inf.ed.ac.uk/teaching/courses/ar

slide-18
SLIDE 18

Automated Reasoning Lecture 1, page 18 Introduction

Useful course material

  • Lecture slides found on the course website
  • Set Course Textbooks:

– M. Huth and M. Ryan. Logic in Computer Science: Modelling and

Reasoning about Systems, Cambridge University Press, 2nd Ed. 2004

– T. Nipkow, L. C. Paulson, and M. Wenzel. Isabelle/HOL: A Proof

Assistant for Higher-Order Logic, Springer-Verlag, 2002

available on-line at

http://www.cl.cam.ac.uk/Research/HVG/Isabelle/dist/packages/Isabelle/doc/tutorial.pdf – A. Bundy. The Computational Modelling of Mathematical Reasoning,

Academic Press, 1983

available on-line at http://www.inf.ed.ac.uk/teaching/courses/ar/book/book-postcript

  • Other material - recent research papers, technical reports, etc.