9 research outputs found
A proof of GMP square root using the Coq assistant
We present a formal proof (at the implementation level) of an efficient algorithm proposed in to compute square roots of arbitrarily large integers. This program, which is part of the GNU Multiple Precision Arithmetic Library (GMP), is completely proven within the system. Proofs are developed using the Correctness tool to deal with imperative features of the program. The formalization is rather large (more than 13000 lines) and requires some advanced techniques for proof management and reuse
Formal study of plane Delaunay triangulation
This article presents the formal proof of correctness for a plane Delaunay
triangulation algorithm. It consists in repeating a sequence of edge flippings
from an initial triangulation until the Delaunay property is achieved. To
describe triangulations, we rely on a combinatorial hypermap specification
framework we have been developing for years. We embed hypermaps in the plane by
attaching coordinates to elements in a consistent way. We then describe what
are legal and illegal Delaunay edges and a flipping operation which we show
preserves hypermap, triangulation, and embedding invariants. To prove the
termination of the algorithm, we use a generic approach expressing that any
non-cyclic relation is well-founded when working on a finite set
Formal verification of exact computations using Newton's method
International audienceWe are interested in the certification of Newton's method. We use a formalization of the convergence and stability of the method done with the axiomatic real numbers of Coq's Standard Library in order to validate the computation with Newton's method done with a library of exact real arithmetic based on co-inductive streams. The contribution of this work is twofold. Firstly, based on Newton's method, we design and prove correct an algorithm on streams for computing the root of a real function in a lazy manner. Secondly, we prove that rounding at each step in Newton's method still yields a convergent process with an accurate correlation between the precision of the input and that of the result. An algorithm including rounding turns out to be much more efficient
Vérification formelle d'extractions de racines entières
http://tsi.revuesonline.com/acceuil.jspNous décrivons la vérification formelle d'algorithmes de calcul de racines carrées, cubiques et énièmes dans un cadre fonctionnel. Nous montrons que les premiers algorithmes se décrivent bien en utilisant la représentation binaire des entiers, qui permet en outre d'assurer la terminaison de ces algorithmes. La même structure est sous-jacente à l'algorithme de racines énièmes, mais la terminaison de l'algorithme est vérifiée en utilisant des outils plus complexes. Le travail de vérification formelle a été effectué en utilisant le système Coq
Décimales distantes de : Preuves formelles de certains algorithmes pour les calculer et des garanties d'exactitude
International audienceWe describe how to compute very far decimals of and how to provide formal guarantees that the decimals we compute are correct. In particular, we report on an experiment where 1 million decimals of and the billionth hexadecimal (without the preceding ones) have been computed in a formally verified way. Three methods have been studied, the first one relying on a spigot formula to obtain at a reasonable cost only one distant digit (more precisely a hexadecimal digit, because the numeration basis is 16) and the other two relying on arithmetic-geometric means. All proofs and computations can be made inside the Coq system. We detail the new formalized material that was necessary for this achievement and the techniques employed to guarantee the accuracy of the computed digits, in spite of the necessity to work with fixed precision numerical computation
Practical implementation of a dependently typed functional programming language
Types express a program's meaning, and checking types ensures that a program has the intended meaning. In a dependently typed programming language types are predicated on values, leading to the possibility of expressing invariants of a program's behaviour in its type. Dependent types allow us to give more detailed meanings to programs, and hence be more confident of their correctness. This thesis considers the practical implementation of a dependently typed programming language, using the Epigram notation defined by McBride and McKinna. Epigram is a high level notation for dependently typed functional programming elaborating to a core type theory based on Lu๙s UTT, using Dybjer's inductive families and elimination rules to implement pattern matching. This gives us a rich framework for reasoning about programs. However, a naive implementation introduces several run-time overheads since the type system blurs the distinction between types and values; these overheads include the duplication of values, and the storage of redundant information and explicit proofs. A practical implementation of any programming language should be as efficient as possible; in this thesis we see how the apparent efficiency problems of dependently typed programming can be overcome and that in many cases the richer type information allows us to apply optimisations which are not directly available in traditional languages. I introduce three storage optimisations on inductive families; forcing, detagging and collapsing. I further introduce a compilation scheme from the core type theory to G-machine code, including a pattern matching compiler for elimination rules and a compilation scheme for efficient run-time implementation of Peano's natural numbers. We also see some low level optimisations for removal of identity functions, unused arguments and impossible case branches. As a result, we see that a dependent type theory is an effective base on which to build a feasible programming language
Intuition in formal proof : a novel framework for combining mathematical tools
This doctoral thesis addresses one major difficulty in formal proof: removing obstructions
to intuition which hamper the proof endeavour. We investigate this in the context
of formally verifying geometric algorithms using the theorem prover Isabelle, by first
proving the Graham’s Scan algorithm for finding convex hulls, then using the challenges
we encountered as motivations for the design of a general, modular framework
for combining mathematical tools.
We introduce our integration framework — the Prover’s Palette, describing in detail
the guiding principles from software engineering and the key differentiator of our
approach — emphasising the role of the user. Two integrations are described, using
the framework to extend Eclipse Proof General so that the computer algebra systems
QEPCAD and Maple are directly available in an Isabelle proof context, capable of running
either fully automated or with user customisation. The versatility of the approach
is illustrated by showing a variety of ways that these tools can be used to streamline the
theorem proving process, enriching the user’s intuition rather than disrupting it. The
usefulness of our approach is then demonstrated through the formal verification of an
algorithm for computing Delaunay triangulations in the Prover’s Palette
A Proof of GMP Square Root
Special Issue on Automating and Mechanising Mathematics: In honour of N.G. de Bruijn. Article dans revue scientifique avec comité de lecture. internationale.International audienceWe present a formal proof (at the implementation level) of an efficient algorithm proposed by Paul Zimmermann \cite{Zimmermann2000} to compute square roots of arbitrary large integers. This program, which is part of the GNU Multiple Precision Arithmetic Library (GMP) is completely proven within the Coq system. Proofs are developed using the Correctness tool to deal with imperative features of the program. The formalization is rather large (more than 13000 lines) and requires some advanced techniques for proof management and reuse