Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
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
System Framework
Isabelle Architecture ! Modern Isabelle Architecture consists of 5 identifyable layers
! SML layer ! Kernel & Proof Object Layer
! Tactic Layer and decision procedures
! Isar Engine
! PIDE Framework and Interface Layer
Isabelle Architecture • Observation:
Effective parallelization is a PERVASIVE PROBLEM, that must be addressed
kernel PO
decisionprocedures
...
datatypes...
PIDE jEditScala System Interface
records...
multi-core PolySML
C1 C2 C3 C4
.
.
.
Isabelle Architecture • In detail:
kernel PO
decisionprocedures
...
datatypes...
PIDE jEditScala System Interface
records...
multi-core PolySML
C1 C2 C3 C4
.
.
.
on the execution platform layer
Isabelle Architecture • In detail:
kernel PO
decisionprocedures
...
datatypes...
PIDE jEditScala System Interface
...
multi-core PolySML
C1 C2 C3 C4
.
.
.
on the kernel layer
Isabelle Architecture • In detail:
kernel PO
decisionprocedures
...
datatypes...
PIDE jEditScala System Interface
...
multi-core PolySML
C1 C2 C3 C4
.
.
.
on layer of procedures and packages
Isabelle Architecture • In detail:
kernel PO
decisionprocedures
...
datatypes...
PIDE jEditScala System Interface
...
multi-core PolySML
C1 C2 C3 C4
.
.
.
on the interface layerPIDE framework + Editor
PIDE - GUI - Architecture(see PIDE - Project: http://bitbucket.org/pide/pide/wiki/Manifesto)
π d.e
prover
SML/Scalainterface
π d.e (Java / Scala)
inte-grationlayer
installationmanager
srcdistribution
server
e.g. Isabelle (SML)
domain editplugin
domain viewplugin
Swinglibrary
. . .
user
JVM/Scalainterface
What is Isabelle as a System ? ! A Document Processor! … where documents have a unique name! … may acyclicly import documents! … and consists of an command sequence! … where new commands may be intro–duced
on the fly (i.e. the system framework is extensible).● A session (a collection of documents organized in
a hierachy) may be “frozen” to a session (or configuration)
What is Isabelle as a System ? ! Global View of a “session“
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
Document /“Theory”
cmd
A
BC
D
What is Isabelle as a System ? ! Global View
token
token
token
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
Document /“Theory”
cmd
A
BC
D
atom detailed view:
What is Isabelle as a System ? ! Document “positions” were evaluated to an
implicit state, the theory context T
Θ3
Θ0
Θ3 - 2
Θ3 - 1
“semantic”evaluationas SML function
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
Document /“Theory”
cmd
A
BC
D
What is Isabelle as a System ? ! Document “positions” were evaluated to an
implicit state, the theory context T
Θ
Θ0
Θ3 - 2
Θ3 - 1
“semantic”evaluationas SML function
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
Document /“Theory”
cmd
A
BC
D
Note: stateless command evaluation! No-side-effects apart from “state” managed by Isabelle !!!
What is Isabelle as a System ? ! Document “positions” were evaluated to an
implicit state, the theory context T
Θ3
Θ0
Θ3 - 2
Θ3 - 1
“semantic”evaluationas SML function
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
Document /“Theory”
cmd
A
BC
D
Note: the theory context T can contain a “type signature”and a “term signature”, “axioms”, but also system configuration information etc.
What is Isabelle as a System ? ! Document “positions” were evaluated to an
implicit state, the theory context T
Θ3
Θ0
Θ3 - 2
Θ3 - 1
“semantic”evaluationas SML function
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
Document /“Theory”
cmd
A
BC
D
Note: … and this is at the beginning a minimal intuitionistic logic called in Isabelle/Pure
What is Isabelle as a System ? ! Example
theory Dimports B Cbeginsection{* First Section *} text{* Some mathematical text: @{text \<alpha>}.*} ML{* fun fac x = if x = 0 then 1 else x*fac(x-1) *}
ML{* fac 10 *}end
What is Isabelle as a System ? ! Example
theory Dimports B Cbeginsection{* First Section *} text{* Some mathematical text: @{text \<alpha>}.*} ML{* fun fac x = if x = 0 then 1 else x*fac(x-1) *}
ML{* fac 10 *}end
What is Isabelle as a System ? ! Example
theory Dimports B Cbeginsection{* First Section *} text{* Some mathematical text: @{text \<alpha>}.*} ML{* fun fac x = if x = 0 then 1 else x*fac(x-1) *}
ML{* fac 10 *}end
“fac” visible here because the ML environment is part of T !!
Demo I ! Start Isabelle (via the PIDE jEdit)! Browse „demo1.thy“! Commands:
" text, section, subsection" ML" value" a browser for theorems: find_theorems
! Capabilities:– hovering, jump-link,
Demo I
Demo I
Main (Editing)Panel
Demo I
OutputPanel
Demo I
Sidekick Panel/[Documentation Panel |Theories Panel]
Exercises! Start Isabelle (via the PIDE/jEdit: isabelle jedit demo1.thy)
! Explore Demo1.thy: Set output window, modify texts and value-computations, ML-code.
! Browse „Editor.thy“; ! Edit a (brief) document with mathematical notation.! Edit and evaluate a small SML program(see http://en.wikipedia.org/wiki/Standard_ML as primer)
Parallel Nano-Kernel LCF-Archi-tecture
in the
jEdit - GUI(PIDE)
fine-grained, asynchronous parallelism(Isabelle2009-2)