From Archieve of Isabelle Proofs if one wants to test AVL Tree, how to go about it?
Proof is there and gets approved by Isabelle Ide as well but what to test and how?
Related
I'm trying to get an overview on the Isabelle Project and everywhere I look new Isabelle/sth's are mentioned.
How do all of them relate to each other?
I'll try to go first:
Isabelle/? - The Isabelle Language itself
Isabelle/Isar - Language used to write proofs in
Isabelle/Pure - ?
Isabelle/HOL - Toolkit for a higher-order logic proving environment
Isabelle/jEdit - Isabelle IDE
Isabelle/Scalar - ?
Isabelle/PIDE - ?
I would not really say that Isabelle is a language; it's more the entire system.
Isabelle/Isar is indeed the language to write structured proofs. Isabelle had actually been around for over 10 years before Isar was developed (it was Makarius Wenzel's PhD thesis in 2002).
Isabelle/Pure is the most basic logic in Isabelle, the one that is implemented in its kernel. It is a simply-typed intuitionistic higher-order logic that only knows about functions, propositions (the prop type), universal quantification, and implication. All the other logics are axiomatised on top of this (Pure serves as a metalogic).
Isabelle/HOL is an axiomatisation of classical simply-typed higher-order logic on top of this. The prop type is mostly hidden from the user; instead you usually work with bool (there is an injection Trueprop : bool ⇒ prop)
Isabelle/jEdit is indeed the IDE that is typically used for Isabelle these days. It consists of the jEdit editor with a lot of Isabelle-specific extras.
Isabelle/ML is the ML (as in, the ML programming language) environment that Isabelle uses. These days this is Poly/ML, but with a custom library and some additions like antiquotations (a kind of macro system).
Isabelle/Scala is the part of Isabelle that is written in Scala. This handles the "plumbing" in the background such as building sessions in batch, communicating with Isabelle/jEdit, etc. whereas Isabelle/ML is where all the logic happens (manipulation of terms and theorems etc.)
Isabelle/PIDE is the ‘Isabelle Prover IDE framework’. I honestly don't really know what it actually does, but as far as I am aware it is a kind of protocol that is used by the Isabelle/ML process to communicate with e.g. IDEs such as Isabelle/jEdit and VSCode, i.e. it enables interactive use of Isabelle (as opposed to batch use with isabelle build). This includes things such as giving Isabelle a bit of code to process, or telling it that some code has been deleted and should be undone, and displaying information such as type information, error messages, which parts of the theory have already been processed etc.
I am trying to understand the use of Isabelle/HOL theory. I have written and saved a theory file:
theory MonoidalLogic
imports sequents
begin
consts
Test :: "test"
axiomatization where
identity "φ⊢φ" and
cut "φ⊢ψ;ψ⊢ρ⟹φ⊢ρ"
l "φ⊢⊤⨂ψ⟺φ⊢ψ"
r "φ⊢ψ⨂⊤⟺φ⊢ψ"
end
Now I would like to get some feedback about this theory - is it accepted by Isabelle, somehow compile it - how can I do this? And after this - I would like to use this theory - e.g. write some lemma and invoke interactive proof session for this. How can I do this? I can enter theory in jEdit dialog but I am not receiving any feedback. I don't understand how should I close this theory file and start interactive session from which I can use this theory file?
As far as I understand, then I should:
write initial theory file;
invoke interactive session where I can find proofs of some lemmas for this theory
If I have managed to find proofs of lemmas then I can add those lemmas in my theory file for further immediate use in other proofs (no need for repeated proof of them).
I am reading Concrete Semantics, LNCS tutorials and other tutorials but I don't see the example of this basic workflow - how to do this workflow and whether I understand it correctly.
My intention is to take this logic http://www.sciencedirect.com/science/article/pii/S1570868314000573 and create theorem prover for this logic in Isabelle/HOL, i.e. automate this logic as an object logic in Isabelle.
As I understand - the main jEdit window is for editing thy - theory files. So - I should seek some console (additional window) in which I can run lemmas, lemma proof commands against this theory?
I can enter theory in jEdit dialog but I am not receiving any feedback.
This sounds like you may not have a working Isabelle installation. In a working installation, any file with the extension .thy gets checked in Isabelle/jEdit. For example, errors are highlighted in red, you'll see prover output in the "Output" and "State" panels, and you can Ctrl-click on entities to jump to their definition.
So - I should seek some console (additional window) in which I can run lemmas, lemma proof commands against this theory?
You don't have to, but you can. In the system manual, it is described how to run a "batch build" of a set of theories (in Isabelle jargon: "a session"). In the simplest case, that boils down to running isabelle mkroot followed by isabelle build with the appropriate flags. See §3.2 in that manual for a self-contained example.
And after this - I would like to use this theory - e.g. write some lemma and invoke interactive proof session for this.
In the same Isabelle/jEdit window, you can create a new theory file, give it a name, and import your theory as follows:
theory Test
imports MonoidalLogic
begin
Make sure you save your theory (.thy) file in one of the folders that jEdit has in its path. I believe using the $ISABELLE_HOME_USER as the root for your files is best; you can find it under Favourites within the File Save pop-up window. That solved my similar issue.
i do not have example, but i googled some people can
use Isabelle to search lemma and discover new lemma with Isabelle
do not know where give hints to discover or search next lemma after current lemma proved automatically
can you give examples that how to discover lemmas?
For searching lemmas, find_theorems is usually what you would use, but that will only finds existing lemmas, either in your theory, or in the theories that you import, including the standard libraries.
Isabelle does not invent genuinely new lemmas for you.
Johansson et al. have recently presented a system for theory exploration, that is, coming up with lemmas based on your definitions. You can find their implementation on GitHub and the paper on arXiv. In the paper, you will also find a lot of examples. The only drawback is that, as far as I can tell, their implementation only works with Isabelle2013-2.
Johansson, Moa, et al. "Hipster: Integrating Theory Exploration in a Proof Assistant." Intelligent Computer Mathematics. Springer International Publishing, 2014. 108-122.
I have looked into the Isabelle tutorial which presents an example of it's use in verifying security protocol. However, it is a bit out of my understanding as I only know the basics. I'm looking for some examples which are not just simple theorems but practical applications using Isabelle/HOL.
For example proving some algorithms or may be verifying properties system or some non-trivial mathematical theorem. Are such examples available anywhere ?
I have looked into the list of all applications provided in the isabelle official page but most of them are proofs of theorems.
I am also looking at an example of a file system verification using Alloy. It provides a proof where the properties of file/directories can be verified. I'm looking for something similar to it.
A few highly non-trivial examples I can think of right now are:
seL4, an entire operating system kernel written in C that was verified with Isabelle.
The AFP entry Jinja_Threads contains, as far as I know, a fully formalised bytecode compiler for a Java-like language with arrays and threads.
Jeremy Avigad's proof of the Prime Number Theorem.
The proof of Kepler's conjecture. A part of this was done in Isabelle; most of it, however, was done in the more ‘basic’ theorem prover HOL Light, whose logic is similar to Isabelle.
As Joachim mentioned, I am sure you can find more interesting applications in the AFP
I've recently started working with Isabelle and I've been trying to explore different parts of it. Is it possible to prove an integration possible in Isabelle? Such as the integrating x between [0,1], dx. If possible, please could you direct me to the relevant Isabelle .thy file, or even a brief tutorial.
I've tried looking around but no success.
Thank you.
There is also IntervalIntegral.thy from https://github.com/avigad/isabelle/blob/master/Analysis/Interval_Integral.thy. This has the advantage of a rich measure-theoretic background and will be merged into Isabelle's measure theory library soon. If you want to prove that the integral from somewhere to somewhere equals some term, you usually use the fundamental theorem of calculus (interval_integral_FTC_finite) to prove that you have an indefinite integral and then use that to compute the definite integral. Integration by substitution is also available, e.g. interval_integral_substitution_finite.
The relevant theories are in HOL-Multivariate_Analysis, in particular theory Integration and following.
Disclaimer: I have not worked with these definition at all, just know about their existence.