User:Boris Tsirelson/Sandbox1: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Boris Tsirelson
imported>Boris Tsirelson
Line 39: Line 39:
We start a new theory "CauchysMeanTheorem". (The well-know [[Algebraic-geometric mean inequality|Cauchy's Mean Theorem]] says that the geometric mean is less than, or equal to, the arithmetic mean, for every finite collection of positive numbers. However, this theorem will appear much later, near the end of the source text.) The existing theory "Complex_Main" is a prerequisite. (It contains main facts about real and complex numbers; only real numbers are relevant, but there is no "Real_Main" file in the library of ''Isabelle.'')
We start a new theory "CauchysMeanTheorem". (The well-know [[Algebraic-geometric mean inequality|Cauchy's Mean Theorem]] says that the geometric mean is less than, or equal to, the arithmetic mean, for every finite collection of positive numbers. However, this theorem will appear much later, near the end of the source text.) The existing theory "Complex_Main" is a prerequisite. (It contains main facts about real and complex numbers; only real numbers are relevant, but there is no "Real_Main" file in the library of ''Isabelle.'')


Clicking the red button "<math>\triangleright</math>" we send the first portion of the text to ''Isabelle.'' After two more such clicks ''Isabelle'' reads "Complex_Main". After 9 more clicks we come to the screen shown on Fig. 3. The definitions (and everything before them) are already processed by ''Isabelle''; accordingly, they turn into blue, and become read-only. The formulation of the first lemma is being processed by ''Isabelle''; accordingly, it turns into orange. A fraction of a second later we get Fig. 4. The formulation of the lemma is read by ''Isabelle''; a dialog about its proof starts on the bottom window.
Clicking the red button "<math>\triangleright</math>" we send the first portion of the text to ''Isabelle.'' After two more such clicks ''Isabelle'' reads "Complex_Main", since it is a prerequisite to "CauchysMeanTheorem", but also "???", since it appears to be a prerequisite to "Complex_Main", and so on, until all prerequisites are done. After 9 more clicks we come to the screen shown on Fig. 3. The definitions (and everything before them) are already processed by ''Isabelle''; accordingly, they turn into blue, and become read-only. The formulation of the first lemma is being processed by ''Isabelle''; accordingly, it turns into orange. A fraction of a second later we get Fig. 4. The formulation of the lemma is read by ''Isabelle''; a dialog about its proof starts on the bottom window.


{| align=center
{| align=center

Revision as of 05:34, 11 August 2010

For a mathematical theory, correctness means formalizability. "In practice, the mathematician ... is content to bring the exposition to a point where his experience and mathematical flair tell him that translation into formal language would be no more than an exercise of patience (though doubtless a very tedious one)."[1] Reliability of these experience and flair appears to be high but not perfect. Formalization is especially desirable in complicated cases, but feasible only in very simple cases, unless computers help. (Similarly, without computers a programmer is able to debug only very simple programs.)

A proof assistant is a computer program used interactively for developing human-readable reliable mathematical documents in a formal language. (It is not the same as a non-interactive, fully automated theorem prover.)

Nowadays (about 2010) the most successful project of this class combines

  • Isabelle, a generic system for implementing logical formalisms;
  • Isar (Intelligible SemiAutomated Reasoning), a versatile language environment for structured formal proofs;
  • Proof General, a configurable user interface (front-end) for proof assistants;
  • HOL (Higher-Order Logic).

This combination is meant below (unless otherwise stated explicitly), and called just Isabelle (rather than Isabelle/Isar/HOL/Proof General).

Top 100 theorems in Isabelle + Formalizing 100 Theorems + Isabelle + Download and installation + Projects + The Isabelle2009-2 Library + IsarMathLib: A library of formalized mathematics for Isabelle/ZF

Example session

First impressions

An existing file, verified before, is used as the source text in this example. Thus, the session is not really interactive. However, this fact is not known to Isabelle. The proof assistant treats the session as interactive, and the text as new.

We start Proof General (Fig. 1) and enter the source text (Fig. 2).

(CC) Image: Boris Tsirelson
Fig. 1: Proof General welcome
(CC) Image: Boris Tsirelson
Fig. 2: Source text entered

On this stage Proof General does not send the text to Isabelle; we still can edit the text. Proof General helps us by automatic colorization according to the syntax of the Isar language.

We start a new theory "CauchysMeanTheorem". (The well-know Cauchy's Mean Theorem says that the geometric mean is less than, or equal to, the arithmetic mean, for every finite collection of positive numbers. However, this theorem will appear much later, near the end of the source text.) The existing theory "Complex_Main" is a prerequisite. (It contains main facts about real and complex numbers; only real numbers are relevant, but there is no "Real_Main" file in the library of Isabelle.)

Clicking the red button "" we send the first portion of the text to Isabelle. After two more such clicks Isabelle reads "Complex_Main", since it is a prerequisite to "CauchysMeanTheorem", but also "???", since it appears to be a prerequisite to "Complex_Main", and so on, until all prerequisites are done. After 9 more clicks we come to the screen shown on Fig. 3. The definitions (and everything before them) are already processed by Isabelle; accordingly, they turn into blue, and become read-only. The formulation of the first lemma is being processed by Isabelle; accordingly, it turns into orange. A fraction of a second later we get Fig. 4. The formulation of the lemma is read by Isabelle; a dialog about its proof starts on the bottom window.

(CC) Image: Boris Tsirelson
Fig. 3: Definitions are done; now reading the lemma.
(CC) Image: Boris Tsirelson
Fig. 4: The proof mode started.

A robot as a student

More


(CC) Image: Boris Tsirelson
Definitions are processed; the formulation of the first lemma is being processed.


Definitions are processed; the formulation of the first lemma is being processed.

(CC) Image: Boris Tsirelson
The formulation of the first lemma is processed; the goal is pending.

The formulation of the first lemma is processed; the goal is pending.

(CC) Image: Boris Tsirelson
At last, a really serious lemma.
(CC) Image: Boris Tsirelson
The goal.
(CC) Image: Boris Tsirelson
"We have", why?
(CC) Image: Boris Tsirelson
Here is why!
(CC) Image: Boris Tsirelson
Really complicated arguments...
(CC) Image: Boris Tsirelson
Happy end is coming.
(CC) Image: Boris Tsirelson
The theorem is proved.
(CC) Image: Boris Tsirelson
Some options of the Proof General.
(CC) Image: Boris Tsirelson
Isabelle, show us your methods...
(CC) Image: Boris Tsirelson
...and your term bindings...
(CC) Image: Boris Tsirelson
...and the theorems.

Notes

  1. Bourbaki 1968, page 8.

References

Bourbaki, Nicolas (1968), Elements of mathematics: Theory of sets, Hermann (original), Addison-Wesley (translation).