Document

Isabelle Tutorial:
System, HOL and Proofs
Burkhart Wolff, Makarius Wenzel
Université Paris-Sud
What we will talk about
What we will talk about
Isabelle with:





its System Framework
the Logical Framework
the Isabelle/HOL Environment
Proof Contexts and Structured Proof
Tactic Proofs (“apply style”)
The Isabelle
Logical Framework (I)
Overview

A Universal Notion of Terms & Types:
Curry-Style Typed λ Calculus with Type-Classes

A Universal Notion of Rule: Isabelle/Pure

A Gentle Introduction to HOL

Forward Proofs

Backward Proofs

ML-Level Proofs

System Architecture

Conclusion
Part of Isabelle Contexts: Theories

(Global) Theories are a pair of a:

Signature S

Axioms
(types, constants,syntax)
A
(a partial map of
names to formulas (“thm”s))
where
– type classes X
(* eg. order, lattice *)
– type constructors κ
(* eg. bool, list,_x_*)
– type variables α
– types τ ::= prop | τ ⇒ τ | (τ
τ )κ | αX X}
– signatures C ↦ τ (a partial map from constants
to types τ)
Part of Isabelle Contexts: Theories

(Global) Theories are a pair of a:

Signature S
(types, constants,syntax)

Axioms
(a partial map of
A
names to formulas (“thm”s))
where

constants c

variables x

schematic-variables ?x

(lambda) -terms: t ::= c | x | ?x | λx. t | t t

typed terms: typing similar to SML, Haskell, …

formulas φ : terms of type prop.
What Isabelle Documents
talk about: Theory Extensions

Theory Extensions (roughly speaking) are:

Signature
S
(types, constants,syntax)

Axioms
A
(set of formulas)
(S, A) ”∈” T
command denoting global
context transition
(S', A') ”∈” T'
example: consts HH :: “prop⇒prop”
What Isabelle Documents
talk about: Theory Extensions

Theory Extensions (roughly speaking) are:

Signature
S
(types, constants,syntax)

Axioms
A
(set of formulas)
(S, A) ”∈” T
consts
<c> :: “<τ>”
(S + {C↦τ}, A) ”∈” T'
example: consts HH :: “prop⇒prop”
What Isabelle Documents
talk about: Theory Extensions

Theory Extensions (roughly speaking) are:

Signature
S
(types, constants,syntax)

Axioms
A
(set of formulas)
(S, A) ”∈” T
axiomatization <c>
where <name>:"<φ>"
(S, A + {name↦(φ  )}) ”∈” T'
What Isabelle Documents
talk about: Theory Extensions

Theory Extensions (roughly speaking) are:

Signature
S
(types, constants,syntax)

Axioms
A
(set of formulas)
s
i
th !!!
e t<c>
y
axiomatization
l
s
u c
e
where 't<name>:"<
φ>"
r
i
n
Do er d
(S, A + {name↦(φ  )}) ”∈”
ev T'
(S, A) ”∈” T
More on Formulas φ:
A Universal Notion of Rule


Pure is the meta-language, i.e. the built-in lan–
guage in which rules and object logic languages can
be denoted.
It consists of typed λterms with constants:

foundational types “prop” and “_ => _” (“_ ⇒_”)

the Pure (universal) quantifier
all :: “(α ⇒ Prop) ⇒ Prop”
(“⋀x. P x”,“\<And> x. P x”
“!!x. P x”)

the Pure implication “A ==> B” (“_ ⟹ _”)

the Pure equality
“ A
= =
B ≡”
“ A
More on Formulas φ:
A Universal Notion of Rule


Pure is the meta-language, i.e. the built-in
formula language (“inner syntax”).
Equivalent notations for natural deduction rules:
A1 ⟹⟹
(…
( An ⟹
A
⟦ A1; …; An ⟧⟹ An+1 ,
n+1
)...),
theorem
assumes A1
and …
and An
shows An+1
More on Formulas φ:
A Universal Notion of Rule


Pure is the meta-language, i.e. the built-in
formula language (“inner syntax”).
Equivalent notations for natural deduction rules:
( P⟹⟹
Q )
theorem
a s s u m ⟹
e s
shows "R"
R
:
"P
Q "
More on Formulas φ:
A Universal Notion of Rule


Pure provides a built-in formula-language, a
is the meta-language.
Equivalent notations for natural deduction rules:
(⋀ a .
P⟹ aQ
theorem
fixes a
a s s u m ⟹
e s
shows R
a⟹
)
“ P
R
a
:
Q
a ”
Some Commands for Inspection

Some Isabelle document commands serve
to inspect the document content. They do
not modify the global context ...

display a theorem:
thm <name>

find a theorem:
find_theorem <pattern>
example: find_theorem “_ ∧_” name:”HOL”
Some Commands for Inspection

Some Isabelle document commands serve
to inspect the document content.

checking a type expression:
typ “<τ>”
example: typ “prop ⇒ prop”

checking a term expression:
term “<t>”
example: term
“λx. x“
More on Formulas φ:
A Universal Notion of Rule

Technically, there is no difference between
a definition, an axiom, a theorem, a rule everything is a “thm” (Γ ⊢ T φ) for Isabelle
⟹ instead


<name>
we write
<thmname>
we can therefore prove a lemma and use
it later on as a “derived rule”,
we can program how collections of derived rules
were applied, and therefore build logically
safe decision procedures