how to discover new lemma or guess or search the next lemma which want to be proved in Isabelle - 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.

Related

Isabelle proof of correctness for Raft / Paxos algorithm

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

How can I recover the Pure lambda expression associated with a proof in Isabelle?

When constructing a proof in Isabelle/HOL we are actually constructing a lambda expression that has a type corresponding to the theory we are trying to proof.
Is there anyway to see the raw lambda expression that corresponds to a proved theorem?
I get the feeling you're coming from the world of dependently-typed systems like Coq or Lean. Isabelle is an LCF-style prover, which works quite differently. No information on the proof steps is recorded for performance reasons – the soundness of the system is instead ensured by having a comparatively small and simple kernel that all other code must go through in order to produce theorems.
There is, however, an option to let the Isabelle kernel record ‘proof terms’, which are probably more or less what you are looking for. Look at the HOL-Proofs session in the Isabelle distribution and the following paper:
Proof terms for simply typed higher order logic
(freely accessible version, slides)
However, this is a feature that is almost never used and the suffers from poor performance of anything except very small examples.
There are several reasons for this and I am not an expert, so take this with a grain of salt: my impression is that the reason is that 1. this feature has never been considered very important so far and is therefore not fully optimised, and 2. proofs in Isabelle tend to use lots of automation, and the proof terms resulting from such automatic procedures are often needlessly blown up and ugly.
Another issue might be (careful, I might be completely mistaken here) that systems like Coq and Lean have the concept of definitional equality and apply such equations implicitly without recording their application in the proof term at all. Isabelle/HOL, on the other hand, has no such thing (all equalities are the same) and one must therefore be recorded explicitly.
However, there has recently been some new interest in this matter and people are actively working on improving the performance and usability of Isabelle's proof terms. So hopefully the situation will be a bit better in a few years!

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

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

Integration in Isabelle

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.

Resources