Isabelle proof of correctness for Raft / Paxos algorithm - isabelle

Can Isabelle help to prove the correctness of the Raft or Paxos consensus algorithm? Is there a formal proof somewhere?

This entry in the Archive of Formal Proofs might be useful: https://www.isa-afp.org/entries/DiskPaxos.html

Isabelle/HOL (and similar theorem provers) are well-fit (and regularly used) for the verification of distributed protocols like Raft and Paxos.
Usually, the formalization will be about the systems model (messages or shared state, faults?), an inductive definition of the state space, a description of the temporal correctness properties and the relevant (inductive) invariants to prove the properties.
A tutorial video can be found here: https://www.youtube.com/watch?v=Uav5jWHNghY
As lsf37 has pointed out, there is a verification of Disk Paxos by
Jaskelioff and Merz in the Archive of Formal Proofs from 2005.
An Isabelle/HOL formalization of classic Paxos has been done by Küfner et al. in “Formal Verification of Distributed Algorithms: From Pseudo Code to Checked Proofs“ (2012, more details in Küfner's dissertation.)
Moreover, there is an Isabelle proof of the theoretical impossibility of consensus in the asynchronous setting with one faulty process (the so-called “FLP result”) by Bisping et al. from 2016.
For Raft, there is a Coq/Verdi formalization

Related

What is the automation support for theories other than HOL in Isabelle?

According to my scan of the Isabelle files, the Sledgehammer tool is only available for Isabelle/HOL. I'm curious about the automation of other theories in Isabelle. For instance:
Isabelle/ZF
Isabelle/FOL
Do they support:
automatic provers
SMT solvers
specialized decision procedures
Isabelle/ZF does not support SMT solvers or specialized decision procedures. As for "automatic provers" I am not sure if that counts but the method auto is quite capable. In some cases it allows to prove a theorem just referencing the premises and a list of several theorems, see for example theorem bij_base_open_homeo in IsarMathLib.

Isabelle/Pure Isabelle/HOL Isabell/Isar conceptual questions

I need to do a presentation on a paper which at some point makes use of Isabelle/Isar and Isabelle/HOL.
I tried researching online about Isabelle/HOL and Isabelle/Isar to be able to eplain the relations in one or two slides.
Here are the relations as I currently understand them:
Isabelle - provides a generic infrastructure for deductive systems
Based on Standard ML programming language
provides an IDE which allows you to write theories which can be later be proved.
Isabelle/Pure - minimal version of higher-order logic according to this link:
Is it an actual language that can be inputted into isabelle IDE?
Or is it a technical specification?
Isabelle/HOL(Higher Order Logic):
Is it a library or a language?
How does it relate to Isabelle/Pure?
Is it procedural in nature?
Do tactics only exist in Isabelle/HOL?
Is it LCF - Logical Commutable Functions?
Isabelle/Isar:
Structured proof language based on Isabelle/Pure
Declarative
Is it an extension of Isabelle/HOL as stated at here?
Do locales only exist in Isabelle/Isar?
What does the Isabelle/IDE supports by default?
Just feels like I'm getting conflicting information from different sources and would like to sort this out.
Thanks in advance
Edit - Check out this highly related question and Manuel Eberls answer here: What are all the isabelle/slashes?
As this is an answer to a homework question and I myself only have limited understanding of all parts of the Isabelle project, this answer merely tries to point you in the right direction for at some parts of your question.
From the Isabelle/ISAR reference manual:
The Isabelle system essentially provides a generic infrastructure for building deductive systems (programmed in Standard ML), with a special focus on interactive theorem proving in higher-order logics.
It continues to also introduce ISAR:
In contrast Isar provides an interpreted language environment of its own,
which has been specifically tailored for the needs of theory and proof development.
[...]
The main concern of Isar is the design of a human-readable structured proof
language
Let's try to connect Pure to all of this by looking at publications from Makarius Wenzel regarding the topic:
Thus Isar proof texts may be understood as structured compositions of formal entities of the Pure framework, namely propositions, facts, and goals
In colloquial terms, Pure is the semantic foundation. Isar is a language that "follows" this semantic and provides syntax for it. Isabelle is just (one of the) platforms it all runs on.
Some of your confusions around the distinction between Pure and Isar seem to stem from the fact that the Isabelle Pure source code defines, or at least seems to define, both the semantics (Pure) and the syntax (Isar) in one go:
(* The Pure theory, with definitions of Isar commands and some lemmas. *)
In my humble opinion, this might be related to your understanding of syntax, semantics and "implementations" of the two. "Pure" outside of computers or paper is just semantics and thus, like math, just a thing in our brains. Give it syntax and you can put it to paper or type it into a machine. For the machine to be able to process your text (since this is ultimately what we after), it needs an implementation. Some framework telling it how to read the syntax and how to then process it. This framework is Isabelle. On top of Isabelle, there is Isabelle/Pure, which defines the semantics (the processing) and Isabelle/Isar, which defines syntax. For practical reasons, Isabelle's Pure implementation already provides the Isar syntax in one go.
From all of this, you might be able to figure HOL out yourself!
Some more references:
The Isabelle/Isar Implementation

how to discover new lemma or guess or search the next lemma which want to be proved in Isabelle

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.

An example of pratical application of Isabelle/HOL

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

Theory of automata prerequisites

I'm interested in automata theory to improve my understanding of programming and compiler design (I would like to create some simple syntax's in my own projects , for example; L-Systems, AI, neural net structures and intelligent object-object conversation 'AI dialog') but there are things I need to learn before I go forward.
There are a lot of new symbols and mathematical concepts I need to learn before studying automata theory, I could not copy and paste examples because of the symbols and
I don't have the required reputation to post an image so hears a link to a wiki article.
Context-free grammar article on Wikipedia
Under the heading "Proper CFGs" you can see some definitions. I don't understand them.
Could someone please tell me what this notation is called so I can Google it. Any other pointers or information would also be helpful but just knowing a few key words will help. Also if anyone knows of a comprehensive resource that can be accessed for free e.g, an IIT Video lecture on the subject of that notation I would be eternally grateful as I
can't afford tutoring or even text books at this time.
The resource I'm using at the moment for automata theory(for anyone who is interested) is Theory of Automata IIT Lectures on YouTube.
The symbols ∀ and ∃ are logical quantifiers, respectively meaning "for all" and "there exists".
Typically you are first introduced to them in a discrete mathematics course, though they're a part of predicate logic (also known as first-order logic); in my particular university's CS program, Discrete Math is a pre-requisite for Logic for Computer Science, which in turn is a pre-requisite for Formal Languages and Automata.
The star * symbol in the term (V union Sigma)* there is studied in formal languages/automata theory itself: it is the Kleene star operator. Its input is an alphabet (a set of symbols), and it produces the set of all strings of zero or more symbols over that alphabet.
A useful tool for studying formal languages and automata is JFLAP.
This topic, at the level that you have referred to in your link, is really only for mathematicians or graduate-level theoretical computer science students. The symbols you are referring to are just symbolic logic. If you are really interested in automata theory, I would recommend trying to find resources that explore the topic from a conceptual level and avoid using complex logical statements. OR, if you really want to dive in, you can teach yourself symbolic logic, some set theory, probably some modern algebra, and then tackle automata theory from there.
I read many books on the subject of Languages and Automata, including the Dragon books on compilers (and the much more pragmatic Jack Crenshaw's Let's Write a Compiler), but none of it really clicked until I read the classic Finite and Infinite Machines by Marvin Minsky. Being an old book, it does not cover the latest research and developments in the field at all, but he explains the state-of-the-art for the 1960s in Automata, Neural Networks, Turing Machines, Functional Programming and Lambda Calculus, and the oft-neglected third wheel of String-Rewriting Systems. And the writing is exceptionally excellent and engaging. IIRC Minksy even co-authored a robot story with Isaac Asimov, so he has some serious writing credentials.
Like I say, this book will not bring you up-to-date in any of these fields, but it's the best book I've found for explaining everything from the ground up. And it would provide a very firm basis for reading anything more recent. This book is in the bibliography of every book published since.

Resources