1 / 19

ISABELLE/HOL

ISABELLE/HOL. CAS- 734 (Presentation -1) By : Vasudha Kapil. Outline. Intoduction Theory Format HOL Proof format Example. ISABELLE/HOL. Isabelle theorem prover is an interactive proof assistant. It is a Generic Proof Assistant.

adanne
Télécharger la présentation

ISABELLE/HOL

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. ISABELLE/HOL CAS- 734 (Presentation -1) By : Vasudha Kapil

  2. Outline • Intoduction • Theory Format • HOL • Proof format • Example

  3. ISABELLE/HOL • Isabelle theorem prover is an interactive proof assistant. • It is a Generic Proof Assistant. • It was developed at University of Cambridge (Laury Paulson) , TU Munchen (Tobias Nipkow) and Universt Paris Sud (Makarius Wenzel) • Isabelle/HOL is specialization of Isabelle for HOL (Higher Order Logic).

  4. INSTALLATION • Download system from : https://www.cl.cam.ac.uk/research/hvg/Isabelle/ • It is currently available for three platforms : • WINDOWS • MAC OS X • LINUX • Platform specific application bundle includes sources, documentation and add on components required.

  5. INTERFACE • Isabelle jEdit is the interface for current version of Isabelle/HOL. • Interactive Development Environment • Parses and interprets file while it is typed. • List of mathematical symbols provided.

  6. THEORIES • General format of theory T in Isabelle/HOL is : Theory T Imports B1.......... Bn Begin (Declarations, Definitions & Proofs) end

  7. Brief Review of HOL • HOL has • datatypes • recursive functions • logical operators (∧, −→, ∀, ∃, . . . ) • HOL = functional programming + logic

  8. Types Basic Syntax – τ ::= (τ ) | bool | nat | . . . base types | ’a | ’b | . . . type variables |τ ⇒ τ total functions |sets,lists type constructors |. . . user-defined types All terms and formulae should be well typed in Isabelle.

  9. Type Inference and Type Annotation • Type Inference : Isabelle automatically computes the type of each variable in a term. • Type Annotations : In the presence of overloaded functions type inference is not always possible. Type constraints are needed in such cases. Syntax : f (x::nat)

  10. Terms • Syntax term ::= (term) | a constant or variable (identifier) | term term function application | λx. term function “abstraction” | . . . lots of syntactic sugar • Terms must be well-typed • Notation: t :: τ means t is a well-typed term of type τ .

  11. Formulae • They are terms of type bool (True & False) and usual logical connectives. • Syntax : form ::= (form) | term = term | ¬form| form ∧ form | form ∨ form | form −→ form| ∀x. form | ∃x. form

  12. Variables • Isabelle has three kinds of variables : • Bound Variables • Free Variables • Schematic variables or unknown. Example : ?x It has ‘?’ as its first character.

  13. Functions Function definition schemas in Isabelle/HOL • Non Recursive with definition • definition name :: “domain” where “fun_def” Example : definition sq :: “nat => nat” where “sq n= n*n” • Primitive Recursive with primrec • primrec name :: “domain” where “fun_def1| fun_def2|...... |fun_defn” Example : primrec rev :: "'a list =>'a list“ where "rev [] = []" | "rev (x # xs) = (rev xs) @ (x # [])"

  14. Functions (continued) • Well founded recursion with fun • Syntax : fun f :: “τ” where “equations” • Fun has automatic termination proof. • Well founded recursion with function. • Syntax : function f :: “τ” where “equations” .... by pat_completeness auto Termination by lexicographic_order • User supplied termination proof.

  15. Proofs General format: lemma name : "..." apply (...) apply (...) . . . done If the lemma is suitable as a simplification rule: lemma name [simp]: "..."

  16. Automated Methods • Methods are commands to work on proof state. Syntax :apply (method <parameters>) • assumption : It solves a sub goal if consequent is contained in set of assumptions. • auto : Instructs Isabelle to try and prove all subgoals automatically essentially by simplifying them. • simp : Same as auto but act on subgoal 1 only. [simp] : It can be used to make a theorem simplification rule. Example : prove rev(rev x) = x lemma rev_rev [simp] : “rev(rev x) = x”

  17. Methods (continued) • blast : Covers logic, sets, relations • Doesn’t support equality. • arith : Covers linear arithmetic. • Supports int, reals as well • Doesn’t support complex multiplication (*) • Induction : apply (induction m) : Tells Isabelle to start a proof by induction on m.

  18. EXAMPLE theory addition imports Main begin fun add :: "nat⇒ nat ⇒ nat" where "add 0 n = n" | "add (Suc m) n = Suc(add m n)" lemma add_ex [simp]: "add m 0 = m" apply(induction m) apply(auto) done end

  19. Bibliography • https://www.cl.cam.ac.uk/research/hvg/Isabelle/documentation.html • Theorem Proving with Isabelle/HOL : By Tobias Nipkow. http://isabelle.in.tum.de/coursematerial/PSV2009-1/ • Isabelle/HOL : A Proof Assistant for Higher Order Logic. By- Tobias Nipkow, Lawrence C. Paulson, Markus Wenzel

More Related