isabelle tutorialwolff/tutorials/2014-lri... · what is isabelle as a system ? ! document...
TRANSCRIPT
![Page 1: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/1.jpg)
Isabelle Tutorial:System, HOL and Proofs
Burkhart Wolff, Makarius Wenzel Université Paris-Sud
![Page 2: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/2.jpg)
What we will talk about
![Page 3: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/3.jpg)
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”)
![Page 4: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/4.jpg)
The Isabelle
System Framework
![Page 5: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/5.jpg)
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
![Page 6: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/6.jpg)
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
.
.
.
![Page 7: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/7.jpg)
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
![Page 8: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/8.jpg)
Isabelle Architecture • In detail:
kernel PO
decisionprocedures
...
datatypes...
PIDE jEditScala System Interface
...
multi-core PolySML
C1 C2 C3 C4
.
.
.
on the kernel layer
![Page 9: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/9.jpg)
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
![Page 10: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/10.jpg)
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
![Page 11: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/11.jpg)
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
![Page 12: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/12.jpg)
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)
![Page 13: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/13.jpg)
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
![Page 14: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/14.jpg)
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:
![Page 15: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/15.jpg)
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
![Page 16: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/16.jpg)
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 !!!
![Page 17: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/17.jpg)
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.
![Page 18: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/18.jpg)
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
![Page 19: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/19.jpg)
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
![Page 20: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/20.jpg)
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
![Page 21: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/21.jpg)
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 !!
![Page 22: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/22.jpg)
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,
![Page 23: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/23.jpg)
Demo I
![Page 24: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/24.jpg)
Demo I
Main (Editing)Panel
![Page 25: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/25.jpg)
Demo I
OutputPanel
![Page 26: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/26.jpg)
Demo I
Sidekick Panel/[Documentation Panel |Theories Panel]
![Page 27: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/27.jpg)
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)
![Page 28: Isabelle Tutorialwolff/tutorials/2014-LRI... · What is Isabelle as a System ? ! Document “positions” were evaluated to an implicit state, the theory context T Θ 3 Θ 0 Θ 3](https://reader034.vdocuments.net/reader034/viewer/2022042812/5faffe7df579fe261d59e34b/html5/thumbnails/28.jpg)
Parallel Nano-Kernel LCF-Archi-tecture
in the
jEdit - GUI(PIDE)
fine-grained, asynchronous parallelism(Isabelle2009-2)