Sindbad~EG File Manager
<div id="pageName0">
<div align="justify">
<h2>Proof Checking Euclid</h2>
<h3> Joint work with Julien Narboux and Freek Wiedijk</h3>
<p>We used computer proof-checking methods to verify the
correctness of our proofs of the propositions in Euclid Book I.
We used axioms as close as possible to those of Euclid, in a language
closely related to that used in Tarski's formal geometry. We used
proofs as close as possible to those given by Euclid, but filling
Euclid's gaps and correcting errors. Euclid Book I has 48 propositions;
we proved 213 theorems. The extras were partly ``Book Zero'', preliminaries
of a very fundamental nature, partly propositions that
Euclid omitted but were used implicitly, partly advanced theorems that
we found necessary to fill Euclid's gaps, and partly just variants of Euclid's
propositions. We wrote these proofs in a simple fragment of first-order logic
corresponding to Euclid's logic, debugged them using a custom software tool, and
then checked them in the well-known and trusted proof checkers
HOL Light and Coq.</p>
<p> This web page provides (below) links to all the files needed to reproduce this work.
The paper that describes the work can be found here: </p>
<p><a href= "http://www.michaelbeeson.com/research/papers/ProofCheckingEuclid.pdf">Proof-checking Euclid</a></p>
<p>Persons wishing to download the files necessary to reproduce our work may download them
all at once in the following archive:
<p><a href= "http://www.michaelbeeson.com/research/CheckEuclid/proofs.tar.gz">proofs.tar.gz</a></p>
The steps to reproduce our work are as follows:
<p> (1) Unpack the archive mentioned above into a directory <pre>CheckEuclid</pre> (or another name of your choice). The subdirectory <code>proofs</code> contains .prf files. These are the formal proofs we wrote by hand. In the directory <code>CheckEuclid</code> are auxiliary files needed to check the proofs in HOL Light.
<p> (2) Ensure that PHP is installed on your system, then
run <pre> ./Checkproofs.php </pre> from directory <code>CheckEuclid/proofs</code>.
This runs our custom proof-checker, or proof debugger, on all the proofs. That one PHP file
contains all the source code for our custom proof-checker. </p>
<p> (3) Ensure the HOL Light is running on your system.</p>
<p> (4) Start HOL Light and load the files <pre>proofs.ml</pre> and <pre>michael.ml</pre>. That will check all the proofs in HOL Light. It will take several minutes, but you will get a lot of reassuring output as it runs.
</p>
<p> (5) The file <code>proofs.ml</code> contains code designed to process HOL Light versions of our proofs. Those HOL Light versions are in <code>michael.ml</code>. That file was generated automatically from the proof files and the file <pre>Axioms.php</pre> that contains the list of our axioms for Euclid and the list of proofs to be checked. If you wish to regenerate <code>michael.ml</code>>, the procedure is as follows, starting from the <code>CheckEuclid</code> directory.
<pre>
cd proofs
../FreekFiles.php
cd ..
./FreekFiles.pl
</pre>
</p>
<p> (6) The script CoqExport.php has already been run to produce the .v files. Those are included in GeoCoq 2.4.0 library. GeoCoq 2.4.0 compiles at least with Coq versions 8.6.1, 8.7.2 and 8.8. See instructions given <a href="http://geocoq.github.io/GeoCoq/">here</a>.
<ul>
<li><a href="https://github.com/GeoCoq/GeoCoq/blob/master/Axioms/euclidean_axioms.v">The Coq version of Euclidean axioms</a></li>
<li><a href="https://github.com/GeoCoq/GeoCoq/blob/master/Elements/OriginalProofs/euclidean_tactics.v">Some adhoc tactics</a></li>
<li><a href="https://github.com/GeoCoq/GeoCoq/tree/master/Elements/OriginalProofs">Book 1</a></li>
<li><a href="https://github.com/GeoCoq/GeoCoq/blob/master/Meta_theory/Models/tarski_to_euclid.v">Going from Tarski's axiom to Euclid's axioms</a></li>
<li><a href="https://github.com/GeoCoq/GeoCoq/blob/master/Meta_theory/Models/euclid_to_tarski.v">Going from Euclid's axioms to Tarski's axioms</a></li>
</ul>
<p> (7) We also used HOL Light to verify that our axioms hold in the usual Cartesian plane. That verification
required thousands of lines of HOL Light code. That code can be found in the following files. To run those
proofs, load the three files in order into HOL Light. They will take some minutes but eventually you will see
a list of the axioms of our theory, as objects of type thm in HOL Light.
<ul>
<li><a href= "http://www.michaelbeeson.com/research/CheckEuclid/ETAxioms.ml">ETAxioms.ml</a></li>
<li><a href= "http://www.michaelbeeson.com/research/CheckEuclid/ETAxioms2.ml">ETAxioms2.ml</a></li>
<li><a href= "http://www.michaelbeeson.com/research/CheckEuclid/EFAxioms.ml">EFAxioms.ml</a></li>
</ul>
</p>
<p> (8) There is also a subdirectory <code>dependencies</code> that is not used in our work. This contains automatically extracted information about what lines are used to deduce other lines in our proofs. This might be useful in the future.
</p>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists